[MediaWiki-commits] [Gerrit] change to set right alt attribute - change (mediawiki...BlueSpiceSkin)

2015-02-10 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged.

Change subject: change to set right alt attribute
..


change to set right alt attribute

Change-Id: I73fd975811d05b5127c893cc66d149a1ae91cc3b
---
M includes/BlueSpiceSkinHooks.php
1 file changed, 14 insertions(+), 9 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/includes/BlueSpiceSkinHooks.php b/includes/BlueSpiceSkinHooks.php
index b1be4c9..2d47b35 100644
--- a/includes/BlueSpiceSkinHooks.php
+++ b/includes/BlueSpiceSkinHooks.php
@@ -3,7 +3,7 @@
 class BlueSpiceSkinHooks {
 
/**
-* 
+*
 * @param SkinTemplate $sktemplate
 * @param BaseTemplate $tpl
 * @return boolean Always true to keep Hook running
@@ -24,7 +24,7 @@
}
 
/**
-* 
+*
 * @param type $oStatebar
 * @param type $aTopViews
 * @param type $oUser
@@ -49,7 +49,7 @@
}
 
/**
-* 
+*
 * @param SkinTemplate $skin
 * @param Title $title
 * @param int $section
@@ -125,14 +125,19 @@
$bar['TOOLBOX'] = array();
return true;
}
-   public static function onBSGetLogo($sImg){
-   $sLogoPath = BsConfig::get('MW::LogoPath');
-   if (substr($sLogoPath,0,1) != '/'  substr($sLogoPath,0,4) != 
'http')
-   $sLogoPath = / . $sLogoPath;
-   $sImg = img src='.$sLogoPath.' alt='' /;
+   public static function onBSGetLogo( $sImg ) {
+   global $wgSitename;
+   $sLogoPath = wfExpandUrl(BsConfig::get( 'MW::LogoPath' ));
+   $sPageName = ;
+   $oTitle = Title::newMainPage();
+   if ( !is_null( $oTitle ) ) {
+   $sPageName = $oTitle-getText() .  - ;
+   }
+   $sPageName .= $wgSitename;
+   $sImg = img src=' . $sLogoPath . ' alt=' . $sPageName . ' 
/;
return true;
}
-   
+
public static function onVisualEditorConfig($aStandardConf, 
$aDefaultConf){
global $wgStylePath, $wgServer;
if (isset($aStandardConf['content_css'])  
$aStandardConf['content_css'] != )

-- 
To view, visit https://gerrit.wikimedia.org/r/188758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I73fd975811d05b5127c893cc66d149a1ae91cc3b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_22
Gerrit-Owner: Tweichart weich...@hallowelt.biz
Gerrit-Reviewer: Mglaser gla...@hallowelt.biz
Gerrit-Reviewer: Pigpen reym...@hallowelt.biz
Gerrit-Reviewer: Robert Vogel vo...@hallowelt.biz
Gerrit-Reviewer: Smuggli mug...@hallowelt.biz
Gerrit-Reviewer: jenkins-bot 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] change to set right alt attribute - change (mediawiki...BlueSpiceSkin)

2015-02-05 Thread Tweichart (Code Review)
Tweichart has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/188758

Change subject: change to set right alt attribute
..

change to set right alt attribute

Change-Id: I73fd975811d05b5127c893cc66d149a1ae91cc3b
---
M includes/BlueSpiceSkinHooks.php
1 file changed, 17 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/58/188758/1

diff --git a/includes/BlueSpiceSkinHooks.php b/includes/BlueSpiceSkinHooks.php
index b1be4c9..2fa005b 100644
--- a/includes/BlueSpiceSkinHooks.php
+++ b/includes/BlueSpiceSkinHooks.php
@@ -3,7 +3,7 @@
 class BlueSpiceSkinHooks {
 
/**
-* 
+*
 * @param SkinTemplate $sktemplate
 * @param BaseTemplate $tpl
 * @return boolean Always true to keep Hook running
@@ -24,7 +24,7 @@
}
 
/**
-* 
+*
 * @param type $oStatebar
 * @param type $aTopViews
 * @param type $oUser
@@ -49,7 +49,7 @@
}
 
/**
-* 
+*
 * @param SkinTemplate $skin
 * @param Title $title
 * @param int $section
@@ -125,14 +125,22 @@
$bar['TOOLBOX'] = array();
return true;
}
-   public static function onBSGetLogo($sImg){
-   $sLogoPath = BsConfig::get('MW::LogoPath');
-   if (substr($sLogoPath,0,1) != '/'  substr($sLogoPath,0,4) != 
'http')
-   $sLogoPath = / . $sLogoPath;
-   $sImg = img src='.$sLogoPath.' alt='' /;
+   public static function onBSGetLogo( $sImg ) {
+   global $wgSitename;
+   $sLogoPath = BsConfig::get( 'MW::LogoPath' );
+   if ( substr( $sLogoPath, 0, 1 ) != '/'  substr( $sLogoPath, 
0, 4 ) != 'http' ) {
+   $sLogoPath = / . $sLogoPath;
+   }
+   $sPageName = ;
+   $oTitle = RequestContext::getMain()-getTitle();
+   if ( !is_null( $oTitle ) ) {
+   $sPageName = $oTitle-getText() .  - ;
+   }
+   $sPageName .= $wgSitename;
+   $sImg = img src=' . $sLogoPath . ' alt=' . $sPageName . ' 
/;
return true;
}
-   
+
public static function onVisualEditorConfig($aStandardConf, 
$aDefaultConf){
global $wgStylePath, $wgServer;
if (isset($aStandardConf['content_css'])  
$aStandardConf['content_css'] != )

-- 
To view, visit https://gerrit.wikimedia.org/r/188758
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73fd975811d05b5127c893cc66d149a1ae91cc3b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_22
Gerrit-Owner: Tweichart weich...@hallowelt.biz

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits