Commit Graph

134 Commits

Author SHA1 Message Date
Bharat Mediratta
fb9efa664b Check for the SimpleXML module, thanks to geekonek.
Fixes ticket #599.
2009-08-04 20:20:43 -07:00
Bharat Mediratta
9d2420e789 Updated for gallery v10 2009-07-29 16:45:26 -07:00
Andy Staudacher
482e223b60 Updating install.sql with the packaging script, basically re-adding the charset (utf8) expressions that were removed by merging in rledisez's left/right -> left_ptr/right_ptr changes. 2009-07-26 23:58:46 -07:00
Romain LE DISEZ
23bb6eb7e3 Rename columns that use reserved SQL words : items.left and items.right 2009-07-25 19:06:54 +02:00
Bharat Mediratta
e3a1bb2c72 Updated version of installer sql:
- gallery_version is gone
- access related columns are now binary (Postgres)
- for some reason we've reverted back to the /*!40101*/ style settings
  in mysqldump.
2009-07-23 16:38:47 -07:00
Romain LE DISEZ
350c1b0267 Use BOOLEAN instead of integer to describe the permissions :
- DENY = false
 - ALLOW = true
 - UNKNOW = null  (for intent only)
 - INHERIT = null (for cache)

Upgrade is not included for now.
(cherry picked from commit 719c59e040)
2009-07-23 09:11:55 -07:00
Bharat Mediratta
39fa93eec7 Simpler solution for #545. Just don't show the form if the storage dir isn't set up yet 2009-07-15 21:06:42 -07:00
Bharat Mediratta
9b69dc8237 Revert "Fix for ticket #545."
This reverts commit d192f2f1bc.
2009-07-15 20:58:22 -07:00
Bharat Mediratta
3349525640 Revert "Fix for ticket #544."
This reverts commit f6973431b7.
2009-07-15 20:58:20 -07:00
Tim Almdal
f6973431b7 Fix for ticket #544.
* Separate the portion of get_db_info.html.php that displays the status
of the var directory into a separate view var_dir_status.html.php
* Change the processing to always generate the database information request
screen unless there is an environment error, the var directory is not writable
and the install was successful

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-15 21:56:15 +08:00
Tim Almdal
d192f2f1bc Fix for ticket #545.
Changed get_db_info.html.php to not display the database information
request form until the var directory is successfully tested as
writable.  This prevents users from thinking they can enter the
database information prior to successfully accessing the var
directory.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-07-15 20:42:58 +08:00
Bharat Mediratta
6281ed03d5 Turn off extended inserts when creating install.sql so that it's
easier to see what's changed.
2009-07-11 05:36:31 -07:00
Bharat Mediratta
9f753a53f0 MySQL 5 generates backwards compatible code-containing comments so:
SET character_set_client = @saved_cs_client;

becomes:
  /*!40101 SET character_set_client = @saved_cs_client */;

for MySQL 4.0.1-01 and newer.
2009-07-11 05:30:39 -07:00
Tim Almdal
b59e94e7dc Change references to Gallery 2 and Gallery 3 to consistently refer to
Gallery n as opposed any variants of this.
2009-07-07 07:32:36 -07:00
Bharat Mediratta
b0bb107b7e Get rid of references to vestigial check.html.php page. 2009-06-28 19:26:41 -07:00
Bharat Mediratta
177a854dbb Move the mysql_xxx() override function definitions inside
installer::connect(), otherwise they're defined before we call
check_environment, then we think we have mysql_query when we really
don't.
2009-06-28 19:23:19 -07:00
Bharat Mediratta
5b2c08d797 Set the gallery module version to 6 in install() (missed this in my last change).
Refresh the install.sql.
2009-06-28 17:37:14 -07:00
Bharat Mediratta
388f7ba310 Updated for module upgrades:
gallery 2 -> 3
  comment 1 -> 2
2009-06-27 21:12:37 -07:00
Bharat Mediratta
0735cfb30c "the the" -> "the" 2009-06-24 11:06:36 -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
acd54fefda Fix a bug in gallery_installer where on an initial install we were
only implementing schema version 1.  This caused install.sql to be
populated from version 1 which meant that after install you'd have to
run the upgrader.  No harm done, and the pattern is fixed for the
future.

