summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers
AgeCommit message (Collapse)Author
2009-07-01Fix a bunch of XSS vulnerabilities turned up by manual inspectionBharat Mediratta
using the checklist in ticket #385.
2009-06-30Re-add Session::abort_save(). It was reverted as part of the earlierBharat Mediratta
change, but this is the part that we want to keep.
2009-06-30Revert "Add Session::abort_save() to Kohana."Bharat Mediratta
Obsoleted by upstream fix. This reverts commit 06f066164f60fe0babbc7a480e6319a0702e0c46.
2009-06-30Rejigger the way we handle "done" status in the upgrader. Now weBharat Mediratta
present the done box if you're done and let you get rid of it if you want. It's not beautiful, by any means, but it gives you an easy link back to your Gallery when you're finished. Fixes ticket #479.
2009-06-29i18n theme name / description in admin themes. Partial fix for ticket 471.Andy Staudacher
2009-06-29Use the appropriate content-type for javascript (application/javascript).Bharat Mediratta
2009-06-29Pass back Cache-Control and Expires headers when we send back a 304,Bharat Mediratta
otherwise some browsers (Firefox, at least) thinks that it needs to revalidate. At least in my case, it appears that my proxy tacks on restrictive Cache-Control headers if they aren't there.
2009-06-29Fix a few more issuesBharat Mediratta
1) Don't use $_SERVER, use Input::instance()->server(). This fixes the problem that when you use a browser that doesn't pass in an Accept-Encoding, we'd barf on a missing array key 2) Don't bother looking up the _gz key if we don't have gzencode, because we probably didn't store one. 3) Only emit the gzip Content-Encoding header if we're actually sending back gzipped data.
2009-06-29If the argument to app() is not an album id, switch to the item parent.Bharat Mediratta
Fixes ticket #489.
2009-06-29Refactor combine_xxx() functions together into combine_files() and useBharat Mediratta
html functions to generate the resulting elements. Add phpdoc.
2009-06-29Refactor combined controller a bitBharat Mediratta
1) Create public javascript() and css() functions and turn __call() into a private function to protect us against having some random type show up in there. Otherwise anything you put in the 2nd argument gets emitted in the header which is a security hole. 2) Fix a bug ("$key = $key[0]") which was breaking functionality. Eliminate the hex check, it's not really necessary in the majority case and doesn't hurt us in edge cases. 3) Convert some empty() calls to !, no need for a function call there. 4) Add phpDoc.
2009-06-29Combine the Combined::javascript and Combined::css into a single method ↵Tim Almdal
implemented by the magic method __call. The first parameter is the content type for text/xxxx and the 2nd parameter is the key of the combined file.
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-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-28Rename the combined javascript controller from javascript/combined to ↵Tim Almdal
combined/javascript.
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-26Implement the combined javascript controller.Tim Almdal
2009-06-26Change the movie controller to set the page type to "movie". Ticket #467Tim Almdal
2009-06-23Cache the page_type in pane() instead of looking it up twice.Bharat Mediratta
2009-06-23Add a new "show credits" check box in the theme options so that youBharat Mediratta
can disable any module credits if you want. Update the theme to obey it.
2009-06-23Don't allow renaming of the root album.Bharat Mediratta
2009-06-23Refactor the install/upgrade code to be more flexible.Bharat Mediratta
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-22Change the quick pan from static to dynamic. This allows modules to add ↵Tim Almdal
buttons to the quick pane. The quick pane is now divided into 4 sections: left, center, right and additional. Additional items appear in the drop down box. Buttons are not sorted within the groupings. In addition, the quick pane will overflow onto the "additional" dropdown if there is not enough room to display all the buttons. The use case is the digibug printing module needed to add a button to the quick pane, and I don't like putting code into core that says if module is active... That's another one of those code smells :-) Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-21Add Session::abort_save() to Kohana.Bharat Mediratta
Filed upstream as: http://dev.kohanaphp.com/issues/1801
2009-06-16Change the page.html file so that if the type of page is login, the sidebar ↵Tim Almdal
contents are are not shown
2009-06-16Merge branch 'master' of git@github.com:gallery/gallery3Andy Staudacher
2009-06-16Add option to list *all* l10n messages (that have been indexed) in l10n UIAndy Staudacher
TODO: The "Show All" link is almost invisible (link color ~= background)
2009-06-16Add support for uploading .jpeg files (in addition to .jpg)Bharat Mediratta
Fix for ticket #428
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-14Get rid of the word "items" in the delete confirmation dialog.Bharat Mediratta
2009-06-14Switch quick delete from JS confirm to jQuery UI dialog, closes ticket #355.Chad Kieffer
2009-06-10Rename theme_details to theme_options everywhere.Bharat Mediratta
Fixes ticket #317
2009-06-10Provide a way for non-admins to authenticate and use the upgrader,Bharat Mediratta
without using our regular code paths.
2009-06-10Fix log links. html::anchor() implicitly calls url::site(), callingBharat Mediratta
it a second time mangles the urls. Fixes ticket #360.
2009-06-10Add CLI sapi supportBharat Mediratta
2009-06-10Rename package -> packager (it's a noun which has verbs on it).Bharat Mediratta
Force a HTTP_HOST so that url::base() works.
2009-06-09Add security checksBharat Mediratta
2009-06-09ACtually implement the upgrader, and add a confirmation box when theBharat Mediratta
upgrade is complete.
2009-06-09Say hello to the new upgrader UI.Bharat Mediratta
2009-06-09Replace login_page.html.php with the form, wrapped in our default pageBharat Mediratta
type.
2009-06-10Add some window dressing to login_page.html in order to make it more in lineTim Almdal
with the overall look of the Gallery3 theme Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-10Created not_authorized.html.php which is a prettier login screen if the rootTim Almdal
album is not publicly browsable. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-09Rather than just displaying the "unformatted" login screen when the root albumTim Almdal
is not viewable by a guest, display the root album as if it was empty. When the page finishes loading force the login dialog to be displayed. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-09Show status message when album cover is set (#257)Chad Kieffer
2009-06-04Fix a bug in Item_Model::get_position() where we incorrectly using theBharat Mediratta
grandparent id. Oops. This caused navigation from photo back up to album to be broken. Also update Photos_Controller to use the active sort order.. it was still hardcoded to use the id. It's more efficient now, yay. Fixes ticket #340.
2009-06-02Extend L10n client to provide UI for plural translation.Andy Staudacher
Ticket 148.
2009-06-01Unescape %20 into " " also.Bharat Mediratta
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-06-01Normalize the random values used in the blocks_dashboard_xxx vars soBharat Mediratta
that install.sql is more stable.