MDL-68954 repository_flickr_public: Return only photo media
authorMihail Geshoski <mihail@moodle.com>
Tue, 9 Jun 2020 04:36:59 +0000 (12:36 +0800)
committerMihail Geshoski <mihail@moodle.com>
Tue, 9 Jun 2020 04:36:59 +0000 (12:36 +0800)
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;
 
-        $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'];