Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用
Revision | a3c8c63550c183f4978ba8a674890bd0cd585fab (tree) |
---|---|
Zeit | 2009-03-01 00:20:07 |
Autor | shizuki <shizuki@1ca2...> |
Commiter | shizuki |
Fix 6 undefined variables.
git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk/utf8@962 1ca29b6e-896d-4ea0-84a5-967f57386b96
@@ -335,7 +335,7 @@ class ADMIN { | ||
335 | 335 | $amount = intPostVar('amount'); |
336 | 336 | else { |
337 | 337 | $amount = intval($CONF['DefaultListSize']); |
338 | - if ($amount < 1) | |
338 | + if ($amount < 1) | |
339 | 339 | $amount = 10; |
340 | 340 | } |
341 | 341 |
@@ -902,7 +902,7 @@ class ADMIN { | ||
902 | 902 | $amount = intPostVar('amount'); |
903 | 903 | else { |
904 | 904 | $amount = intval($CONF['DefaultListSize']); |
905 | - if ($amount < 1) | |
905 | + if ($amount < 1) | |
906 | 906 | $amount = 10; |
907 | 907 | } |
908 | 908 |
@@ -957,7 +957,7 @@ class ADMIN { | ||
957 | 957 | $amount = intPostVar('amount'); |
958 | 958 | else { |
959 | 959 | $amount = intval($CONF['DefaultListSize']); |
960 | - if ($amount < 1) | |
960 | + if ($amount < 1) | |
961 | 961 | $amount = 10; |
962 | 962 | } |
963 | 963 |
@@ -1001,7 +1001,7 @@ class ADMIN { | ||
1001 | 1001 | $amount = intPostVar('amount'); |
1002 | 1002 | else { |
1003 | 1003 | $amount = intval($CONF['DefaultListSize']); |
1004 | - if ($amount < 1) | |
1004 | + if ($amount < 1) | |
1005 | 1005 | $amount = 10; |
1006 | 1006 | } |
1007 | 1007 |
@@ -1057,7 +1057,7 @@ class ADMIN { | ||
1057 | 1057 | $amount = intPostVar('amount'); |
1058 | 1058 | else { |
1059 | 1059 | $amount = intval($CONF['DefaultListSize']); |
1060 | - if ($amount < 1) | |
1060 | + if ($amount < 1) | |
1061 | 1061 | $amount = 10; |
1062 | 1062 | } |
1063 | 1063 |
@@ -1225,7 +1225,7 @@ class ADMIN { | ||
1225 | 1225 | $wasdraft = 0; |
1226 | 1226 | $publish = 0; |
1227 | 1227 | $timestamp = 0; |
1228 | - break; | |
1228 | + break; | |
1229 | 1229 | case 'edit': |
1230 | 1230 | default: |
1231 | 1231 | $publish = 1; |
@@ -1520,7 +1520,7 @@ class ADMIN { | ||
1520 | 1520 | } |
1521 | 1521 | if ($result['status'] == 'newcategory') { |
1522 | 1522 | // $distURI = ($nextAction == 'sendping') ? $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=' |
1523 | -// . $nextAction . '&blogid=' . intval($blogid)) : | |
1523 | +// . $nextAction . '&blogid=' . intval($blogid)) : | |
1524 | 1524 | // ''; |
1525 | 1525 | $distURI = $manager->addTicketToUrl($CONF['AdminURL'] . 'index.php?action=' . $nextAction . '&blogid=' . intval($blogid)); |
1526 | 1526 | $this->action_categoryedit($result['catid'], $blogid, $distURI); |
@@ -2101,7 +2101,7 @@ class ADMIN { | ||
2101 | 2101 | $mem->setCanLogin($canlogin); |
2102 | 2102 | } |
2103 | 2103 | |
2104 | - $autosave = postVar ('autosave'); | |
2104 | + $autosave = postVar ('autosave'); | |
2105 | 2105 | $mem->setAutosave($autosave); |
2106 | 2106 | |
2107 | 2107 | $mem->write(); |
@@ -4006,7 +4006,7 @@ selector(); | ||
4006 | 4006 | $this->_templateEditRow($template, $pfdesc, $pffield, '',++$tab,0); |
4007 | 4007 | } |
4008 | 4008 | } |
4009 | -?> | |
4009 | +?> | |
4010 | 4010 | </tr><tr> |
4011 | 4011 | <th colspan="2"><?php echo _TEMPLATE_UPDATE?></th> |
4012 | 4012 | </tr><tr> |
@@ -4028,6 +4028,7 @@ selector(); | ||
4028 | 4028 | */ |
4029 | 4029 | function _templateEditRow(&$template, $description, $name, $help = '', $tabindex = 0, $big = 0) { |
4030 | 4030 | static $count = 1; |
4031 | + if (!isset($template[$name])) $template[$name] = ''; | |
4031 | 4032 | ?> |
4032 | 4033 | </tr><tr> |
4033 | 4034 | <td><?php echo $description?> <?php if ($help) help('template'.$help); ?></td> |
@@ -4914,14 +4915,14 @@ selector(); | ||
4914 | 4915 | <td><?php |
4915 | 4916 | |
4916 | 4917 | $this->input_yesno('DebugVars',$CONF['DebugVars'],10078); |
4917 | - | |
4918 | + | |
4918 | 4919 | ?> |
4919 | 4920 | |
4920 | 4921 | </td> |
4921 | 4922 | </tr><tr> |
4922 | 4923 | <td><?php echo _SETTINGS_DEFAULTLISTSIZE?> <?php help('defaultlistsize');?></td> |
4923 | 4924 | <td> |
4924 | - <?php | |
4925 | + <?php | |
4925 | 4926 | if (!array_key_exists('DefaultListSize',$CONF)) { |
4926 | 4927 | sql_query("INSERT INTO ".sql_table('config')." VALUES ('DefaultListSize', '10')"); |
4927 | 4928 | $CONF['DefaultListSize'] = 10; |
@@ -5108,7 +5109,7 @@ selector(); | ||
5108 | 5109 | |
5109 | 5110 | /** |
5110 | 5111 | * Give an overview over the used system |
5111 | - */ | |
5112 | + */ | |
5112 | 5113 | function action_systemoverview() { |
5113 | 5114 | global $member, $nucleus, $CONF; |
5114 | 5115 |
@@ -5182,14 +5183,14 @@ selector(); | ||
5182 | 5183 | echo "\t\t" . '<th colspan="2">' . _ADMIN_SYSTEMOVERVIEW_MODULES . "</th>\n"; |
5183 | 5184 | echo "\t</tr><tr>\n"; |
5184 | 5185 | echo "\t\t" . '<td width="50%">mod_rewrite' . "</td>\n"; |
5185 | - $modrewrite = (strstr($im, 'mod_rewrite') != '') ? | |
5186 | + $modrewrite = (strstr($im, 'mod_rewrite') != '') ? | |
5186 | 5187 | _ADMIN_SYSTEMOVERVIEW_ENABLE : |
5187 | 5188 | _ADMIN_SYSTEMOVERVIEW_DISABLE; |
5188 | 5189 | echo "\t\t" . '<td>' . $modrewrite . "</td>\n"; |
5189 | 5190 | echo "\t</tr>\n"; |
5190 | 5191 | echo "</table>\n"; |
5191 | 5192 | |
5192 | - // Information about the used Nucleus CMS | |
5193 | + // Information about the used Nucleus CMS | |
5193 | 5194 | echo '<h3>' . _ADMIN_SYSTEMOVERVIEW_NUCLEUSSYSTEM . "</h3>\n"; |
5194 | 5195 | global $nucleus; |
5195 | 5196 | $nv = getNucleusVersion() / 100 . '(' . $nucleus['version'] . ')'; |
@@ -5239,7 +5240,7 @@ selector(); | ||
5239 | 5240 | else { |
5240 | 5241 | echo _ADMIN_SYSTEMOVERVIEW_NOT_ADMIN; |
5241 | 5242 | } |
5242 | - | |
5243 | + | |
5243 | 5244 | $this->pagefoot(); |
5244 | 5245 | } |
5245 | 5246 |
@@ -58,7 +58,7 @@ class ITEMACTIONS extends BaseActions { | ||
58 | 58 | |
59 | 59 | /** |
60 | 60 | * Returns an array with the actions that are defined |
61 | - * in the ITEMACTIONS class | |
61 | + * in the ITEMACTIONS class | |
62 | 62 | */ |
63 | 63 | function getDefinedActions() { |
64 | 64 | return array( |
@@ -115,23 +115,23 @@ class ITEMACTIONS extends BaseActions { | ||
115 | 115 | function setLastVisit($lastVisit) { |
116 | 116 | $this->lastVisit = $lastVisit; |
117 | 117 | } |
118 | - | |
118 | + | |
119 | 119 | function setParser(&$parser) { |
120 | 120 | $this->parser =& $parser; |
121 | 121 | } |
122 | - | |
122 | + | |
123 | 123 | function setCurrentItem(&$item) { |
124 | 124 | $this->currentItem =& $item; |
125 | 125 | } |
126 | - | |
126 | + | |
127 | 127 | function setBlog(&$blog) { |
128 | 128 | $this->blog =& $blog; |
129 | 129 | } |
130 | - | |
130 | + | |
131 | 131 | function setTemplate($template) { |
132 | 132 | $this->template =& $template; |
133 | 133 | } |
134 | - | |
134 | + | |
135 | 135 | function setShowComments($val) { |
136 | 136 | $this->showComments = $val; |
137 | 137 | } |
@@ -145,21 +145,21 @@ class ITEMACTIONS extends BaseActions { | ||
145 | 145 | function parse_blogid() { |
146 | 146 | echo $this->blog->getID(); |
147 | 147 | } |
148 | - | |
148 | + | |
149 | 149 | /** |
150 | 150 | * Parse templatevar body |
151 | 151 | */ |
152 | 152 | function parse_body() { |
153 | 153 | $this->highlightAndParse($this->currentItem->body); |
154 | 154 | } |
155 | - | |
155 | + | |
156 | 156 | /** |
157 | 157 | * Parse templatevar more |
158 | 158 | */ |
159 | 159 | function parse_more() { |
160 | 160 | $this->highlightAndParse($this->currentItem->more); |
161 | 161 | } |
162 | - | |
162 | + | |
163 | 163 | /** |
164 | 164 | * Parse templatevar itemid |
165 | 165 | */ |
@@ -169,32 +169,32 @@ class ITEMACTIONS extends BaseActions { | ||
169 | 169 | |
170 | 170 | /** |
171 | 171 | * Parse templatevar category |
172 | - */ | |
172 | + */ | |
173 | 173 | function parse_category() { |
174 | 174 | echo $this->currentItem->category; |
175 | 175 | } |
176 | - | |
176 | + | |
177 | 177 | /** |
178 | 178 | * Parse templatevar categorylink |
179 | 179 | */ |
180 | 180 | function parse_categorylink() { |
181 | 181 | echo createLink('category', array('catid' => $this->currentItem->catid, 'name' => $this->currentItem->category)); |
182 | 182 | } |
183 | - | |
183 | + | |
184 | 184 | /** |
185 | 185 | * Parse templatevar catid |
186 | 186 | */ |
187 | 187 | function parse_catid() { |
188 | 188 | echo $this->currentItem->catid; |
189 | 189 | } |
190 | - | |
190 | + | |
191 | 191 | /** |
192 | 192 | * Parse templatevar authorid |
193 | 193 | */ |
194 | 194 | function parse_authorid() { |
195 | 195 | echo $this->currentItem->authorid; |
196 | 196 | } |
197 | - | |
197 | + | |
198 | 198 | /** |
199 | 199 | * Parse templatevar authorlink |
200 | 200 | */ |
@@ -208,14 +208,14 @@ class ITEMACTIONS extends BaseActions { | ||
208 | 208 | ) |
209 | 209 | ); |
210 | 210 | } |
211 | - | |
211 | + | |
212 | 212 | /** |
213 | 213 | * Parse templatevar query |
214 | 214 | */ |
215 | 215 | function parse_query() { |
216 | 216 | echo $this->strHighlight; |
217 | 217 | } |
218 | - | |
218 | + | |
219 | 219 | /** |
220 | 220 | * Parse templatevar itemlink |
221 | 221 | */ |
@@ -230,21 +230,21 @@ class ITEMACTIONS extends BaseActions { | ||
230 | 230 | ) |
231 | 231 | ); |
232 | 232 | } |
233 | - | |
233 | + | |
234 | 234 | /** |
235 | 235 | * Parse templatevar blogurl |
236 | 236 | */ |
237 | 237 | function parse_blogurl() { |
238 | 238 | echo $this->blog->getURL(); |
239 | 239 | } |
240 | - | |
240 | + | |
241 | 241 | /** |
242 | 242 | * Parse templatevar closed |
243 | 243 | */ |
244 | 244 | function parse_closed() { |
245 | 245 | echo $this->currentItem->closed; |
246 | 246 | } |
247 | - | |
247 | + | |
248 | 248 | /** |
249 | 249 | * Parse templatevar relevance |
250 | 250 | */ |
@@ -254,8 +254,8 @@ class ITEMACTIONS extends BaseActions { | ||
254 | 254 | |
255 | 255 | /** |
256 | 256 | * 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 | |
259 | 259 | */ |
260 | 260 | function parse_title($format = '') { |
261 | 261 | if (is_array($this->currentItem)) { |
@@ -363,19 +363,21 @@ class ITEMACTIONS extends BaseActions { | ||
363 | 363 | |
364 | 364 | /** |
365 | 365 | * Parse templatevar date |
366 | - * | |
367 | - * @param format optional strftime format | |
366 | + * | |
367 | + * @param format optional strftime format | |
368 | 368 | */ |
369 | 369 | function parse_date($format = '') { |
370 | + if (!isset($this->template['FORMAT_DATE'])) $this->template['FORMAT_DATE'] = ''; | |
370 | 371 | echo formatDate($format, $this->currentItem->timestamp, $this->template['FORMAT_DATE'], $this->blog); |
371 | 372 | } |
372 | 373 | |
373 | 374 | /** |
374 | 375 | * Parse templatevar time |
375 | - * | |
376 | + * | |
376 | 377 | * @param format optional strftime format |
377 | 378 | */ |
378 | 379 | function parse_time($format = '') { |
380 | + if (!isset($this->template['FORMAT_TIME'])) $this->template['FORMAT_TIME'] = ''; | |
379 | 381 | echo strftime($format ? $format : $this->template['FORMAT_TIME'],$this->currentItem->timestamp); |
380 | 382 | } |
381 | 383 |
@@ -275,10 +275,12 @@ class PAGEFACTORY extends BaseActions { | ||
275 | 275 | } |
276 | 276 | |
277 | 277 | function parse_contents($which) { |
278 | + if (!isset($this->variables[$which])) $this->variables[$which] = ''; | |
278 | 279 | echo htmlspecialchars($this->variables[$which],ENT_QUOTES); |
279 | 280 | } |
280 | 281 | |
281 | 282 | function parse_checkedonval($value, $name) { |
283 | + if (!isset($this->variables[$name])) $this->variables[$name] = ''; | |
282 | 284 | if ($this->variables[$name] == $value) |
283 | 285 | echo 'checked="checked"'; |
284 | 286 | } |
@@ -143,7 +143,7 @@ class TEMPLATE { | ||
143 | 143 | $template[$obj->tpartname] = $obj->tcontent; |
144 | 144 | |
145 | 145 | // set locale according to template: |
146 | - if ($template['LOCALE']) | |
146 | + if (isset($template['LOCALE'])) | |
147 | 147 | setlocale(LC_TIME,$template['LOCALE']); |
148 | 148 | else |
149 | 149 | setlocale(LC_TIME,''); |