summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
AgeCommit message (Collapse)Author
2009-07-03Fix for ticket #400: Add HTMLPurifier to gallery3 and change p::clean() to ↵Tim Almdal
call HTMLPurifier->purify()
2009-07-012 fixes:Bharat Mediratta
1) Include the url in the cache key so that if the Gallery moves, we don't use old cached entries. 2) Use the relative path to files in the comments that we embed in our files so that we don't leak local paths.
2009-06-29Remove the testing code to force rebuilding the cache.Tim Almdal
2009-06-29Revert to serializing and deserializing data. The cache table can'tBharat Mediratta
accept PHP constructs like arrays (the tests were choking on this). Update tests to reflect the new `key` column.
2009-06-29Oops, "head" => "admin_head" to make the admin dashboard work.Bharat Mediratta
2009-06-29Fix some bugs in the combined JS/CSS code (most of which I introducedBharat Mediratta
in my last refactor): 1) Actually combine the JS (I was only combining the CSS) 2) Add line breaks between the files and comment them so that we can find a specific file inside the blob. 3) Add an HTML comment to help developers figure out why they can't find their CSS/JS.
2009-06-29Add a media type using the most common media type from our CSS. ThisBharat Mediratta
doesn't fix the problem that we need to support multiple media types (the original code had superfish using just "screen", and some other deviations). There's no code yet to support multiple media types, but it would not be too difficult to create buckets based on media.
2009-06-29Refactor combine_xxx() functions together into combine_files() and useBharat Mediratta
html functions to generate the resulting elements. Add phpdoc.
2009-06-29Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-06-29A Combined javascript seems to work.Tim Almdal
1) CSS files are added to the combined version by use of $theme->css() or $theme->css_theme() methods 2) url references in the css are converted to full paths as opposed to relative 3) @import statements in the css are resolved as well. 4) need to move the [if IE] statements into the css files so the will be honored in the browser. currently the ie fix css are always included.
2009-06-29Remove unused $theme_relative arg from theme_script().Bharat Mediratta
2009-06-29*Note* work in progress.Tim Almdal
Implement the combined css functionality. Local url references and replace with absolute urls instead of relative.
2009-06-29Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
Conflicts: modules/gallery/libraries/Theme_View.php themes/admin_default/views/admin.html.php
2009-06-29Temporary checkin to allow merge with trunk... don't integrateTim Almdal
2009-06-28Rename $theme->url() to $theme->theme_url() for consistency wihtBharat Mediratta
$theme->theme_script().
2009-06-28Clean up the combined javascript change and refactor out theBharat Mediratta
Gallery_View base class from Theme_View and Admin_View. 1) Move all the theme specific jquery stuff from gallery_theme::head() and admin_head() into the theme files. Use $theme->script() as appropriate. 2) Get rid of the extra boolean on $theme->url() that we were using so that we could call $theme->script($theme->url(...)) -- add $theme->theme_script() instead (poorly named, but still clearer than what we had before) 3) Fix the bug that combined scripts didn't work at all in the admin theme. 4) Get rid of $theme->display() in favor of new View(...)
2009-06-28Rename the combined javascript controller from javascript/combined to ↵Tim Almdal
combined/javascript.
2009-06-28Modify the cache table to make id the primary key for consistency withBharat Mediratta
other gallery 3 tables. Update the driver to match, add more upgrader code, update the installer block and change the gallery module version to 6.
2009-06-28Tweak the cache implementationBharat Mediratta
1) Drop the *_modified key, we don't really need it. The modification date is not relevant to our browser caching strategy. 2) Fix multiple issues with the Expires header and just hardcode it to the biggest possibly value for code clarity. 3) print the $content out directly instead of using fwrite 4) Minor cleanups in the installer.
2009-06-28Change the combined javascript to use the new caching functionality and ↵Tim Almdal
respect the HTTP_IF_MODIFIED_SINCE header request.
2009-06-28Change the cache column of the caches table to a large blob. This fixes ↵Tim Almdal
ticket #485 and gives us the extra adavantage of not having to serialize the data (as the database driver handles that for us)
2009-06-28Clean up code (i.e. preamble, tabs) from the caching implementation so the ↵Tim Almdal
unit tests pass
2009-06-27The rest of the caching driver implementation that i somehow forgot.Tim Almdal
2009-06-27Merge branch 'master' of git@github.com:gallery/gallery3Tim Almdal
2009-06-27Create a new thumb_menu() and convert Digibug over to use it.Bharat Mediratta
1) Eliminate digibug_album.html 2) Get rid of the $(document).ready() in digibug.js and rename popUp() to digibug_popup() then just make direct calls to digibug_popup() in the menu urls.
2009-06-26Implement the combined javascript controller.Tim Almdal
2009-06-26Create a theme_view function script which allows modules in the head or ↵Tim Almdal
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-261) Move the generation of script tags to gallery_theme::head and ↵Tim Almdal
gallery_theme::admin_head. This allows us to potentially manage the scripts like we do in g2 (single file and compressed) 2) Change Theme_View::_call to always call the gallery_theme::$function first.
2009-06-17Correct the "inappropriate intimacy" smell that bharat's refined senses pick upTim Almdal
2009-06-17Fix for ticket #366Tim Almdal
Move the creation of the setting menu back to gallery_menu::admin, now that there is a mechanism to remove empty menu items
2009-06-17Fix for ticket #366Tim Almdal
1) Stored the menu element type in the menu element 2) Scanned the menu before display removing any empty sub menus. Went with the removal approach because there will more users than developers
2009-06-16Refactor common xxx_menu() code into private _menu() helper.Bharat Mediratta
2009-06-15Fix up the titles in the default theme. They've been broken for aBharat Mediratta
while. This fixes ticket #342. The bug is that we were using $item instead of $theme->item(). But we were also not special casing tags properly, and they are effectively first class citizens (at least for now) so treat them properly. Also, set page_title by default in the theme so that we don't have to do an empty() check on it (makes the theme easier to read) and move the title out of Tags_Controller so that the theme has more control over it.
2009-06-14Create a sidebar for tag pagesBharat Mediratta
Move the <link> for the container feed (either gallery/album/<id> or tag/tag/<id>) back into gallery_theme
2009-06-08Rename main_element_attributes() callback to body_attributes() to beBharat Mediratta
more intuitive for themers.
2009-06-06Preliminary BiDi support (needs *a lot* of tweaking)Andy Staudacher
2009-06-04Convert single quotes to double quotes.Bharat Mediratta
2009-06-02Have server_add turn the "Add Photo" menu option into a dropdown andBharat Mediratta
make "Add from Server" a 2nd option there. This requires adding the Menu::remove() API function.
2009-06-02Extend L10n client to provide UI for plural translation.Andy Staudacher
Ticket 148.
2009-06-01Security pass over all controller code. Mostly adding CSRF checkingBharat Mediratta
and verifying user permissions, but there are several above-the-bar changes: 1) Server add is now only available to admins. This is a hard requirement because we have to limit server access (eg: server_add::children) to a user subset and the current permission model doesn't include that. Easiest fix is to restrict to admins. Got rid of the server_add permission. 2) We now know check permissions at every level, which means in controllers AND in helpers. This "belt and suspenders" approach will give us defense in depth in case we overlook it in one area. 3) We now do CSRF checking in every controller method that changes the code, in addition to the Forge auto-check. Again, defense in depth and it makes scanning the code for security much simpler. 4) Moved Simple_Uploader_Controller::convert_filename_to_title to item:convert_filename_to_title 5) Fixed a bug in sending notification emails. 6) Fixed the Organize code to verify that you only have access to your own tasks. In general, added permission checks to organize which had pretty much no validation code. I did my best to verify every feature that I touched.
2009-05-28Flush the model cache as appropriate every time we call ORM::save().Bharat Mediratta
Fixes ticket #301
2009-05-27Update all references to the core application to now point to theBharat Mediratta
gallery module. This type of mass update is prone to some small bugs.
2009-05-27Restructure things so that the application is now just another module.Bharat Mediratta
Kohana makes this type of transition fairly straightforward in that all controllers/helpers/etc are still located in the cascading filesystem without any extra effort, except that I've temporarily added a hack to force modules/gallery into the module path. Rename what's left of "core" to be "application" so that it conforms more closely to the Kohana standard (basically, just application/config/config.php which is the minimal thing that you need in the application directory) There's still considerable work left to be done here.