]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Tidypics now requires Elgg 1.5 or greater
authorCash Costello <cash.costello@gmail.com>
Fri, 30 Jul 2010 02:03:23 +0000 (02:03 +0000)
committerCash Costello <cash.costello@gmail.com>
Fri, 30 Jul 2010 02:03:23 +0000 (02:03 +0000)
actions/addtag.php
actions/flickrImportPhotoset.php
start.php

index 115a81bc68bf59f629a35441dfd4f77ca5f7bfd8..9e5313b7fac542bb7105178e0db442740c6929ea 100644 (file)
@@ -78,9 +78,7 @@ if ($image->annotate('phototag', serialize($tag), $access_id, $owner_id)) {
                        add_entity_relationship($user_id, 'phototag', $image_guid);
 
                        // also add this to the river - subject is image, object is the tagged user
-                       if (function_exists('add_to_river')) {
-                               add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id);
-                       }
+                       add_to_river('river/object/image/tag', 'tag', $image_guid, $user_id, $access_id);
 
                        // notify user of tagging as long as not self
                        if ($owner_id != $user_id) {
index fd6769e3ae98c6a718d2afe0269c7f9f2745f747..eeb42d622545ce00b3f5fc0d67e8dc95e8089267 100644 (file)
@@ -288,8 +288,7 @@ foreach( $photos_to_upload as $name => $photo ) {
                // is at least a few photos in it
                object_notifications('create', 'object', $album);
                
-               if (function_exists('add_to_river'))
-                       add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
+               add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
        }
 
        if ($img_river_view == "all") {
@@ -336,4 +335,3 @@ trigger_elgg_event('upload', 'tp_album', $album);
 
 $url = $CONFIG->wwwroot . 'mod/tidypics/pages/edit_multiple.php?files=' . implode('-', $uploaded_images);
 forward($url); 
-
index baaf33f2b7b28730b64353294344832585302db8..8589be9fba9770eec087be77b06477d30175fd86 100644 (file)
--- a/start.php
+++ b/start.php
@@ -56,20 +56,15 @@ function tidypics_init() {
        register_entity_type('object','image');
        register_entity_type('object','album');
 
-       if (function_exists('add_group_tool_option')) {
-               add_group_tool_option('photos', elgg_echo('tidypics:enablephotos'), true);
-       }
+       add_group_tool_option('photos', elgg_echo('tidypics:enablephotos'), true);
 
        if (get_plugin_setting('grp_perm_override', 'tidypics') != "disabled") {
                register_plugin_hook('permissions_check', 'object', 'tidypics_permission_override');
        }
 
        // Register for notifications
-       if (is_callable('register_notification_object')) {
-               register_notification_object('object', 'album', elgg_echo('tidypics:newalbum'));
-
-               register_plugin_hook('notify:entity:message', 'object', 'tidypics_notify_message');
-       }
+       register_notification_object('object', 'album', elgg_echo('tidypics:newalbum'));
+       register_plugin_hook('notify:entity:message', 'object', 'tidypics_notify_message');
 
        // slideshow plugin hook
        register_plugin_hook('tp_slideshow', 'album', 'tidypics_slideshow');