• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-plugins: Commit

Nucleus CMS日本語版用プラグインのうち、日本語版開発者がサポートしているもの


Commit MetaInfo

Revision40ef5eae1beca1052cb7f4d7bc5da82ecb179d76 (tree)
Time2006-11-29 15:04:27
Authorshizuki <shizuki@1ca2...>
Commitershizuki

Log Message

fix short open tag

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

Change Summary

Incremental Difference

--- a/trunk/NP_Dtree/NP_Dtree.php
+++ b/trunk/NP_Dtree/NP_Dtree.php
@@ -1,4 +1,4 @@
1-<?
1+<?php
22 /**
33 *
44 * 0.94 bug fix
--- a/trunk/NP_RecentItems/NP_RecentItems.php
+++ b/trunk/NP_RecentItems/NP_RecentItems.php
@@ -1,4 +1,4 @@
1-<?
1+<?php
22 /**
33 *
44 * SHOW RECENT ITEMS PLUG-IN FOR NucleusCMS
@@ -65,44 +65,55 @@ class NP_RecentItems extends NucleusPlugin
6565 $query = 'SELECT bshortname as result FROM %s WHERE bnumber = %d';
6666 $blogname = quickQuery(sprintf($query, sql_table('blog'), intval($blogName)));
6767 }
68- if (!BLOG::exists($blogName)) return;
69- if (!TEMPLATE::exists($templateName)) return;
70- if ($amountEntries=='') $amountEntries = 5;
71-
72- $tempBid = getBlogIDFromName($blogName);
73- $b =& $manager->getBlog($tempBid);
68+ if (!BLOG::exists($blogName)) {
69+ return;
70+ }
71+ if (!TEMPLATE::exists($templateName)) {
72+ return;
73+ }
74+ if ($amountEntries=='') {
75+ $amountEntries = 5;
76+ }
7477
75- $query = $this->_getsqlquery($b, $amountEntries, '');
78+ $tempBid = getBlogIDFromName($blogName);
79+ $b =& $manager->getBlog($tempBid);
80+ $query = $this->_getsqlquery($b, $amountEntries, '');
7681 $b->showUsingQuery($templateName, $query, 0, 1, 0);
7782 }
7883
7984 function _getsqlquery($blogObj, $amountEntries, $extraQuery)
8085 {
81- $query = 'SELECT i.inumber as itemid, i.ititle as title, i.ibody as body,' .
82- ' m.mname as author, m.mrealname as authorname, i.itime, i.imore as more,' .
83- ' m.mnumber as authorid, m.memail as authormail, m.murl as authorurl,' .
84- ' c.cname as category, i.icat as catid, i.iclosed as closed';
85-
86- $query .= ' FROM ' . // <mod by shizuki corresponds MySQL 5.0.x or later />
87- sql_table('member') . ' as m, ' .
88- sql_table('category') . ' as c,' .
89- sql_table('item') . ' as i' .
90- ' WHERE i.iblog = ' . intval($blogObj->getID()) .
91- ' AND i.iauthor = m.mnumber' .
92- ' AND i.icat = c.catid' .
93- ' AND i.idraft = 0' . // exclude drafts
86+ $query = 'SELECT'
87+ . ' i.inumber as itemid,'
88+ . ' i.ititle as title,'
89+ . ' i.ibody as body,'
90+ . ' m.mname as author,'
91+ . ' m.mrealname as authorname,'
92+ . ' i.itime,'
93+ . ' i.imore as more,'
94+ . ' m.mnumber as authorid,'
95+ . ' m.memail as authormail,'
96+ . ' m.murl as authorurl,'
97+ . ' c.cname as category,'
98+ . ' i.icat as catid,'
99+ . ' i.iclosed as closed'
100+ . ' FROM ' // <mod by shizuki corresponds MySQL 5.0.x or later />
101+ . sql_table('member') . ' as m, '
102+ . sql_table('category') . ' as c,'
103+ . sql_table('item') . ' as i'
104+ . ' WHERE i.iblog = ' . intval($blogObj->getID())
105+ . ' AND i.iauthor = m.mnumber'
106+ . ' AND i.icat = c.catid'
107+ . ' AND i.idraft = 0' // exclude drafts
94108 // don't show future items
95- ' AND i.itime <= ' . mysqldate($blogObj->getCorrectTime());
109+ . ' AND i.itime <= ' . mysqldate($blogObj->getCorrectTime());
96110
97111 // if ($blogObj->getSelectedCategory())
98112 // $query .= ' and i.icat=' . $blogObj->getSelectedCategory() . ' ';
99113
100- $query .= $extraQuery;
101-
102- $query .= ' ORDER BY i.itime DESC';
103- $query .= ' LIMIT ' . intval($amountEntries);
104-
114+ $query .= $extraQuery
115+ . ' ORDER BY i.itime DESC'
116+ . ' LIMIT ' . intval($amountEntries);
105117 return $query;
106118 }
107119 }
108-?>
\ No newline at end of file
Show on old repository browser