*
* @param $out OutputPage
* @param $skin Skin (deprecated presumably)
- * @param $dbr DatabaseBase
+ * @param $dbr IDatabase
* @param $res ResultWrapper Results from query
* @param $num integer Number of results
* @param $offset integer Paging offset (Should always be 0 in our case)
);
$row .= Html::rawElement(
'td',
- array(),
+ // Make sure js sorts it in numeric order
+ array( 'data-sort-value' => $count ),
$this->msg( 'mediastatistics-nfiles' )
->numParams( $count )
/** @todo Check to be sure this really should have number formatting */
if ( $decimal == 0 ) {
return '0';
}
+ if ( $decimal >= 100 ) {
+ return '100';
+ }
$percent = sprintf( "%." . max( 0, 2 - floor( log10( $decimal ) ) ) . "f", $decimal );
// Then remove any trailing 0's
return preg_replace( '/\.?0*$/', '', $percent );
*
* @param $skin Skin
* @param $result stdObject Result row
+ * @return bool|string|void
+ * @throws MWException
*/
public function formatResult( $skin, $result ) {
throw new MWException( "unimplemented" );
/**
* Initialize total values so we can figure out percentages later.
*
- * @param $dbr DatabaseBase
+ * @param $dbr IDatabase
* @param $res ResultWrapper
*/
public function preprocessResults( $dbr, $res ) {