Commit Graph

74 Commits

Author SHA1 Message Date
Bharat Mediratta
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
bad6d21584 Remove success logging from exif_task. 2009-07-19 13:48:38 -07:00
Bharat Mediratta
0f766b149d Second non-trivial change to the event code. We now publish model
related events from within the model handling code.  The only
exception to this currently is item_created which is challenging
because we have to save the item using ORM_MPTT::add_to_parent()
before the object itself is fully set up.  When we get that down to
one call to save() we can publish that event from within the model
also.
2009-07-16 12:31:40 -07:00
Bharat Mediratta
5b3b675b6d Non-trivial changes to the event handling code:
1) The item_updated event no longer takes the old and new items.
   Instead we overload ORM to track the original data and make
   that available via the item.  This will allow us to move event
   publishing down into the API methods which in turn will give us
   more stability since we won't require each controller to remember
   to do it.

2) ORM class now tracks the original values.  It doesn't track
   the original relationships (no need for that, yet)

3) Added new events:
     item_deleted
     group_deleted
     user_deleted
2009-07-16 11:19:34 -07:00
Bharat Mediratta
e2a9a1d284 Add quotes around all values that contain spaces in them, and add a
test to make sure that we continue to do so.

This makes sure that we don't have problems with 5.3 which treats the
literal "on" as a boolean.
2009-07-13 10:36:55 -07:00
Shai Ben-Naphtali
6320babf78 Fixes ticket #526
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-11 14:26:28 +08:00
Tim Almdal
fabdde9bb9 Reference exif consistently as EXIF ticket #526. 2009-07-10 17:46:33 -07:00
Tim Almdal
43c6336257 Add Task logging to the Extract EXIF data task 2009-07-08 08:37:40 -07:00
Tim Almdal
588f991d55 Updated to Exifer r4159 2009-07-01 21:56:02 -07:00
Bharat Mediratta
7b1e3c5021 Reapply c65bfb5a10 without extra
whitespace changes.
2009-07-01 11:32:27 -07:00
Bharat Mediratta
8f4c1c4ddf Revert "Fix for ticket #437"
This change had unintentional whitespace changes.  Reverting for now, will reapply it.

This reverts commit c65bfb5a10.
2009-07-01 11:31:12 -07:00
Tim Almdal
c65bfb5a10 Fix for ticket #437
Tracking vendor ticket: http://bit.ly/16b7Zj
2009-07-01 10:45:37 -07:00
Bharat Mediratta
3ef39d4576 Update Exif_test to match change made in 4943103700
Get rid of vestigial third column in exif::_keys().
2009-06-30 19:17:45 -07:00
Tim Almdal
4943103700 Fix for #437. Use Exposure Time instead of Shutter Speed as suggested by
hiwilson.
2009-06-30 07:22:03 -07:00
Bharat Mediratta
bfca0c7903 Refactor the install/upgrade code to be more flexible.
Add xxx_installer::upgrade($version) method so that upgrade stanzas
are separate from install stanzas.  In the old code, to do an upgrade
meant that you had to re-evolve everything from the initial install
because we'd step through each version's changes.  But what we really
want is for the initial install to start off in the perfect initial
state, and the upgrades to do the work behind the scenes.  So now the
install() function gets things set up properly the first time, and the
upgrade() function does any work to catch you up to the latest code.
See gallery_installer.php for a good example.
2009-06-23 12:00:49 -07:00
Bharat Mediratta
1fa05d2f39 Updated to Exifer r4107 2009-06-20 21:41:09 -07:00
Bharat Mediratta
cdb4052b52 Add an id to the exif link anchor. 2009-06-19 09:58:36 -07:00
Bharat Mediratta
c31434ea3c Don't bomb if there are no exif_records for the given item. 2009-06-01 18:03:07 -07:00
Bharat Mediratta
708f27f483 Run p::clean() on any variables that contain data entered by users. 2009-05-31 00:11:48 -07:00
Bharat Mediratta
c4c70c537d Tweak path slightly 2009-05-28 21:18:31 -07:00
Bharat Mediratta
73f348b29e Protect get() against missing records. 2009-05-28 21:07:47 -07:00
Bharat Mediratta
7e5e70548b clean up whitespace errors introduced in last commit 2009-05-26 06:01:04 +00:00
Bharat Mediratta
7aed923908 Restructure the module lifecycle.
Install: <module>_installer::install() is called, any necessary tables
are created.

Activate: <module>_installer::activate() is called.  Module
controllers are routable, helpers are accessible, etc.  The module is
in use.

Deactivate: <module>_installer::deactivate() is called.  Module code
is not accessible or routable.  Module is *not* in use, but its tables
are still around.

Uninstall: <module>_installer::uninstall() is called.  Module is
completely removed from the database.

Admin > Modules will install and activate modules, but will only
deactivate (will NOT uninstall modules).
2009-05-26 05:28:59 +00:00
Bharat Mediratta
774e0b3737 Avoid complex inserts in available_tasks() to make admin/maintenance
run faster.  This fixes ticket #235.

