Merge "Fixup some method documentation return types"
authorIAlex <ialex.wiki@gmail.com>
Thu, 18 Oct 2012 04:38:33 +0000 (04:38 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 18 Oct 2012 04:38:33 +0000 (04:38 +0000)
17 files changed:
docs/hooks.txt
includes/DefaultSettings.php
includes/Linker.php
includes/User.php
includes/actions/InfoAction.php
includes/job/JobQueueGroup.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/specials/SpecialActiveusers.php
includes/specials/SpecialListusers.php
includes/specials/SpecialUpload.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc
resources/Resources.php
tests/phpunit/languages/LanguageTest.php

index 10a341d..46ddcfe 100644 (file)
@@ -502,17 +502,6 @@ $section: (No longer used)
 $flags: Flags passed to WikiPage::doEditContent()
 $revision: New Revision of the article
 
-'PageContentInsertComplete': After a new article is created
-$article: WikiPage created
-$user: User creating the article
-$content: New content as a Content object
-$summary: Edit summary/comment
-$isMinor: Whether or not the edit was marked as minor
-$isWatch: (No longer used)
-$section: (No longer used)
-$flags: Flags passed to WikiPage::doEditContent()
-$revision: New Revision of the article
-
 'ArticleMergeComplete': after merging to article using Special:Mergehistory
 $targetTitle: target title (object)
 $destTitle: destination title (object)
@@ -570,15 +559,6 @@ $isminor: minor flag
 $iswatch: watch flag
 $section: section #
 
-'PageContentSave': before an article is saved.
-$article: the WikiPage (object) being saved
-$user: the user (object) saving the article
-$content: the new article content, as a Content object
-$summary: the article summary (comment)
-$isminor: minor flag
-$iswatch: watch flag
-$section: section #
-
 'ArticleSaveComplete': After an article has been updated. DEPRECATED, use PageContentSaveComplete instead.
 $article: WikiPage modified
 $user: User performing the modification
@@ -592,19 +572,6 @@ $revision: New Revision of the article
 $status: Status object about to be returned by doEditContent()
 $baseRevId: the rev ID (or false) this edit was based on
 
-'PageContentSaveComplete': After an article has been updated
-$article: WikiPage modified
-$user: User performing the modification
-$content: New content, as a Content object
-$summary: Edit summary/comment
-$isMinor: Whether or not the edit was marked as minor
-$isWatch: (No longer used)
-$section: (No longer used)
-$flags: Flags passed to WikiPage::doEditContent()
-$revision: New Revision of the article
-$status: Status object about to be returned by doEditContent()
-$baseRevId: the rev ID (or false) this edit was based on
-
 'ArticleUndelete': When one or more revisions of an article are restored
 $title: Title corresponding to the article restored
 $create: Whether or not the restoration caused the page to be created
@@ -1565,12 +1532,45 @@ $categories: associative array, keys are category names, values are category
 $links: array, intended to hold the result. Must be an associative array with
        category types as keys and arrays of HTML links as values.
 
+'PageContentInsertComplete': After a new article is created
+$article: WikiPage created
+$user: User creating the article
+$content: New content as a Content object
+$summary: Edit summary/comment
+$isMinor: Whether or not the edit was marked as minor
+$isWatch: (No longer used)
+$section: (No longer used)
+$flags: Flags passed to WikiPage::doEditContent()
+$revision: New Revision of the article
+
 'PageContentLanguage': allows changing the language in which the content of
 a page is written. Defaults to the wiki content language ($wgContLang).
 $title: Title object
 &$pageLang: the page content language (either an object or a language code)
 $wgLang: the user language
 
+'PageContentSave': before an article is saved.
+$article: the WikiPage (object) being saved
+$user: the user (object) saving the article
+$content: the new article content, as a Content object
+$summary: the article summary (comment)
+$isminor: minor flag
+$iswatch: watch flag
+$section: section #
+
+'PageContentSaveComplete': After an article has been updated
+$article: WikiPage modified
+$user: User performing the modification
+$content: New content, as a Content object
+$summary: Edit summary/comment
+$isMinor: Whether or not the edit was marked as minor
+$isWatch: (No longer used)
+$section: (No longer used)
+$flags: Flags passed to WikiPage::doEditContent()
+$revision: New Revision of the article
+$status: Status object about to be returned by doEditContent()
+$baseRevId: the rev ID (or false) this edit was based on
+
 'PageHistoryBeforeList': When a history page list is about to be constructed.
 $article: the article that the history is loading for
 
index 9f07bdb..6dde841 100644 (file)
@@ -530,6 +530,13 @@ $wgAllowAsyncCopyUploads = false;
  */
 $wgCopyUploadsDomains = array();
 
+/**
+ * Enable copy uploads from Special:Upload. $wgAllowCopyUploads must also be
+ * true. If $wgAllowCopyUploads is true, but this is false, you will only be
+ * able to perform copy uploads from the API or extensions (e.g. UploadWizard).
+ */
+$wgCopyUploadsFromSpecialUpload = false;
+
 /**
  * Proxy to use for copy upload requests.
  * @since 1.20
index 0f45165..bd5b571 100644 (file)
@@ -1113,8 +1113,11 @@ class Linker {
                        // check if the user has an edit
                        $attribs = array();
                        if ( $redContribsWhenNoEdits ) {
-                               $count = !is_null( $edits ) ? $edits : User::edits( $userId );
-                               if ( $count == 0 ) {
+                               if ( intval( $edits ) === 0 && $edits !== 0 ) {
+                                       $user = User::newFromId( $userId );
+                                       $edits = $user->getEditCount();
+                               }
+                               if ( $edits === 0 ) {
                                        $attribs['class'] = 'new';
                                }
                        }
index f80319d..809c183 100644 (file)
@@ -817,39 +817,16 @@ class User {
 
        /**
         * Count the number of edits of a user
-        * @todo It should not be static and some day should be merged as proper member function / deprecated -- domas
         *
         * @param $uid Int User ID to check
         * @return Int the user's edit count
+        *
+        * @deprecated since 1.21 in favour of User::getEditCount
         */
        public static function edits( $uid ) {
-               wfProfileIn( __METHOD__ );
-               $dbr = wfGetDB( DB_SLAVE );
-               // check if the user_editcount field has been initialized
-               $field = $dbr->selectField(
-                       'user', 'user_editcount',
-                       array( 'user_id' => $uid ),
-                       __METHOD__
-               );
-
-               if( $field === null ) { // it has not been initialized. do so.
-                       $dbw = wfGetDB( DB_MASTER );
-                       $count = $dbr->selectField(
-                               'revision', 'count(*)',
-                               array( 'rev_user' => $uid ),
-                               __METHOD__
-                       );
-                       $dbw->update(
-                               'user',
-                               array( 'user_editcount' => $count ),
-                               array( 'user_id' => $uid ),
-                               __METHOD__
-                       );
-               } else {
-                       $count = $field;
-               }
-               wfProfileOut( __METHOD__ );
-               return $count;
+               wfDeprecated( __METHOD__, '1.21' );
+               $user = self::newFromId( $uid );
+               return $user->getEditCount();
        }
 
        /**
@@ -2466,7 +2443,32 @@ class User {
                if( $this->getId() ) {
                        if ( !isset( $this->mEditCount ) ) {
                                /* Populate the count, if it has not been populated yet */
-                               $this->mEditCount = User::edits( $this->mId );
+                               wfProfileIn( __METHOD__ );
+                               $dbr = wfGetDB( DB_SLAVE );
+                               // check if the user_editcount field has been initialized
+                               $count = $dbr->selectField(
+                                       'user', 'user_editcount',
+                                       array( 'user_id' => $this->mId ),
+                                       __METHOD__
+                               );
+
+                               if( $count === null ) {
+                                       // it has not been initialized. do so.
+                                       $dbw = wfGetDB( DB_MASTER );
+                                       $count = $dbr->selectField(
+                                               'revision', 'count(*)',
+                                               array( 'rev_user' => $this->mId ),
+                                               __METHOD__
+                                       );
+                                       $dbw->update(
+                                               'user',
+                                               array( 'user_editcount' => $count ),
+                                               array( 'user_id' => $this->mId ),
+                                               __METHOD__
+                                       );
+                               }
+                               wfProfileOut( __METHOD__ );
+                               $this->mEditCount = $count;
                        }
                        return $this->mEditCount;
                } else {
index 05b6dcf..510f4ef 100644 (file)
@@ -297,6 +297,30 @@ class InfoAction extends FormlessAction {
                // Page protection
                $pageInfo['header-restrictions'] = array();
 
+               // Is this page effected by the cascading protection of something which includes it?
+               if ( $title->isCascadeProtected() ) {
+                       $cascadingFrom = '';
+                       $sources = $title->getCascadeProtectionSources(); // Array deferencing is in PHP 5.4 :(
+
+                       foreach ( $sources[0] as $sourceTitle ) {
+                               $cascadingFrom .= Html::rawElement( 'li', array(), Linker::linkKnown( $sourceTitle ) );
+                       }
+
+                       $cascadingFrom = Html::rawElement( 'ul', array(), $cascadingFrom );
+                       $pageInfo['header-restrictions'][] = array(
+                               $this->msg( 'pageinfo-protect-cascading-from' ),
+                               $cascadingFrom
+                       );
+               }
+
+               // Is out protection set to cascade to other pages?
+               if ( $title->areRestrictionsCascading() ) {
+                       $pageInfo['header-restrictions'][] = array(
+                               $this->msg( 'pageinfo-protect-cascading' ),
+                               $this->msg( 'pageinfo-protect-cascading-yes' )
+                       );
+               }
+
                // Page protection
                foreach ( $title->getRestrictionTypes() as $restrictionType ) {
                        $protectionLevel = implode( ', ', $title->getRestrictions( $restrictionType ) );
index 2f94152..69bcf01 100644 (file)
@@ -83,7 +83,7 @@ class JobQueueGroup {
         * @return bool
         */
        public function push( $jobs ) {
-               $jobs = (array)$jobs;
+               $jobs = is_array( $jobs ) ? $jobs : array( $jobs );
 
                $jobsByType = array(); // (job type => list of jobs)
                foreach ( $jobs as $job ) {
index aa177f8..db4c758 100644 (file)
@@ -113,6 +113,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        protected $debugRaw = true;
        /** Boolean: Whether mw.loader.state() call should be omitted */
        protected $raw = false;
+       protected $targets = array( 'desktop' );
+
        /**
         * Array: Cache for mtime
         * @par Usage:
@@ -232,6 +234,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                                // Lists of strings
                                case 'dependencies':
                                case 'messages':
+                               case 'targets':
                                        $this->{$member} = (array) $option;
                                        break;
                                // Single strings
@@ -670,4 +673,14 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
        public function getFlip( $context ) {
                return $context->getDirection() === 'rtl';
        }
+
+       /**
+        * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
+        *
+        * @return array of strings
+        */
+       public function getTargets() {
+               return $this->targets;
+       }
+
 }
index e364b71..c570f0a 100644 (file)
@@ -450,4 +450,13 @@ abstract class ResourceLoaderModule {
                return self::$jsParser;
        }
 
+       /**
+        * Get target(s) for the module, eg ['desktop'] or ['desktop', 'mobile']
+        * Default implementation hardcodes 'desktop'.
+        *
+        * @return array of strings
+        */
+       public function getTargets() {
+               return array( 'desktop' );
+       }
 }
index 20ee83f..4979047 100644 (file)
@@ -114,6 +114,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                $out = '';
                $registrations = array();
                $resourceLoader = $context->getResourceLoader();
+               $target = $context->getRequest()->getVal( 'target', 'desktop' );
 
                // Register sources
                $out .= ResourceLoader::makeLoaderSourcesScript( $resourceLoader->getSources() );
@@ -121,41 +122,44 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                // Register modules
                foreach ( $resourceLoader->getModuleNames() as $name ) {
                        $module = $resourceLoader->getModule( $name );
-                       $deps = $module->getDependencies();
-                       $group = $module->getGroup();
-                       $source = $module->getSource();
-                       // Support module loader scripts
-                       $loader = $module->getLoaderScript();
-                       if ( $loader !== false ) {
-                               $version = wfTimestamp( TS_ISO_8601_BASIC,
-                                       $module->getModifiedTime( $context ) );
-                               $out .= ResourceLoader::makeCustomLoaderScript( $name, $version, $deps, $group, $source, $loader );
-                       }
-                       // Automatically register module
-                       else {
-                               // getModifiedTime() is supposed to return a UNIX timestamp, but it doesn't always
-                               // seem to do that, and custom implementations might forget. Coerce it to TS_UNIX
-                               $moduleMtime = wfTimestamp( TS_UNIX, $module->getModifiedTime( $context ) );
-                               $mtime = max( $moduleMtime, wfTimestamp( TS_UNIX, $wgCacheEpoch ) );
-                               // Modules without dependencies, a group or a foreign source pass two arguments (name, timestamp) to
-                               // mw.loader.register()
-                               if ( !count( $deps ) && $group === null && $source === 'local' ) {
-                                       $registrations[] = array( $name, $mtime );
-                               }
-                               // Modules with dependencies but no group or foreign source pass three arguments
-                               // (name, timestamp, dependencies) to mw.loader.register()
-                               elseif ( $group === null && $source === 'local' ) {
-                                       $registrations[] = array( $name, $mtime, $deps );
-                               }
-                               // Modules with a group but no foreign source pass four arguments (name, timestamp, dependencies, group)
-                               // to mw.loader.register()
-                               elseif ( $source === 'local' ) {
-                                       $registrations[] = array( $name, $mtime, $deps, $group );
+                       $moduleTargets = $module->getTargets();
+                       if ( in_array( $target, $moduleTargets ) ) {
+                               $deps = $module->getDependencies();
+                               $group = $module->getGroup();
+                               $source = $module->getSource();
+                               // Support module loader scripts
+                               $loader = $module->getLoaderScript();
+                               if ( $loader !== false ) {
+                                       $version = wfTimestamp( TS_ISO_8601_BASIC,
+                                               $module->getModifiedTime( $context ) );
+                                       $out .= ResourceLoader::makeCustomLoaderScript( $name, $version, $deps, $group, $source, $loader );
                                }
-                               // Modules with a foreign source pass five arguments (name, timestamp, dependencies, group, source)
-                               // to mw.loader.register()
+                               // Automatically register module
                                else {
-                                       $registrations[] = array( $name, $mtime, $deps, $group, $source );
+                                       // getModifiedTime() is supposed to return a UNIX timestamp, but it doesn't always
+                                       // seem to do that, and custom implementations might forget. Coerce it to TS_UNIX
+                                       $moduleMtime = wfTimestamp( TS_UNIX, $module->getModifiedTime( $context ) );
+                                       $mtime = max( $moduleMtime, wfTimestamp( TS_UNIX, $wgCacheEpoch ) );
+                                       // Modules without dependencies, a group or a foreign source pass two arguments (name, timestamp) to
+                                       // mw.loader.register()
+                                       if ( !count( $deps ) && $group === null && $source === 'local' ) {
+                                               $registrations[] = array( $name, $mtime );
+                                       }
+                                       // Modules with dependencies but no group or foreign source pass three arguments
+                                       // (name, timestamp, dependencies) to mw.loader.register()
+                                       elseif ( $group === null && $source === 'local' ) {
+                                               $registrations[] = array( $name, $mtime, $deps );
+                                       }
+                                       // Modules with a group but no foreign source pass four arguments (name, timestamp, dependencies, group)
+                                       // to mw.loader.register()
+                                       elseif ( $source === 'local' ) {
+                                               $registrations[] = array( $name, $mtime, $deps, $group );
+                                       }
+                                       // Modules with a foreign source pass five arguments (name, timestamp, dependencies, group, source)
+                                       // to mw.loader.register()
+                                       else {
+                                               $registrations[] = array( $name, $mtime, $deps, $group, $source );
+                                       }
                                }
                        }
                }
index 994365e..c5aa238 100644 (file)
@@ -93,9 +93,7 @@ class ActiveUsersPager extends UsersPager {
        function getQueryInfo() {
                $dbr = wfGetDB( DB_SLAVE );
                $conds = array( 'rc_user > 0' ); // Users - no anons
-               if( !$this->getUser()->isAllowed( 'hideuser' ) ) {
-                       $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0'; // don't show hidden names
-               }
+               $conds[] = 'ipb_deleted IS NULL'; // don't show hidden names
                $conds[] = 'rc_log_type IS NULL OR rc_log_type != ' . $dbr->addQuotes( 'newusers' );
                $conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $this->RCMaxAge*24*3600 ) );
 
@@ -109,7 +107,7 @@ class ActiveUsersPager extends UsersPager {
                                'rc_user_text', // for Pager
                                'user_id',
                                'recentedits' => 'COUNT(*)',
-                               'ipb_deleted' => 'MAX(ipb_deleted)'
+                               'blocked' => 'MAX(ipb_user)'
                        ),
                        'options' => array(
                                'GROUP BY' => array( 'rc_user_text', 'user_id' ),
@@ -119,7 +117,8 @@ class ActiveUsersPager extends UsersPager {
                                'user' => array( 'INNER JOIN', 'rc_user_text=user_name' ),
                                'ipblocks' => array( 'LEFT JOIN', array(
                                        'user_id=ipb_user',
-                                       'ipb_auto' => 0
+                                       'ipb_auto' => 0,
+                                       'ipb_deleted' => 1
                                )),
                        ),
                        'conds' => $conds
@@ -163,12 +162,9 @@ class ActiveUsersPager extends UsersPager {
                $groups = $lang->commaList( $list );
 
                $item = $lang->specialList( $ulinks, $groups );
-               if( $row->ipb_deleted ) {
-                       $item = "<span class=\"deleted\">$item</span>";
-               }
                $count = $this->msg( 'activeusers-count' )->numParams( $row->recentedits )
                        ->params( $userName )->numParams( $this->RCMaxAge )->escaped();
-               $blocked = !is_null( $row->ipb_deleted ) ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : '';
+               $blocked = $row->blocked ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : '';
 
                return Html::rawElement( 'li', array(), "{$item} [{$count}]{$blocked}" );
        }
index 11d7f4d..331a0e0 100644 (file)
@@ -89,7 +89,7 @@ class UsersPager extends AlphabeticPager {
                $conds = array();
                // Don't show hidden names
                if( !$this->getUser()->isAllowed( 'hideuser' ) ) {
-                       $conds[] = 'ipb_deleted IS NULL OR ipb_deleted = 0';
+                       $conds[] = 'ipb_deleted IS NULL';
                }
 
                $options = array();
@@ -129,6 +129,7 @@ class UsersPager extends AlphabeticPager {
                                'user_groups' => array( 'LEFT JOIN', 'user_id=ug_user' ),
                                'ipblocks' => array( 'LEFT JOIN', array(
                                        'user_id=ipb_user',
+                                       'ipb_deleted' => 1,
                                        'ipb_auto' => 0
                                )),
                        ),
@@ -184,10 +185,9 @@ class UsersPager extends AlphabeticPager {
                        $created = $this->msg( 'usercreated', $d, $t, $row->user_name )->escaped();
                        $created = ' ' . $this->msg( 'parentheses' )->rawParams( $created )->escaped();
                }
-               $blocked = !is_null( $row->ipb_deleted ) ? ' ' . $this->msg( 'listusers-blocked', $userName )->escaped() : '';
 
                wfRunHooks( 'SpecialListusersFormatRow', array( &$item, $row ) );
-               return Html::rawElement( 'li', array(), "{$item}{$edits}{$created}{$blocked}" );
+               return Html::rawElement( 'li', array(), "{$item}{$edits}{$created}" );
        }
 
        function doBatchLookups() {
index e3a4c3a..fd24af1 100644 (file)
@@ -790,6 +790,8 @@ class UploadForm extends HTMLForm {
         * @return Array: descriptor array
         */
        protected function getSourceSection() {
+               global $wgCopyUploadsFromSpecialUpload;
+
                if ( $this->mSessionKey ) {
                        return array(
                                'SessionKey' => array(
@@ -803,7 +805,9 @@ class UploadForm extends HTMLForm {
                        );
                }
 
-               $canUploadByUrl = UploadFromUrl::isEnabled() && UploadFromUrl::isAllowed( $this->getUser() );
+               $canUploadByUrl = UploadFromUrl::isEnabled()
+                       && UploadFromUrl::isAllowed( $this->getUser() )
+                       && $wgCopyUploadsFromSpecialUpload;
                $radio = $canUploadByUrl;
                $selectedSourceType = strtolower( $this->getRequest()->getText( 'wpSourceType', 'File' ) );
 
index f3ef7bf..dc5fb52 100644 (file)
@@ -3777,6 +3777,9 @@ This is probably caused by a link to a blacklisted external site.',
 'pageinfo-redirectsto-info'    => 'info',
 'pageinfo-contentpage'         => 'Counted as a content page',
 'pageinfo-contentpage-yes'     => 'Yes',
+'pageinfo-protect-cascading'      => 'Protections are cascading from here',
+'pageinfo-protect-cascading-yes'  => 'Yes',
+'pageinfo-protect-cascading-from' => 'Protections are cascading from',
 
 # Skin names
 'skinname-standard'    => 'Classic', # only translate this message to other languages if you have to change it
@@ -3860,10 +3863,10 @@ By executing it, your system may be compromised.",
 
 # Video information, used by Language::formatTimePeriod() to format lengths in the above messages
 'video-dims'     => '$1, $2 × $3', # only translate this message to other languages if you have to change it
-'seconds-abbrev' => '$1s', # only translate this message to other languages if you have to change it
-'minutes-abbrev' => '$1m', # only translate this message to other languages if you have to change it
-'hours-abbrev'   => '$1h', # only translate this message to other languages if you have to change it
-'days-abbrev'    => '$1d', # only translate this message to other languages if you have to change it
+'seconds-abbrev' => '$1 s', # only translate this message to other languages if you have to change it
+'minutes-abbrev' => '$1 min', # only translate this message to other languages if you have to change it
+'hours-abbrev'   => '$1 h', # only translate this message to other languages if you have to change it
+'days-abbrev'    => '$1 d', # only translate this message to other languages if you have to change it
 'seconds'        => '{{PLURAL:$1|$1 second|$1 seconds}}',
 'minutes'        => '{{PLURAL:$1|$1 minute|$1 minutes}}',
 'hours'          => '{{PLURAL:$1|$1 hour|$1 hours}}',
index 86b3515..777a23e 100644 (file)
@@ -3552,6 +3552,9 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 'pageinfo-redirectsto-info' => 'Text to put in parentheses for the link to the action=info of the redirect target.',
 'pageinfo-contentpage' => 'Key for the row shown if this page is counted as a content page',
 'pageinfo-contentpage-yes' => 'Yes, this page is a content page',
+'pageinfo-protect-cascading'      => 'Key for the row which shows whether this page has cascading protection enabled',
+'pageinfo-protect-cascading-yes'  => 'Yes, protections are cascading from here',
+'pageinfo-protect-cascading-from' => 'Key for a list of pages where protections are cascading from',
 
 # Skin names
 'skinname-standard' => '{{optional}}
index 1a9115d..60e0f30 100644 (file)
@@ -2707,6 +2707,9 @@ $wgMessageStructure = array(
                'pageinfo-redirectsto-info',
                'pageinfo-contentpage',
                'pageinfo-contentpage-yes',
+               'pageinfo-protect-cascading',
+               'pageinfo-protect-cascading-yes',
+               'pageinfo-protect-cascading-from',
        ),
        'skin' => array(
                'skinname-standard',
index c906143..4ec8b3e 100644 (file)
@@ -108,6 +108,7 @@ return array(
        'jquery' => array(
                'scripts' => 'resources/jquery/jquery.js',
                'debugRaw' => false,
+               'targets' => array( 'desktop', 'mobile' ),
        ),
 
        /* jQuery Plugins */
@@ -180,6 +181,7 @@ return array(
        ),
        'jquery.hidpi' => array(
                'scripts' => 'resources/jquery/jquery.hidpi.js',
+               'targets' => array( 'desktop', 'mobile' ),
        ),
        'jquery.highlightText' => array(
                'scripts' => 'resources/jquery/jquery.highlightText.js',
@@ -549,6 +551,7 @@ return array(
                'scripts' => 'resources/mediawiki/mediawiki.js',
                'debugScripts' => 'resources/mediawiki/mediawiki.log.js',
                'debugRaw' => false,
+               'targets' => array( 'desktop', 'mobile' ),
        ),
        'mediawiki.api' => array(
                'scripts' => 'resources/mediawiki.api/mediawiki.api.js',
@@ -629,6 +632,7 @@ return array(
                'dependencies' => array(
                        'jquery.hidpi',
                ),
+               'targets' => array( 'desktop', 'mobile' ),
        ),
        'mediawiki.htmlform' => array(
                'scripts' => 'resources/mediawiki/mediawiki.htmlform.js',
index 621c891..d8ec2e9 100644 (file)
@@ -36,7 +36,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                9.45,
                                array(),
-                               '9.5s',
+                               '9.5 s',
                                'formatTimePeriod() rounding (<10s)'
                        ),
                        array(
@@ -48,7 +48,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                9.95,
                                array(),
-                               '10s',
+                               '10 s',
                                'formatTimePeriod() rounding (<10s)'
                        ),
                        array(
@@ -60,7 +60,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                59.55,
                                array(),
-                               '1m 0s',
+                               '1 min 0 s',
                                'formatTimePeriod() rounding (<60s)'
                        ),
                        array(
@@ -72,7 +72,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                119.55,
                                array(),
-                               '2m 0s',
+                               '2 min 0 s',
                                'formatTimePeriod() rounding (<1h)'
                        ),
                        array(
@@ -84,7 +84,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                3599.55,
                                array(),
-                               '1h 0m 0s',
+                               '1 h 0 min 0 s',
                                'formatTimePeriod() rounding (<1h)'
                        ),
                        array(
@@ -96,7 +96,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                7199.55,
                                array(),
-                               '2h 0m 0s',
+                               '2 h 0 min 0 s',
                                'formatTimePeriod() rounding (>=1h)'
                        ),
                        array(
@@ -108,7 +108,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                7199.55,
                                'avoidseconds',
-                               '2h 0m',
+                               '2 h 0 min',
                                'formatTimePeriod() rounding (>=1h), avoidseconds'
                        ),
                        array(
@@ -120,7 +120,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                7199.55,
                                'avoidminutes',
-                               '2h 0m',
+                               '2 h 0 min',
                                'formatTimePeriod() rounding (>=1h), avoidminutes'
                        ),
                        array(
@@ -132,7 +132,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                172799.55,
                                'avoidseconds',
-                               '48h 0m',
+                               '48 h 0 min',
                                'formatTimePeriod() rounding (=48h), avoidseconds'
                        ),
                        array(
@@ -144,7 +144,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                259199.55,
                                'avoidminutes',
-                               '3d 0h',
+                               '3 d 0 h',
                                'formatTimePeriod() rounding (>48h), avoidminutes'
                        ),
                        array(
@@ -156,7 +156,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                176399.55,
                                'avoidseconds',
-                               '2d 1h 0m',
+                               '2 d 1 h 0 min',
                                'formatTimePeriod() rounding (>48h), avoidseconds'
                        ),
                        array(
@@ -168,7 +168,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                176399.55,
                                'avoidminutes',
-                               '2d 1h',
+                               '2 d 1 h',
                                'formatTimePeriod() rounding (>48h), avoidminutes'
                        ),
                        array(
@@ -180,7 +180,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                259199.55,
                                'avoidseconds',
-                               '3d 0h 0m',
+                               '3 d 0 h 0 min',
                                'formatTimePeriod() rounding (>48h), avoidseconds'
                        ),
                        array(
@@ -192,7 +192,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                172801.55,
                                'avoidseconds',
-                               '2d 0h 0m',
+                               '2 d 0 h 0 min',
                                'formatTimePeriod() rounding, (>48h), avoidseconds'
                        ),
                        array(
@@ -204,7 +204,7 @@ class LanguageTest extends MediaWikiTestCase {
                        array(
                                176460.55,
                                array(),
-                               '2d 1h 1m 1s',
+                               '2 d 1 h 1 min 1 s',
                                'formatTimePeriod() rounding, recursion, (>48h)'
                        ),
                        array(