diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-11-04 21:24:42 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-04 21:24:42 +0000 |
| commit | 605d2de336eac8c8f80b916d30989b347d813e94 (patch) | |
| tree | 1e33c92d4b3eedd9f4b3c31e21e11a9f36bcd8b2 /core/helpers/core_installer.php | |
| parent | ade1650846605d648da2565994e309414d908ac5 (diff) | |
Lots of new stuff!
Replace theme HTML with *almost* the latest stuff from the
mockups. (it doesn't include r18467 yet).
Our theme format is now modelled after WordPress / Habari's style
where you have one entry point per type (eg: album.php) which can
load up whatever parts it needs (eg: $theme->display("header"))
Created album and photo helpers which have create() functions
that form the base of our new API, along with tests for them.
Created our own version of the ORM_MPTT since the existing
versions were too buggy and unsupported to depend upon. Only has
a minimal implementation so far, and the tests are not yet
committed.
Added path(), thumbnail_path() and resize_path() to Item_Model
Extended the scaffolding to allow you to add lots of
photos/albums into your hierarchy.
Deleted modules/mptt -- we're not going to use this anymore.
Diffstat (limited to 'core/helpers/core_installer.php')
| -rw-r--r-- | core/helpers/core_installer.php | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 5720976b..d100e0d1 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -41,14 +41,14 @@ class core_installer { $db->query("CREATE TABLE `items` ( `id` int(9) NOT NULL auto_increment, - `type` char(32) default NULL, + `type` char(32) NOT NULL, `title` char(255) default NULL, `description` char(255) default NULL, - `path` char(255) default NULL, - `left` int(9) default NULL, - `right` int(9) default NULL, - `parent_id` int(9) default NULL, - `scope` int(9) default NULL, + `name` char(255) default NULL, + `left` int(9) NOT NULL, + `right` int(9) NOT NULL, + `parent_id` int(9) NOT NULL, + `level` int(9) NOT NULL, PRIMARY KEY (`id`), KEY `parent_id` (`parent_id`), KEY `type` (`type`)) @@ -64,9 +64,14 @@ class core_installer { $core->save(); $root = ORM::factory("item"); + $root->type = 'album'; $root->title = "Gallery"; $root->description = "Welcome to your Gallery3"; - $root->make_root(); + $root->left = 1; + $root->right = 2; + $root->parent_id = 0; + $root->level = 1; + $root->save(); } } @@ -74,5 +79,7 @@ class core_installer { $db = Database::instance(); $db->query("DROP TABLE IF EXISTS `items`;"); $db->query("DROP TABLE IF EXISTS `modules`;"); + system("/bin/rm -rf " . VARPATH . "albums"); + system("/bin/rm -rf " . VARPATH . "thumbnails"); } } |
