OSDN Git Service

$blogidがshort nameであったときの処理を追加
authorhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sun, 15 Oct 2006 10:58:26 +0000 (10:58 +0000)
committerhsur <hsur@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Sun, 15 Oct 2006 10:58:26 +0000 (10:58 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@450 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_UpdateTime/NP_UpdateTime.php

index 21b512e..3fb2dd2 100644 (file)
@@ -80,6 +80,12 @@ class NP_UpdateTime extends NucleusPlugin {
 
        function doSkinVar($skinType, $maxtoshow = 5, $bmode = 'current') {
                global $manager, $CONF, $blogid;
+               if (is_numeric($blogid)) {
+                       $blogid = intval($blogid);
+               } else {
+                       $blogid = gttBlogIDFromName($blogid);
+               }
+               
                $b =& $manager->getBlog($CONF['DefaultBlog']);
                $this->defaultblogurl = $b->getURL() ;
                if(!$this->defaultblogurl)
@@ -87,7 +93,7 @@ class NP_UpdateTime extends NucleusPlugin {
 
                if($maxtoshow == ''){$maxtoshow = 5;}
                if($bmode == ''){$bmode = 'current';}
-
+               
                echo $this->getOption('s_lists')."\n";
                $query = 'SELECT r.up_id as up_id, IF(INTERVAL(r.updatetime, i.itime), UNIX_TIMESTAMP(r.updatetime), UNIX_TIMESTAMP(i.itime) ) as utime FROM '.sql_table('plugin_rectime') . ' as r, '.sql_table('item') .' as i WHERE  r.up_id=i.inumber';
                if($bmode != 'all'){