Commit Graph

40 Commits

Author SHA1 Message Date
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
2a9335f71b Update version to beta 1 2009-06-05 17:45:42 -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
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
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
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
1968057a90 Add var/tmp 2009-05-17 04:44:16 +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
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
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
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
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
Bharat Mediratta
acfb81d940 Oops, we need UNIX_TIMESTAMP() instead of NOW() 2009-03-20 08:25:33 +00:00
Bharat Mediratta
6df1dffed1 Do some data normalization so that the install files will have stable
ordering and known values.  This way subsequent packaging runs won't
have any differences unless there's a real data change.
2009-03-20 08:22:57 +00:00
Bharat Mediratta
1055fe6be3 Revive the install() and uninstall() functions in Scaffold_Controller
because we need those to make a package.

Fix the packaging code to ignore whatever prefix is being used by the
developer who is doing the packaging.

Update the install.sql file (there were a variety of small
inconsistencies, probably from hand-editing.  Don't hand-edit this
file!)
2009-03-16 08:49:55 +00:00
Tim Almdal
c0375db79f Restructure the sort order to maintain the sort column and sort order
as two separate columns in the item table.
2009-03-09 13:30:22 +00:00
Bharat Mediratta
2aaf263b9e On second thought, make the description column varchar(2048) instead.
If I understand correctly, this is better for performance.  I could be
wrong here, though.
2009-03-09 03:33:49 +00:00
Bharat Mediratta
1ad7ca639d Make the description a text column so that we can handle much larger
descriptions.
2009-03-09 03:29:22 +00:00
Bharat Mediratta
72c7fed975 Log the user in as admin after running the web installer, and give
them a nice "Welcome to Gallery 3" dialog.  The text in there needs a
little work but it's a start.

In the process, re-build the install.sql using the scaffolding code.
2009-03-08 21:21:09 +00:00
Tim Almdal
39954ad0b7 Implement Sortable albums. Current sort fields include (Creation
Date, Update Date, Random Key, Title, Mime Type, Item Type & Number of views)
2009-03-08 16:29:01 +00:00
Tim Almdal
14c1f45578 Forgot to update the install.sql when i changed the [] to {} to
identify table names that need substitution.
2009-03-02 01:53:26 +00:00
Tim Almdal
0b9fe18a6b Both the command line and web installer installer now supports
creating tables with a table prefix.
There are still some queries that haven't been converted, so don't
start using prefixes yet.  However, if you do, you can login and
modify the user profile.
2009-02-27 19:26:21 +00:00
Tim Almdal
dc4f784558 * Refactor task management methods from admin_maintenance.php to
task.php
* Added a owner_id field to the task database
* Modified the admin maintenace to show the owner of the task
<<**** Requires a reinstallation of core ****>>
2009-02-27 16:28:20 +00:00
Tim Almdal
d097b4fc02 Update to image_block based on bharat's feedback
1) move the rand_key column into core
2) don't do a max rand, just try to a get a random number less than
the current random number if that doesn't successd look the other way
2009-02-26 23:38:17 +00:00
Tim Almdal
4b08146c45 A couple of references to media_rss that were overlooked 2009-02-23 19:19:16 +00:00
Andy Staudacher
8bba897a46 Changing from binary(16) to char(32) as translation message key.
Although less efficient as a storage / transmission / comparison format, it's friendlier on the eyes and universally supported.
2009-02-23 06:33:10 +00:00
Andy Staudacher
c2eee47465 Move site default_locale into DB (vars) and add a per user locale preference.
There's no UI to select the locale yet.
2009-02-10 02:37: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
Bharat Mediratta
681197a265 Web based installer. It's still got some rough edges, but you can now
do a complete CLI or web based install.
2009-01-20 00:54:02 +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
Bharat Mediratta
0448a5b32c Flush the access_intent cache after ALTER TABLE queries, fixes a
problem where the install.sql had the wrong view permissions.
2009-01-19 06:02:53 +00:00
Bharat Mediratta
c136a2e84a Packager now does a clean reinstall of just the packages we want, then
rebuilds the install.sql and init_var.php files accordingly.
2009-01-19 05:16:55 +00:00
Bharat Mediratta
46d010e89d Simplification pass over the installer:
- Flattened the directory structure
- Greatly simplified structure in installer; it now only reports environmental
  checks that fail.  Simplified code that prints exceptions.  Use only mysql
  calls for the installer, but select mysqli automatically if it's available.
  Drop the response file; that's easily replicated with flag support
- Create a random password for the admin user
- Delete unused controllers
- Invert the form of the database config template to be mostly non-PHP
  with just a few PHP calls
2009-01-19 03:31:13 +00:00