Upload license preview now uses the API instead of action=ajax
[lhc/web/wiklou.git] / includes / Setup.php
index 62e7b0a..6f310c7 100644 (file)
@@ -40,6 +40,7 @@ if( $wgArticlePath === false ) {
 
 if( $wgStylePath === false ) $wgStylePath = "$wgScriptPath/skins";
 if( $wgStyleDirectory === false) $wgStyleDirectory   = "$IP/skins";
+if( $wgExtensionAssetsPath === false ) $wgExtensionAssetsPath = "$wgScriptPath/extensions";
 
 if( $wgLogo === false ) $wgLogo = "$wgStylePath/common/images/wiki.png";
 
@@ -140,7 +141,6 @@ if( $wgUseInstantCommons ) {
        );
 }
 
-
 if ( !class_exists( 'AutoLoader' ) ) {
        require_once( "$IP/includes/AutoLoader.php" );
 }
@@ -160,9 +160,19 @@ require_once( "$IP/includes/ImageFunctions.php" );
 require_once( "$IP/includes/StubObject.php" );
 wfProfileOut( $fname.'-includes' );
 wfProfileIn( $fname.'-misc1' );
+
 # Raise the memory limit if it's too low
 wfMemoryLimit();
 
+/**
+ * Set up the timezone, suppressing the pseudo-security warning in PHP 5.1+ 
+ * that happens whenever you use a date function without the timezone being
+ * explicitly set. Inspired by phpMyAdmin's treatment of the problem.
+ */
+wfSuppressWarnings();
+date_default_timezone_set( date_default_timezone_get() );
+wfRestoreWarnings();
+
 $wgIP = false; # Load on demand
 # Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
 $wgRequest = new WebRequest;
@@ -327,8 +337,6 @@ $wgPostCommitUpdateList = array();
 
 if ( $wgAjaxWatch ) $wgAjaxExportList[] = 'wfAjaxWatch';
 if ( $wgAjaxUploadDestCheck ) $wgAjaxExportList[] = 'SpecialUpload::ajaxGetExistsWarning';
-if( $wgAjaxLicensePreview )
-       $wgAjaxExportList[] = 'SpecialUpload::ajaxGetLicensePreview';
 
 # Placeholders in case of DB error
 $wgTitle = null;