Alphabetize the tables so it's easier to find stuff.
2009-06-20 01:24:21 -07:00
Bharat Mediratta
52ac0e7172 Remap mysql_xx() functions to their mysqli counterparts if the mysql
extension is unavailable.  Fixes ticket #393.
2009-06-13 17:06:34 -07:00
Bharat Mediratta
2a9335f71b Update version to beta 1 2009-06-05 17:45:42 -07:00
Bharat Mediratta
8c580f75ed use PHP_SAPI instead of php_sapi_name() 2009-06-01 18:20:15 -07:00
Bharat Mediratta
c94c11eb3e Normalize the random values used in the blocks_dashboard_xxx vars so
that install.sql is more stable.
2009-06-01 00:22:30 -07:00
Tim Almdal
3c24d94766 Merge branch 'master' of git@github.com:gallery/gallery3 2009-05-31 23:28:42 -07:00
Tim Almdal
463b3454ae Move the sql packaging code from installer into the gallery module. It must be run from the command line and will throw a 404 if it is run as a web request. 2009-05-31 23:28:27 -07:00
bharat
c96b81db65 Fix a warning 2009-06-01 00:22:21 -04:00
tim almdal
120088140c Move the code that was in the scaffolding to package the initial mySql database and var directory to a seperate standalone file in the installer. This will save the current database environment and restore it when the packaging is complete 2009-05-29 23:34:24 -07:00
Bharat Mediratta
60d1bbc2d6 Move credits message into a variable, which can be changed in Admin >
Settings > Advanced.  It's stored in the variable as an
internationalized string and localized at output time.
2009-05-29 20:24:42 -07:00
Bharat Mediratta
994830f611 Fix the code to specify which columns its inserting into. Without
that it's fragile, and I broke it when I sorted the columns
alphabetically a day or two ago.
2009-05-29 18:04:54 -07:00
Bharat Mediratta
84ce0cdefd Normalize root update time in the installer
Rebuild install.sql
2009-05-27 19:59:54 -07:00
Bharat Mediratta
e8cd6bd5e7 Manually updated to change 'core' to 'gallery' 2009-05-27 16:31:10 -07:00
Bharat Mediratta
88a3d43ba9 Update all references to the core application to now point to the
gallery module.  This type of mass update is prone to some small bugs.
2009-05-27 16:17:29 -07: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
0536025ff6 Add a default image quality level. There's no UI for it, except Admin
> Settings > Advanced.  The default is 75.
2009-05-20 04:04:50 +00:00
Bharat Mediratta
1c84472746 Make our dependency on json_encode() an explicit requirement 2009-05-17 21:51:15 +00:00
Bharat Mediratta
1968057a90 Add var/tmp 2009-05-17 04:44:16 +00:00
Bharat Mediratta
a0e5e0b1aa Tell the user the location of VARPATH so that they know where their photos are getting installed. 2009-05-14 22:39:45 +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
aaff4a7886 Introduce a relative_path_cache column in the items table. This lets
us avoid doing lots of MPTT lookups to find the parent path when we're
trying to generate thumbnails, etc.  Invalidate the cache at all the
right times.  This greatly reduces our query count on album page views.

This fixes ticket #40.
2009-05-14 02:14:46 +00:00
Bharat Mediratta
baa220186e Suppress some warnings 2009-05-13 22:34:54 +00:00
Bharat Mediratta
5495037a3d Gee it's May already. Update copyright to 2009. 2009-05-13 20:04:58 +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
d049e406e0 updated to reflect tinyint(2) -> smallint(6) change 2009-05-13 04:45:25 +00:00
Bharat Mediratta
7008bfb5c3 Warn the user if they're attemping to reinstall into a database that
already has Gallery 3 tables.  Otherwise, permit it to continue.

We key this off of the existence of the g3_items table.  Theoretically
it's possible that the g3_items table is gone but other tables are
still there, which could mess things up.  I'm not going to worry about
that for now.

Fixes ticket #175
2009-05-13 00:32:19 +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
e382ec748e Root album weight is now 1; Organize module is auto-activated; search_record has a key on item_id 2009-04-28 20:54:05 +00:00
Bharat Mediratta
e30c023bd3 Use single quotes so that user data containing $ doesn't suffer
variable interpolation.  Fixes ticket #229.
2009-04-23 23:58:16 +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