Commit Graph

4047 Commits

Author SHA1 Message Date
Bharat Mediratta
b42fcb9cda Use db::expr instead of "new Database_Expression". Resolves #1560. 2010-12-28 23:10:05 -08:00
Bharat Mediratta
9f3c6e4bee Update test to match change in Item_Model::as_restful_array made in
7e31f97b4c for #1536.
2010-12-28 22:00:25 -08:00
Bharat Mediratta
5d37d529b0 Update golden file to reflect the change in
c989981041 for #1520.
2010-12-28 21:56:31 -08:00
Bharat Mediratta
d0e78fc5cf Fix capitalization to be sentence case. 2010-12-26 23:06:09 -08:00
dmolavi
2d4d613318 Correct image block plurality, fixes 1506 2010-12-25 16:09:42 -05:00
Bharat Mediratta
11df9f204f Added Croatian as hr_HR. Fixes #1514. 2010-12-24 01:10:17 -08:00
Bharat Mediratta
b5ba61fc53 Create a way for controllers to exempty themselves from maintenance
mode and private gallery mode by setting the following constants in
the controller to true.

  ALLOW_MAINTENANCE_MODE
  ALLOW_PRIVATE_GALLERY

Fixes #1411 and the subsequent refactoring fixes #1551 as well.
2010-12-23 23:34:04 -08:00
Bharat Mediratta
2b83918efd Fix PHPDoc for composite(). 2010-12-23 23:16:30 -08:00
Bharat Mediratta
032e6fde5f Change MY_url::parse_url to use item::find_by_relative_url. 2010-12-21 20:47:14 -08:00
Bharat Mediratta
98fd1e9957 Implement item::find_by_relative_url with tests. 2010-12-21 20:47:07 -08:00
Bharat Mediratta
c5ede5881b Updated to use the new item::find_by_path() API. 2010-12-21 19:36:23 -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
612ddd7050 Warn admins after login if their PHP install has the
session.use_trans_sid feature enabled, since this will cause random
logouts.  Partial fix for #1316.
2010-12-18 11:55:04 -08:00
Bharat Mediratta
dbb9b8b1c8 Sort the Admin > Settings menu instead of relying on module activation order.
Requires making Menu::get() return a reference.  Fixes #1545.
2010-12-17 22:19:46 -08:00
Bharat Mediratta
e60edcdeba Include the root in the tree output. 2010-12-17 17:30:00 -08:00
Bharat Mediratta
b6c202d572 Swap the order of the CSS and JS for performance. Fixes #1540. 2010-12-16 22:18:04 -08:00
Bharat Mediratta
6e58fced20 Follow on to 16555935ee to clean up the
style a bit.  Tracked in #1539.
2010-12-16 21:01:51 -08:00
Kriss Andsten
16555935ee Fetch permissions for non-albumbs by parent rather than by item, allowing the result to be cached. 2010-12-17 12:50:51 +08:00
Bharat Mediratta
7eaf49a6ca Create a "tree" rest resource that can return the entire album tree in
a single fast request, among other operations.  Fixes #1538.
2010-12-16 20:38:01 -08:00
Bharat Mediratta
161a85d3f5 Enable profiling output in the HTML output for REST. Fixes #1535. 2010-12-16 20:37:44 -08:00
Bharat Mediratta
7e31f97b4c Improve Item_Model::as_restful_array() to take an array of fields so
that we only return the fields we care about.  This improves
performance when retrieving large numbers of items.  Fixes #1536.
2010-12-16 20:37:00 -08:00
Bharat Mediratta
53a2652fd6 Create url::merge_querystring() which merges a query string into an
existing url.  Fixes #1537.
2010-12-16 20:36:00 -08:00
Bharat Mediratta
8a5bbc896b Follow on to 1057436b7c -- cache the
users and groups as an array so that multiple calls will not call
ORM_Iterator->current() repeatedly.
2010-12-15 19:57:09 -08:00
Bharat Mediratta
1057436b7c Cache the result of User_Model::groups() and Group_Model::users() and
invalidate it on save/delete for efficiency.  Fixes #1529.
2010-12-15 16:28:18 -08:00
Bharat Mediratta
b9e11a6f93 Don't show the "can't find ffmpeg" message to non-admins. Fixes #1528. 2010-12-15 15:16:00 -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
6fb0eb4e97 Follow on to d2be26e407 to update the
unit tests to reflect the proper type filtering for #1503.
2010-12-15 12:24:31 -08:00
Bharat Mediratta
ff4c930338 Clean up golden file as a follow-on to
3c523bcac6 for #1499.
2010-12-15 12:08:56 -08:00
Bharat Mediratta
18470a6001 Clean up xss golden file as a follow-on to
945e79b171 for #1478.
2010-12-15 12:07:02 -08:00
Bharat Mediratta
f8890be62b Follow on to d2be26e407 to convert tabs to spaces. 2010-12-15 11:57:46 -08:00
Bharat Mediratta
a0b7d397dd Amend db00958cee by extending the system
user_agents.php instead of replacing it.  This lets us avoid having to
reformat the file to get File_Structure_Test to pass and will let us
take advantage of further improvements ot the Kohana version of the file.
Additional fix for #1436.
2010-12-15 11:44:29 -08:00
Bharat Mediratta
587284ab38 Move the test time limit code into Unit_Test since some parts of the
code (like ORM_MPTT) mess with the time limit which interferes with
the overall time limit set in Gallery_Unit_Test_Controller.
2010-12-15 11:17:22 -08:00
Bharat Mediratta
79740a2c77 Move photo/movie file extension validation into the model. Fixes #1524. 2010-12-14 21:19:25 -08:00
Bharat Mediratta
6c46382fd0 Ok, do a real fix for #1499 by creating version 3 of the image_block
module and creating the image_count variable if it wasn't already set.
2010-12-02 08:38:16 -08:00
Bharat Mediratta
c3ef892126 Duh, set the image_block.image_count variable in the installer! This
issue was introduced in cdf0f7f765 which
was a follow-on for 3c523bcac6 which
fixes #1499.
2010-12-02 08:32:59 -08:00
Bharat Mediratta
cdf0f7f765 In 3c523bcac6 (fix for #1499) I left out
the install() function which should set the image_block module to
version 2.  Fix that here.
2010-11-29 21:02:19 -08:00
Bharat Mediratta
a36c894c63 Fix g2_import::g2_url() to only replace the $g2_base_url once at the
beginning of the url string.  Also, only do this when we're about to
put it into the map, not when we're getting the g2 url else the url is
mangled for other purposes.  Fixes #1512.
2010-11-28 17:01:51 -08:00
Bharat Mediratta
5fb5d10e5a Delete the temporary "user" value from the session when upconverting
the admin account post-install.  Fixes #1511.
2010-11-28 12:18:08 -08:00
Bharat Mediratta
eb010554ff Replace self::func() with <helper_name>::func() for all public APIs
and constants to make overloading easier.  Fixes #1510.
2010-11-28 11:27:25 -08:00
Bharat Mediratta
76b6daefaa Clean up phpDoc on get() a little more 2010-11-27 20:42:53 -08:00
Bharat Mediratta
f91819441c Tighten up the phpDoc for get(). 2010-11-27 19:48:16 -08:00
Kriss Andsten
d2be26e407 Slightly more invasive version, but cleaner on the eyes. 2010-11-28 11:44:23 +08:00
Kriss Andsten
2ed83fcd95 Patch from ticket 1503, making rest/items behaviour consisten with rest/item behaviour. 2010-11-28 11:44:23 +08:00
Bharat Mediratta
554ca2e683 Take into account the core.url_suffix configuration setting when
parsing REST urls.  This fixes the problem that setting the url suffix
breaks REST.  Fixes #1500.
2010-11-22 22:01:11 -08:00