Commit Graph

148 Commits

Author SHA1 Message Date
Bharat Mediratta
b6363bcb03 Update to reflect changes in Kohana ORM relationship code.
Now you must call ORM::save() after ORM::add() and ORM::remove().
2008-12-15 20:49:05 +00:00
Bharat Mediratta
1127257f63 Rename default_admin to admin_default. 2008-12-15 01:50:52 +00:00
Bharat Mediratta
c02d2554cf Refactor admin dashboard.
o Copy all the assets from default to default_admin so that they're
  totally separate
o Get rid of $item_theme
o Rename list_users.html.php to users.html.php
o use __call in admin controller to allow us to load any admin page
2008-12-15 01:48:34 +00:00
Bharat Mediratta
19e75b1e2e mark unauthorized exception w/ a @todo 2008-12-15 00:37:31 +00:00
Tim Almdal
db7e60da32 Change the watermark module to use forge.
Also the watermark file is now stored in varpath.
and the location is stored in the module vars table
2008-12-14 23:53:30 +00:00
Felix Rabinovich
c46bd97407 load admin subpages AJAXy way 2008-12-14 21:50:10 +00:00
Bharat Mediratta
b7487e384d convert single quotes to double quotes for consistency. 2008-12-14 21:39:56 +00:00
Tim Almdal
4b4e9e8e45 The start of the watermark module. It doesn't save the watermark at this point. This is more of trying out the approach where Forge is not used for forms. Basic html and the Validation library. 2008-12-14 19:43:04 +00:00
Felix Rabinovich
7fa014ae61 refactored admin views and added 'List User' 2008-12-14 07:59:24 +00:00
Felix Rabinovich
8b81731846 clean the links and require authorization before showing admin pages 2008-12-14 04:39:22 +00:00
Felix Rabinovich
cb92d1a70d 1. fix up the <link> and <script> elements in the dashboard <head>.
2. made the images work properly
2008-12-14 04:16:38 +00:00
Felix Rabinovich
34c9aa52b8 Fixed tabs and line endings 2008-12-14 02:45:07 +00:00
Felix Rabinovich
13ad40ab5c Created admin controller and made admin obey admin theme settings 2008-12-14 02:23:37 +00:00
Tim Almdal
80792d4fb1 Set the resize and thumbnail maximum dimension into the module vars table 2008-12-13 05:01:12 +00:00
Tim Almdal
8f4fec1f3d Change the check from class_exists to module::is_installed 2008-12-12 23:02:53 +00:00
Tim Almdal
942dbe175c Remove a couple of todo's by store the "theme name", "admin theme name" and "page size" in the vars table and initializing when the core module is installed 2008-12-12 19:39:38 +00:00
Tim Almdal
7715aa9c64 If the user class doesn't exist, then just set the owner_id to null. Another issue of generating data before the user class is installed 2008-12-12 19:36:07 +00:00
Bharat Mediratta
e12451cf10 Refaactor module::install() and module::uninstall() out of the
scaffolding and unit test code so that we can use it consistently.
This fixes an issue where adding a module was not refreshing the
statically cached module list causing the test framework to break.
2008-12-12 08:41:48 +00:00
Bharat Mediratta
a0415afc1d Use restore_error_handler() instead of a second set_error_handler() call 2008-12-12 07:44:19 +00:00
Tim Almdal
2fb94444d9 Randomly choose images from core/tests/images as test images 2008-12-12 07:40:53 +00:00
Tim Almdal
b202816324 Remove the attempt at a local import module 2008-12-12 01:46:43 +00:00
Bharat Mediratta
2cf3233f54 Get rid of all pseudo users and pseudo groups, while preserving all
other functionality.  This makes our user/group and access code
fully consistent.
2008-12-12 00:59:30 +00:00
Tim Almdal
e1f2a5d4e6 1) Begins the creation of the local import module by adding the administation component to the scaffolding Actions tab. The importing functionality will follow shortly.
2) Defines a routining pattern for module administration controllers.  URI's of the form admin/module/method/parameters gets remapped into module_admin/method/parameters. This will result in the lookup of the the controller Module_Admin_Controller
2008-12-11 17:20:55 +00:00
Bharat Mediratta
18a6614a11 Change all access API methods to take ORMs instead of ids. This will
minimize reloading objects from the database.
2008-12-10 07:05:49 +00:00
Bharat Mediratta
4a0e4b798e Check view permissions before allowing view access to albums/photos. 2008-12-09 10:14:09 +00:00
Bharat Mediratta
e62103b8d9 Move code to delete users and add/remove users from groups into the
model.
2008-12-09 08:47:30 +00:00
Bharat Mediratta
f69f3967ea move user::delete() to User_Model::delete() 2008-12-09 00:07:26 +00:00
Bharat Mediratta
f0a1950597 Fix a bug in the redirect after adding photos. 2008-12-07 04:56:39 +00:00
Bharat Mediratta
2aa84796f3 * Don't call _getadd_photo_html() when we don't have an items table.
* Guard against errors when uninstalling modules that don't have any code left (eg: carousel)
* Create the var/uploads dir automatically.
2008-12-07 01:24:44 +00:00
Tim Almdal
fb6e22e145 Implemented photo::_get_photo_add(). You need to create the var/uploads directory and make it writable by the server. The location of the temporary upload directory is specified in config/upload.php 2008-12-06 21:14:36 +00:00
Tim Almdal
64c380a60d Correct @todo's in Item_Controller 2008-12-06 20:27:55 +00:00
Bharat Mediratta
bda84d71eb Fix a bug where any uninstall removed the entire database. 2008-12-05 06:27:02 +00:00
Tim Almdal
0f103b1c06 Moving albums around with a drag and drop interface seems to work and preserve the left right pointers.
* changed _lock and _unlock to protected methods lock and lock respectively
* added a moveTo method on the Item_Model
* Corrected the hole closure  on delete.
* added moveTo on the ORM_MTPP class
* Changed the rearrange javascript to do moves with ajax
2008-12-04 20:05:58 +00:00
Bharat Mediratta
9ba9f7bf27 Change the startup code to only put installed modules on the autoload
path.  This breaks a bunch of places where we had hardcoded
dependencies, so guard all of those cases.  Restructure
module::available() a bit and the way that we do install/uninstall in
the scaffolding.
2008-12-04 07:44:28 +00:00
Tim Almdal
1ae3ed7e3b Get rid of the rearrange helper as the code could be inlined 2008-12-04 06:36:14 +00:00
Bharat Mediratta
ccee9854c2 Rename file::unlink() to dir::unlink(). This creates an API that is
clearer about its actions, otherwise we may accidentally blow away an
entire hierarchy when we think we're deleting a single file (there's a
reason why rm won't let you delete dirs that aren't empty!)