Incidentally, refactor exif and search to use the same patterns
overall so that if you understand one, you understand the other and
they generally use the same strings for localization.
2009-05-20 06:10:14 +00:00
Bharat Mediratta
54fe2c600e Avoid doing an expensive insert in available_tasks(). Partial fix for ticket #235. 2009-05-20 05:46:34 +00:00
Bharat Mediratta
a1ad048ef2 Update preamble to avoid extra opening php block 2009-05-18 04:00:20 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +00:00
Bharat Mediratta
c397cc73be Don't divide by zero if there are no photos in the Gallery. 2009-05-12 04:22:05 +00:00
Bharat Mediratta
a2c188ac37 Update exif lib to upstream r3901 which resolves the following tickets:
http://www.zenphoto.org/trac/ticket/1117
  http://www.zenphoto.org/trac/ticket/1118
2009-05-11 19:19:13 +00:00
Tim Almdal
11477cbc3e Correct the reference to $item->id 2009-05-11 14:32:18 +00:00
Bharat Mediratta
891930ec2b Don't accept negative capture dates from EXIF, they're probably just crap data. 2009-05-11 04:22:50 +00:00
Bharat Mediratta
977d0da9f3 Refactor the exif module to denormalize the stored data. This way we
have a single exif_record for each item instead of 1 per key.  It's
about 5x faster to scan photos this way.
2009-05-11 03:53:44 +00:00
Bharat Mediratta
b706cb69ac Reinstate abortCount code, originally added to exifer in G2:
http://gallery.svn.sourceforge.net/viewvc/gallery?view=rev&revision=13422

it was commented out in the ZenPhoto version.  Filed upstream ticket
about this:
  http://www.zenphoto.org/trac/ticket/1118
2009-05-11 02:37:12 +00:00
Bharat Mediratta
6dbd8aa002 Don't use ORM to delete old exif_keys.. it's too inefficient 2009-05-11 02:35:43 +00:00
Bharat Mediratta
8c776ffa6f Add a cache in intel2Moto(). Because of the duplicate nature of the
calls to this function, this is a 1-2x order of magnitude performance
improvement.
2009-05-11 01:36:36 +00:00
Bharat Mediratta
cc0fcc8961 Use a clearer query syntax for deleting extra search and exif records (thanks Romain LE DISEZ) 2009-05-10 18:44:03 +00:00
Bharat Mediratta
d1a9138925 Don't try to use mb_detect_encoding if the module isn't loaded. Not sure if this is a great solution, but it'll probably cut down on a big class of errors opportunistically 2009-05-08 19:16:48 +00:00
Bharat Mediratta
85832e2e0f Don't try to use the exif/iptc values if we couldn't extract them cleanly. 2009-05-07 05:04:11 +00:00
Bharat Mediratta
fc6bdbbbc8 Grab photo capture date and captions from EXIF/IPTC data.
- Add a "captured" column to the items table.
- Pull the DateTime EXIF field and put it into the captured column
- Pull the Caption EXIF & IPTC fields and put them into the description
  field if there was not already a value there
2009-05-07 01:18:31 +00:00
Bharat Mediratta
13f8a0dd7b Detect input encodings from EXIF/IPTC data and convert to utf-8 as
appropriate.  This allows us to switch the exif value column back to
varchar and improves the way that we deal with non-utf8 data in our
embedded EXIF/IPTC data.
2009-05-05 03:30:49 +00:00
Bharat Mediratta
f3caf1eb52 Update upstream to to r3835 which resolves upstream ticket #1108
svn merge -r20638:20640 vendor/exifer/modified trunk/modules/exif/lib
2009-04-28 03:28:43 +00:00
Bharat Mediratta
2a5abfdbd4 Update value size to 1536 chars because I had an image which went over 1024 chars 2009-04-27 05:36:32 +00:00
Bharat Mediratta
f118fc0c14 Fix an edge case with GPS data handling that results in this error:
fread: Length parameter must be greater than 0 in file modules/exif/lib/makers/gps.php on line 197

Filed upstream as:
  http://www.zenphoto.org/trac/ticket/1108
2009-04-27 03:58:16 +00:00
Bharat Mediratta
f51765a4b2 Drop the item_id key; we don't need this level of strictness in most
cases and it slows down inserts.
2009-04-25 22:17:06 +00:00
Bharat Mediratta
bab514a48d Change the value column to varbinary so that we can handle the occasional binary data embedded in places like the EXIF caption field 2009-04-25 22:02:50 +00:00
Bharat Mediratta
3950e7582b Fix status math. 2009-04-25 07:18:39 +00:00
Bharat Mediratta
2819a1b7b4 Extract as many records as we can in a second 2009-04-25 06:53:34 +00:00
Bharat Mediratta
63ce71a32b Add a key on item_id so that our query to find missing exif records is efficient 2009-04-25 06:52:44 +00:00
Tim Almdal
0fdc4639c3 Remove duplicate word from status message 2009-04-21 14:41:06 +00:00
Bharat Mediratta
fabb9fb4bd Don't try to insert exif keys if there aren't any. 2009-04-05 04:07:18 +00:00