only get the title string if action is not empty
[lhc/web/wiklou.git] / includes / WatchedItem.php
index 6a0ef07..74371be 100644 (file)
@@ -1,4 +1,4 @@
-<?
+<?php
 
 class WatchedItem {
 
@@ -25,7 +25,7 @@ class WatchedItem {
                global $wgMemc;
                $key = $this->watchKey();
                $iswatched = $wgMemc->get( $key );
-               if( is_scalar( $iswatched ) ) return $iswatched;
+               if( is_integer( $iswatched ) ) return $iswatched;
                
                $sql = "SELECT 1 FROM watchlist WHERE wl_user=$this->id AND wl_namespace=$this->ns AND wl_title='$this->eti'";
                $res = wfQuery( $sql, DB_READ );
@@ -59,6 +59,7 @@ class WatchedItem {
        }
 
        /* static */ function duplicateEntries( $ot, $nt ) {
+               $fname = "WatchedItem::duplicateEntries";
                global $wgMemc, $wgDBname;
                $oldnamespace = $ot->getNamespace() & ~1;
                $newnamespace = $nt->getNamespace() & ~1;