Commit Graph

396 Commits

Author SHA1 Message Date
Bharat Mediratta
f850bf75cf Fix a typo; swapped uninstalled and installed. 2009-05-20 01:18:14 +00:00
Bharat Mediratta
a0e0c48e47 Collate install/uninstall messages. Fixes ticket #288 2009-05-19 05:59:30 +00:00
Bharat Mediratta
13cc8bc706 verify csrf when installing/uninstalling modules 2009-05-18 04:21:02 +00:00
Bharat Mediratta
34d8b49aed Clean up tmp when packaging 2009-05-18 04:20:36 +00:00
Bharat Mediratta
930452aa6b Support renaming albums, photos and movies.
Fixes ticket #278.
2009-05-16 04:32:00 +00:00
Bharat Mediratta
9b0541a0ad Fix save() to stop using ORM objects. 2009-05-14 22:39:14 +00:00
Bharat Mediratta
5979836006 Change the way we update view_count to use math instead of ORM for better accuracy 2009-05-14 04:05:14 +00:00
Bharat Mediratta
627e83adc1 Cache variables in core._cache so that we can retrieve them all in a
single query.  In most cases, we were fetching 4-5 variables per page
load, so this is 2-3x faster.
2009-05-14 03:56:29 +00:00
Bharat Mediratta
3c78d482e5 Beautify only the title, not the filename 2009-05-14 00:06:45 +00:00
Bharat Mediratta
a149659f33 Fix a bad redirect. 2009-05-13 23:52:40 +00:00
Bharat Mediratta
d3103f6c5d Add a little JS sugar to set the album directory name to the same as
the album title.
2009-05-13 23:23:08 +00:00
Bharat Mediratta
ce4a8224d8 Allow admins to modify variables. This way when something goes wrong,
we can tell them what to do in the forums and we don't have to build
super smart admin UIs to help users with weird edge cases.

This plus r20789 is probably a good enough fix for #232.
2009-05-13 21:32:22 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
12380b8b39 Add the "advanced settings" controller which lets you see all the
vars.  We'll eventually turn this into a registry where you can edit
settings directly (at your own risk).
2009-05-13 19:48:57 +00:00
Bharat Mediratta
c52a231bc0 Create a new "add" permission and require it at the controller level
when adding photos/movies/albums
2009-05-13 18:03:50 +00:00
Bharat Mediratta
5c40669fd7 Unlink var/modules dir also when packaging 2009-05-13 18:02:57 +00:00
Bharat Mediratta
88afbeba07 Clean out old dirs before packaging. 2009-05-13 04:36:18 +00:00
Bharat Mediratta
ee4f9eaa00 Beautify the title of uploaded files. Convert underscores to spaces, collapse multiple spaces, drop the extension. Fixes ticket #237 2009-05-13 02:52:09 +00:00
Bharat Mediratta
238cb7ff6e Log the complete exception information for exceptions that happen in tasks so that we have some clue as to what went wrong 2009-05-13 01:21:09 +00:00
Bharat Mediratta
ea693af59b Fire off the module_change event whenever we install or uninstall a module 2009-05-12 23:43:45 +00:00
Tim Almdal
3969145a36 Move the thumb_proportion method into Theme_View and set it by default
if the page type is album.
Leave a todo if we ever set up a theme default API
2009-05-09 22:22:30 +00:00
Bharat Mediratta
cdc796aed4 Don't rely on the file to have an extension (or better: don't throw an
error if we can't find one-- just assume its a photo).
2009-05-08 19:32:51 +00:00
Bharat Mediratta
bf3282cb3c Don't do ORM::factory() lookups on non-ints (thanks Romain LE DISEZ) 2009-05-08 19:01:45 +00:00
Bharat Mediratta
2c61ad361e Remove some unnecessary blank lines. 2009-05-02 21:19:40 +00:00
Bharat Mediratta
b4c9a97050 Create item helper and move move_item(), remove_album_cover() and
make_album_cover() functions into it.
2009-05-02 20:34:02 +00:00
Bharat Mediratta
0fd82598b5 Move make_album_cover and remove_album_cover out of Item_Model and
into the core helper.  Clean up interactions so that when we remove an
album cover we pick a new one, or clean out the old album cover if
there are no other choices.
2009-05-02 20:14:13 +00:00
Tim Almdal
820cbdf1c3 Refactor the creation and removal of the album covers into
make_album_cover and remove_album_cover methods in Item_Model.
Usage: $photo->make_album_cover()  $album->remove_album_cover()
2009-04-29 15:57:29 +00:00
Tim Almdal
0d49773559 Reset the parent thumbnail in Item_Model::delete instead of where the
delete was happening.  This will insure that it is consistently done
for all deletes and we don't have to remember to replicate the code.
2009-04-29 00:40:59 +00:00
Tim Almdal
9176dadfd6 Move the module::event("before_item_delete") into the
Item_Model::delete method.  This will insure that it will get called
for all events.  Currently it is not being called for children of an
album when the parent album is deleted.
2009-04-29 00:29:53 +00:00
Bharat Mediratta
234aed87e6 auto install organize module 2009-04-28 21:07:03 +00:00
Bharat Mediratta
47f531fc9c Mark a task as stalled if it's > 15 seconds old (because tasks should ping back much faster than that) 2009-04-22 19:51:25 +00:00
Tim Almdal
f9ec5d6de4 Make the scaling based on the target thumbnail size that was specified
at thumbnail creation.  This will remove the upscaling effect
2009-04-22 14:05:16 +00:00
Chad Kieffer
b4bca043ac Added method to determine proportion of current thumb_size to the default, 150. Use this in the the default theme, or any other, to reduce the size of CSS widths and heights in albums, including .gItem. 2009-04-22 05:31:29 +00:00
Tim Almdal
1956a6ae95 Refactor the move functionality into a helper function so it can be
called from organize
2009-04-22 04:20:05 +00:00
Bharat Mediratta
6e05e917df Redirect item/NN requests to absolute urls 2009-04-18 23:52:02 +00:00
Bharat Mediratta
471c1d5b3d Don't show the 'no toolkit found' message unless we actually didn't find one 2009-04-17 09:48:36 +00:00
Andy Staudacher
f8bc0a40fe Fix for ticket 203: Don't interpolate the translation string for the l10n client translation input field 2009-04-17 02:19:56 +00:00
Bharat Mediratta
63edb37076 Fix up the quick-edit code on the photos page. Everything but "move"
is implemented.  Can't do move easily because it's tricky to handle
the post-move redirect.
2009-04-06 08:10:42 +00:00
Bharat Mediratta
c936eebcf7 Don't do graphics detection in core_installer::install() because that
gets run at scaffolding::package() time, not on the target machine.
Instead, create a core module variable to trigger running
graphics::choose_default_toolkit() on the first admin login after install.

