Prechádzať zdrojové kódy

Merge pull request #186 from Hutchy68/patch-1

Fixes for bugs, scrutinizer happy with 5 issues fixed
Tom Hutchison 10 rokov pred
rodič
commit
f3bb8394f4

+ 0 - 35
Foreground.i18n.php

@@ -1,35 +0,0 @@
-<?php
-/**
- * This is a backwards-compatibility shim, generated by:
- * https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nSkinForeground' ) ) {
-	function wfJsonI18nSkinForeground( $cache, $code, &$cachedData ) {
-		$codeSequence = array_merge( array( $code ), $cachedData['fallbackSequence'] );
-		foreach ( $codeSequence as $csCode ) {
-			$fileName = dirname( __FILE__ ) . "/i18n/$csCode.json";
-			if ( is_readable( $fileName ) ) {
-				$data = FormatJson::decode( file_get_contents( $fileName ), true );
-				foreach ( array_keys( $data ) as $key ) {
-					if ( $key === '' || $key[0] === '@' ) {
-						unset( $data[$key] );
-					}
-				}
-				$cachedData['messages'] = array_merge( $data, $cachedData['messages'] );
-			}
-
-			$cachedData['deps'][] = new FileDependency( $fileName );
-		}
-		return true;
-	}
-
-	$GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 'wfJsonI18nSkinForeground';
-}

+ 9 - 8
Foreground.skin.php

@@ -69,19 +69,20 @@ class foregroundTemplate extends BaseTemplate {
 				echo "<div id='navwrapper' class='". $wgForegroundFeatures['NavWrapperType']. "'>";
 				break;
 		}
+		// Set default variables for footer and switch them if 'showFooterIcons' => true
+		$footerLeftClass = 'small-8 large-centered columns text-center';
+		$footerRightClass = 'large-12 small-12 columns';
+		$poweredbyType = "nocopyright";
+		$poweredbyMakeType = 'withoutImage';
 		switch ($wgForegroundFeatures['showFooterIcons']) {
-			case '0':
-				$footerLeftClass = 'small-8 large-centered columns text-center';
-				$footerRightClass = 'large-12 small-12 columns';
-				$poweredbyType = "nocopyright";
-				$poweredbyMakeType = 'withoutImage';
-				break;	
-			case '1':
+			case true:
 				$footerLeftClass = 'large-8 small-12 columns';
 				$footerRightClass = 'large-4 small-12 columns';
 				$poweredbyType = "icononly";
 				$poweredbyMakeType = 'withImage';
 				break;
+			default:
+				break;	
 		}
 ?>
 <!-- START FOREGROUNDTEMPLATE -->
@@ -171,7 +172,7 @@ class foregroundTemplate extends BaseTemplate {
 				<div id="siteNotice" class="sitenotice panel radius"><?php echo $this->text('sitename') . ' '. wfMessage( 'foreground-browsermsg' )->text(); ?></div>
 				<![endif]-->
 
-				<?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="sitenotice panel radius"><?php $this->html( 'sitenotice' ); ?></div><?php } ?>
+				<?php if ( $this->data['sitenotice'] ) { ?><div id="siteNotice" class="sitenotice"><?php $this->html( 'sitenotice' ); ?></div><?php } ?>
 				<?php if ( $this->data['newtalk'] ) { ?><div id="usermessage" class="newtalk panel radius"><?php $this->html( 'newtalk' ); ?></div><?php } ?>
 				</div>
 		</div>

+ 5 - 0
assets/stylesheets/foreground.css

@@ -813,3 +813,8 @@ body.mw-special-Userlogin h2.title {
 #echo-notifications #mw-echo-overlay-pref-link { padding: 10px 0 10px 30px; }
 #echo-notifications #mw-echo-overlay-link { border-right: 1px solid #DDDDDD; margin-right: 2em; }
 }
+
+/*Fix ULS CSS */
+#pt-uls a.uls-trigger {
+  padding-left:15px !important;
+}