Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用
Revision | 853b60bd3104cff91e8837e079d0f2bd40a64ae2 (tree) |
---|---|
Zeit | 2009-03-05 02:54:34 |
Autor | shizuki17xx <shizuki17xx"@1ca2...> |
Commiter | shizuki17xx |
Fix Undefined variable
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@964 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -553,8 +553,10 @@ class BLOG { | ||
553 | 553 | function showArchiveList($template, $mode = 'month', $limit = 0) { |
554 | 554 | global $CONF, $catid, $manager; |
555 | 555 | |
556 | - if ($catid) | |
556 | + $linkparams = array(); | |
557 | + if ($catid) { | |
557 | 558 | $linkparams = array('catid' => $catid); |
559 | + } | |
558 | 560 | |
559 | 561 | $template =& $manager->getTemplate($template); |
560 | 562 | $data['blogid'] = $this->getID(); |
@@ -671,7 +673,7 @@ class BLOG { | ||
671 | 673 | 'listitem' => &$data |
672 | 674 | ) |
673 | 675 | ); |
674 | - | |
676 | + | |
675 | 677 | echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data); |
676 | 678 | //$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data); |
677 | 679 | //echo strftime($temp, $current->itime); |
@@ -687,15 +689,15 @@ class BLOG { | ||
687 | 689 | 'self' => $CONF['Self'] |
688 | 690 | )); |
689 | 691 | } |
690 | - | |
692 | + | |
691 | 693 | /** |
692 | 694 | * Shows a list of all blogs in the system using a given template |
693 | 695 | * ordered by number, name, shortname or description |
694 | - * in ascending or descending order | |
696 | + * in ascending or descending order | |
695 | 697 | */ |
696 | 698 | function showBlogList($template, $bnametype, $orderby, $direction) { |
697 | 699 | global $CONF, $manager; |
698 | - | |
700 | + | |
699 | 701 | switch ($orderby) { |
700 | 702 | case 'number': |
701 | 703 | $orderby='bnumber'; |
@@ -713,7 +715,7 @@ class BLOG { | ||
713 | 715 | $orderby='bnumber'; |
714 | 716 | break; |
715 | 717 | } |
716 | - | |
718 | + | |
717 | 719 | $direction=strtolower($direction); |
718 | 720 | switch ($direction) { |
719 | 721 | case 'asc': |
@@ -726,49 +728,49 @@ class BLOG { | ||
726 | 728 | $direction='ASC'; |
727 | 729 | break; |
728 | 730 | } |
729 | - | |
731 | + | |
730 | 732 | $template =& $manager->getTemplate($template); |
731 | - | |
733 | + | |
732 | 734 | echo TEMPLATE::fill((isset($template['BLOGLIST_HEADER']) ? $template['BLOGLIST_HEADER'] : null), |
733 | 735 | array( |
734 | 736 | 'sitename' => $CONF['SiteName'], |
735 | 737 | 'siteurl' => $CONF['IndexURL'] |
736 | 738 | )); |
737 | - | |
739 | + | |
738 | 740 | $query = 'SELECT bnumber, bname, bshortname, bdesc, burl FROM '.sql_table('blog').' ORDER BY '.$orderby.' '.$direction; |
739 | 741 | $res = sql_query($query); |
740 | - | |
742 | + | |
741 | 743 | while ($data = mysql_fetch_assoc($res)) { |
742 | - | |
744 | + | |
743 | 745 | $list = array(); |
744 | - | |
746 | + | |
745 | 747 | // $list['bloglink'] = createLink('blog', array('blogid' => $data['bnumber'])); |
746 | 748 | $list['bloglink'] = createBlogidLink($data['bnumber']); |
747 | - | |
749 | + | |
748 | 750 | $list['blogdesc'] = $data['bdesc']; |
749 | - | |
751 | + | |
750 | 752 | $list['blogurl'] = $data['burl']; |
751 | - | |
753 | + | |
752 | 754 | if ($bnametype=='shortname') { |
753 | 755 | $list['blogname'] = $data['bshortname']; |
754 | 756 | } |
755 | 757 | else { // all other cases |
756 | 758 | $list['blogname'] = $data['bname']; |
757 | 759 | } |
758 | - | |
760 | + | |
759 | 761 | $manager->notify( |
760 | 762 | 'PreBlogListItem', |
761 | 763 | array( |
762 | 764 | 'listitem' => &$list |
763 | 765 | ) |
764 | 766 | ); |
765 | - | |
767 | + | |
766 | 768 | echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list); |
767 | - | |
769 | + | |
768 | 770 | } |
769 | - | |
771 | + | |
770 | 772 | mysql_free_result($res); |
771 | - | |
773 | + | |
772 | 774 | echo TEMPLATE::fill((isset($template['BLOGLIST_FOOTER']) ? $template['BLOGLIST_FOOTER'] : null), |
773 | 775 | array( |
774 | 776 | 'sitename' => $CONF['SiteName'], |
@@ -1156,8 +1158,8 @@ class BLOG { | ||
1156 | 1158 | // clear all expired future posts |
1157 | 1159 | sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()"); |
1158 | 1160 | |
1159 | - // check to see any pending future post, clear the flag is none | |
1160 | - $result = sql_query("SELECT * FROM " . sql_table('item') | |
1161 | + // check to see any pending future post, clear the flag is none | |
1162 | + $result = sql_query("SELECT * FROM " . sql_table('item') | |
1161 | 1163 | . " WHERE iposted=0 AND iblog=" . $blogid); |
1162 | 1164 | if (mysql_num_rows($result) == 0) { |
1163 | 1165 | $this->clearFuturePost(); |
@@ -1165,14 +1167,14 @@ class BLOG { | ||
1165 | 1167 | } |
1166 | 1168 | } |
1167 | 1169 | } |
1168 | - | |
1170 | + | |
1169 | 1171 | /** |
1170 | 1172 | * Shows the given list of items for this blog |
1171 | 1173 | * |
1172 | 1174 | * @param $itemarray |
1173 | 1175 | * array of item numbers to be displayed |
1174 | 1176 | * @param $template |
1175 | - * String representing the template _NAME_ (!) | |
1177 | + * String representing the template _NAME_ (!) | |
1176 | 1178 | * @param $highlight |
1177 | 1179 | * contains a query that should be highlighted |
1178 | 1180 | * @param $comments |
@@ -1188,7 +1190,7 @@ class BLOG { | ||
1188 | 1190 | |
1189 | 1191 | return $this->showUsingQuery($template, $query, $highlight, $comments, $dateheads); |
1190 | 1192 | } |
1191 | - | |
1193 | + | |
1192 | 1194 | /** |
1193 | 1195 | * Returns the SQL query used to fill out templates for a list of items |
1194 | 1196 | * |
@@ -1226,7 +1228,7 @@ class BLOG { | ||
1226 | 1228 | . ' c.cname as category,' |
1227 | 1229 | . ' i.icat as catid,' |
1228 | 1230 | . ' i.iclosed as closed'; |
1229 | - | |
1231 | + | |
1230 | 1232 | $query .= ' FROM ' |
1231 | 1233 | . sql_table('item') . ' as i, ' |
1232 | 1234 | . sql_table('member') . ' as m, ' |
@@ -1245,7 +1247,7 @@ class BLOG { | ||
1245 | 1247 | $i--; |
1246 | 1248 | if ($i) $query .= ' UNION '; |
1247 | 1249 | } |
1248 | - | |
1250 | + | |
1249 | 1251 | return $query; |
1250 | 1252 | } |
1251 | 1253 |