Commit Graph

472 Commits

Author SHA1 Message Date
Tim Almdal
8285cd58e2 Handle the filters on Identity/Gallery::list_users and Identity/Gallery::list_groups 2009-10-05 18:10:39 -07:00
Tim Almdal
ca17727478 Access the form validation rules via the API for groups and users 2009-10-05 17:08:27 -07:00
Tim Almdal
194cc3b27a First pass on converting calls to the Identity interface. Will worry about writes and saves later.
Convert the Admin_User controller
Convert the login and password change controller
Change the item model to call user::lookup to get the owner.
On the log model, delete the relationship between the log and user table, and replace with a
call to user::lookup
2009-10-05 16:28:16 -07:00
Tim Almdal
08c01fec6c The initial commit of refactoring the user/group adminsitration into a driver.
Create an Identity library that defines the interface the Gallery3 expects
Move the user and group helpers into the gallery module to provide the familiar
interface into the Identity library.
Create a Gallery Identity back-end that is supplied by the user module.

The vision here is that all user and group code that is gallery or ui specific
is contained within the core product.  Anything that relates to manipulating a
user or group is contained in the back end code that can be replaced.
2009-10-05 16:27:52 -07:00
Chad Kieffer
d581bbbd1e Renamed more CSS selectors from gName to g-name. 2009-10-04 15:53:00 -06:00
Chad Kieffer
3e6ba7acc3 Renamed most, if not all css selectors from gName to g-name. Moved a few shared images from wind to lib. Deleted unused images in the admin_wind. This will likely break a few ajax features. 2009-10-04 00:27:22 -06:00
Chad Kieffer
9145331fd4 Renamed and moved gOdd/gEven CSS classes. 2009-10-03 12:33:53 -06:00
Chad Kieffer
e1e8904e4a Convert gDialog and gCancel over to g-dialog and g-cancel. Refactor CSS id's and classes in the login/reset password dialog. 2009-09-30 22:49:36 -06:00
Chad Kieffer
8f3691d502 Apply button style and hover effect to password reset button. 2009-09-30 22:20:34 -06:00
Chad Kieffer
1f252f0609 Missed g-right application on add group 2009-09-30 21:52:51 -06:00
Chad Kieffer
0c3c13d27f Removed blank line. 2009-09-30 21:12:00 -06:00
Tim Almdal
a210878725 Merge branch 'master' into talmdal_dev 2009-09-30 07:37:14 -07:00
Tim Almdal
60d35b8992 Use the block_manager to manage site sidebar panels. Fixes ticket #110.
* Extend block_manager to handle sidebar blocks. get_available has become get_available_admin_blocks, get_list becomes get_admin_list.
* Create new functions get_available_site_blocks which will look for gallery_block get_available_site_blocks.
* Refactor sidebar_blocks into a separate function and then call block_manager::get_html(site.sidebar). Convert image_block to use block management instead of theme::sidebar_blocks
* Change the block_manager api so that the theme is passed into the get method. convert info to the new sidebar block approach
* Convert the user module to use the new sidebar block structure. remove the installers for info and image_block modules.
* Convert tag and rss modules to the new sidebar framework. reset the version number to 1 for info and image_block modules.
* Change the get_html method to ignore empty blocks and change the individual handlers to return an empty string if no block is generated
* Add a warning message if no sidebar blocks are active and provide a link to the admin page that configures the sidebar.
2009-09-30 07:31:12 -07:00
Chad Kieffer
72672bda39 Replaced gButtonLink with g-button. 2009-09-30 08:04:49 -06:00
Chad Kieffer
daa3a2b43c First round of CSS refactor updates. Added calls to gallery.common.css from wind and admin_wind. Replaced basic text align and block float classes. Removed section #2 from both themes screen styles. 2009-09-30 00:32:52 -06:00
Andy Staudacher
e168e0dfae CSRF / auth fixes, golden data file checkpoint 2009-09-15 21:50:48 -07:00
Bharat Mediratta
7fddd2aced Use abs_url() inside url::redirect() calls so that we don't just wind
up tacking onto the base url.
2009-09-10 21:31:50 -07:00
Bharat Mediratta
2aad580f53 Move specialized (pretty) url generation back into Item_Model so that
we're not relying on overriding url::site() to do tricks around item
urls.  This means that you won't get item urls by doing
url::site("albums/37"), for example, but it also means that we won't
get pretty urls where we don't expect them (like in the action of a
<form> element).

