Commit Graph
816 Commits
Author SHA1 Message Date
Bharat Mediratta e60edcdeba Include the root in the tree output. 2010-12-17 17:30:00 -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 AndstenandBharat Mediratta 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 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 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 f8890be62b Follow on to d2be26e407 to convert tabs to spaces. 2010-12-15 11:57:46 -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 AndstenandBharat Mediratta d2be26e407 Slightly more invasive version, but cleaner on the eyes. 2010-11-28 11:44:23 +08:00
Kriss AndstenandBharat Mediratta 2ed83fcd95 Patch from ticket 1503, making rest/items behaviour consisten with rest/item behaviour. 2010-11-28 11:44:23 +08:00
Bharat Mediratta 5f4ab7fd76 Shuffle up the way we figure out which image to rebuild next so that
multiple concurrent tasks actually work in parallel and don't stomp
on each other.  Fixes #1498.
2010-11-21 13:03:02 -08:00
Bharat Mediratta 12b77c7ef4 Move the sys_getloadavg() call into the template since that's what we're doing for other similar calls 2010-11-20 20:54:16 -08:00
Bharat Mediratta dd2b815ab2 Add Bengali (bn_BD). 2010-11-18 21:33:30 -08:00
Bharat Mediratta c1573d8ef2 Use sys_getloadavg() instead of reading /proc/loadavg. Fixes #1491. 2010-11-18 13:09:10 -08:00
Tim Almdal 86790d4464 Return the admin check as part of the block structure as opposed to printing
it directly to the output.  I had problems with the admin check messing up the
AJAX calls on the module update page.  And it went away after this fix.
2010-11-09 21:08:14 -08:00
Bharat Mediratta dae8354491 Updated item::random_query() PHPdoc to include example usage 2010-11-08 19:52:43 -08:00
Bharat Mediratta 853a3acc9b Implement module::clear_all_vars($module_name)
Also switch from using ORM to Database_Builder for the SQL because it's
cleaner, and clean up the test.  Fixes #1479.
2010-11-08 11:45:14 -08:00
Bharat Mediratta 359a081f15 Add Malay as 'Bahasa Melayu' 2010-11-07 22:08:20 -08:00
Bharat Mediratta 4dc451629c Allow access to the rest module when the gallery is wholly private. Fixes ticket #1452. 2010-10-24 17:03:40 -07:00
Bharat Mediratta 84731437a7 Identify robots and don't let them save sessions. 2010-10-09 16:24:58 -07:00
Bharat Mediratta 349071f501 Change version to "3.0+ (git)". 2010-10-07 22:16:18 -07:00
Bharat Mediratta 4b4a2f8d8d Set the version to 3.0 final (woot!). 2010-10-04 23:55:19 -07:00
Bharat Mediratta a153ca0829 Detect the case where there are no more broken images and skip to the end. Fixes #1414. 2010-10-02 17:04:37 -07:00
Bharat Mediratta 161bbb9ba3 Proxy the BasicAuth authentication header in htaccess_works() so that
if the entire Gallery is behind BasicAuth we share the same
credentials as the browser.  Fixes #1413.
2010-10-02 16:44:31 -07:00
Bharat Mediratta 62f1bb06a2 Set the User-Agent field to "Gallery3" by default. Fixes #1408. 2010-10-02 13:46:47 -07:00
Bharat Mediratta c0022dc3c3 Fix a bug in the way we set the mime type for protected image renders.
Also whitelist the digibug controller so that it's accessible when the
gallery is private, and don't expire old proxies right away since
Digibug may request the full size multiple times for different preview
operations.

Fixes ticket #1410.
2010-10-01 21:45:45 -07:00
Bharat Mediratta f84782d620 Stop caching all module variables in the vars table using the
name=_cache row.  If that overflows, it will cause us to be unable to
load variables, and we can't recover from that.

