Per r40414: Add new CSS files to message files.
[lhc/web/wiklou.git] / maintenance / importLogs.inc
index 5e4773e..a008e6c 100644 (file)
@@ -14,7 +14,7 @@
 #
 # You should have received a copy of the GNU General Public License along
 # with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 # http://www.gnu.org/copyleft/gpl.html
 
 /**
@@ -22,9 +22,9 @@
  *
  * Not yet complete.
  *
+ * @file
  * @todo document
- * @package MediaWiki
- * @subpackage Maintenance
+ * @ingroup Maintenance
  */
 
 /** */
@@ -36,15 +36,14 @@ require_once( 'LogPage.php' );
 /**
  * Log importer
  * @todo document
- * @package MediaWiki
- * @subpackage Maintenance
+ * @ingroup Maintenance
  */
 class LogImporter {
        var $dummy = false;
 
        function LogImporter( $type ) {
                $this->type = $type;
-               $this->db =& wfGetDB( DB_MASTER );
+               $this->db = wfGetDB( DB_MASTER );
                $this->actions = $this->setupActions();
        }
 
@@ -77,6 +76,7 @@ class LogImporter {
                }
                $lines = explode( '<li>', $text );
                foreach( $lines as $line ) {
+                       $matches = array();
                        if( preg_match( '!^(.*)</li>!', $line, $matches ) ) {
                                $this->importLine( $matches[1] );
                        }
@@ -88,6 +88,7 @@ class LogImporter {
                # 01:55, 23 Aug 2004 - won't take in strtotimr
                # "Aug 23 2004 01:55" - seems ok
                # TODO: multilingual attempt to extract from the data in Language
+               $matches = array();
                if( preg_match( '/^(\d+:\d+(?::\d+)?), (.*)$/', $date, $matches ) ) {
                        $date = $matches[2] . ' ' . $matches[1];
                }
@@ -99,6 +100,7 @@ class LogImporter {
 
        function importLine( $line ) {
                foreach( $this->actions as $action => $regexp ) {
+                       $matches = array();
                        if( preg_match( $regexp, $line, $matches ) ) {
                                if( $this->dummy ) {
                                        #var_dump( $matches );
@@ -140,5 +142,3 @@ function wfUnescapeWikiText( $text ) {
                $text );
        return $text;
 }
-
-?>