Commit Graph

159 Commits

Author SHA1 Message Date
Bharat Mediratta
2e420522ec Preliminary work to cut over to Kohana 2.4
- Kohana::log() -> Kohana_Log::add()
- Kohana::config_XXX -> Kohana_Config::instance()->XXX
- Implement View::set_global in MY_View
- Updated Cache_Database_Driver to latest APIs
- ORM::$loaded -> ORM::loaded()
- Updated item::viewable() to use K2.4 parenthesization
2009-11-25 13:22:24 -08:00
Bharat Mediratta
01e10d1708 K2.4 has its own parentheses support 2009-11-24 19:24:38 -08:00
Bharat Mediratta
3ed7a5af46 Rename I18n to Gallery_I18n to avoid conflict with Kohana 2.4 2009-11-24 19:24:02 -08:00
Tim Almdal
ee9c921397 Don't use realpath when calculating the relative paths of embedded references in css files. This fixes ticket #910 2009-11-21 09:36:12 -08:00
Bharat Mediratta
9d40f6fc00 Paginator: don't try to set the position for "other" page types. 2009-11-20 20:29:49 -08:00
Bharat Mediratta
5e9bbbe490 Convert the Simple Uploader form over to Forge, and use the event
model to let the Tags module modify it.  This brings it inline with
our other module-extensible form based interactions.
2009-11-20 19:41:45 -08:00
Tim Almdal
57adefc5ba Revert "Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme."
This reverts commit 26114972c3.
2009-11-19 11:44:01 -08:00
Tim Almdal
26114972c3 Create theme::get_var(), theme::set_var() methods to set the options of the active site theme. Change all refrences to theme options to use these methods. Update the version number of Gallery to 20 and move any them related options to the be stored under the active theme. 2009-11-18 15:36:13 -08:00
Bharat Mediratta
670312ff10 For album pagination, don't let the last_visible_position exceed the
total.  Fixes ticket #903.
2009-11-18 11:26:19 -08:00
Bharat Mediratta
1067e68292 Redesign the way that we consider page types to create buckets of page
types, and a subtype for specifics.  Currently the top level bucket

   collection, item, other

Here are the core subtypes so far:

   collection: album, search, tag
   item: movie, photo
   other: login, reset, comment-fragment, comment

It's legal to create new page_subtypes whenever you want.  Use the
appropriate page_type to get the coarse grain behavior that you want.
2009-11-17 14:04:45 -08:00
Tim Almdal
2e4d29e7dd If an empty array is passed into set method, then make sure the tag value being stored in the database is null, not "Array" 2009-11-16 14:23:29 -08:00
Bharat Mediratta
5df00737c9 Fix a couple of errors in the refctored paginator code:
1) We weren't showing previous page links for albums when we should have
2) We needed to wrap the results of url::merge() in url::site() so that we
   generate server-relative urls.
2009-11-15 15:24:49 -08:00
Bharat Mediratta
aa1ddba155 Oops. Fix a typo that the forced page_type to always be "tag" 2009-11-14 16:36:25 -08:00
Bharat Mediratta
cd8663b81d Fix pagination so that it does not require any domain specific logic
to support tags and search.  Instead, just modify the page param to
the current page.
2009-11-14 16:31:56 -08:00
Bharat Mediratta
29efb6ba9f Rename "pager" to "paginator" so that we differentiate page.html.php
from paginator.html.php
2009-11-14 16:20:36 -08:00
Bharat Mediratta
081ce9f6ca Normalize pagination so that pager.html.php can handle pagination for
both albums and movies.  Kohana's paginator is not quite sufficient
for this, so create our own pagination logic in Theme_View with only
the stuff we need.

Clearly document the variables available in pager.html so that themers
know how to use it.

Fixes ticket #626.
2009-11-14 14:25:39 -08:00
Tim Almdal
0fe32a61f6 Standardize the name of the blocks. 2009-11-13 13:56:05 -08:00
Tim Almdal
beb63a8380 Clean up the In place edit api:
1) Only allow 1 in place edit to be active at a time (gets around the issue of using an id to identify the form
2) remove the add_ prefix from some of the api methods
3) clean up inconsistent naming
2009-11-06 23:05:20 -08:00
Tim Almdal
b5f2dbc2c4 Create a user_menu for the top of the page. Change the login, edit profile and logout portions of the banner to be rendered by the Theme_View::user_menu callback. This fires the user_menu event. Fixes Ticket #871. 2009-11-06 14:08:46 -08:00
Tim Almdal
b01056da91 Modify the Menu_Element class to allow for the specification of a custom view. Also allow the root element to specify a css id. 2009-11-06 13:03:48 -08:00
Tim Almdal
8ac7a5c0d3 Remove debugging statement 2009-11-05 13:21:40 -08:00
Tim Almdal
03408f3e39 Refactor the in place editting in tags admin out into a separate widget as part ofthe gallery module. Create the jQuery widget, form template and library to support generalized in place editting. Part of the fix for ticket #750. 2009-11-05 13:00:41 -08:00
Tim Almdal
8db2406c00 Added a config parameter to the IdentityProvider to specifiy the configuration. This allows the ldap installer to instantiate the ldap Identity provider to use in the install and uninstall methods 2009-10-31 14:11:06 -07:00
Tim Almdal
c6fbd34f28 Add the add_user_to_group and remove_user_from_group api method calls. If the identity provider isn't writable, the method implementations should throw an Invalid Operation exception. 2009-10-29 19:16:08 -07:00
Tim Almdal
392e24e56b Correct the issues that identity::registered_users was calling the backend provider everybody method 2009-10-29 12:12:22 -07:00
Tim Almdal
0bb2b7659f Add the admin_user api function to the identity helper and the IdentityProvider interface. 2009-10-29 11:12:55 -07:00
Bharat Mediratta
145a3f80ce Guard against developers who forget to internationalize label strings 2009-10-27 19:35:21 -07:00
Bharat Mediratta
13faf6035d Remove Menu::compact() in favor of putting an if-then clause in
menu.html.php.  This serves two purposes:

