• R/O
  • HTTP
  • SSH
  • HTTPS

nucleus-jp-ancient: Commit

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


Commit MetaInfo

Revisiona3c8c63550c183f4978ba8a674890bd0cd585fab (tree)
Zeit2009-03-01 00:20:07
Autorshizuki <shizuki@1ca2...>
Commitershizuki

Log Message

Fix 6 undefined variables.

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

Ändern Zusammenfassung

Diff

--- a/nucleus/libs/ADMIN.php
+++ b/nucleus/libs/ADMIN.php
@@ -335,7 +335,7 @@ class ADMIN {
335335 $amount = intPostVar('amount');
336336 else {
337337 $amount = intval($CONF['DefaultListSize']);
338- if ($amount < 1)
338+ if ($amount < 1)
339339 $amount = 10;
340340 }
341341
@@ -902,7 +902,7 @@ class ADMIN {
902902 $amount = intPostVar('amount');
903903 else {
904904 $amount = intval($CONF['DefaultListSize']);
905- if ($amount < 1)
905+ if ($amount < 1)
906906 $amount = 10;
907907 }
908908
@@ -957,7 +957,7 @@ class ADMIN {
957957 $amount = intPostVar('amount');
958958 else {
959959 $amount = intval($CONF['DefaultListSize']);
960- if ($amount < 1)
960+ if ($amount < 1)
961961 $amount = 10;
962962 }
963963
@@ -1001,7 +1001,7 @@ class ADMIN {
10011001 $amount = intPostVar('amount');
10021002 else {
10031003 $amount = intval($CONF['DefaultListSize']);
1004- if ($amount < 1)
1004+ if ($amount < 1)
10051005 $amount = 10;
10061006 }
10071007
@@ -1057,7 +1057,7 @@ class ADMIN {
10571057 $amount = intPostVar('amount');
10581058 else {
10591059 $amount = intval($CONF['DefaultListSize']);
1060- if ($amount < 1)
1060+ if ($amount < 1)
10611061 $amount = 10;
10621062 }
10631063
@@ -1225,7 +1225,7 @@ class ADMIN {
12251225 $wasdraft = 0;
12261226 $publish = 0;
12271227 $timestamp = 0;
1228- break;
1228+ break;
12291229 case 'edit':
12301230 default:
12311231 $publish = 1;
@@ -1520,7 +1520,7 @@ class ADMIN {
15201520 }
15211521 if ($result['status'] == 'newcategory') {
15221522 // $distURI = ($nextAction == 'sendping') ? $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action='
1523-// . $nextAction . '&blogid=' . intval($blogid)) :
1523+// . $nextAction . '&blogid=' . intval($blogid)) :
15241524 // '';
15251525 $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=' . $nextAction . '&blogid=' . intval($blogid));
15261526 $this->action_categoryedit($result['catid'], $blogid, $distURI);
@@ -2101,7 +2101,7 @@ class ADMIN {
21012101 $mem->setCanLogin($canlogin);
21022102 }
21032103
2104- $autosave = postVar ('autosave');
2104+ $autosave = postVar ('autosave');
21052105 $mem->setAutosave($autosave);
21062106
21072107 $mem->write();
@@ -4006,7 +4006,7 @@ selector();
40064006 $this->_templateEditRow($template, $pfdesc, $pffield, '',++$tab,0);
40074007 }
40084008 }
4009-?>
4009+?>
40104010 </tr><tr>
40114011 <th colspan="2"><?php echo _TEMPLATE_UPDATE?></th>
40124012 </tr><tr>
@@ -4028,6 +4028,7 @@ selector();
40284028 */
40294029 function _templateEditRow(&$template, $description, $name, $help = '', $tabindex = 0, $big = 0) {
40304030 static $count = 1;
4031+ if (!isset($template[$name])) $template[$name] = '';
40314032 ?>
40324033 </tr><tr>
40334034 <td><?php echo $description?> <?php if ($help) help('template'.$help); ?></td>
@@ -4914,14 +4915,14 @@ selector();
49144915 <td><?php
49154916
49164917 $this->input_yesno('DebugVars',$CONF['DebugVars'],10078);
4917-
4918+
49184919 ?>
49194920
49204921 </td>
49214922 </tr><tr>
49224923 <td><?php echo _SETTINGS_DEFAULTLISTSIZE?> <?php help('defaultlistsize');?></td>
49234924 <td>
4924- <?php
4925+ <?php
49254926 if (!array_key_exists('DefaultListSize',$CONF)) {
49264927 sql_query("INSERT INTO ".sql_table('config')." VALUES ('DefaultListSize', '10')");
49274928 $CONF['DefaultListSize'] = 10;
@@ -5108,7 +5109,7 @@ selector();
51085109
51095110 /**
51105111 * Give an overview over the used system
5111- */
5112+ */
51125113 function action_systemoverview() {
51135114 global $member, $nucleus, $CONF;
51145115
@@ -5182,14 +5183,14 @@ selector();
51825183 echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_MODULES . "</th>\n";
51835184 echo "\t</tr><tr>\n";
51845185 echo "\t\t" . '<td width="50%">mod_rewrite' . "</td>\n";
5185- $modrewrite = (strstr($im, 'mod_rewrite') != '') ?
5186+ $modrewrite = (strstr($im, 'mod_rewrite') != '') ?
51865187 _ADMIN_SYSTEMOVERVIEW_ENABLE :
51875188 _ADMIN_SYSTEMOVERVIEW_DISABLE;
51885189 echo "\t\t" . '<td>' . $modrewrite . "</td>\n";
51895190 echo "\t</tr>\n";
51905191 echo "</table>\n";
51915192
5192- // Information about the used Nucleus CMS
5193+ // Information about the used Nucleus CMS
51935194 echo '<h3>' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSSYSTEM . "</h3>\n";
51945195 global $nucleus;
51955196 $nv = getNucleusVersion() / 100 . '(' . $nucleus['version'] . ')';
@@ -5239,7 +5240,7 @@ selector();
52395240 else {
52405241 echo _ADMIN_SYSTEMOVERVIEW_NOT_ADMIN;
52415242 }
5242-
5243+
52435244 $this->pagefoot();
52445245 }
52455246
--- a/nucleus/libs/ITEMACTIONS.php
+++ b/nucleus/libs/ITEMACTIONS.php
@@ -58,7 +58,7 @@ class ITEMACTIONS extends BaseActions {
5858
5959 /**
6060 * Returns an array with the actions that are defined
61- * in the ITEMACTIONS class
61+ * in the ITEMACTIONS class
6262 */
6363 function getDefinedActions() {
6464 return array(
@@ -115,23 +115,23 @@ class ITEMACTIONS extends BaseActions {
115115 function setLastVisit($lastVisit) {
116116 $this->lastVisit = $lastVisit;
117117 }
118-
118+
119119 function setParser(&$parser) {
120120 $this->parser =& $parser;
121121 }
122-
122+
123123 function setCurrentItem(&$item) {
124124 $this->currentItem =& $item;
125125 }
126-
126+
127127 function setBlog(&$blog) {
128128 $this->blog =& $blog;
129129 }
130-
130+
131131 function setTemplate($template) {
132132 $this->template =& $template;
133133 }
134-
134+
135135 function setShowComments($val) {
136136 $this->showComments = $val;
137137 }
@@ -145,21 +145,21 @@ class ITEMACTIONS extends BaseActions {
145145 function parse_blogid() {
146146 echo $this->blog->getID();
147147 }
148-
148+
149149 /**
150150 * Parse templatevar body
151151 */
152152 function parse_body() {
153153 $this->highlightAndParse($this->currentItem->body);
154154 }
155-
155+
156156 /**
157157 * Parse templatevar more
158158 */
159159 function parse_more() {
160160 $this->highlightAndParse($this->currentItem->more);
161161 }
162-
162+
163163 /**
164164 * Parse templatevar itemid
165165 */
@@ -169,32 +169,32 @@ class ITEMACTIONS extends BaseActions {
169169
170170 /**
171171 * Parse templatevar category
172- */
172+ */
173173 function parse_category() {
174174 echo $this->currentItem->category;
175175 }
176-
176+
177177 /**
178178 * Parse templatevar categorylink
179179 */
180180 function parse_categorylink() {
181181 echo createLink('category', array('catid' => $this->currentItem->catid, 'name' => $this->currentItem->category));
182182 }
183-
183+
184184 /**
185185 * Parse templatevar catid
186186 */
187187 function parse_catid() {
188188 echo $this->currentItem->catid;
189189 }
190-
190+
191191 /**
192192 * Parse templatevar authorid
193193 */
194194 function parse_authorid() {
195195 echo $this->currentItem->authorid;
196196 }
197-
197+
198198 /**
199199 * Parse templatevar authorlink
200200 */
@@ -208,14 +208,14 @@ class ITEMACTIONS extends BaseActions {
208208 )
209209 );
210210 }
211-
211+
212212 /**
213213 * Parse templatevar query
214214 */
215215 function parse_query() {
216216 echo $this->strHighlight;
217217 }
218-
218+
219219 /**
220220 * Parse templatevar itemlink
221221 */
@@ -230,21 +230,21 @@ class ITEMACTIONS extends BaseActions {
230230 )
231231 );
232232 }
233-
233+
234234 /**
235235 * Parse templatevar blogurl
236236 */
237237 function parse_blogurl() {
238238 echo $this->blog->getURL();
239239 }
240-
240+
241241 /**
242242 * Parse templatevar closed
243243 */
244244 function parse_closed() {
245245 echo $this->currentItem->closed;
246246 }
247-
247+
248248 /**
249249 * Parse templatevar relevance
250250 */
@@ -254,8 +254,8 @@ class ITEMACTIONS extends BaseActions {
254254
255255 /**
256256 * Parse templatevar title
257- *
258- * @param string $format defines in which format the title is shown
257+ *
258+ * @param string $format defines in which format the title is shown
259259 */
260260 function parse_title($format = '') {
261261 if (is_array($this->currentItem)) {
@@ -363,19 +363,21 @@ class ITEMACTIONS extends BaseActions {
363363
364364 /**
365365 * Parse templatevar date
366- *
367- * @param format optional strftime format
366+ *
367+ * @param format optional strftime format
368368 */
369369 function parse_date($format = '') {
370+ if (!isset($this->template['FORMAT_DATE'])) $this->template['FORMAT_DATE'] = '';
370371 echo formatDate($format, $this->currentItem->timestamp, $this->template['FORMAT_DATE'], $this->blog);
371372 }
372373
373374 /**
374375 * Parse templatevar time
375- *
376+ *
376377 * @param format optional strftime format
377378 */
378379 function parse_time($format = '') {
380+ if (!isset($this->template['FORMAT_TIME'])) $this->template['FORMAT_TIME'] = '';
379381 echo strftime($format ? $format : $this->template['FORMAT_TIME'],$this->currentItem->timestamp);
380382 }
381383
--- a/nucleus/libs/PAGEFACTORY.php
+++ b/nucleus/libs/PAGEFACTORY.php
@@ -275,10 +275,12 @@ class PAGEFACTORY extends BaseActions {
275275 }
276276
277277 function parse_contents($which) {
278+ if (!isset($this->variables[$which])) $this->variables[$which] = '';
278279 echo htmlspecialchars($this->variables[$which],ENT_QUOTES);
279280 }
280281
281282 function parse_checkedonval($value, $name) {
283+ if (!isset($this->variables[$name])) $this->variables[$name] = '';
282284 if ($this->variables[$name] == $value)
283285 echo 'checked="checked"';
284286 }
--- a/nucleus/libs/TEMPLATE.php
+++ b/nucleus/libs/TEMPLATE.php
@@ -143,7 +143,7 @@ class TEMPLATE {
143143 $template[$obj->tpartname] = $obj->tcontent;
144144
145145 // set locale according to template:
146- if ($template['LOCALE'])
146+ if (isset($template['LOCALE']))
147147 setlocale(LC_TIME,$template['LOCALE']);
148148 else
149149 setlocale(LC_TIME,'');
Show on old repository browser