aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-12-11 12:30:23 +0000
committerCash Costello <cash.costello@gmail.com>2009-12-11 12:30:23 +0000
commit3bd5e571364385cb93a93b8526e1e90e56db7b49 (patch)
tree1536e0b02dc1a4739368a2e83cb0ec971d0f2ee6 /start.php
parent622dca92b2a8eb399e7b2b44a682d7dd682dc68c (diff)
downloadelgg-3bd5e571364385cb93a93b8526e1e90e56db7b49.tar.gz
elgg-3bd5e571364385cb93a93b8526e1e90e56db7b49.tar.bz2
moved download action to download page
Diffstat (limited to 'start.php')
-rw-r--r--start.php26
1 files changed, 7 insertions, 19 deletions
diff --git a/start.php b/start.php
index 54322d8c9..6a1b95723 100644
--- a/start.php
+++ b/start.php
@@ -72,10 +72,7 @@
}
// slideshow plugin hook
- register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');
-
- // no checking security token for download
- register_plugin_hook('action', 'tidypics/download', 'tidypics_download_override');
+ register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');
}
/**
@@ -273,6 +270,12 @@
include($CONFIG->pluginspath . "tidypics/pages/world.php");
break;
+ case "download": // download an image
+ if (isset($page[1])) set_input('file_guid', $page[1]);
+ if (isset($page[2])) set_input('type', $page[2]);
+ include($CONFIG->pluginspath . "tidypics/pages/download.php");
+ break;
+
case "tagged": // all photos tagged with user
if (isset($page[1])) set_input('guid',$page[1]);
include($CONFIG->pluginspath . "tidypics/pages/tagged.php");
@@ -425,20 +428,6 @@
function tp_mostrecentimages($max = 8, $pagination = true) {
return list_entities("object", "image", 0, $max, false, false, $pagination);
}
- /**
- * Called before validating the security token on a download link
- * We don't need security as this is not a true action (it doesn't change any data)
- *
- * @return false (shouldn't return though since the action exits
- */
- function tidypics_download_override($hook, $action)
- {
- global $CONFIG;
-
- include $CONFIG->actions[$action]['file'];
-
- return false;
- }
// Make sure tidypics_init is called on initialisation
@@ -453,7 +442,6 @@
register_action("tidypics/edit", false, $CONFIG->pluginspath. "tidypics/actions/edit.php");
register_action("tidypics/delete", false, $CONFIG->pluginspath. "tidypics/actions/delete.php");
register_action("tidypics/edit_multi", false, $CONFIG->pluginspath. "tidypics/actions/edit_multi.php");
- register_action("tidypics/download", true, $CONFIG->pluginspath . "tidypics/actions/download.php");
register_action("tidypics/addtag", true, $CONFIG->pluginspath . "tidypics/actions/addtag.php");
register_action("tidypics/deletetag", true, $CONFIG->pluginspath . "tidypics/actions/deletetag.php");
register_action("tidypics/flickrSetup", true, $CONFIG->pluginspath . "tidypics/actions/flickrSetup.php");