Spaces to tabs
[lhc/web/wiklou.git] / includes / ChangeTags.php
index 8dce679..4a1ad80 100644 (file)
@@ -119,7 +119,6 @@ class ChangeTags {
                }
 
                // Figure out which conditions can be done.
-               $join_field = '';
                if ( in_array( 'recentchanges', $tables ) ) {
                        $join_cond = 'rc_id';
                } elseif( in_array( 'logging', $tables ) ) {
@@ -168,9 +167,9 @@ class ChangeTags {
                        return $data;
                }
 
-               $html = implode( ' ', $data );
+               $html = implode( ' ', $data );
                $html .= "\n" . Xml::element( 'input', array( 'type' => 'submit', 'value' => wfMsg( 'tag-filter-submit' ) ) );
-               $html .= "\n" . Xml::hidden( 'title', $wgTitle-> getPrefixedText() );
+               $html .= "\n" . Html::hidden( 'title', $wgTitle-> getPrefixedText() );
                $html = Xml::tags( 'form', array( 'action' => $wgTitle->getLocalURL(), 'method' => 'get' ), $html );
 
                return $html;
@@ -181,16 +180,17 @@ class ChangeTags {
                // Caching...
                global $wgMemc;
                $key = wfMemcKey( 'valid-tags' );
-
-               if ( $tags = $wgMemc->get( $key ) )
+               $tags = $wgMemc->get( $key );
+               if ( $tags ) {
                        return $tags;
+               }
 
                $emptyTags = array();
 
                // Some DB stuff
                $dbr = wfGetDB( DB_SLAVE );
                $res = $dbr->select( 'valid_tag', 'vt_tag', array(), __METHOD__ );
-               while( $row = $res->fetchObject() ) {
+               foreach ( $res as $row ) {
                        $emptyTags[] = $row->vt_tag;
                }