<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: file.php,v 1.38 2005/08/01 15:38:26 henoheno Exp $
+// $Id: file.php,v 1.39 2005/10/02 16:15:05 henoheno Exp $
// Copyright (C)
// 2002-2005 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
set_file_buffer($fp, 0);
flock($fp, LOCK_EX);
rewind($fp);
- foreach (array_splice(array_keys($recent_pages), 0, $maxshow) as $page) {
+
+ // Only variables can be passed by reference from PHP 5.0.5
+ $tmp_array = array_keys($recent_pages); // with array_splice()
+
+ foreach (array_splice($tmp_array, 0, $maxshow) as $page) {
$time = $recent_pages[$page];
$s_lastmod = htmlspecialchars(format_date($time));
$s_page = htmlspecialchars($page);
<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: html.php,v 1.42 2005/08/22 14:35:47 henoheno Exp $
+// $Id: html.php,v 1.43 2005/10/02 16:15:05 henoheno Exp $
// Copyright (C)
// 2002-2005 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
if ($search_word_color && isset($vars['word'])) {
$body = '<div class="small">' . $_msg_word . htmlspecialchars($vars['word']) .
'</div>' . $hr . "\n" . $body;
- $words = array_flip(array_splice(
- preg_split('/\s+/', $vars['word'], -1, PREG_SPLIT_NO_EMPTY),
- 0, 10));
+
+ // Only variables can be passed by reference from PHP 5.0.5
+ // with array_splice()
+ $tmp_array = preg_split('/\s+/', $vars['word'], -1, PREG_SPLIT_NO_EMPTY);
+
+ $words = array_flip(array_splice($tmp_array, 0, 10));
$keys = array();
foreach ($words as $word=>$id) $keys[$word] = strlen($word);
arsort($keys, SORT_NUMERIC);
<?php
-// $Id: recent.inc.php,v 1.16 2005/07/17 10:55:28 henoheno Exp $
+// $Id: recent.inc.php,v 1.17 2005/10/02 16:15:06 henoheno Exp $
// Copyright (C)
// 2002-2005 PukiWiki Developers Team
// 2002 Y.MASUI http://masui.net/pukiwiki/ masui@masui.net
// Get latest N changes
if (file_exists(PLUGIN_RECENT_CACHE)) {
- $lines = array_splice(file(PLUGIN_RECENT_CACHE), 0, $recent_lines);
+ // Only variables can be passed by reference from PHP 5.0.5
+ $file_array = file(PLUGIN_RECENT_CACHE); // with array_splice()
+ $lines = array_splice($file_array, 0, $recent_lines);
} else {
return '#recent(): Cache file of RecentChanges not found' . '<br />';
}
<?php
// PukiWiki - Yet another WikiWikiWeb clone
-// $Id: rss.inc.php,v 1.15 2005/02/05 03:11:13 henoheno Exp $
+// $Id: rss.inc.php,v 1.16 2005/10/02 16:15:06 henoheno Exp $
//
// RSS plugin: Publishing RSS of RecentChanges
//
// Creating <item>
$items = $rdf_li = '';
- foreach (array_splice(file($recent), 0, $rss_max) as $line) {
+
+ // Only variables can be passed by reference from PHP 5.0.5
+ $file_array = file($recent); // with array_splice()
+
+ foreach (array_splice($file_array, 0, $rss_max) as $line) {
list($time, $page) = explode("\t", rtrim($line));
$r_page = rawurlencode($page);
$title = mb_convert_encoding($page, 'UTF-8', SOURCE_ENCODING);
<?php
// PukiWiki - Yet another WikiWikiWeb clone.
-// $Id: rules.ini.php,v 1.7 2005/04/30 11:35:43 henoheno Exp $
+// $Id: rules.ini.php,v 1.8 2005/10/02 16:15:05 henoheno Exp $
// Copyright (C)
// 2003-2005 PukiWiki Developers Team
// 2001-2002 Originally written by yu-ji
// Á°¸å¤Ëɬ¤º / ¤ò´Þ¤á¤Æ¤¯¤À¤µ¤¤¡£¹ÔƬ»ØÄê¤Ï ^ ¤òƬ¤Ë¡£
// ¹ÔËö»ØÄê¤Ï $ ¤ò¸å¤í¤Ë¡£
//
+
+// Only variables can be passed by reference from PHP 5.0.5
+$page_array = explode('/', $vars['page']); // with array_pop()
+
$str_rules = array(
'now\?' => format_date(UTIME),
'date\?' => get_date($date_format),
'&now;' => format_date(UTIME),
'&date;' => get_date($date_format),
'&time;' => get_date($time_format),
- '&page;' => array_pop(explode('/', $vars['page'])),
+ '&page;' => array_pop($page_array),
'&fpage;' => $vars['page'],
'&t;' => "\t",
);
+unset($page_array);
?>