• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用


Commit MetaInfo

Revision853b60bd3104cff91e8837e079d0f2bd40a64ae2 (tree)
Zeit2009-03-05 02:54:34
Autorshizuki17xx <shizuki17xx"@1ca2...>
Commitershizuki17xx

Log Message

Fix Undefined variable

git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@964 1ca29b6e-896d-4ea0-84a5-967f57386b96

Ändern Zusammenfassung

Diff

--- a/nucleus/libs/BLOG.php
+++ b/nucleus/libs/BLOG.php
@@ -553,8 +553,10 @@ class BLOG {
553553 function showArchiveList($template, $mode = 'month', $limit = 0) {
554554 global $CONF, $catid, $manager;
555555
556- if ($catid)
556+ $linkparams = array();
557+ if ($catid) {
557558 $linkparams = array('catid' => $catid);
559+ }
558560
559561 $template =& $manager->getTemplate($template);
560562 $data['blogid'] = $this->getID();
@@ -671,7 +673,7 @@ class BLOG {
671673 'listitem' => &$data
672674 )
673675 );
674-
676+
675677 echo TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
676678 //$temp = TEMPLATE::fill((isset($template['CATLIST_LISTITEM']) ? $template['CATLIST_LISTITEM'] : null), $data);
677679 //echo strftime($temp, $current->itime);
@@ -687,15 +689,15 @@ class BLOG {
687689 'self' => $CONF['Self']
688690 ));
689691 }
690-
692+
691693 /**
692694 * Shows a list of all blogs in the system using a given template
693695 * ordered by number, name, shortname or description
694- * in ascending or descending order
696+ * in ascending or descending order
695697 */
696698 function showBlogList($template, $bnametype, $orderby, $direction) {
697699 global $CONF, $manager;
698-
700+
699701 switch ($orderby) {
700702 case 'number':
701703 $orderby='bnumber';
@@ -713,7 +715,7 @@ class BLOG {
713715 $orderby='bnumber';
714716 break;
715717 }
716-
718+
717719 $direction=strtolower($direction);
718720 switch ($direction) {
719721 case 'asc':
@@ -726,49 +728,49 @@ class BLOG {
726728 $direction='ASC';
727729 break;
728730 }
729-
731+
730732 $template =& $manager->getTemplate($template);
731-
733+
732734 echo TEMPLATE::fill((isset($template['BLOGLIST_HEADER']) ? $template['BLOGLIST_HEADER'] : null),
733735 array(
734736 'sitename' => $CONF['SiteName'],
735737 'siteurl' => $CONF['IndexURL']
736738 ));
737-
739+
738740 $query = 'SELECT bnumber, bname, bshortname, bdesc, burl FROM '.sql_table('blog').' ORDER BY '.$orderby.' '.$direction;
739741 $res = sql_query($query);
740-
742+
741743 while ($data = mysql_fetch_assoc($res)) {
742-
744+
743745 $list = array();
744-
746+
745747 // $list['bloglink'] = createLink('blog', array('blogid' => $data['bnumber']));
746748 $list['bloglink'] = createBlogidLink($data['bnumber']);
747-
749+
748750 $list['blogdesc'] = $data['bdesc'];
749-
751+
750752 $list['blogurl'] = $data['burl'];
751-
753+
752754 if ($bnametype=='shortname') {
753755 $list['blogname'] = $data['bshortname'];
754756 }
755757 else { // all other cases
756758 $list['blogname'] = $data['bname'];
757759 }
758-
760+
759761 $manager->notify(
760762 'PreBlogListItem',
761763 array(
762764 'listitem' => &$list
763765 )
764766 );
765-
767+
766768 echo TEMPLATE::fill((isset($template['BLOGLIST_LISTITEM']) ? $template['BLOGLIST_LISTITEM'] : null), $list);
767-
769+
768770 }
769-
771+
770772 mysql_free_result($res);
771-
773+
772774 echo TEMPLATE::fill((isset($template['BLOGLIST_FOOTER']) ? $template['BLOGLIST_FOOTER'] : null),
773775 array(
774776 'sitename' => $CONF['SiteName'],
@@ -1156,8 +1158,8 @@ class BLOG {
11561158 // clear all expired future posts
11571159 sql_query("UPDATE " . sql_table('item') . " SET iposted='1' WHERE iblog=" . $blogid . " AND itime<NOW()");
11581160
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')
11611163 . " WHERE iposted=0 AND iblog=" . $blogid);
11621164 if (mysql_num_rows($result) == 0) {
11631165 $this->clearFuturePost();
@@ -1165,14 +1167,14 @@ class BLOG {
11651167 }
11661168 }
11671169 }
1168-
1170+
11691171 /**
11701172 * Shows the given list of items for this blog
11711173 *
11721174 * @param $itemarray
11731175 * array of item numbers to be displayed
11741176 * @param $template
1175- * String representing the template _NAME_ (!)
1177+ * String representing the template _NAME_ (!)
11761178 * @param $highlight
11771179 * contains a query that should be highlighted
11781180 * @param $comments
@@ -1188,7 +1190,7 @@ class BLOG {
11881190
11891191 return $this->showUsingQuery($template, $query, $highlight, $comments, $dateheads);
11901192 }
1191-
1193+
11921194 /**
11931195 * Returns the SQL query used to fill out templates for a list of items
11941196 *
@@ -1226,7 +1228,7 @@ class BLOG {
12261228 . ' c.cname as category,'
12271229 . ' i.icat as catid,'
12281230 . ' i.iclosed as closed';
1229-
1231+
12301232 $query .= ' FROM '
12311233 . sql_table('item') . ' as i, '
12321234 . sql_table('member') . ' as m, '
@@ -1245,7 +1247,7 @@ class BLOG {
12451247 $i--;
12461248 if ($i) $query .= ' UNION ';
12471249 }
1248-
1250+
12491251 return $query;
12501252 }
12511253
Show on old repository browser