https://bugzilla.wikimedia.org/show_bug.cgi?id=65456
--- Comment #1 from Purodha Blissenbach bugzilla.wikime...@publi.purodha.net
---
Since git/gerrit do not work for me, and I cannot install omegawiki (see
abovementioned link) here is a list of changes, just in case someone want to
try them out:
diff --git a/includes/specials/SpecialOWStatistics.php
b/includes/specials/SpecialOWStatistics.php
index bc5e6d5..01fe441 100644
--- a/includes/specials/SpecialOWStatistics.php
+++ b/includes/specials/SpecialOWStatistics.php
@@ -100,7 +100,7 @@ class SpecialOWStatistics extends SpecialPage {
$max = max ( $nbDMArray ) ;
foreach ($nbDMArray as $lang = $dm) {
- $tableLang .= $this-addTableRowWithBar( $lang, $dm,
$max );
+ $tableLang .= $this-addTableRowWithBar( $lang, $dm,
$max , $nbdm );
}
$tableLang .= Html::closeElement( 'table' );
@@ -154,7 +154,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbDefArray ) ;
$max = max ( $nbDefArray ) ;
foreach ($nbDefArray as $lang = $def) {
- $tableLang .= $this-addTableRowWithBar( $lang, $def,
$max );
+ $tableLang .= $this-addTableRowWithBar( $lang, $def,
$max , $nbDefTot );
}
$tableLang .= Html::closeElement( 'table' );
@@ -206,7 +206,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbexpArray ) ;
$max = max ( $nbexpArray ) ;
foreach ($nbexpArray as $lang = $exp) {
- $tableLang .= $this-addTableRowWithBar( $lang, $exp,
$max );
+ $tableLang .= $this-addTableRowWithBar( $lang, $exp,
$max , $nbexptot );
}
$tableLang .= Html::closeElement( 'table' );
@@ -259,7 +259,7 @@ class SpecialOWStatistics extends SpecialPage {
arsort ( $nbSyntransArray ) ;
$max = max ( $nbSyntransArray ) ;
foreach ($nbSyntransArray as $lang = $syntrans) {
- $tableLang .= $this-addTableRowWithBar( $lang,
$syntrans, $max );
+ $tableLang .= $this-addTableRowWithBar( $lang,
$syntrans, $max , $nbSyntransTot );
}
$tableLang .= Html::closeElement( 'table' );
@@ -361,11 +361,12 @@ class SpecialOWStatistics extends SpecialPage {
* adds a row in a table with three columns
* the first column is e.g. the language name
* the second column is a value
-* the third column shows a bar according to value/max
+* the third column shows a bar according to $value/$max
+* followed by a percent figure based on $value/$total
*/
- function addTableRowWithBar ( $firstcol, $value, $max ) {
+ function addTableRowWithBar ( $firstcol, $value, $max , $total ) {
$wi = ceil( ( ( $value / $max ) * 500 ) );
- $per = ceil( ( ( $value / $max ) * 100 ) );
+ $per = ceil( ( ( $value / $total ) * 100 ) );
$row = Html::openElement( 'tr' );
$row .= Html::element( 'td', array(), $firstcol );
--
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l