Don't override the default Bitmap.php information in the longDescription() for GIF...
[lhc/web/wiklou.git] / includes / Licenses.php
index 4b81bfa..12a1f93 100644 (file)
@@ -68,14 +68,11 @@ class Licenses extends HTMLFormField {
                }
        }
 
-       protected static function trimStars( $str ) {
+       protected function trimStars( $str ) {
                $i = $count = 0;
 
-               $length = strlen( $str );
-               for ( $i = 0; $i < $length; $i++ ) {
-                       if ( $str[$i] != '*' )
-                               return array( $i, ltrim( $str, '* ' ) );
-               }
+               $numStars = strspn( $str, '*' );
+               return array( $numStars, ltrim( substr( $str, $numStars ), ' ' ) );
        }
 
        protected function stackItem( &$list, $path, $item ) {
@@ -86,7 +83,7 @@ class Licenses extends HTMLFormField {
                $position[] = $item;
        }
 
-       protected function makeHtml( &$tagset, $depth = 0 ) {
+       protected function makeHtml( $tagset, $depth = 0 ) {
                foreach ( $tagset as $key => $val )
                        if ( is_array( $val ) ) {
                                $this->html .= $this->outputOption(