Bharat Mediratta
98fd1e9957
Implement item::find_by_relative_url with tests.
2010-12-21 20:47:07 -08:00
Bharat Mediratta
d9299f3b3f
Change item::find_by_path() to check the relative_path_cache first,
...
and only fall back the name/level comparison if there's no cached
entry. Update tests accordingly.
2010-12-21 19:33:47 -08:00
Bharat Mediratta
2a08cbf76d
Return an empty Item_Model when item::find_by_path fails
2010-12-21 16:58:54 -08:00
Bharat Mediratta
f493130e59
Tighten up item::find_by_path slightly. Augment the tests to cover
...
special characters in the file name ("+" is an edge case differentiator
between rawurlencode and urlencode).
2010-12-21 16:55:01 -08:00
Bharat Mediratta
c7096cc9eb
Fix assertion order to be (expected,actual)
...
Change strinct concatenation to be variable interpolation to tighten it up.
2010-12-21 16:32:02 -08:00
Kriss Andsten
addd384bbd
Minor changes to satisfy the G3 code standards.
2010-12-22 08:22:25 +08:00
Kriss Andsten
48640005a4
Packaging + tests of Bharat's find_by_path routine.
2010-12-22 08:22:25 +08:00
Bharat Mediratta
cd48b89f31
Consolidate all the random code into a random helper that offers:
...
random::hash()
random::string()
random::percent()
random::int()
So that we don't have lots of different ways to get random values all
over the code. Follow-on to #1527 .
2010-12-15 14:57:00 -08:00
Bharat Mediratta
45c63f4d11
Use mt_rand() instead of rand() since it provides better portability.
...
Fixes #1527 .
2010-12-15 12:48:56 -08:00
Bharat Mediratta
0d424a635d
When we delete an item, make sure that we scrub it from any other
...
items that may have it in the album_cover_item_id column. Fixes ticket #1172 .
2010-07-03 14:25:33 -07:00
Tim Almdal
58b21e909d
Change the pattern used to convert the file name to a title. Fixes ticket#1061
2010-06-10 18:49:29 -07:00
Bharat Mediratta
9affa8ebbd
Pick a new album cover when the photo that's the current cover is
...
deleted. Fixes ticket #1083 .
2010-05-10 22:11:59 -07:00
Bharat Mediratta
c3c2b45280
Update the copyright to 2010. It's only 3 months into the year :-)
2010-03-03 10:15:34 -08:00
Bharat Mediratta
d4423eb349
Reset the active user to admin in all test cases where we change the
...
user to something else.
2010-02-23 13:50:57 -08:00
Bharat Mediratta
8a8d8b4bc4
Rename item name and slug if necessary to avoid a conflict when we
...
move photos. Fixes ticket #957 .
2010-02-09 15:49:43 -08:00
Bharat Mediratta
e1c0877646
Add unit tests for item::move() in preparation for renaming when there
...
are conflicts (see ticket #957 )
2010-02-09 08:53:27 -08:00
Bharat Mediratta
1e35cf28ee
Reload the album after adding the photo so that MPTT pointers are correct.
2010-01-21 08:29:30 -08:00
Bharat Mediratta
76da85a1a0
Extend Gallery_Unit_Test_Case instead of Unit_Test_Case.
2010-01-19 22:38:19 -08:00
Bharat Mediratta
2687762aec
Update for model validation. Move the url safe tests into Item_Model_Test.
2010-01-18 23:38:18 -08:00
Bharat Mediratta
1fd0e14359
Convert all DB where() calls to take 3 arguments.
...
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-26 12:09:04 -08:00
Tim Almdal
3c936d661a
Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class
2009-10-22 13:11:03 -07:00
Tim Almdal
78ee4193b7
Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form.
2009-10-16 10:06:58 -07:00
Tim Almdal
00eacd659f
Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module.
2009-10-16 08:53:31 -07:00
Bharat Mediratta
48becbe017
Update item::convert_filename_to_slug() to eliminate leading and
...
trailing hyphens.
2009-09-08 20:03:55 -07:00
Bharat Mediratta
2f666f4c52
Add item::validate_url_safe() with a test.
2009-09-07 20:07:37 -07:00
Bharat Mediratta
0d16cc1c10
Clean up the test and get it working.
2009-08-29 12:12:53 -07:00
Tim Almdal
38b2efc44c
Fix for 641... extend viewable functionality to comments. Viewable unit test is not working.
2009-08-29 11:43:10 -07:00