MDL-68954 repository_flickr_public: Return only photo media
[moodle.git] / repository / flickr_public / lib.php
index 1dd58b7..ad12ee2 100644 (file)
@@ -296,13 +296,15 @@ class repository_flickr_public extends repository {
         $text = !empty($SESSION->{$this->sess_text}) ? $SESSION->{$this->sess_text} : null;
         $nsid = !empty($this->nsid) ? $this->nsid : null;
 
         $text = !empty($SESSION->{$this->sess_text}) ? $SESSION->{$this->sess_text} : null;
         $nsid = !empty($this->nsid) ? $this->nsid : null;
 
-        $photos = $this->flickr->photos_search(array(
-            'tags'=>$tag,
-            'page'=>$page,
-            'per_page'=>24,
-            'user_id'=>$nsid,
-            'license'=>$licenses,
-            'text'=>$text
+        $photos = $this->flickr->photos_search(
+            array(
+                'tags' => $tag,
+                'page' => $page,
+                'per_page' => 24,
+                'user_id' => $nsid,
+                'license' => $licenses,
+                'text' => $text,
+                'media' => 'photos'
             )
         );
         $ret['total'] = $photos['total'];
             )
         );
         $ret['total'] = $photos['total'];