Commit Graph

39 Commits

Author SHA1 Message Date
Bharat Mediratta
d45a737779 Update copyright to 2013. Fixes #1953. 2013-01-21 01:22:01 -05:00
Mike Miller
f92982c59c Tags by name (includes a G2 mapping) 2013-01-13 05:36:50 +02:00
Bharat Mediratta
bf2bb3e1ea Update copyright to 2012. #1822 2012-02-27 09:48:23 -08:00
Tim Almdal
933a34986d Patch for tickets #1428 and #1760
Create the concept of a Photo_Display_Context.  If the user is browsing a dynamic album (i.e. tags) and chooses to
look at an image in that album.  The display of the image happens correctly, but the 'next' and 'previous' buttons
are no longer consistent.  When one of these is clicked, Gallery  will open the adjacent image in the actuall album,
not the dynamic album.
2011-08-11 22:04:21 -07:00
Bharat Mediratta
f8493a1df2 Revert my two "fixes" on top of Andy's tag combine change. Leave Tag_Model::items() calling
Item_Model::viewable() because it's too dangerous to separate that out, and it's fragile to
rely on only admins doing tag combines.

Revert "Undo the change made in 5ce8563632 because it messes up tag counts"
- This reverts commit 67d2e8081c.
Revert "Move the calculation for item_related_update ahead of the duplicate"
- This reverts commit 5ce8563632.
2011-04-24 08:59:33 -07:00
Bharat Mediratta
67d2e8081c Undo the change made in 5ce8563632 because it messes up tag counts
(and makes the test fail-- I should have run that!).

Also, use Tag_Model::items() in save() to avoid code duplication.  Follow-on for #1628.
2011-04-23 16:12:10 -07:00
Bharat Mediratta
5ce8563632 Move the calculation for item_related_update ahead of the duplicate
tag merge so that we don't trigger an item_related_update on items
who semantically have the same tag after the merge.  Follow-on for #1628.
2011-04-23 13:20:22 -07:00
Andy Lindeman
c101151616 Allow tags to be merged by renaming
* Fixes #1628
2011-04-23 12:04:43 -04:00
Bharat Mediratta
72149b8c68 Urlencode the tag name so that our html is compliant. Fixes #1672. 2011-04-22 08:11: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
Bharat Mediratta
02f30b91bf Follow on to 966dee8628 for #1586 --
don't try to update the tag item count if we didn't change any items
with this change (ie: a tag rename).  In that case, we haven't loaded
the related items so we don't have any idea what the count is going to
be.
2011-01-15 14:20:26 -08:00
Bharat Mediratta
966dee8628 Move tag count management into the model. Fixes #1586. 2011-01-07 23:38:08 -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
dff1a53696 All modules should be named Xxx_Core for extensibility. Fixes #1458. 2010-10-25 21:05:31 -07: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
c3c2b45280 Update the copyright to 2010. It's only 3 months into the year :-) 2010-03-03 10:15:34 -08:00
Bharat Mediratta
c050acf30a Fix lots of warnings that pop up when we're in E_STRICT mode. They're
mostly issues around uninitialized variables, calling non-static
functions in a static context, calling Session functions directly
instead of on its singleton, passing non-variables by reference, and
subclasses not using the same interface as the parent class.
2010-01-31 16:07:41 -08:00
Bharat Mediratta
d18be7fe55 $offset should be null by default, not 0. Hold over bug from the K24 migration. 2010-01-05 12:05:22 -08:00
Tim Almdal
bccb6fc021 Clean up validation the check for duplicate names or slugs, finish converting the rest API to Kohana 2.4 2009-12-27 08:32:12 -08:00
Bharat Mediratta
046382c3e7 Remove some unused references to Database::instance() 2009-12-18 11:27:44 -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
Tim Almdal
454a96f48f Refactor the tags to remove the REST_Controller. Partial fix for ticket #917 2009-11-25 09:08:33 -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
Bharat Mediratta
7863aa16f9 Update tags module to notify modules when items related to a tag are
affected.  Practically speaking this means that we'll reindex items
when tags are added or removed from them.

API change:
  Remove item_related_updated_batch event.

Rationale:
  While this is an efficient event, it requires module developers to
  support two event APIs for staying up to date and increases the
  likelihood that they'll forget one and have data corruption.  Force
  them all through the slower but more reliable pipe, for now.  We
  can always try to improve efficiency by using the batch_start and
  batch_stop events.
2009-08-08 14:30:21 -07:00
Tim Almdal
67190412e6 Respect the $type parameter on Tag_Model::items_count() 2009-07-23 11:57:34 -07:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
99c26f30c6 Allow users to enter multiple tags at once, split by space, semicolon
or comma.

Fixes ticket #193.
2009-05-13 01:43:47 +00:00
Tim Almdal
38cf6ca403 The start of the notification module. At this point, the icon has been added to the item menu in the sidebar (both photo and album). There is a corresponding icon in themes/default/images that needs to be spruced up. You can add and remove notifications to albums and photos, but nothing happens under the covers for event handling. 2009-01-30 20:52:25 +00:00
Bharat Mediratta
92ceef27da Allow renaming of tags using a modal dialog. Put up a confirmation
dialog for deleting tags.  Remove the 4 character restriction on tags
(it was getting ignored by the add form anyway since it was mistakenly
referred to as tag_name there).
2009-01-04 08:44:06 +00:00
Bharat Mediratta
b37047ff55 Add Item_Model::viewable() which we can use to restrict any query to
just items viewable by the active user.  Ie:

  ORM::factory("item")
    ->where("name", "foo")
    ->find_all()

Would get all items with the name "foo".

  ORM::factory("item")
    ->viewable()
    ->where("name", "foo")
    ->find_all()

Restricts it to just the set of items that the user is allowed to see.
2008-12-17 22:39:33 +00:00
Bharat Mediratta
88b35c1182 Tags_Model::items() now lets you filter by item type 2008-11-28 01:40:55 +00:00
Bharat Mediratta
974f9f7788 Add a new "tag" page type.
Create the concept of "page types" which let us specify the kind of
page that we're rendering in high level terms.  Currently there are
three page types: album, photo and tag.

The tag page type uses slightly different variables.  It has a $tag
but no $item.  Adjust all sidebar_block() functions to avoid printing
stuff that's dependent on the item if there is no item.

Simplify the tag code to stop trying to fake an item.

Update the theme slightly to use $item and $tag where appropriate
(notably, for making the <title> element).
2008-11-26 21:50:45 +00:00
Tim Almdal
b3be74166c Breadcrumbs now look right for dynamic tag albums 2008-11-26 17:08:57 +00:00
Tim Almdal
e77fd34175 Duh, i have the count in the tag model... why do i need to do a query to count?
Added text to the description instead of return an empty string
2008-11-26 17:02:27 +00:00
Tim Almdal
af9a27216d Modify the tag model to behave like a virtual album. There are two outstanding issues that i still have to resolve. The first being there is no thumbnail for the root directory, so it doesn't look quite right. And secondly, the bread crumb shows the dynamic tag album as hot having a parent. I wanted it to be the root directory, but i will overcome :-) 2008-11-26 16:48:00 +00:00
Tim Almdal
ab20406ef2 Tag module database definitions 2008-11-23 18:00:44 +00:00