Commit Graph

208 Commits

Author SHA1 Message Date
Chad Kieffer
121fcab5c8 Replaced most clear fix hacks with generic class. 2009-10-07 00:46:02 -06: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
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
Tim Almdal
b310fab1f8 Change the link on the "Be first to comment" link to do a request to the server to get the comment add form. Fixes ticket #699. 2009-09-22 07:59:26 -07:00
Bharat Mediratta
aed7ce9161 Specify a page anchor for the comments block. 2009-09-13 14:25:17 -07:00
Bharat Mediratta
21d6e17efa Don't add another comment form every time you click the [Add a
comment] button.
2009-09-13 14:19:04 -07:00
Bharat Mediratta
d5cd6a92e7 Rename $comment_model to $comments, this time without stomping on the
pre-existing variable.
2009-09-01 20:40:18 -07:00
Bharat Mediratta
eab5d71d06 Revert "Rename $comment_model to $comments."
This reverts commit d85a8b20bb.
2009-09-01 20:39:08 -07:00
Andy Staudacher
1d30691452 Add missing mark_clean() for t() calls with %attr parameter. 2009-09-01 12:14:23 -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
fc294c2777 XSS fixes in admin_comments.html.php 2009-08-30 21:26:23 -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
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
Chad Kieffer
a9fcec755a Merge branch 'master' of git@github.com:gallery/gallery3 2009-08-29 14:02:29 -06:00
Chad Kieffer
5db0b68a70 Update status message styles. Lighten backgrounds, don't show background on Admin Maintenance rows, and added gModuleStatus class. 2009-08-29 14:01:04 -06: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
cd1fd4989f Add a test for Comment_Model::viewable(). 2009-08-29 12:22:00 -07:00
Bharat Mediratta
d85a8b20bb Rename $comment_model to $comments. 2009-08-29 11:48:49 -07:00
Tim Almdal
38b2efc44c Fix for 641... extend viewable functionality to comments. Viewable unit test is not working. 2009-08-29 11:43:10 -07:00
Tim Almdal
6de10a54dd Fix typo in the parameter list 2009-08-29 11:21:30 -07:00
Tim Almdal
1d5262f9c3 Fix ticket #591: reCaptcha always on the page.
1) move creating the "Add a comment" button into the comments.html.php
2) use $.get() to retrieve the comment add form
2009-08-28 13:44:01 -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
7863aa16f9 Update tags module to notify modules when items related to a tag are
affected.  Practically speaking this means that we'll reindex items
when tags are added or removed from them.

API change:
  Remove item_related_updated_batch event.

Rationale:
  While this is an efficient event, it requires module developers to
  support two event APIs for staying up to date and increases the
  likelihood that they'll forget one and have data corruption.  Force
  them all through the slower but more reliable pipe, for now.  We
  can always try to improve efficiency by using the batch_start and
  batch_stop events.
2009-08-08 14:30:21 -07: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
2473418ea3 Show the author's username if the author has no fullname. Fixes ticket #601. 2009-07-29 17:35:56 -07:00
Bharat Mediratta
44bc74edb9 Change search callbacks to use the event system, so move them out of
xxx_search helpers and into xxx_event helpers.
2009-07-28 20:30:34 -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
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
Bharat Mediratta
0f766b149d Second non-trivial change to the event code. We now publish model
related events from within the model handling code.  The only
exception to this currently is item_created which is challenging
because we have to save the item using ORM_MPTT::add_to_parent()
before the object itself is fully set up.  When we get that down to
one call to save() we can publish that event from within the model
also.
2009-07-16 12:31:40 -07:00
Bharat Mediratta
5b3b675b6d Non-trivial changes to the event handling code:
1) The item_updated event no longer takes the old and new items.
   Instead we overload ORM to track the original data and make
   that available via the item.  This will allow us to move event
   publishing down into the API methods which in turn will give us
   more stability since we won't require each controller to remember
   to do it.

2) ORM class now tracks the original values.  It doesn't track
   the original relationships (no need for that, yet)

3) Added new events:
     item_deleted
     group_deleted
     user_deleted
2009-07-16 11:19:34 -07:00
Bharat Mediratta
e2a9a1d284 Add quotes around all values that contain spaces in them, and add a
test to make sure that we continue to do so.

This makes sure that we don't have problems with 5.3 which treats the
literal "on" as a boolean.
2009-07-13 10:36:55 -07:00
Bharat Mediratta
a944bf4259 Avoid using the bare word "on" in a value; it breaks PHP 5.3.
Fixes ticket #540.
2009-07-13 06:43:44 -07:00
Tim Almdal
b59e94e7dc Change references to Gallery 2 and Gallery 3 to consistently refer to
Gallery n as opposed any variants of this.
2009-07-07 07:32:36 -07:00
Tim Almdal
4f0b4469f9 Forgot this file when i was fixing #477 2009-07-04 17:33:10 -07:00
Tim Almdal
d6648c0aff Fix for ticket #477. Use nl2br method when rendering comment::text and
item::description.  In addition add p::clean or p::purify to places that
xss cleaning had missed (i.e. rss feeds)
2009-07-04 08:17:12 -07:00
Tim Almdal
54ffea2419 Split the clean method into two clean and purify. clean is a light weight
approach using html::specialchars and purify uses HTMLPurifier to intelligently
cleanse the output fields. Use purifier for text and title fields where it is
likely that a user would enter html to format their data.
2009-07-03 21:44:10 -07:00
Tim Almdal
6f3ec5f039 Fix for ticket #357.
Changed the set the created date as part of the import and change
models/comment::save() to not set the creation date if it is already
set.
2009-07-01 22:18:52 -07:00
Bharat Mediratta
6e8a8c53e6 Rename $theme->url() to $theme->theme_url() for consistency wiht
$theme->theme_script().
2009-06-28 19:49:48 -07:00
Tim Almdal
4cec020163 Create a theme_view function script which allows modules in the head or admin_head functions to specify javascript files that are required for this page.
In this commit, these script files are expressed at the end of the head or admin_head calls and appended to the beginning of the block stack.  In a future commit these will be combined and gzipped for download.
2009-06-26 14:37:15 -07:00
Bharat Mediratta
4384b67be1 Comment out [reply] and [edit] links because they're not implemented
yet.  This closes ticket #416, and I'll open a new ticket to implement
these functions.
2009-06-24 21:30:48 -07:00
Bharat Mediratta
3b0baa8271 Replay change from Romain DE LISEZ to change the state column to be a varchar 2009-06-23 13:45:16 -07:00
Bharat Mediratta
e49c4a2459 Upgrade to version 2 and change the state column to a varchar for
Postgres compatibility.
2009-06-23 13:40:23 -07:00
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