Nucleus CMS日本語版SVNをgit-svnしたもの。リポジトリの変換作業用
Rev. | 3bdf207ee5bf3199219f0f12beed8a3c1b4548f8 |
---|---|
サイズ | 3,437 バイト |
日時 | 2012-09-22 13:42:19 |
作者 | sakamocchi |
ログメッセージ | FIX: PHP5/MySQL5における文法違反コードの修正
1. [PHP5] new演算子によるオブジェクトのインスタンス取得字における、参照記号の不正使用
「PHP 5 以降では、new 演算子が自動的に参照を返すようになりました。そのため、 new の結果を参照で代入しようとすると PHP 5.3
2. [PHP5] 関数呼び出しにおける、参照記号の不正使用
「注意: 関数コールの際には、リファレンス記号がないことに注意してください。
3. [PHP5] callableタイプヒント(PHP5.3以前はcallback型)変数に配列を渡す際の、参照記号の無意味な使用
call_user_func()やcall_user_func_array()の第一引数はcallableタイプヒント(以前はcallback型)だが、オブジェクトのメソッドをコールバックする際、オブジェクトのインスタンスを第一引数、オブジェクトのメソッド名を第二引数に取る配列を指定する。この際、第一引数は常に参照渡し扱いとなるため、参照記号を付与する必要がない。
4. [MySQL5] 「TABLE CREATE」文における、TYPEオプションの不正使用
"The older TYPE option was synonymous with ENGINE. TYPE was deprecated
|
<?php
/*
* Nucleus: PHP/MySQL Weblog CMS (http://nucleuscms.org/)
* Copyright (C) 2002-2011 The Nucleus Group
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* (see nucleus/documentation/index.html#license for more info)
*/
/**
* Create account form
*
* @license http://nucleuscms.org/license.txt GNU General Public License
* @copyright Copyright (C) 2002-2011 The Nucleus Group
* @version $Id$
*/
require_once "./config.php";
//include $DIR_LIBS."ACTION.php";
include_libs('ACTION.php',false,false);
sendContentType('text/html', 'createaccount', _CHARSET);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html <?php echo _HTML_XML_NAME_SPACE_AND_LANG_CODE; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo _CHARSET; ?>" />
<title><?php echo _CREATE_ACCOUNT_TITLE; ?></title>
<style type="text/css">@import url(nucleus/styles/manual.css);</style>
</head>
<body>
<h1><?php echo _CREATE_ACCOUNT0; ?></h1>
<?php
// show form only if Visitors are allowed to create a Member Account
if ($CONF['AllowMemberCreate']==1) {
if (isset($_POST['showform']) && $_POST['showform'] == 1) {
// after the from is sent it will be validated
// POST data will be added as value to treat the user with care (;-))
$a = new ACTION();
// if createAccount fails it returns an error message
$message = $a->createAccount();
echo '<span style="font-weight:bold; color:red;">'.$message.'</span><br /><br />';
}
?>
<form method="post" action="createaccount.php">
<div>
<input type="hidden" name="showform" value="1" />
<input type="hidden" name="action" value="createaccount" />
<?php echo _CREATE_ACCOUNT_LOGIN_NAME; ?>
<br />
<input name="name" size="32" maxlength="32" value="<?php echo htmlspecialchars(postVar('name')); ?>" /> <small><?php echo _CREATE_ACCOUNT_LOGIN_NAME_VALID; ?></small>
<br />
<br />
<?php echo _CREATE_ACCOUNT_REAL_NAME; ?>
<br />
<input name="realname" size="40" value="<?php echo htmlspecialchars(postVar('realname')); ?>" />
<br />
<br />
<?php echo _CREATE_ACCOUNT_EMAIL; ?>
<br />
<input name="email" size="40" value="<?php echo htmlspecialchars(postVar('email')); ?>" /> <small><?php echo _CREATE_ACCOUNT_EMAIL2; ?></small>
<br />
<br />
<?php echo _CREATE_ACCOUNT_URL; ?>
<br />
<input name="url" size="60" value="<?php echo htmlspecialchars(postVar('url')); ?>" />
<br />
<?php
// add extra fields from Plugins, like NP_Profile
$param = array(
'type' => 'createaccount.php',
'prelabel' => '',
'postlabel' => '<br />',
'prefield' => '',
'postfield' => '<br /><br />'
);
$manager->notify('RegistrationFormExtraFields', $param);
// add a Captcha challenge or something else
$param = array('type' => 'membermailform-notloggedin');
$manager->notify('FormExtra', $param);
?>
<br />
<br />
<input type="submit" value="<?php echo _CREATE_ACCOUNT_SUBMIT; ?>" />
</div>
</form>
<?php
} else {
echo _CREATE_ACCOUNT1;
echo _CREATE_ACCOUNT2;
}
?>
</body>
</html>