Tim Almdal
7f48671186
For ticket #1701 . Remove unused variable.
2011-04-24 07:15:30 -07:00
Tim Almdal
41f90e669f
Clarify the meaning of variable names.
2011-04-24 07:04:11 -07:00
Tim Almdal
c01a0eac9a
Allow the tag rename function to split a tag into multiple tags if a comma is used to delinate the seperate tags.
2011-04-23 20:30:30 -07:00
Andy Lindeman
c101151616
Allow tags to be merged by renaming
...
* Fixes #1628
2011-04-23 12:04:43 -04:00
Tim Almdal
b07bc1af08
Allow the administrator to set the number of tags to display in the cloud via the advanced settings. Fixes ticket #1649 .
2011-04-22 16:15:56 -07:00
Bharat Mediratta
451ef39d58
PATH_INFO mangles apostrophe (and other symbols, I'm sure) into a
...
question mark, so any tags containing an apostrophe won't display
their contents.
Take the simple fix here and change the tag urls to also contain the
tag id, which avoids having to add a slug for the tag and all kinds of
validation code.
Fixes #1636 .
2011-03-05 16:51:20 -08:00
Bharat Mediratta
423daa52d5
Update copyright to 2011.
2011-01-21 23:01:06 -08:00
Joe7
fca6d1254a
Fixed offset sanitizing code - Fixes Ticket#1593
2011-01-09 18:48:24 -08:00
Joe7
f364e8a96b
Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569
2011-01-03 11:38:21 -08:00
Bharat Mediratta
3d952f41c8
Fix a bug in the way that we add tags that causes it to be really slow
...
when adding a tag to lots of items. Tag_Model::save() would call
item_related_update for every tag related to an item upon save which
is an O(N!) operation. Fixes ticket #1412 .
2010-11-08 22:16:57 -08:00
Bharat Mediratta
cef7ca9cf2
Change tag url form to be /tag/{name} from /tags/show/{id}. This is
...
a much friendlier url format. Fixes ticket #1363 .
2010-09-11 10:26:48 -07:00
Bharat Mediratta
7607e1f932
Full pass over all the JSON encoding and JS dialog code. We now abide
...
by the following rules:
1) An initial dialog or panel load can take either HTML or JSON, but
the mime type must accurately reflect its payload.
2) dialog form submits can handle a pure HTML response, but the mime
type must also be correct. This properly resolves the problem
where the reauth code gets a JSON response first from the reauth
code, and then an HTML response when you reauth and continue on to
a given form -- try it out with Admin > Settings > Advanced.
3) All JSON replies must set the mime type correctly. The json::reply
convenience function does this for us.
4) By default, any HTML content sent back in the JSON response should be
in the "html" field, no longer the "form" field.
The combination of these allows us to stop doing boilerplate code like
this in our controllers:
// Print our view, JSON encoded
json::reply(array("form" => (string) $view));
instead, controllers can just return HTML, eg:
// Print our view
print $view;
That's much more intuitive for developers.
2010-07-31 21:16:17 -07:00
Tim Almdal
91a2c04a24
More patches as part of #1225 . Change the 'core' modules to use the json::reply
...
method to set the content type header and encode the response as a json object
2010-07-31 15:44:55 -07:00
Tim Almdal
dbf3199e46
Fix for ticket #1181 . Use $.getJSON to retrieve the json contents of the dialog. Convert all the controllers
...
that create the data to go into a dialog to return the html as part of a json object.
2010-07-06 14:12:01 -07:00
Bharat Mediratta
2992daa00e
Add "Tag: %s" in the title on tag pages. Fixes ticket #1097 .
2010-06-20 16:55:42 -07:00
ckieffer
f1076590f1
Add page_title to admin views. Closes #1038 .
2010-04-30 00:08:37 -06: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
7099fc71f1
Fix for ticket 1004: Replace all uses of split with explode (none actually required regular expressions). Thanks to Brian Hartsock for providing a patch!
2010-02-06 13:05:44 -08:00
Tim Almdal
e98991b90f
return a location method so the page reloads properly if the edit was successful.
2010-01-31 16:58:42 -08:00
Bharat Mediratta
cfbbf9ef60
Convert __toString() to use (string) cast instead.
2010-01-27 21:58:06 -08:00
Bharat Mediratta
5c49c041e7
Use "(string) $form" instead of "$form->__toString()"
2010-01-16 22:42:02 -08:00
Bharat Mediratta
057e8d09af
Convert a bunch of leftover kohana::show_404 calls to throw
...
Kohana_404_Exception instead. These are the ones where we used a
lower-case 'k' so my previous filter didn't catch it.
2009-12-23 20:51:33 -08:00
Bharat Mediratta
8b9a02084a
Updates for the latest version of Kohana 2.4:
...
1) Controller::$input is gone -- use Input::instance() now
2) Handle new 'database.<default>.connection.params' parameter
3) Handle new 'cache.<default>.prefix' parameter
2009-12-21 21:27:43 -08:00
Bharat Mediratta
3d0a7a33ad
Fix a few more database queries
2009-12-06 20:38:57 -08:00
Bharat Mediratta
2132c9a96d
Fix some database calls.
2009-12-06 20:19:54 -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
Bharat Mediratta
0121bfd585
ORM::orderby -> ORM::order_by
2009-11-25 19:26:52 -08:00
Bharat Mediratta
f50dbd992d
Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_dev
...
Conflicts:
modules/gallery/controllers/rest.php
2009-11-25 13:40:47 -08:00
Bharat Mediratta
2e420522ec
Preliminary work to cut over to Kohana 2.4
...
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Tim Almdal
454a96f48f
Refactor the tags to remove the REST_Controller. Partial fix for ticket #917
2009-11-25 09:08:33 -08:00
Tim Almdal
57adefc5ba
Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
...
This reverts commit 26114972c3 .
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3
Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme.
2009-11-18 15:36:13 -08:00
Bharat Mediratta
1067e68292
Redesign the way that we consider page types to create buckets of page
...
types, and a subtype for specifics. Currently the top level bucket
collection, item, other
Here are the core subtypes so far:
collection: album, search, tag
item: movie, photo
other: login, reset, comment-fragment, comment
It's legal to create new page_subtypes whenever you want. Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Bharat Mediratta
846f365db9
Normalize tags a bit.
...
- Create Tag_Model::url() to mimic Item_Model::url()
- Use the same pagination logic as we do for viewing items
2009-11-14 16:17:19 -08:00
Tim Almdal
beb63a8380
Clean up the In place edit api:
...
1) Only allow 1 in place edit to be active at a time (gets around the issue of using an id to identify the form
2) remove the add_ prefix from some of the api methods
3) clean up inconsistent naming
2009-11-06 23:05:20 -08:00
Tim Almdal
72a8ce696e
Refactor out the in place editting and use the new gallery.in_place_edit widget to manage the tag renames. Part the fix for ticket #750 .
2009-11-05 13:01:01 -08:00
Andy Staudacher
d050f0a246
Minor style fix: (string) $var, not (string)$var, and move the explicit cast down where it's needed.
2009-09-17 14:04:13 -07:00
Tim Almdal
2eeacd2656
use an implicit cast to convert the translated error message to a string as it is encoded by the json routines and will be treated as an object otherwise
2009-09-17 13:55:11 -07:00
Tim Almdal
48326ad017
Cleanup issues with the original fix for #779
2009-09-17 12:11:00 -07:00
Tim Almdal
5490057480
When editing tags in place, and there is a validation error, highlight the tag with a red border and show a statust message. This fixes ticket: #779
2009-09-16 12:27:13 -07:00
Andy Staudacher
f1887422f8
Stricter input handling (cast to int)
2009-09-15 23:07:41 -07:00
Andy Staudacher
7608870537
Controller auth / CSRF fixes
2009-09-15 22:51:49 -07:00
Andy Staudacher
e168e0dfae
CSRF / auth fixes, golden data file checkpoint
2009-09-15 21:50:48 -07:00
Andy Staudacher
b9bd1681a3
Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly.
2009-08-29 22:54:20 -07:00
Andy Staudacher
c01ac42c46
Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
...
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Tim Almdal
975a5ded7b
Clean up amd simplify the tag processing: Only allow comma separators between
...
phrases. Using only 1 separator cleans up the javascript as well, as we
can use some of the jquery autocomplete to set the tag separator.
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca >
2009-07-28 09:16:57 +08:00
Tim Almdal
ecc9203c23
Standardize the specification of tags.
...
With this patch a comma(,) is the only valid tag separator. Spaces
are allowed in tags and phrases no longer need to be specified with a
dot.
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca >
2009-07-28 06:28:31 +08:00
Tim Almdal
fa1d32e646
Partial implementation of ticket #80 . Provide auto complete and suggestions on the tag add form in the tag sidebar block. Updated the xss golden file as well. Still to do figure out how toget it into the edit popup dialog
2009-07-24 11:24:43 -07:00
Tim Almdal
fa0c17ab5b
Make tag handling consistent by converting spaces to periods and using commas or semi-colons as separators
2009-07-23 09:26:04 -07:00
Tim Almdal
7a9a4b9e8b
Found another place that p:purify was required.
...
Generalize the dynamic.html so it doesn't require a tag element
2009-07-04 09:00:11 -07:00