Name it "dir" instead of "directory" because apparently "directory" is
already reserved.

Move the delete call out of Items_Controller and into the model.  The
model is responsible for keeping state integrity, not the controller.
2008-12-03 23:31:10 +00:00
Tim Almdal
7bb4b6029d Add a MY_file class that extends the file helper by creating an unlink method that deletes a file or an album directory.
Modify Items_Controller::_delete to call this new helper method when deleting an item
2008-12-03 22:39:57 +00:00
Bharat Mediratta
39499cdf2e Add /welcome/form/add/photos to give you the add photo form. 2008-12-03 05:40:59 +00:00
Tim Almdal
3953dde2c6 The rearrange module will now add an album if you drag the "new album" onto the album tree. I haven't had a chance to figure out why the form does get any styling or why a textarea is no included as a list item. 2008-12-02 21:25:15 +00:00
Bharat Mediratta
ed2cb2a86d Fix profiler settings in the scaffolding 2008-12-01 10:40:40 +00:00
Bharat Mediratta
5c303aa07b Add access::reset() so that you can specify your intent to use the
parent's permissions.

Update scaffolding to demonstrate that it works.
2008-12-01 09:57:03 +00:00
Bharat Mediratta
91c4bda1ec Prototype access control model. There's much left to do, but it's a
working implementation.
2008-12-01 08:50:00 +00:00
Bharat Mediratta
6b03b798f3 Move rearrange HTML generation into welcome.php so that we gracefully
handle the case where the DB is not installed yet.
2008-11-30 21:39:23 +00:00
Bharat Mediratta
4271f7702a Add access model (not fully baked yet).
Update scaffolding to allow addition of just albums (helpful for testing permissions)
2008-11-29 22:47:15 +00:00
Tim Almdal
70de32ebb4 Insure that the page and offset refere to valid items 2008-11-29 17:08:42 +00:00
Tim Almdal
6a76d6f747 Dynamically create the list of available modules. This permits new modules to be added without having to update the config.php file 2008-11-28 21:22:34 +00:00
Bharat Mediratta
8b6ed6c477 Create module::event() which runs Gallery events. It works by
convention.  To respond to the "photo_created" event in the gmaps
module, you create modules/gmaps/helpers/gmaps_event.php containing
class gmaps_event which has function photo_created.

Renamed all events from gallery.foo.bar to foo_bar
Updated tag module to use new convention.
2008-11-28 19:37:01 +00:00
Bharat Mediratta
2c86723942 Add an easy way to add a bunch of servers from the server side 2008-11-28 05:45:35 +00:00
Tim Almdal
828f23896f Rename item events and create events for comment create, login, logout, user creation. I probably forgot some, but its a start. 2008-11-28 00:51:38 +00:00
Tim Almdal
bac4ff2046 1) Create a Theme_View class that combines the functionality of the Theme class with the View class.
2) Only define the form.html.php::DrawForm method once if there are multiple forms on the page (i.e. comments and add tags)
2008-11-27 16:19:07 +00:00