summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/MY_url.php
AgeCommit message (Collapse)Author
2013-01-21Update copyright to 2013. Fixes #1953.Bharat Mediratta
2012-02-27Update copyright to 2012. #1822Bharat Mediratta
2011-01-21Update copyright to 2011.Bharat Mediratta
2010-12-21Change MY_url::parse_url to use item::find_by_relative_url.Bharat Mediratta
2010-12-16Create url::merge_querystring() which merges a query string into anBharat Mediratta
existing url. Fixes #1537.
2010-06-18Use request::protocol()Bharat Mediratta
2010-03-03Update the copyright to 2010. It's only 3 months into the year :-)Bharat Mediratta
2010-01-30Make url::merge() function use the same exact definition as url_Core::merge()Bharat Mediratta
2010-01-18Overload url::current() and url::merge() to make the current url XSSBharat Mediratta
safe. Add tests to make sure that it doesn't relapse with future Kohana changes. Fixes ticket #983. Ref: http://gallery.menalto.com/node/93738
2009-12-01Merge branch 'master' of git@github.com:gallery/gallery3 into bharat_devBharat Mediratta
2009-11-30Clean up item routing a bit.Bharat Mediratta
1) The new default route is "albums", and Albums_Controller::index() does the right thing 2) Items_Controller redirects to the appropriate specific controller 3) All item controllers now have show() instead of _show(), so that the routing code in url::parse_url() can get to it. But that code is protected against receiving bogus requests.
2009-11-26Convert all DB where() calls to take 3 arguments.Bharat Mediratta
Convert all open_paren() calls to and_open() or or_open() as appropriate.
2009-11-25Preliminary work to cut over to Kohana 2.4Bharat Mediratta
- 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-09-08Move specialized (pretty) url generation back into Item_Model so thatBharat Mediratta
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-08Improve comment.Bharat Mediratta
2009-09-07Automagically generate pretty urls for movies, too.Bharat Mediratta
2009-09-07Fix a bug where we were not properly decoding the path in the fallbackBharat Mediratta
code in get_item_from_uri() by using relative_url() instead of relative_path().
2009-09-07Switch to using Item_Model::relative_url() for the url path.Bharat Mediratta
2009-08-29Undo url helper changes - url methods no longer return a SafeString.Andy Staudacher
Adding SafeString::of_safe_html() calls where urls are passed as parameters to t() and t2().
2009-08-29Add more factory methods for convenience:Andy Staudacher
SafeString::purify() and SafeString::of_safe_html(). Removing SafeString::mark_html_safe() since it's no longer needed.
2009-08-29Have url::site() and other methods return a SafeString, just as t() and t2().Andy Staudacher
Benefits: - url::site() is often used in views and we can ensure in the url class that returned strings are indeed safe for use in HTML. Makes the list of vars of unknown safety status shorter. - url::site() is often used as message parameter to t() and t2(). The parameter would be HTML-escaped if it wasn't marked as safe HTML already. Makes the usage simpler / shorter.
2009-06-24Use ENT_QUOTEs when decoding the $current_uri otherwise apostrophesBharat Mediratta
are treated as &#039; which doesn't match in our relative_path_cache.
2009-06-09Removed extra whitespaceTim Almdal
Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-09Create a new method in MY_url.php "get_item_from_uri" which loads the itemTim Almdal
based on the uri. Then use this helper method in logout.php to insure that the guest user has access to the "continue" uri. If they don't redirect to the root album and let it deal with access issues. Signed-off-by: Tim Almdal <tnalmdal@shaw.ca>
2009-06-04Work around a problem with the CGI sapi on urls that don't containBharat Mediratta
index.php (ie, /gallery3 instead of /gallery3/index.php) that causes is to mis-route.
2009-06-04Make sure the item is loaded in parse_url() before we use it.Bharat Mediratta
2009-05-29Use the relative_path_cache to look up items which should be a fasterBharat Mediratta
query than using the level + the components.
2009-05-27Convert a few more references of APPPATH to MODPATH/galleryBharat Mediratta
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.