Jump to content

Wikia code/maintenance/cleanupImages.php

From mediawiki.org
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\maintenance\cleanupImages.php	2011-07-18 22:30:28.675781300 +0100
+++ D:\Programming\SVN\wikia\trunk\maintenance\cleanupImages.php	2011-08-17 15:05:35.055664100 +0100
@@ -47,6 +47,13 @@
 		global $wgContLang;
 
 		$source = $row->img_name;
+
+		// do nothing for videos, regardless of anything else
+		if ( ( 'VIDEO' == $row->img_media_type ) && ( 'video' == $row->img_major_mime ) && ( 'swf' == $row->img_minor_mime ) ) {
+			$this->log( "omitting video row '$source'" );
+			return $this->progress( 0 );
+		}
+
 		if( $source == '' ) {
 			// Ye olde empty rows. Just kill them.
 			$this->killRow( $source );