aboutsummaryrefslogtreecommitdiff
path: root/start.php
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-02 21:00:16 -0500
committercash <cash.costello@gmail.com>2012-01-02 21:00:16 -0500
commit83cbd76b2e11b7d832e212ce1ffc77da7a3dd2a6 (patch)
treee77fc18ea6b9402be0a653aeaf152b9231bad153 /start.php
parentbe94a34e652571eb61c3e306abfb7cce673823d7 (diff)
downloadelgg-83cbd76b2e11b7d832e212ce1ffc77da7a3dd2a6.tar.gz
elgg-83cbd76b2e11b7d832e212ce1ffc77da7a3dd2a6.tar.bz2
sorting albums added back
Diffstat (limited to 'start.php')
-rw-r--r--start.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/start.php b/start.php
index 1df04876a..cebd033b0 100644
--- a/start.php
+++ b/start.php
@@ -88,13 +88,13 @@ function tidypics_init() {
// Register actions
$base_dir = elgg_get_plugins_path() . 'tidypics/actions/photos';
elgg_register_action("photos/album/save", "$base_dir/album/save.php");
+ elgg_register_action("photos/album/sort", "$base_dir/album/sort.php");
elgg_register_action("photos/delete", "$base_dir/delete.php");
elgg_register_action("photos/image/upload", "$base_dir/image/upload.php");
elgg_register_action("photos/image/save", "$base_dir/image/save.php");
elgg_register_action("photos/batch/edit", "$base_dir/batch/edit.php");
//register_action("tidypics/ajax_upload", true, "$base_dir/ajax_upload.php");
//register_action("tidypics/ajax_upload_complete", true, "$base_dir/ajax_upload_complete.php");
- //register_action("tidypics/sortalbum", false, "$base_dir/sortalbum.php");
elgg_register_action("photos/image/tag", "$base_dir/image/tag.php");
//register_action("tidypics/deletetag", false, "$base_dir/deletetag.php");
@@ -317,9 +317,19 @@ function tidypics_entity_menu_setup($hook, $type, $return, $params) {
'name' => 'slideshow',
'text' => elgg_echo('album:slideshow'),
'href' => $slideshow_link,
- 'priority' => 90,
+ 'priority' => 80,
);
$return[] = ElggMenuItem::factory($options);
+
+ if ($entity->canEdit()) {
+ $options = array(
+ 'name' => 'sort',
+ 'text' => elgg_echo('album:sort'),
+ 'href' => "photos/sort/" . $entity->getGUID(),
+ 'priority' => 90,
+ );
+ $return[] = ElggMenuItem::factory($options);
+ }
}
return $return;