Joe7 and Bharat Mediratta
f364e8a96b
Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569
2011-01-03 11:38:21 -08:00
Joe7 and Bharat Mediratta
cfaa62370e
Reimplemented Kohana 2.3's View::set_global() with array support.
...
Allows for cleaner code and fewer function calls.
2011-01-03 11:38:13 -08:00
Bharat Mediratta
a8b0254e4a
Improve the solution for #1545 by sorting the settings menu properly
...
to be naturally ordered and case insensitive.
2010-12-29 17:31:28 -08:00
Joe7 and Bharat Mediratta
17700b805f
Coding style fixes: identation on line 48+removed trailing whitespaces, added spaces around =s
2010-12-28 23:14:04 -08:00
Joe7 and Bharat Mediratta
66fd8c7518
Using ON DUPLICATE KEY UPDATE instead of SELECT+UPDATE/INSERT style method (that does 2 trips to Database server and is less optimal).
...
exists() method is not needed anymore thus got removed
2010-12-28 23:14:04 -08:00
Joe7 and Bharat Mediratta
fda9250796
Added limit on select as for the outcome it doesn't matter if there are 20 rows or just 1. Is sufficient to return straight after reading 1 row.
2010-12-28 23:14:04 -08:00
Bharat Mediratta
b42fcb9cda
Use db::expr instead of "new Database_Expression". Resolves #1560 .
2010-12-28 23:10:05 -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
b6c202d572
Swap the order of the CSS and JS for performance. Fixes #1540 .
2010-12-16 22:18:04 -08:00
Bharat Mediratta
8d030cea64
Fix a bug where simultaneous deletes of the same item can result in it
...
deleting the first item row in the database. The root issue is a bug
in Kohana that's addressed in dca9b5f3fc
but in this change we deal with the fact that reloading an item can
result in an instance of the item that's unloaded. In those cases, we
should just ignore it and move on. Fixes #1489 .
2010-11-18 09:52:40 -08:00
Bharat Mediratta
df378fcca8
Don't wrap the action in url::site() -- form::open() will do that for us. Fixes #1417 .
2010-10-03 22:10:05 -07:00
Bharat Mediratta
fad1f05203
The Kohana folks removed the cache cleanup code back in
...
http://dev.kohanaframework.org/projects/kohana2/repository/revisions/4605
So now our cache entries don't expire. For now, do cache expiration
whenever we render Admin > Maintenance, since that's the type of place
that users will go when they want their cache to expire anyway.
2010-09-18 17:46:28 -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
883d8f1e23
Whitespace.
2010-09-06 15:06:37 -07:00
Tim Almdal
04f6646b06
Hopefully the third and final patch for #1216 . Set the default from and reply-to addresses to an empty string. The first time the user model is saved, set the sendmail from and reply-to addresses. Requires an update to gallery version 38.
2010-09-01 23:19:43 -07:00
Tim Almdal
e09c6dbd5e
Patch for ticket #1216 . Move the values that were in the sendmail config file and store them as gallery module variables. Requires a version number bump to 37.
2010-08-31 20:45:09 -07:00
Bharat Mediratta
ab598b2931
Put the theme CSS at the end of the module CSS so that the theme has
...
the final say. Fixes ticket #1315 .
2010-08-29 21:15:58 -07:00
Bharat Mediratta
2c717b18d3
Don't concatenate two strings together as an argument for t() or t2();
...
the l10n_scanner cannot parse it properly and drops those from the
localization list. Fixes ticket #1284 .
2010-08-29 20:04:02 -07:00
Bharat Mediratta
c6a28a93dd
Put up a warning and don't accept movie files if we don't have ffmpeg.
...
This fixes ticket #973 .
2010-08-21 15:11:06 -07:00
Bharat Mediratta
3c7dc6d7a6
Handle 404 exceptions specially to reduce spam in the log files. Fixes ticket #1228 .
2010-08-08 12:46:26 -07:00
Bharat Mediratta
1abf43d3f1
Add a max_level to _sanitize_for_dump() so that we don't blow the stack.
2010-08-07 22:06:57 -07:00
Bharat Mediratta
400c248e2d
default maintenance_mode from false -> 0 for consistency with the value we set in the db
2010-08-01 21:10:27 -07:00
Bharat Mediratta
c33b24c9fa
Make maintenance mode a variable instead of a config. Then create
...
links on the Admin > Maintenance page to allow you to turn it on and
off. This should be efficient since we cache all vars and look them
up on every request anyway.
This also allows us to have the Fix task enable maintenance mode while
it's running which greatly reduces the chances that somebody will come
along and hork the database while we're tinkering with MPTT pointers.
Fixes ticket #1259 .
2010-08-01 21:00:30 -07:00
Bharat Mediratta
ebbb73787d
Trap ORM_Validation_Exception specially and report which fields failed validation.
2010-07-29 19:37:38 -07:00
Bharat Mediratta
adeea49e0a
Catch any exceptions thrown when we try to restore the original
...
identity provider after we fail to set up a new one.
2010-07-21 11:43:51 -07:00
Bharat Mediratta
b7cd2f73c5
PHPDoc fix.
2010-07-10 15:18:54 -07:00
Bharat Mediratta
0a42d74d55
Reset the time limit to 30 seconds every time we delete a child. Fixes ticket #1199 .
2010-07-10 15:10:20 -07:00
Bharat Mediratta
41ca2b0195
Rework our exception framework to fit into Kohana's model better.
...
Instead of overwriting Kohana_Exception::handle() (which we were doing
in MY_Kohana_Exception) we instead use their existing template system.
gallery/views/kohana/error.php overrides system/views/kohana/error.php
and is the standard error template for all exceptions. Our version of
error.php figures out the appropriate view based on context (cli,
authenticated admin, guest viewing a 404, guest viewing a system
error) and delegates appropriately. Each delegated view has a narrow
responsibility.
This paves the way for us to add new error views per module. For
example, the rest module will define its own template in
Rest_Exception and then its exceptions can be rendered the way that it
wants (json encoded, in that case).
2010-06-19 14:07:32 -07:00
Bharat Mediratta
5736698b4b
single -> double quotes.
2010-06-19 10:51:05 -07:00
Bharat Mediratta
dceecabbf1
Make login/logout continuation url code consistent. Where necessary,
...
we specify the continue_url in the session, but we store it in the
login form so that we can propagate it across the session creation
that happens at login time.
2010-06-12 15:16:47 -07:00
Bharat Mediratta
1240878df0
Fix-ups for d98b85f7d3
...
- Pass the CSS selector of the active image in as an arg to site_menu
so that quick operations know what they're operating on.
- Change the ids from g-{photo,movie}-id to the generic g-item-id
- Initialize ajax handlers for site menu on the photo and movie page
- Drop the movie context menu, it's now in the site menu
2010-05-14 16:55:15 -07:00
Bharat Mediratta
c9edb943f9
Fix a bug introduced when we patched the "disallowed global data"
...
security check. Not sure why the patch worked for some and not for
others, but this should resolve it either way. Fixes ticket #1123 .
2010-04-10 17:01:48 -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
Andy Staudacher
a19b97f8d6
First step towards fixing ticket #1038 : Allowing for custom page <title> in admin pages, just like in non-admin pages.
...
TODO: Set $view->page_title in the many admin controllers we have. I just set it for admin_maintenance.php to show how it's intended to be used. I copied the title from views/admin_maintenance.html.php to the controller.
2010-02-28 13:35:58 -08:00
Andy Staudacher
d9707ae749
Fix for ticket #1036 - Don't echo any sensitive information such as passwords, hashes or personally identifiable information.
2010-02-27 02:37:39 -08:00
Andy Staudacher
1d8862d957
Fix for ticket #1034 : Fix db cache driver delete() call which was missed in a recent refactoring / fix.
2010-02-24 01:28:38 -08:00
Andy Staudacher
6afc5ccf5c
Fix translation cache for installations with 0 translations in the DB.
2010-02-23 10:02:27 -08:00
Andy Staudacher
95374070db
Merge commit 'upstream/master'
2010-02-22 00:00:25 -08:00
Andy Staudacher
334cd2368d
Performance improvement: Load all translations of a locale as one serialized array from the Cache.
...
Until now, we loaded hundreds of translation messages row by row, and unserializing one by one at bootstrap time. That amounted to a significant percentage of the complete request time. This approach is more than 10x faster.
2010-02-21 23:50:01 -08:00
Andy Staudacher
6591ea2577
Fix delete() function of DB based Cache driver. It expected a scalar key / tag value, but it was always an array of keys / tags.
...
(compare to system/libraries/Cache.php and the File.php driver)
2010-02-21 23:48:23 -08:00
Bharat Mediratta
9b7542b9f1
Add Menu::add_before()
2010-02-21 17:14:19 -08:00
Bharat Mediratta
d3e07f8a97
Revert "Fix for ticket #1017 : Handle the common case of t(html::clean($var)) by casting SafeString instances to string in translate()."
...
This reverts commit 4ca55a90ee .
2010-02-18 16:19:41 -08:00
Andy Staudacher and Bharat Mediratta
45910ffdc0
Improve setlocale() call, using some of G2's locale fallback code to match the platform's locale names.
2010-02-18 16:19:17 -08:00
Andy Staudacher
4ca55a90ee
Fix for ticket #1017 : Handle the common case of t(html::clean($var)) by casting SafeString instances to string in translate().
2010-02-16 23:54:39 -08:00
Andy Staudacher
30dcaaa236
Need to allow access to ::change_provider for CLI, to make packager work.
2010-02-14 18:33:10 -08:00
Andy Staudacher
74471df777
Minor security tightening of IdentityProvider::change_provider().
2010-02-14 16:12:18 -08:00
Andy Staudacher and Tim Almdal
2dad1d7cd1
Some HTML validation fixes (don't render empty <ul> lists, empty id attributes, use & not &)
2010-02-14 07:15:57 -08:00
Andy Staudacher
d53f6d0e05
Fix for tickets 1009 and 603: Show a themed error page to guests / registered users (not to admins though). And show a login form to guests for 404 (incl. insufficient view permissions) errors.
2010-02-12 16:40:44 -08:00
Bharat Mediratta
6dfab72922
Override Input::clean_input_keys() to sanitize malicious values out of
...
strings instead of dying. This at least gives us graceful degradation.
Fixes ticket #764 , patch thanks to djnz.
2010-02-08 15:37:11 -08:00
Tim Almdal
6783de2457
Remove the redundant reference to ["force_rtl".
2010-02-07 14:17:58 -08:00