Fixes ticket #206.
2009-04-05 20:43:05 +00:00
Bharat Mediratta
6883762238 Completely task-ify the localization scanning code and restore the
incoming_translation key cache.  The only part of this that is not
broken down is the l10n_client::fetch_updates() part.
2009-04-02 23:56:00 +00:00
Tim Almdal
b05b89798a Continuation of r20518. Remove all the cases were the csrf values in
views were being manually set.  Also removed it from the Admin_View.
2009-04-02 21:41:10 +00:00
Bharat Mediratta
96aa486060 Add missing 2nd argument for Theme_View() 2009-03-31 20:34:12 +00:00
Bharat Mediratta
c96544ff34 Add missing csrf value. 2009-03-27 15:39:22 +00:00
Bharat Mediratta
921f3a2eee Put csrf token into Admin_View and Theme_View by default, then use it
directly wherever possible instead of access::csrf_token().
2009-03-27 03:43:21 +00:00
Bharat Mediratta
9f8393c9d5 Rename $block_id to $id to fix ticket #192 2009-03-26 19:51:15 +00:00
Bharat Mediratta
a142aee609 Convert language updates over to task form. It's still very rough,
the task only has one step from zero to 100.
2009-03-26 07:10:47 +00:00
Bharat Mediratta
09243aa72e Normalize code style. 2009-03-26 04:44:12 +00:00
Bharat Mediratta
78943402b2 Convert the L10n scanner from a library to a helper.
In order to make the class static, I had to remove the index cache.
I'll restore that and cache the index keys in the task context in a
subsequent change.  For now, I've put in a @todo to add the caching
back in.
2009-03-26 04:36:00 +00:00
Andy Staudacher
ed7175092c Refactor all translation strings that have ambiguous placeholders.
E.g. "%link_startClick here%link_end" is now '<a href="%url">Click here</a>'.

Note: This isn't always the best solution. E.g. consider "Foo <a href='%url' class='gDialogLink'>bar</a>." Now the translator has to deal with 
preserving CSS classes too...
2009-03-21 07:44:46 +00:00
Bharat Mediratta
acfb81d940 Oops, we need UNIX_TIMESTAMP() instead of NOW() 2009-03-20 08:25:33 +00:00