1) It's more efficient since we're doing less passes over the Menu tree
2) We're allowing themers to decide whether or not to show empty menus
2009-10-27 14:00:32 -07:00
Bharat Mediratta
76c0c7f3a1 Change our menu building blocks to use PHP templates so that themes
can override them and define their own menu formats.  I worry a little
bit that this approach may be too heavy since we're now doing a lot
more template includes than we were before.  Also, I had to change the
Menu API to stop using __toString() because you can't throw exceptions
from __toString() which would make it an unhappy experience for
developers.
2009-10-27 13:48:41 -07:00
Bharat Mediratta
abb080f232 phpDoc fixes. 2009-10-24 10:56:56 -07:00
Bharat Mediratta
73a01d475b Minor style tweaks. 2009-10-24 10:55:22 -07:00
Tim Almdal
b74b131e25 Change Identity adminstration to use the uninstall/install methods when changing providers. 2009-10-22 22:30:25 -07:00
Tim Almdal
3c936d661a Change the name of identity library from Identity to IdentityProvider. Create a helper class called identity to simplify call the Identity Provider. Move the contents of MY_Session.php to the new helper class and remove the MY_Session class 2009-10-22 13:11:03 -07:00
Tim Almdal
7638834e97 Address the issue of the administrator changing the identity provider whilst users are logged onto the system. Addressed the issue by adding try/catch logic to the Session::load_user() method. If load_user fails for any reason, then assume that the identity provider has changed, destroy the current session and redirect to the root album. 2009-10-21 15:17:23 -07:00
Tim Almdal
f04177f138 re-add the lookup_group_by_name API Method. 2009-10-21 11:49:42 -07:00
Tim Almdal
0d53ed619a remove the lookup_group_by_name as it is not referenced 2009-10-20 17:24:17 -07:00
Tim Almdal
b28c758d4a Add lookup_group Identity provider API and change the permissions controller to use it to get the group it is modifying 2009-10-20 17:21:33 -07:00
Tim Almdal
3ece1a01f2 Add a groups api method on the Identity provider and change access_Core::_get_all_groups() to use this to get the defined groups. 2009-10-20 17:01:19 -07:00
Tim Almdal
7f9441c33d Changes to Identity interface to allow for multiple Identity providers. What I've tested to this point, is you can install a new provider, switch to it, login as administrator, uninstall the default user module, reinstall the user module, switch back to the user module and login. 2009-10-20 16:32:22 -07:00
Tim Almdal
098b57bf18 Simplify the user interface by moving the password reset functionality into the user module
Bagging the User_Definition and Group_Definition abstract classes and replacing them with interfaces with the same names.
Make sure all the unit tests work.
2009-10-19 12:53:44 -07:00
Tim Almdal
c9a030dd08 Add a menu item to manage the Identity drivers if there is more than one installed 2009-10-18 09:21:34 -07:00
Tim Almdal
6d5c12e13e Move the default identity config into the users module and change the Identity constructor to look in module::get_var(gallery, identity_provider) for the current identity driver.
In addition, don't just arbitrarily lock the use module.  Only lock gallery and the module that is referenced by "user_driver_module" variable.
2009-10-18 08:00:33 -07:00
Tim Almdal
78ee4193b7 Remove all non Identity API methods from Identity.php. Created an MY_Session class to provide the user state changes in the session and a login.php helper that has the login form. 2009-10-16 10:06:58 -07:00
Tim Almdal
bc241e44c2 Cleanup merge of user/group helpers into Identity interface. Reduce redundant code in the user module and remove references to the Identity helper from the user module as the user module should be able to access things directly. Simplify the get_user_list api method to just accept an array of ids to return user objects for. 2009-10-16 08:55:26 -07:00
Tim Almdal
00eacd659f Start simplifying the interface by moving the static methods from user.php and group.php. Tried creating a identity helper, but the helper identity.php was confused with the library Identity.php. So got around this by making the methods on Identity static and calling the instance within the static methods. Also temporarily moved the user.php and group.php back into the user module. 2009-10-16 08:53:31 -07:00
Tim Almdal
be6765336e Finish integrating the move of the user edit/update functions into the user module. The premise is that the plugable user module will provide the update screens if the user backend supports updates. 2009-10-16 08:53:30 -07:00
Tim Almdal
5b4f309163 Clean up phpDoc and change the Identity driver so only one configuration can be active at a given time. 2009-10-14 09:47:04 -07:00
Tim Almdal
d9720b77e9 Merge branch 'master' into talmdal_dev
Conflicts:
	modules/gallery/controllers/admin_users.php
	modules/gallery/controllers/password.php
	modules/gallery/helpers/group.php
	modules/gallery/helpers/user.php
	modules/notification/helpers/notification.php
2009-10-13 11:48:42 -07:00
Tim Almdal
03d0311618 Implement a user::is_writable() API method and disable the user add, updates and display if the Identity driver does not support writes. This is set in the config.identity.php 2009-10-07 21:40:05 -07:00
Tim Almdal
c787e46c2a Change the __set method on User_Definition to actually set the value as opposed to return it. 2009-10-07 20:14:51 -07:00