If 'tables' is a string that starts with a space, treat it as user-enforced FROM...
[lhc/web/wiklou.git] / includes / LogPage.php
index a0b45e7..65dbbe4 100644 (file)
@@ -21,7 +21,6 @@
 /**
  * Contain log classes
  *
- * @package MediaWiki
  */
 
 /**
@@ -29,7 +28,6 @@
  * The logs are now kept in a table which is easier to manage and trim
  * than ever-growing wiki pages.
  *
- * @package MediaWiki
  */
 class LogPage {
        /* @access private */
@@ -44,7 +42,7 @@ class LogPage {
          *               'upload', 'move'
          * @param bool $rc Whether to update recent changes as well as the logging table
          */
-       function LogPage( $type, $rc = true ) {
+       function __construct( $type, $rc = true ) {
                $this->type = $type;
                $this->updateRecentChanges = $rc;
        }
@@ -55,7 +53,7 @@ class LogPage {
                global $wgUser;
                $fname = 'LogPage::saveContent';
 
-               $dbw =& wfGetDB( DB_MASTER );
+               $dbw = wfGetDB( DB_MASTER );
                $uid = $wgUser->getID();
 
                $this->timestamp = $now = wfTimestampNow();
@@ -134,6 +132,10 @@ class LogPage {
                global $wgLang, $wgContLang, $wgLogActions;
 
                $key = "$type/$action";
+               
+               if( $key == 'patrol/patrol' )
+                       return PatrolLog::makeActionText( $title, $params, $skin );
+               
                if( isset( $wgLogActions[$key] ) ) {
                        if( is_null( $title ) ) {
                                $rv=wfMsg( $wgLogActions[$key] );