本文整理匯總了PHP中is_pagename函數的典型用法代碼示例。如果您正苦於以下問題:PHP is_pagename函數的具體用法?PHP is_pagename怎麽用?PHP is_pagename使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了is_pagename函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: plugin_read_action
function plugin_read_action()
{
global $vars, $_title_invalidwn, $_msg_invalidiwn;
$page = isset($vars['page']) ? $vars['page'] : '';
if (is_page($page)) {
// ページを表示
check_readable($page, true, true);
header_lastmod($page);
return array('msg' => '', 'body' => '');
} else {
if (!PKWK_SAFE_MODE && is_interwiki($page)) {
return do_plugin_action('interwiki');
// InterWikiNameを処理
} else {
if (is_pagename($page)) {
$vars['cmd'] = 'edit';
return do_plugin_action('edit');
// 存在しないので、編集フォームを表示
} else {
// 無効なページ名
return array('msg' => $_title_invalidwn, 'body' => str_replace('$1', htmlsc($page), str_replace('$2', 'WikiName', $_msg_invalidiwn)));
}
}
}
}
示例2: plugin_doc_ini_action
function plugin_doc_ini_action()
{
global $script, $vars, $_doc_ini_msg;
if (auth::check_role('role_adm_contents')) {
die_message('NOT AUTHORIZED.');
}
if (empty($vars['page'])) {
return;
}
if (!is_pagename($vars['page'])) {
return '';
}
// Invalid page name;
$action = empty($vars['action']) ? '' : $vars['action'];
$retval = array();
$msg_title = sprintf($_doc_ini_msg['msg_confirmation'], $vars['page']);
if ($action === 'exec') {
return plugin_doc_ini_exec($vars['page']);
}
$retval['body'] = <<<EOD
<form action="{$script}" method="post">
<div>
\t{$msg_title}
<input type="hidden" name="plugin" value="doc_ini" />
<input type="hidden" name="action" value="exec" />
<input type="hidden" name="page" value="{$vars['page']}" />
<input type="submit" value="{$_doc_ini_msg['btn_exec']}" />
</div>
</form>
EOD;
$retval['msg'] = $_doc_ini_msg['title_confirmation'];
return $retval;
}
示例3: is_editable
function is_editable($page)
{
static $is_editable = array();
if (!isset($is_editable[$page])) {
$is_editable[$page] = is_pagename($page) && !is_freeze($page) && !is_cantedit($page);
}
return $is_editable[$page];
}
示例4: plugin_read_action
function plugin_read_action()
{
global $vars, $_title_invalidwn, $_msg_invalidiwn;
$page = isset($vars['page']) ? $vars['page'] : '';
if (is_page($page)) {
// ページを表示
check_readable($page, true, true);
header_lastmod($page);
return array('msg' => '', 'body' => '');
// } else if (! PKWK_SAFE_MODE && is_interwiki($page)) {
} else {
if (!auth::check_role('safemode') && is_interwiki($page)) {
return do_plugin_action('interwiki');
// InterWikiNameを処理
} else {
if (is_pagename($page)) {
$realpages = get_autoaliases($page);
if (count($realpages) == 1) {
$realpage = $realpages[0];
if (is_page($realpage)) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . get_page_location_uri($realpage));
return;
} elseif (is_url($realpage)) {
header('HTTP/1.0 301 Moved Permanently');
header('Location: ' . $realpage);
return;
} elseif (is_interwiki($realpage)) {
header('HTTP/1.0 301 Moved Permanently');
$vars['page'] = $realpage;
return do_plugin_action('interwiki');
// header('Location');
} else {
// 存在しない場合、直接編集フォームに飛ばす // To avoid infinite loop
header('Location: ' . get_location_uri('edit', $realpage));
return;
}
} elseif (count($realpages) >= 2) {
$body = '<p>';
$body .= _('This pagename is an alias to') . '<br />';
$link = '';
foreach ($realpages as $realpage) {
$link .= '[[' . $realpage . '>' . $realpage . ']]&br;';
}
$body .= make_link($link);
$body .= '</p>';
return array('msg' => _('Redirect'), 'body' => $body);
}
$vars['cmd'] = 'edit';
return do_plugin_action('edit');
// 存在しないので、編集フォームを表示
} else {
// 無効なページ名
return array('msg' => $_title_invalidwn, 'body' => str_replace('$1', htmlspecialchars($page), str_replace('$2', 'WikiName', $_msg_invalidiwn)));
}
}
}
}
示例5: is_editable
function is_editable($page)
{
global $cantedit;
static $is_editable = array();
if (!isset($is_editable[$page])) {
$is_editable[$page] = is_pagename($page) && !is_freeze($page) && !in_array($page, $cantedit);
}
return $is_editable[$page];
}
示例6: plugin_rename_action
function plugin_rename_action()
{
global $whatsnew;
// if (PKWK_READONLY) die_message('PKWK_READONLY prohibits this');
if (auth::check_role('readonly')) {
die_message('PKWK_READONLY prohibits this');
}
$method = plugin_rename_getvar('method');
if ($method == 'regex') {
$src = plugin_rename_getvar('src');
if ($src == '') {
return plugin_rename_phase1();
}
$src_pattern = '/' . preg_quote($src, '/') . '/';
$arr0 = preg_grep($src_pattern, auth::get_existpages());
if (!is_array($arr0) || empty($arr0)) {
return plugin_rename_phase1('nomatch');
}
$dst = plugin_rename_getvar('dst');
$arr1 = preg_replace($src_pattern, $dst, $arr0);
foreach ($arr1 as $page) {
if (!is_pagename($page)) {
return plugin_rename_phase1('notvalid');
}
}
return plugin_rename_regex($arr0, $arr1);
} else {
// $method == 'page'
$page = plugin_rename_getvar('page');
$refer = plugin_rename_getvar('refer');
if ($refer === '') {
return plugin_rename_phase1();
} else {
if (!is_page($refer)) {
return plugin_rename_phase1('notpage', $refer);
} else {
if ($refer === $whatsnew) {
return plugin_rename_phase1('norename', $refer);
} else {
if ($page === '' || $page === $refer) {
return plugin_rename_phase2();
} else {
if (!is_pagename($page)) {
return plugin_rename_phase2('notvalid');
} else {
return plugin_rename_refer();
}
}
}
}
}
}
}
示例7: plugin_read_action
function plugin_read_action()
{
global $vars, $script;
global $post;
$qm = get_qm();
$qt = get_qt();
$page = isset($vars['page']) ? $vars['page'] : '';
//キャッシュを無効化
if (isset($vars['word'])) {
$qt->enable_cache = false;
}
if (is_page($page)) {
// ページを表示
check_readable($page, true, true);
header_lastmod($page);
return array('msg' => '', 'body' => '');
} else {
if (!PKWK_SAFE_MODE && is_interwiki($page)) {
return do_plugin_action('interwiki');
// InterWikiNameを処理
} else {
if (is_pagename($page)) {
$vars['cmd'] = 'edit';
// 編集権限があれば、編集モードへ。なければ、メッセージを表示
$editable = edit_auth($page, FALSE, FALSE);
if ($editable) {
return do_plugin_action('edit');
// 存在しないので、編集フォームを表示
} else {
//404 NOT FOUND
header('HTTP/1.1 404 Not Found');
return array('msg' => $qm->m['fmt_err_notfoundpage_title'], 'body' => $qm->replace('fmt_err_notfoundpage', $script));
}
} else {
//EUCエンコーディングかチェック
if (mb_detect_encoding($post['page'], 'UTF-8,EUC-JP') == 'EUC-JP') {
$u_page = mb_convert_encoding($post['page'], 'UTF-8', 'EUC-JP');
$enc_page = rawurlencode($u_page);
//redirect
header("HTTP/1.1 301 Moved Permanently");
header('Location: ' . $script . '?' . $enc_page);
exit;
}
// 無効なページ名
return array('msg' => $qm->m['fmt_title_invalidiwn'], 'body' => $qm->replace('fmt_err_invalidiwn', h($page), 'WikiName'));
}
}
}
}
示例8: is_editable
function is_editable($page)
{
global $cantedit;
static $is_editable = array();
if (!array_key_exists($page,$is_editable))
{
$is_editable[$page] = (
is_pagename($page) and
!is_freeze($page) and
!in_array($page,$cantedit)
);
}
return $is_editable[$page];
}
示例9: plugin_diff_delete
function plugin_diff_delete($page)
{
global $script, $vars;
global $_title_diff_delete, $_msg_diff_deleted;
global $_msg_diff_adminpass, $_btn_delete, $_msg_invalidpass;
$filename = DIFF_DIR . encode($page) . '.txt';
$body = '';
if (!is_pagename($page)) {
$body = 'Invalid page name';
}
if (!file_exists($filename)) {
$body = make_pagelink($page) . '\'s diff seems not found';
}
if ($body) {
return array('msg' => $_title_diff_delete, 'body' => $body);
}
if (isset($vars['pass'])) {
if (pkwk_login($vars['pass'])) {
unlink($filename);
return array('msg' => $_title_diff_delete, 'body' => str_replace('$1', make_pagelink($page), $_msg_diff_deleted));
} else {
$body .= '<p><strong>' . $_msg_invalidpass . '</strong></p>' . "\n";
}
}
$s_page = htmlsc($page);
$body .= <<<EOD
<p>{$_msg_diff_adminpass}</p>
<form action="{$script}" method="post">
<div>
<input type="hidden" name="cmd" value="diff" />
<input type="hidden" name="page" value="{$s_page}" />
<input type="hidden" name="action" value="delete" />
<input type="password" name="pass" size="12" />
<input type="submit" name="ok" value="{$_btn_delete}" />
</div>
</form>
EOD;
return array('msg' => $_title_diff_delete, 'body' => $body);
}
示例10: attach_upload
function attach_upload($file, $page, $pass = NULL)
{
global $_attach_messages, $notify, $notify_subject;
if (PKWK_READONLY) {
die_message('PKWK_READONLY prohibits editing');
}
// Check query-string
$query = 'plugin=attach&pcmd=info&refer=' . rawurlencode($page) . '&file=' . rawurlencode($file['name']);
if (PKWK_QUERY_STRING_MAX && strlen($query) > PKWK_QUERY_STRING_MAX) {
pkwk_common_headers();
echo 'Query string (page name and/or file name) too long';
exit;
} else {
if (!is_page($page)) {
die_message('No such page');
} else {
if ($file['tmp_name'] == '' || !is_uploaded_file($file['tmp_name'])) {
return array('result' => FALSE);
} else {
if ($file['size'] > PLUGIN_ATTACH_MAX_FILESIZE) {
return array('result' => FALSE, 'msg' => $_attach_messages['err_exceed']);
} else {
if (!is_pagename($page) || $pass !== TRUE && !is_editable($page)) {
return array('result' => FALSE, '
msg' => $_attach_messages['err_noparm']);
} else {
if (PLUGIN_ATTACH_UPLOAD_ADMIN_ONLY && $pass !== TRUE && ($pass === NULL || !pkwk_login($pass))) {
return array('result' => FALSE, 'msg' => $_attach_messages['err_adminpass']);
}
}
}
}
}
}
$obj =& new AttachFile($page, $file['name']);
if ($obj->exist) {
return array('result' => FALSE, 'msg' => $_attach_messages['err_exists']);
}
if (move_uploaded_file($file['tmp_name'], $obj->filename)) {
chmod($obj->filename, PLUGIN_ATTACH_FILE_MODE);
}
if (is_page($page)) {
touch(get_filename($page));
}
$obj->getstatus();
$obj->status['pass'] = $pass !== TRUE && $pass !== NULL ? md5($pass) : '';
$obj->putstatus();
if ($notify) {
$footer['ACTION'] = 'File attached';
$footer['FILENAME'] =& $file['name'];
$footer['FILESIZE'] =& $file['size'];
$footer['PAGE'] =& $page;
$footer['URI'] = get_script_uri() . '?plugin=attach' . '&refer=' . rawurlencode($page) . '&file=' . rawurlencode($file['name']) . '&pcmd=info';
$footer['USER_AGENT'] = TRUE;
$footer['REMOTE_ADDR'] = TRUE;
pkwk_mail_notify($notify_subject, "\n", $footer) or die('pkwk_mail_notify(): Failed');
}
return array('result' => TRUE, 'msg' => $_attach_messages['msg_uploaded']);
}
示例11: format_value
function format_value($value)
{
global $WikiName;
$value = strip_bracket($value);
if (is_pagename($value)) {
$value = "[[{$value}]]";
}
return parent::format_value($value);
}
示例12: catbody
function catbody($title, $page, $body)
{
global $script, $vars, $arg, $defaultpage, $whatsnew, $help_page, $hr;
global $attach_link, $related_link, $cantedit, $function_freeze;
global $search_word_color, $_msg_word, $foot_explain, $note_hr, $head_tags;
global $trackback, $trackback_javascript, $referer, $javascript;
global $nofollow;
global $_LANG, $_LINK, $_IMAGE;
global $pkwk_dtd;
// XHTML 1.1, XHTML1.0, HTML 4.01 Transitional...
global $page_title;
// Title of this site
global $do_backup;
// Do backup or not
global $modifier;
// Site administrator's web page
global $modifierlink;
// Site administrator's name
if (!file_exists(SKIN_FILE) || !is_readable(SKIN_FILE)) {
die_message('SKIN_FILE is not found');
}
$_LINK = $_IMAGE = array();
// Add JavaScript header when ...
if ($trackback && $trackback_javascript) {
$javascript = 1;
}
// Set something If you want
if (!PKWK_ALLOW_JAVASCRIPT) {
unset($javascript);
}
$_page = isset($vars['page']) ? $vars['page'] : '';
$r_page = rawurlencode($_page);
// Set $_LINK for skin
$_LINK['add'] = "{$script}?cmd=add&page={$r_page}";
$_LINK['backup'] = "{$script}?cmd=backup&page={$r_page}";
$_LINK['copy'] = "{$script}?plugin=template&refer={$r_page}";
$_LINK['diff'] = "{$script}?cmd=diff&page={$r_page}";
$_LINK['edit'] = "{$script}?cmd=edit&page={$r_page}";
$_LINK['filelist'] = "{$script}?cmd=filelist";
$_LINK['freeze'] = "{$script}?cmd=freeze&page={$r_page}";
$_LINK['help'] = "{$script}?" . rawurlencode($help_page);
$_LINK['list'] = "{$script}?cmd=list";
$_LINK['new'] = "{$script}?plugin=newpage&refer={$r_page}";
$_LINK['rdf'] = "{$script}?cmd=rss&ver=1.0";
$_LINK['recent'] = "{$script}?" . rawurlencode($whatsnew);
$_LINK['refer'] = "{$script}?plugin=referer&page={$r_page}";
$_LINK['reload'] = "{$script}?{$r_page}";
$_LINK['rename'] = "{$script}?plugin=rename&refer={$r_page}";
$_LINK['rss'] = "{$script}?cmd=rss";
$_LINK['rss10'] = "{$script}?cmd=rss&ver=1.0";
// Same as 'rdf'
$_LINK['rss20'] = "{$script}?cmd=rss&ver=2.0";
$_LINK['search'] = "{$script}?cmd=search";
$_LINK['top'] = "{$script}?" . rawurlencode($defaultpage);
if ($trackback) {
$tb_id = tb_get_id($_page);
$_LINK['trackback'] = "{$script}?plugin=tb&__mode=view&tb_id={$tb_id}";
}
$_LINK['unfreeze'] = "{$script}?cmd=unfreeze&page={$r_page}";
$_LINK['upload'] = "{$script}?plugin=attach&pcmd=upload&page={$r_page}";
// Compat: Skins for 1.4.4 and before
$link_add =& $_LINK['add'];
$link_new =& $_LINK['new'];
// New!
$link_edit =& $_LINK['edit'];
$link_diff =& $_LINK['diff'];
$link_top =& $_LINK['top'];
$link_list =& $_LINK['list'];
$link_filelist =& $_LINK['filelist'];
$link_search =& $_LINK['search'];
$link_whatsnew =& $_LINK['recent'];
$link_backup =& $_LINK['backup'];
$link_help =& $_LINK['help'];
$link_trackback =& $_LINK['trackback'];
// New!
$link_rdf =& $_LINK['rdf'];
// New!
$link_rss =& $_LINK['rss'];
$link_rss10 =& $_LINK['rss10'];
// New!
$link_rss20 =& $_LINK['rss20'];
// New!
$link_freeze =& $_LINK['freeze'];
$link_unfreeze =& $_LINK['unfreeze'];
$link_upload =& $_LINK['upload'];
$link_template =& $_LINK['copy'];
$link_refer =& $_LINK['refer'];
// New!
$link_rename =& $_LINK['rename'];
// Init flags
$is_page = is_pagename($_page) && !arg_check('backup') && $_page != $whatsnew;
$is_read = arg_check('read') && is_page($_page);
$is_freeze = is_freeze($_page);
// Last modification date (string) of the page
$lastmodified = $is_read ? format_date(get_filetime($_page)) . ' ' . get_pg_passage($_page, FALSE) : '';
// List of attached files to the page
$attaches = $attach_link && $is_read && exist_plugin_action('attach') ? attach_filelist() : '';
// List of related pages
$related = $related_link && $is_read ? make_related($_page) : '';
// List of footnotes
//.........這裏部分代碼省略.........
示例13: plugin_csv2newpage_write
function plugin_csv2newpage_write($ary, $base, $postdata, $config)
{
global $vars, $now, $num;
$name = empty($ary['_name']) ? '' : $ary['_name'];
if (!empty($ary['_page'])) {
$page = $real = $ary['_page'];
$page = $base . '/' . $page;
} else {
$real = is_pagename($name) ? $name : ++$num;
$page = get_fullname('./' . $real, $base);
}
if (!Factory::Wiki($page)->isValied()) {
$page = $base;
}
while (Factory::Wiki($page)->isValied()) {
$real = ++$num;
$page = $base . '/' . $real;
}
// 規定のデータ
$_post = array_merge($ary, $vars, $_FILES);
$_post['_date'] = $now;
$_post['_page'] = $page;
$_post['_name'] = $name;
$_post['_real'] = $real;
// $_post['_refer'] = $_post['refer'];
if (!exist_plugin('tracker')) {
return array('msg' => 'plugin not found', 'body' => 'The tracker plugin is not found.');
}
$fields = plugin_tracker_get_fields($base, $page, $config);
foreach ($fields as $key => $class) {
if (array_key_exists($key, $_post)) {
$val = $class->format_value($_post[$key]);
} else {
$val = $class->default_value;
}
$postdata = str_replace('[' . $key . ']', $val, $postdata);
}
// 書き込み
Factory::Wiki($page)->set($postdata);
return $page;
}
示例14: file_write
function file_write($dir, $page, $str, $notimestamp = FALSE)
{
global $update_exec;
global $notify, $notify_diff_only, $notify_subject;
global $notify_exclude;
global $whatsdeleted, $maxshow_deleted;
global $_string;
// if (PKWK_READONLY) return; // Do nothing
if (auth::check_role('readonly')) {
return;
}
// Do nothing
if ($dir != DATA_DIR && $dir != DIFF_DIR) {
die('file_write(): Invalid directory');
}
$page = strip_bracket($page);
$file = $dir . encode($page) . '.txt';
$file_exists = file_exists($file);
// ----
// Delete?
if ($dir == DATA_DIR && $str === '') {
// Page deletion
if (!$file_exists) {
return;
}
// Ignore null posting for DATA_DIR
// Update RecentDeleted (Add the $page)
add_recent($page, $whatsdeleted, '', $maxshow_deleted);
// Remove the page
unlink($file);
// Update RecentDeleted, and remove the page from RecentChanges
lastmodified_add($whatsdeleted, $page);
// Clear is_page() cache
is_page($page, TRUE);
return;
} else {
if ($dir == DIFF_DIR && $str === " \n") {
return;
// Ignore null posting for DIFF_DIR
}
}
// ----
// File replacement (Edit)
if (!is_pagename($page)) {
die_message(str_replace('$1', htmlspecialchars($page), str_replace('$2', 'WikiName', $_msg_invalidiwn)));
}
$str = rtrim(preg_replace('/' . "\r" . '/', '', $str)) . "\n";
$timestamp = $file_exists && $notimestamp ? filemtime($file) : FALSE;
$fp = fopen($file, 'a') or die('fopen() failed: ' . htmlspecialchars(basename($dir) . '/' . encode($page) . '.txt') . '<br />' . "\n" . 'Maybe permission is not writable or filename is too long');
set_file_buffer($fp, 0);
@flock($fp, LOCK_EX);
$last = ignore_user_abort(1);
ftruncate($fp, 0);
rewind($fp);
fputs($fp, $str);
ignore_user_abort($last);
@flock($fp, LOCK_UN);
fclose($fp);
if ($timestamp) {
pkwk_touch_file($file, $timestamp);
}
// Optional actions
if ($dir == DATA_DIR) {
if ($timestamp === FALSE) {
lastmodified_add($page);
}
// Command execution per update
if (defined('PKWK_UPDATE_EXEC') && PKWK_UPDATE_EXEC) {
system(PKWK_UPDATE_EXEC . ' > /dev/null &');
} elseif ($update_exec) {
system($update_exec . ' > /dev/null &');
}
} else {
if ($dir == DIFF_DIR && $notify) {
$notify_exec = TRUE;
foreach ($notify_exclude as $exclude) {
$exclude = preg_quote($exclude);
if (substr($exclude, -1) == '.') {
$exclude = $exclude . '*';
}
if (preg_match('/^' . $exclude . '/', $_SERVER["REMOTE_ADDR"])) {
$notify_exec = FALSE;
break;
}
}
if ($notify_exec !== FALSE) {
if ($notify_diff_only) {
$str = preg_replace('/^[^-+].*\\n/m', '', $str);
}
$summary['ACTION'] = 'Page update';
$summary['PAGE'] =& $page;
$summary['URI'] = get_page_absuri($page);
$summary['USER_AGENT'] = TRUE;
$summary['REMOTE_ADDR'] = TRUE;
pkwk_mail_notify($notify_subject, $str, $summary);
// pkwk_mail_notify($notify_subject, $str, $summary) or
// die('pkwk_mail_notify(): Failed');
}
}
}
//.........這裏部分代碼省略.........
示例15: catbody
//.........這裏部分代碼省略.........
$link_rss10 =& $_LINK['rss10'];
// New!
$link_rss20 =& $_LINK['rss20'];
// New!
$link_freeze =& $_LINK['freeze'];
$link_unfreeze =& $_LINK['unfreeze'];
$link_upload =& $_LINK['upload'];
$link_template =& $_LINK['copy'];
$link_refer =& $_LINK['refer'];
// New!
$link_rename =& $_LINK['rename'];
$link_delete =& $_LINK['delete'];
$link_menuadmin =& $_LINK['menuadmin'];
//Hokuken.com original
$link_copy =& $_LINK['copy'];
$link_qhm_adminmenu =& $_LINK['qhm_adminmenu'];
//Hokuken.com original
$link_qhm_logout =& $_LINK['qhm_logout'];
//Hokuken.com original
$link_qhm_setting =& $_LINK['qhm_setting'];
//Hokuken.com original
$link_edit_menu =& $_LINK['edit_menu'];
//Hokuken.com original
$link_edit_menu2 =& $_LINK['edit_menu2'];
$link_edit_navi =& $_LINK['edit_navi'];
//Hokuken.com original
$link_edit_navi2 =& $_LINK['edit_navi2'];
//Hokuken.com original
$link_edit_header =& $_LINK['edit_header'];
//Hokuken.com original
$link_yetlist =& $_LINK['yetlist'];
//Hokuken.com original
// Init flags
$is_page = is_pagename($_page) && $_page != $whatsnew;
$is_read = arg_check('read') && is_page($_page);
$is_freeze = is_freeze($_page);
// Last modification date (string) of the page
$lastmodified = $is_read ? format_date(get_filetime($_page)) . ' ' . get_pg_passage($_page, FALSE) : '';
// List of attached files to the page
$attaches = $attach_link && $is_read && exist_plugin_action('attach') ? attach_filelist() : '';
// List of related pages
$related = $related_link && $is_read ? make_related($_page) : '';
// List of footnotes
ksort($foot_explain, SORT_NUMERIC);
$notes = !empty($foot_explain) ? $note_hr . join("\n", $foot_explain) : '';
// Tags will be inserted into <head></head>
$head_tag = !empty($head_tags) ? join("\n", $head_tags) . "\n" : '';
// 1.3.x compat
// Last modification date (UNIX timestamp) of the page
$fmt = $is_read ? get_filetime($_page) + LOCALZONE : 0;
// Search words
if ($search_word_color && isset($vars['word'])) {
$body = '<div class="small">' . $_msg_word . htmlspecialchars($vars['word']) . '</div>' . $hr . "\n" . $body;
// BugTrack2/106: Only variables can be passed by reference from PHP 5.0.5
// with array_splice(), array_flip()
$words = preg_split('/\\s+/', $vars['word'], -1, PREG_SPLIT_NO_EMPTY);
$words = array_splice($words, 0, 10);
// Max: 10 words
$words = array_flip($words);
$keys = array();
foreach ($words as $word => $id) {
$keys[$word] = strlen($word);
}
arsort($keys, SORT_NUMERIC);
$keys = get_search_words(array_keys($keys), TRUE);
$id = 0;