]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Better event name (creating thumbnail _source_)
authorMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Apr 2014 10:33:41 +0000 (12:33 +0200)
committerMikael Nordfeldth <mmn@hethane.se>
Mon, 21 Apr 2014 10:33:41 +0000 (12:33 +0200)
EVENTS.txt
lib/mediafile.php
plugins/VideoThumbnails/VideoThumbnailsPlugin.php

index 705a761358d9568c34dc476df457c3620e7075ca..4d1215f6e03580a003a7c01c9eaaa2f74cb134cd 100644 (file)
@@ -1441,7 +1441,7 @@ OtherAccountProfiles: Hook to add account profiles to a user account profile blo
             text: text for the profile
             image: mini image for the profile
 
-CreateFileImageThumbnail: Hook to create image thumbnail source from a File
+CreateFileImageThumbnailSource: Hook to create image thumbnail source from a File
 - $file:    MediaFile object with related metadata
 - &$imgPath: Path to image file which can be used as source for our thumbnail algorithm.
 - $media:   MIME media type ('image', 'video', 'audio' etc.)
index 64bc039f57377782545bb4e75d18fff8e22ed012..1791b1a6981d5dd58d5f580452c9932cea84302f 100644 (file)
@@ -120,7 +120,7 @@ class MediaFile
         $imgPath = null;
         $media = common_get_mime_media($this->mimetype);
 
-        if (Event::handle('CreateFileImageThumbnail', array($this, &$imgPath, $media))) {
+        if (Event::handle('CreateFileImageThumbnailSource', array($this, &$imgPath, $media))) {
             switch ($media) {
             case 'image':
                 $imgPath = $this->getPath();
index 6621d0b10403fbd8dd4375e7ee2ea8635a5e03e4..42f45571eb60dba51cec227af06624cf3e8297f8 100644 (file)
@@ -41,12 +41,12 @@ class VideoThumbnailsPlugin extends Plugin
 {
     /*
      * This function should only extract an image from the video stream
-     * and disregard any scaling aspects in the resulting file, since
-     * this will be handled in the core thumbnail algorithm.
+     * and disregard any cropping or scaling in the resulting file, as
+     * that will be handled in the core thumbnail algorithm.
      */
-    public function onCreateFileImageThumbnail(MediaFile $file, &$imgPath, $media=null)
+    public function onCreateFileImageThumbnailSource(MediaFile $file, &$imgPath, $media=null)
     {
-        // This might accidentally pass application/ogg videos.
+        // The calling function might accidentally pass application/ogg videos.
         // If that's a problem, let's fix it in the calling function.
         if ($media !== 'video') {
             return true;