Commit Graph

130 Commits

Author SHA1 Message Date
Tim Almdal
2991831c03 Fix for ticket #72 2009-05-06 14:45:44 +00:00
Bharat Mediratta
a4d63d5a41 Exclude lib/swfupload from our scan paths 2009-04-06 08:59:39 +00:00
Tim Almdal
f1eec57221 Add a weight column to the items model. Change the album ordering to
use this as the default instead of id.  This prepares the way for
manual reordering in the organize functionality.
2009-04-05 16:57:51 +00:00
Tim Almdal
961d5e11cf Fix unit tests where the albums, resizes and thumbs directory were
being deleted.
Fix for ticket #182
2009-03-25 15:22:23 +00:00
Andy Staudacher
4971db37d4 Fix for ticket 142: Choose plural form "other" for count == 0 (unless the locale has a specific plural form for zero) 2009-03-18 02:40:16 +00:00
Bharat Mediratta
a83db20fe2 Fix minor correctness issues 2009-03-17 18:09:21 +00:00
Tim Almdal
d1f181da08 Attempt to reduce the chance of replacing text in sql statements that
is not a table name (but contained in braces) with the database prefix
by building and maintaining a cache of database tables and prefixes.
2009-03-12 03:20:13 +00:00
Tim Almdal
ee2407cde2 Fix the test failures. If albums are created manually instead of
calling album::create, then the default sourt column needs to be set
to id.
2009-03-11 00:41:51 +00:00
Tim Almdal
c2db5d0fc9 Fix the test, with the addition of the additional fields required by
album sort order change.
2009-03-11 00:17:48 +00:00
Tim Almdal
c04ff8e02f Change the pattern to identify tables that need prefix substitution to
mirror the drupal pattern of using braces {}.
2009-02-28 06:37:28 +00:00
Tim Almdal
ab973bd871 Replace the string [table_name] with {$prefix}table_name. Slowly
working through setting up the database access to support table
prefixes. (Ticket#68)

Before going ahead, just wanted to check this approach... whatcha think?
2009-02-27 03:25:29 +00:00
Tim Almdal
0b055835fd Remove commented code
Correct unbalanced brackets
2009-02-27 02:50:07 +00:00
Tim Almdal
8d59f5b5fb Removed raw update sql and replaced it with Database::update(...)
calls. (ticket #68)
2009-02-26 20:43:56 +00:00
Andy Staudacher
c5964c74cd Fix i18n create table sql (forgot to change core_install.php) 2009-02-24 06:10:40 +00:00
Andy Staudacher
50b783e3a5 Change i18n message key to include the plural form (to ensure that it's truly unique). 2009-02-12 07:11:24 +00:00
Andy Staudacher
b2f20ff766 style fixes (style for method names, style for vars in locale.php) 2009-02-10 06:12:16 +00:00
Andy Staudacher
dce6548431 Add local localization functionality. Local = no means to upload / download translations to a translation server yet.
- Added an outgoing_translations table to store translations from the local translation UI.
 - I18n class is checking incoming_ and outgoing_translations for translations, giving the latter priority.
 - Not handling plural strings in the translations UI yet.
2009-02-09 08:42:13 +00:00
Andy Staudacher
fa1f49d99a Adding translation UI. Not backed by any model yet (submissions are ignored).
The code is based on the l10n_client module from Drupal 6, by Gabor Hojtsy (http://drupal.org/user/4166).
2009-02-09 07:29:24 +00:00
Bharat Mediratta
b31c79a71f Fix a bug that I think I introduced in my last sendmail refactor where
I inverted the expectations on the result from mail() causing image
uploads to fail (even though the mail gets sent!)
2009-02-08 20:01:15 +00:00
Tim Almdal
3b944bca5d Use the ORM method delete_all to remove selected records from the
database instead of calling the Database::query with raw sql.
2009-02-08 18:03:31 +00:00
Tim Almdal
1fc2307fab rollback r20001-r19998, r19995. This may require a reinstall 2009-02-08 02:21:28 +00:00
Tim Almdal
12701b1801 The start of the exif module. so I can merger the exifer library 2009-02-07 21:21:08 +00:00
Tim Almdal
90277704a2 Changed the way album and photo creation guards against duplicate
names.
Added similiar code to insure that path names are not duplicated.
2009-02-07 18:12:06 +00:00
Bharat Mediratta
1894a673bf Move test-related extensions to Sendmail into a subclass that we only
use in the test code (Sendmail_For_Test).
2009-02-05 07:51:11 +00:00
Andy Staudacher
5d0b710d54 Fix sendmail tests (had mismatch between configured header separator and expected results) 2009-02-02 07:05:02 +00:00
Bharat Mediratta
894a33d744 Add support for pretty urls. So now instead of urls like:
http://example.com/gallery3/index.php/albums/2
  http://example.com/gallery3/index.php/photos/9

You'll see urls like:
  http://example.com/gallery3/index.php/Family/Weddings
  http://example.com/gallery3/index.php/Family/Weddings/Bob.jpg
2009-01-29 03:22:02 +00:00
Tim Almdal
66fae63558 Create a sendmail library to wrap the call to the system sendmail
facility. Something quirky is happening in the first test, see comment
in code, but I couldn't figure it out.  Left a @todo for now.
2009-01-28 04:22:59 +00:00
Bharat Mediratta
cd6629ad23 Add support for parenthetical grouping to Database queries. Turns out
that this is something they kind of want for Kohana :-)

Upstream ticket for this change: http://dev.kohanaphp.com/ticket/1070
2009-01-23 08:07:37 +00:00
Bharat Mediratta
fc8cf562f5 Fix up various little things to get File_Structure_Test to pass. 2009-01-19 07:26:25 +00:00
Andy Staudacher
e4a9b19bf9 Changing t() placeholder syntax from {{replace_me}} to %replace_me. 2009-01-15 10:02:41 +00:00
Bharat Mediratta
f3ba69c1d6 Make sure that helper functions are all static. Add new
File_Structure_Test to make sure we don't regress.

According to the PHP docs, the "public" keyword is implied on static
functions, so remove it.  Also, require private static functions to
start with an _.

http://php.net/manual/en/language.oop5.visibility.php
2009-01-14 04:12:02 +00:00
Bharat Mediratta
ff6791f576 Models should be named in adjective_noun form to make pluralizatoin
more intuitive.

Renamed Translations_Incoming to Incoming_Translation to suit.
2009-01-13 01:05:11 +00:00
Andy Staudacher
6510fae661 Remove path normalization, the current normalization code didn't go far enough anyway. 2009-01-11 05:28:48 +00:00
Andy Staudacher
5e0d0f546a MySQL strict fix for Item_Model test. Set all fields that have no default value. 2009-01-11 05:19:09 +00:00
Andy Staudacher
4757126acc Fix ORM MPTT tests for MySQL strict mode (can't omit Iten type in inserts, it doesn't have a default value). 2009-01-11 05:09:06 +00:00
Andy Staudacher
9406e80c90 Fix Access_Helper tests for MySQL strict mode (can't omit Iten type in inserts, it doesn't have a default value). 2009-01-11 03:28:57 +00:00
Bharat Mediratta
01666c5579 Fix all file structure issues (tabs, bad preambles, etc).
Note: installer/install.php is now on the "direct access" list.
2009-01-11 02:27:00 +00:00
Bharat Mediratta
7f52500cf9 Allow .txt.php views 2009-01-11 02:02:43 +00:00
Andy Staudacher
a631fe29f3 i18n refactoring: Rename all _() (reserved by gettext) calls to t().
- And refactor printf to our string interpolation / pluralization syntax
- Also, a slight change to the translations_incomings table, using binary(16) instead of char(32) as message key.
2009-01-08 17:13:06 +00:00
Andy Staudacher
2917740ba6 First step of i18n refactoring:
- Using DB table translations_incomings as translations storage (file cache to be added)
- Removed overly complex i18n code which will be unnecessary with the future compiled cache files
- Added t() as a translation function (global refactoring from _() to t() to follow)
2009-01-08 06:52:18 +00:00
Bharat Mediratta
58c8b3b031 module::event now takes an unlimited number of args
added module::incr_var() ftw.
2009-01-08 02:46:09 +00:00
Bharat Mediratta
08c9745086 Make sure that create/update/delete fail without CSRF. 2009-01-04 01:55:07 +00:00
Bharat Mediratta
cd1d023754 Change the preamble for views in two ways:
1) drop unnecessary semicolon
2) start with <?php for extra security in the case that the server itself doesn't
   have short_tags enabled (the app won't work, but we need to make sure that we're
   still secure)
2009-01-01 00:23:29 +00:00
Bharat Mediratta
23105f1359 PhotoID -> PhotoId for consistency 2008-12-31 07:16:38 +00:00
Bharat Mediratta
bfb040a463 Fix a bug where we were accidentally allowing view permissions when
allowing or resetting permission further down in the tree.  This bug
was introduced when I refactored the view permission cache into the
items table.  Updated test to catch it.
2008-12-31 00:47:15 +00:00
Bharat Mediratta
ad719b9b6f Fully implement the view_full permission. 2008-12-31 00:18:24 +00:00
Bharat Mediratta
eb35afc987 Add module::clear_var() 2008-12-26 01:29:33 +00:00
Bharat Mediratta
3185915264 Split Items_Controller_Test into Photos and Albums tests 2008-12-25 10:14:59 +00:00
Bharat Mediratta
5713e3c66e Change photo::create() and album::create() to take ORM instances
instead of ids.
2008-12-23 04:36:09 +00:00
Chad Kieffer
a98d13e9c7 Update Selenium IDE test case file names. 2008-12-22 00:19:58 +00:00