Instead, use the Cache table.  Bump the gallery module to v40.  Fixes
ticket #1405.
2010-09-29 20:47:43 -07:00
Bharat Mediratta ef8751468b Base64 encode the data result if the encoding param is set to "base64".
Fixes #1400.
2010-09-25 13:27:35 -07:00
Bharat Mediratta 790bf4e871 Prioritize using the value in graphics_toolkit_path over the standard
path so that if you change that value in Admin > Settings > Advanced
we prefer it over other paths (which may be restricted by
open_basedir).  Fixes #1395.
2010-09-22 21:35:49 -07:00
Bharat Mediratta 3e1743b21f Add a module variable containing extra paths to search for binaries.
Fixes ticket #1384.
2010-09-16 20:43:48 -07:00
Bharat Mediratta 5e316f78c6 Restrict viewing user profile pages to registered users only, but
provide a "show_user_profiles_to" setting to allow admins to open it
up to everybody (choices there are "registered_users", "admin_users"
or "everybody").  Fixes ticket #1378.
2010-09-16 15:17:00 -07:00
Bharat Mediratta 70f15c6662 Add ability to sort albums by name. Fixes ticket #1377. 2010-09-14 19:51:43 -07:00
Bharat Mediratta 1a0d76c43e When moving a single item, just copy its permissions from its parent
album.  This is totally legal since an items permissions must be the
same as its parent's, and it's much faster for large installs where
a complete recalculation can be very costly.  Should fix #1360.
2010-09-13 22:23:09 -07:00
Bharat Mediratta 19750cb0d5 When deleting items, choose the first *viewable* peer as the album
cover.  Normally, all items are equally viewable, but in our unit
tests we occasionally have the scenario where peers have different
viewability settings which is internally consistent although only
possible if you set the fields manually.
2010-09-13 22:02:19 -07:00
Bharat Mediratta b08bf26d2d Ignore the private gallery settings if we're in the cli SAPI. It
breaks the upgrader.  Fixes #1361, thanks to Romain LE DISEZ.
2010-09-12 14:34:49 -07:00
Bharat Mediratta a98841613a LOWER() the slug and name in the find_dupes functions since DISTINCT
is case sensitive, but our dupe validation is not.  Fixes ticket #1367.
2010-09-12 14:30:25 -07:00
Bharat Mediratta b4fb11f8d5 Only call $theme->item() if we're in a non admin theme. 2010-09-11 21:40:57 -07:00
Bharat Mediratta bfd92ac6f2 Use $theme->item() instead of $theme->item, otherwise
isset($theme->item) may return true even when we don't have an actual
Item_Model in there.
2010-09-11 21:38:46 -07:00
Bharat Mediratta cbb6967405 Detect out-of-date modules and put up a message for site admins.
Fixes ticket #1353.
2010-09-08 20:59:40 -07:00
Bharat Mediratta 391a90e3ce Detect when a module fails to upgrade properly and put up an
informative message to help the user know that she needs to get a
newer copy of the module.  Fixes ticket #1189.
2010-09-08 20:36:22 -07:00
Bharat Mediratta afeb3bb8c4 Fix typo. 2010-09-07 22:13:30 -07:00
Bharat Mediratta 00c1100d9d Add Macedonian. Fixes ticket #1345. 2010-09-07 21:30:53 -07:00
Bharat Mediratta fa1fe47b6a Use the absolute site url when logging out of the admin site else we
wind up with weird url doubling effects.  Fixes ticket #1342.
2010-09-06 22:13:41 -07:00
Bharat Mediratta 886b88fccf Revert "change the Setswana locale from tn_ZA to tn_BW since it's mostly"
This reverts commit 2d948cb39f.

Valiant said that tn_ZA is right:
http://gallery.menalto.com/node/97840#comment-352865
2010-09-06 18:49:37 -07:00
Bharat Mediratta 8a36c24f39 Fix some broken identity APIs:
- add_user_to_group and remove_user_from_group should take Group_Definition instances
  to be consistent
- add_user_to_group and remove_user_from_group in drivers/IdentityProvider.php should
  not be static
2010-09-06 18:20:46 -07:00
Bharat Mediratta 2d948cb39f change the Setswana locale from tn_ZA to tn_BW since it's mostly
Botswana anyway according to @sagemaniac in
http://gallery.menalto.com/node/97840
2010-09-06 14:05:48 -07:00