Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの
Revision | e511ef6131d2c527f5bcfafa1ea9564768847b3b (tree) |
---|---|
Time | 2006-10-13 23:43:55 |
Author | shizuki <shizuki@1ca2...> |
Commiter | shizuki |
amount が 3 未満の時にエラーになっていたのを修正
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/plugin@445 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -52,7 +52,7 @@ class NP_ShowBlogs extends NucleusPlugin | ||
52 | 52 | |
53 | 53 | function getVersion() |
54 | 54 | { |
55 | - return '2.64'; | |
55 | + return '2.641'; | |
56 | 56 | } |
57 | 57 | |
58 | 58 | function getDescription() |
@@ -349,12 +349,14 @@ $monthlimit = 0; | ||
349 | 349 | } |
350 | 350 | $q_startpos++; |
351 | 351 | $q_amount--; |
352 | + if ($q_amount <= $q_startpos) return; | |
352 | 353 | $onlyone_query = $showQuery . ' LIMIT ' . intval($q_startpos) . ', 1'; |
353 | 354 | $b->showUsingQuery($template, $onlyone_query, 0, 1, 1); |
354 | 355 | if (mysql_num_rows(sql_query($onlyone_query)) && empty($ads)) { |
355 | 356 | echo $this->getOption('ads2'); |
356 | 357 | } |
357 | 358 | //------------SECOND AD CODE END------------- |
359 | + if ($q_amount <= $q_startpos) return; | |
358 | 360 | $q_startpos++; |
359 | 361 | $q_amount--; |
360 | 362 | $second_query = $showQuery . ' LIMIT ' . intval($q_startpos) . ',' . intval($q_amount); |