]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/GNUsocialPhotos/actions/photoupload.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / GNUsocialPhotos / actions / photoupload.php
index 5411ec8089ce5b8a5d448421fc8b1dc39b1432b9..a8874ea13b17a3da215e41c652d5ee005549ec46 100644 (file)
@@ -36,14 +36,14 @@ class PhotouploadAction extends Action
 {
     var $user = null;
 
-    function prepare($args)
+    function prepare(array $args=array())
     {
         parent::prepare($args);
         $this->user = common_current_user();
         return true;
     }
 
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
         if($_SERVER['REQUEST_METHOD'] == 'POST') {
@@ -214,7 +214,7 @@ class PhotouploadAction extends Action
         $thumb_uri = 'http://' . common_config('site', 'server') . '/file/thumb.' . $filename;
         $profile_id = $cur->id;
        
-        $album = GNUsocialPhotoAlbum::staticGet('album_id', $this->trimmed('album'));
+        $album = GNUsocialPhotoAlbum::getKV('album_id', $this->trimmed('album'));
         if ($album->profile_id != $profile_id) {
             $this->showForm(_('Error: This is not your album!'));
             return;
@@ -241,13 +241,13 @@ class PhotouploadAction extends Action
         if(empty($cur)) return;
         
         $album_id = $this->trimmed('album');
-        $album = GNUsocialPhotoAlbum::staticGet('album_id', $album_id);
+        $album = GNUsocialPhotoAlbum::getKV('album_id', $album_id);
         if (empty($album)) {
             $this->showForm(_('This album does not exist or has been deleted.'));
             return;
         }
         //Check if the album has any photos in it before deleting
-        $photos = GNUsocialPhoto::staticGet('album_id', $album_id);
+        $photos = GNUsocialPhoto::getKV('album_id', $album_id);
         if(empty($photos)) {
             $album->delete();
             $this->showForm(_('Album deleted'), true);