OSDN Git Service

amount が 3 未満の時にエラーになっていたのを修正
authorshizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Fri, 13 Oct 2006 14:43:55 +0000 (14:43 +0000)
committershizuki <shizuki@1ca29b6e-896d-4ea0-84a5-967f57386b96>
Fri, 13 Oct 2006 14:43:55 +0000 (14:43 +0000)
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@445 1ca29b6e-896d-4ea0-84a5-967f57386b96

trunk/NP_ShowBlogs/NP_ShowBlogs.php

index 20cce85..94deda9 100644 (file)
@@ -52,7 +52,7 @@ class NP_ShowBlogs extends NucleusPlugin
 
        function getVersion()
        {
-               return '2.64';
+               return '2.641';
        }
 
        function getDescription()
@@ -349,12 +349,14 @@ $monthlimit = 0;
                }
                $q_startpos++;
                $q_amount--;
+               if ($q_amount <= $q_startpos) return;
                $onlyone_query = $showQuery . ' LIMIT ' . intval($q_startpos) . ', 1';
                $b->showUsingQuery($template, $onlyone_query, 0, 1, 1); 
                if (mysql_num_rows(sql_query($onlyone_query)) && empty($ads)) {
                        echo $this->getOption('ads2');
                }
 //------------SECOND AD CODE END-------------
+               if ($q_amount <= $q_startpos) return;
                $q_startpos++;
                $q_amount--;
                $second_query = $showQuery . ' LIMIT ' . intval($q_startpos) . ',' . intval($q_amount);