Incidentally, this will help us move over to using the slug format
because if you've got a bad character in a url, the edit forms will
now work on it since they'll be id based.
2009-09-08 13:44:52 -07:00
Bharat Mediratta
d8f5b0f5a3 Change click() to change() so that we immediately update the UI when
the user picks a new option.
2009-09-05 21:14:25 -07:00
Andy Staudacher
beb232a1cc Revert previous edit. Prefer « none » (sweet, nice Unicode characters) instead of HTML entities. 2009-09-05 17:43:47 -07:00
Andy Staudacher
047196b23c Add missing view for language selection 2009-09-05 17:39:49 -07:00
Bharat Mediratta
add134cc75 placeholder for a missing view 2009-09-04 20:29:12 -07:00
Bharat Mediratta
a25640f9b2 Shorten the name in the block so that it doesn't wrap.
Use &laquo; and &raquo; in the << none >> text.
2009-09-04 20:28:46 -07:00
Andy Staudacher
75e99c9ea3 When changing user preferences, reset the session based locale preferences. 2009-09-04 11:17:11 -07:00
Andy Staudacher
001623c755 Add new locale preferences: Adding per session (cookie) locale preferences and check the browser's / OS' locale preferences.
Ticket 582.
2009-09-04 11:06:20 -07:00
Andy Staudacher
53711225ac XSS / style fixes for newly detected issues (after fixing XSS scanner) 2009-09-01 01:28:52 -07:00
Andy Staudacher
2bc73e2e36 Fix XSS vectors in HTML attributes (mostly t() calls) 2009-08-31 21:51:57 -07:00
Andy Staudacher
ddb84c84e1 Rename mark_safe() to mark_clean() 2009-08-31 00:42:18 -07:00
Andy Staudacher
effccfd41d Change all instances of SafeString::of_safe_html() to html::mark_safe() in views. 2009-08-30 07:00:56 -07:00
Andy Staudacher
b9bd1681a3 Update all code to use helper method html::clean(), html::purify(), ... instead of SafeString directly. 2009-08-29 22:54:20 -07:00
Andy Staudacher
b4b638be44 Undo url helper changes - url methods no longer return a SafeString.
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29 16:28:30 -07:00
Andy Staudacher
a5dfc81a8f Merge commit 'upstream/master'
Conflicts:

	modules/akismet/views/admin_akismet.html.php
	modules/comment/helpers/comment_rss.php
	modules/gallery/helpers/gallery_rss.php
	modules/gallery/libraries/I18n.php
	modules/gallery/views/permissions_browse.html.php
	modules/gallery/views/simple_uploader.html.php
	modules/info/views/info_block.html.php
	modules/organize/controllers/organize.php
	modules/organize/views/organize.html.php
	modules/organize/views/organize_album.html.php
	themes/default/views/album.html.php
	themes/default/views/movie.html.php
	themes/default/views/photo.html.php
2009-08-29 14:17:48 -07:00
Andy Staudacher
c01ac42c46 Refactor all calls of p::clean() to SafeString::of() and p::purify() to SafeString::purify().
Removing any p::clean() calls for arguments to t() and t2() since their args are wrapped in a SafeString anyway.
2009-08-29 12:48:40 -07:00
Bharat Mediratta
50c624ed1b Fix active() to not use user::guest() as the fallback for our Session::get() call. 2009-08-29 12:20:03 -07:00
Andy Staudacher
020281d932 Adding SafeString which is going to replace p::clean() and p::purify().
Refactoring of Xss_Security_Test.
t() and t2() return a SafeString instance.

