Wikia code/includes/specials/SpecialNewimages.php
This page is obsolete. It is being retained for archival purposes. It may document extensions or features that are obsolete and/or no longer supported. Do not rely on the information here being up-to-date. The information shown below refers to the now unmaintained 1.16 MediaWiki release. The current stable release number is 1.42.1. |
--- D:\Programming\SVN\mediawiki\branches\REL1_16\phase3\includes\specials\SpecialNewimages.php 2011-07-18 22:31:17.819336000 +0100
+++ D:\Programming\SVN\wikia\trunk\includes\specials\SpecialNewimages.php 2011-08-17 15:28:16.468750000 +0100
@@ -6,7 +6,11 @@
*/
function wfSpecialNewimages( $par, $specialPage ) {
- global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode;
+ global $wgUser, $wgOut, $wgLang, $wgRequest, $wgMiserMode, $wgUseWikiaNewFiles, $wgEnableWikiaPhotoGalleryExt;
+ global $wmu;
+
+ if ($wgUseWikiaNewFiles && $wgEnableWikiaPhotoGalleryExt)
+ return wfSpecialWikiaNewFiles( $par, $specialPage );
$wpIlMatch = $wgRequest->getText( 'wpIlMatch' );
$dbr = wfGetDB( DB_SLAVE );
@@ -89,6 +93,10 @@
$sql .= $hidebotsql;
$where[] = 'ug_group IS NULL';
}
+
+ // hook by Wikia, Bartek Lapinski 26.03.2009, for videos and stuff
+ wfRunHooks( 'SpecialNewImages::beforeQuery', array( &$where ) );
+
if( count( $where ) ) {
$sql .= ' WHERE ' . $dbr->makeList( $where, LIST_AND );
}
@@ -136,6 +144,8 @@
$lastTimestamp = $timestamp;
}
+ wfRunHooks( 'SpecialNewImages::beforeDisplay', array( &$images, &$gallery, &$limit ) );
+
$titleObj = SpecialPage::getTitleFor( 'Newimages' );
$action = $titleObj->getLocalURL( $hidebots ? '' : 'hidebots=0' );
if ( $shownav && !$wgMiserMode ) {
@@ -236,6 +245,7 @@
$wgOut->addHTML( $prevnext );
if( count( $images ) ) {
+ $wmu['gallery'] = $gallery;
$wgOut->addHTML( $gallery->toHTML() );
if ($shownav)
$wgOut->addHTML( $prevnext );