TODO:
 - Update all code to use SafeString where appropriate.
 - Update golden fole of Xss_Security_Test
 - Stop reporting CLEAN vars in Xss_Security_Test
2009-08-29 10:45:47 -07:00
Bharat Mediratta
4828db003f Remove 'ENGINE=InnoDB' specification from tables that we create. Use
the system's default table specification.  Fixes ticket #597.
2009-08-27 15:47:54 -07:00
Bharat Mediratta
e586389f65 Don't ask for csrf when we're resetting passwords. They're not gonna have one. Duh!
Fixes #642.
2009-08-27 13:29:45 -07:00
Bharat Mediratta
5c25973ee8 Require a valid url for users. Fixes ticket #612. 2009-08-09 00:02:17 -07:00
Tim Almdal
445a8fb1b6 Change galleryPanel and galleryDialog widgets to gallery_panel and gallery_dialog respectively
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 02:08:42 +08:00
Tim Almdal
a302a9c3fa Refactor the gallery dialog into a jQuery widget
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 02:08:28 +08:00
Bharat Mediratta
1591c3871a Don't show the ajaxy login link in the top right corner if we're on the login page itself.
Signed-off-by: Bharat Mediratta <bharat@menalto.com>
2009-08-08 01:40:54 +08:00
Tim Almdal
b826182b7a Cleanup the javascript for enabling dialog or panel links.
1) We don't need to loop over the elements to bind the event handler.
2) Just include gallery.panel.js for all the admin pages.

Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-08-06 22:28:05 +08:00
Bharat Mediratta
7ad0808a11 Change the API for getting to the original state of an ORM.
Old API:  $obj->original("field_name")
  New API:  $obj->original()->field_name

This allows us to revert the varous xxx_updated events back to passing
an original ORM as well as the the updated one.  This makes for a
cleaner event API.

  Old API:  comment_updated($comment) { $comment->original("field_name") }
  Old API:  comment_updated($old, $new) { $old->field_name }
2009-08-02 12:09:00 -07:00
Bharat Mediratta
67d4ae21d5 Clean up user form events. Thanks to Ben Smith (glooper). 2009-07-29 17:43:12 -07:00
Bharat Mediratta
1e90e40d3a Use events to generate menus, instead of having xxx_menu helpers.
This is the first step towards having a simple, lightweight and
unified API for module interaction.
2009-07-28 13:47:22 -07:00
Tim Almdal
00cd2b646d fix for ticket #574. The user->url database wasn't being set when the user was updated via the admin panel. 2009-07-25 15:00:57 -07:00
Tim Almdal
7a6952720c Pass the variable when the "user_edit_form" event is fired. 2009-07-25 14:48:10 -07:00
Bharat Mediratta
1fbdf1a1e0 Add form processing events:
user_add_form_admin            admin adding a user
 user_edit_form_admin           admin editing a user
 user_add_form_admin_completed  successfully added a user (admin)
 user_edit_form                 user editing their own settings
 user_edit_form_completed       successfully edited a user (admin and user editing own settings)
2009-07-23 10:35:52 -07:00
Bharat Mediratta
41b8f943a6 Convert instances of theme_url() to just url() to match the API change
made in dbeadc1407
2009-07-23 10:20:49 -07:00
Bharat Mediratta
dbeadc1407 Use the Kohana cascading filesystem to locate resources loaded by the
theme.  Because the theme comes first, this means that themes can
override any module resources, at the cost that we no longer have
namespacing for JS and CSS files.

The only file getting used outside of this model is
themes/default/screen.css which is used in the admin theme.  I fixed
that by copying screen.css into admin_default and renaming its
screen.css to admin_screen.css.  I also copied over all the images
that it was referencing.

Fixes tickets #48 and #539.

Theme API changes:
- theme_script(), theme_url() and theme_css() are no longer needed
- script(), url() and css() now refer to the first matching asset in
  the module load path, where gallery3/lib is at the end of the path
2009-07-22 14:27:57 -07:00