From minahito @ users.sourceforge.jp Sat Jul 1 13:17:28 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Sat, 1 Jul 2006 13:17:28 +0900
Subject: [xoops-cvslog 3392] CVS update: xoops2jp/html/kernel
Message-ID: <20060701041728.C46F72AC048@users.sourceforge.jp>
Index: xoops2jp/html/kernel/block.php
diff -u xoops2jp/html/kernel/block.php:1.2.8.7 xoops2jp/html/kernel/block.php:1.2.8.8
--- xoops2jp/html/kernel/block.php:1.2.8.7 Sun Apr 16 11:35:38 2006
+++ xoops2jp/html/kernel/block.php Sat Jul 1 13:17:28 2006
@@ -1,5 +1,5 @@
* Legal value for the type of content
@@ -115,36 +119,41 @@
**/
function &getContent($format = 'S', $c_type = 'T')
{
+ $ret = null;
+
switch ( $format ) {
case 'S':
+
// check the type of content
// H : custom HTML block
// P : custom PHP block
// S : use text sanitizater (smilies enabled)
// T : use text sanitizater (smilies disabled)
if ( $c_type == 'H' ) {
- return str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N'));
+ $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $this->getVar('content', 'N'));
} elseif ( $c_type == 'P' ) {
ob_start();
echo eval($this->getVar('content', 'N'));
$content = ob_get_contents();
ob_end_clean();
- return str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
+ $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $content);
} elseif ( $c_type == 'S' ) {
$myts =& MyTextSanitizer::getInstance();
- return str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 1));
+ $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 1));
} else {
$myts =& MyTextSanitizer::getInstance();
- return str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 0));
+ $ret = str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 0));
}
break;
case 'E':
- return $this->getVar('content', 'E');
+ $ret = $this->getVar('content', 'E');
break;
default:
- return $this->getVar('content', 'N');
+ $ret = $this->getVar('content', 'N');
break;
}
+
+ return $ret;
}
function &buildBlock()
From minahito @ users.sourceforge.jp Sat Jul 1 13:18:10 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Sat, 1 Jul 2006 13:18:10 +0900
Subject: [xoops-cvslog 3393] CVS update: xoops2jp/html/class/xoopsform
Message-ID: <20060701041810.CF0C12AC048@users.sourceforge.jp>
Index: xoops2jp/html/class/xoopsform/formdhtmltextarea.php
diff -u xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.1 xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.2
--- xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.2.8.1 Wed Oct 19 02:18:33 2005
+++ xoops2jp/html/class/xoopsform/formdhtmltextarea.php Sat Jul 1 13:18:10 2006
@@ -1,5 +1,5 @@
\n";
+ $ret = "
\n";
$sizearray = array("xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large");
- $ret .= "
<{/foreach}>
Index: xoops2jp/html/modules/user/templates/user_register_confirm.html
diff -u xoops2jp/html/modules/user/templates/user_register_confirm.html:1.1.2.4 xoops2jp/html/modules/user/templates/user_register_confirm.html:1.1.2.5
--- xoops2jp/html/modules/user/templates/user_register_confirm.html:1.1.2.4 Sat Feb 4 22:35:32 2006
+++ xoops2jp/html/modules/user/templates/user_register_confirm.html Wed Jul 19 19:21:40 2006
@@ -3,13 +3,13 @@
<{$smarty.const._US_NICKNAME}> |
">
- <{$registForm->getVar('uname')|escape}>
+ <{$registForm->get('uname')|escape}>
|
<{$smarty.const._US_EMAIL}> |
">
- <{$registForm->getVar('email')|escape}>
+ <{$registForm->get('email')|escape}>
|
Index: xoops2jp/html/modules/user/templates/user_avatar_edit.html
diff -u xoops2jp/html/modules/user/templates/user_avatar_edit.html:1.1.2.7 xoops2jp/html/modules/user/templates/user_avatar_edit.html:1.1.2.8
--- xoops2jp/html/modules/user/templates/user_avatar_edit.html:1.1.2.7 Wed Jun 14 01:12:53 2006
+++ xoops2jp/html/modules/user/templates/user_avatar_edit.html Wed Jul 19 19:21:40 2006
@@ -1,5 +1,5 @@
@@ -58,9 +58,9 @@
<{foreach item=obj from=$systemAvatars}>
" style="text-align:center;">
-
- <{$obj->getVar('avatar_name')}>
-
+
+ <{$obj->getShow('avatar_name')}>
+
<{cycle name="table" values=" | ,,,,
"}>
<{/foreach}>
Index: xoops2jp/html/modules/user/templates/user_edituser.html
diff -u xoops2jp/html/modules/user/templates/user_edituser.html:1.1.2.8 xoops2jp/html/modules/user/templates/user_edituser.html:1.1.2.9
--- xoops2jp/html/modules/user/templates/user_edituser.html:1.1.2.8 Wed Jun 14 01:12:53 2006
+++ xoops2jp/html/modules/user/templates/user_edituser.html Wed Jul 19 19:21:40 2006
@@ -22,7 +22,7 @@
<{$smarty.const._US_NICKNAME}> |
- "><{$thisUser->getVar('uname')}> |
+ "><{$thisUser->getShow('uname')}> |
<{$smarty.const._US_REALNAME}> |
@@ -30,20 +30,29 @@
<{xoops_input name=name size=30 maxlength=60 value=$actionForm->get('name')}>
+ <{if $allow_chgmail}>
+
+ <{$smarty.const._US_EMAIL}> |
+ ">
+ <{xoops_input name=email size=30 maxlength=60 value=$actionForm->get('email')}>
+ <{xoops_input type=checkbox name=user_viewemail value=1 default=$actionForm->get('user_viewemail')}><{$smarty.const._US_ALLOWVIEWEMAIL}>
+ |
+
+ <{/if}>
- <{$smarty.const._US_EMAIL}> |
+ <{$smarty.const._US_WEBSITE}> |
">
- <{xoops_input name=email size=30 maxlength=60 value=$actionForm->get('email')}>
- get('user_viewemail')}>checked<{/if}> /><{$smarty.const._US_ALLOWVIEWEMAIL}>
+ <{xoops_input name=url size=30 maxlength=100 value=$actionForm->get('url')}>
|
- <{$smarty.const._US_WEBSITE}> |
+ <{$smarty.const._MD_USER_LANG_TIMEZONE_OFFSET}> |
">
- <{xoops_input name=url size=30 maxlength=100 value=$actionForm->get('url')}>
+
+ <{xoops_optionsArray label=zone_name value=offset from=$timezones default=$actionForm->get('timezone_offset')}>
+
|
-
<{$smarty.const._US_ICQ}> |
">
@@ -90,13 +99,37 @@
| <{$smarty.const._US_SIGNATURE}> |
">
<{xoops_dhtmltarea name=user_sig value=$actionForm->get('user_sig')}>
- get('attachsig')}>checked<{/if}> /><{$smarty.const._US_SHOWSIG}>
+ <{xoops_input type=checkbox name=attachsig value=1 default=$actionForm->get('attachsig')}><{$smarty.const._US_SHOWSIG}>
+ |
+
+
+ <{$smarty.const._US_CDISPLAYMODE}> |
+ ">
+ <{html_options name=umode options=$umodeOptions selected=$actionForm->get('umode')}>
+ |
+
+
+ <{$smarty.const._US_CSORTORDER}> |
+ ">
+ <{html_options name=uorder options=$uorderOptions selected=$actionForm->get('uorder')}>
+ |
+
+
+ <{$smarty.const._MD_USER_LANG_NOTIFY_METHOD}> |
+ ">
+ <{html_options name=notify_method options=$notify_methodOptions selected=$actionForm->get('notify_method')}>
+ |
+
+
+ <{$smarty.const._MD_USER_LANG_NOTIFY_MODE}> |
+ ">
+ <{html_options name=notify_mode options=$notify_modeOptions selected=$actionForm->get('notify_mode')}>
|
<{$smarty.const._US_EXTRAINFO}> |
">
- <{xoops_textarea name=bio value=$actionForm->get('bio') rows=5 cols=50 id=bio}>
+ <{xoops_textarea name=bio value=$actionForm->get('bio') rows=5 cols=50}>
|
@@ -110,8 +143,8 @@
<{$smarty.const._US_MAILOK}> |
">
- get('user_mailok')==1}>checked<{/if}> /><{$smarty.const._YES}>
- get('user_mailok')==0}>checked<{/if}> /><{$smarty.const._NO}>
+ <{xoops_input type=radio name=user_mailok value=1 default=$actionForm->get('user_mailok')}><{$smarty.const._YES}>
+ <{xoops_input type=radio name=user_mailok value=0 default=$actionForm->get('user_mailok')}><{$smarty.const._NO}>
|
Index: xoops2jp/html/modules/user/templates/user_register_form.html
diff -u xoops2jp/html/modules/user/templates/user_register_form.html:1.1.2.8 xoops2jp/html/modules/user/templates/user_register_form.html:1.1.2.9
--- xoops2jp/html/modules/user/templates/user_register_form.html:1.1.2.8 Wed Jun 14 01:12:53 2006
+++ xoops2jp/html/modules/user/templates/user_register_form.html Wed Jul 19 19:21:40 2006
@@ -34,9 +34,7 @@
<{$smarty.const._MD_USER_LANG_TIMEZONE_OFFSET}> |
">
- <{foreach item=timezone from=$timezones}>
-
- <{/foreach}>
+ <{xoops_optionsArray label=zone_name value=offset from=$timezones default=$actionForm->get('timezone_offset')}>
|
Index: xoops2jp/html/modules/user/templates/user_register_finish.html
diff -u xoops2jp/html/modules/user/templates/user_register_finish.html:1.1.2.1 xoops2jp/html/modules/user/templates/user_register_finish.html:1.1.2.2
--- xoops2jp/html/modules/user/templates/user_register_finish.html:1.1.2.1 Sat Feb 4 22:35:32 2006
+++ xoops2jp/html/modules/user/templates/user_register_finish.html Wed Jul 19 19:21:40 2006
@@ -1 +1 @@
-<{$complete_message}>
\ No newline at end of file
+<{$complete_message|escape}>
\ No newline at end of file
From minahito @ users.sourceforge.jp Wed Jul 19 19:22:04 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:22:04 +0900
Subject: [xoops-cvslog 3619] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060719102204.C0BBB2AC05D@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/users.php
diff -u xoops2jp/html/modules/user/class/users.php:1.1.2.4 xoops2jp/html/modules/user/class/users.php:1.1.2.5
--- xoops2jp/html/modules/user/class/users.php:1.1.2.4 Thu Jul 13 19:55:29 2006
+++ xoops2jp/html/modules/user/class/users.php Wed Jul 19 19:22:04 2006
@@ -54,7 +54,7 @@
//
function _loadGroups()
{
- $handler =& xoops_getmodulehandler('groups_users_link');
+ $handler =& xoops_getmodulehandler('groups_users_link', 'user');
$links =& $handler->getObjects(new Criteria('uid', $this->get('uid')));
foreach ($links as $link) {
$this->Groups[] = $link->get('groupid');
@@ -150,7 +150,7 @@
if (parent::insert($user, $force)) {
$flag = true;
- $handler =& xoops_getmodulehandler('groups_users_link');
+ $handler =& xoops_getmodulehandler('groups_users_link', 'user');
$handler->deleteAll(new Criteria('uid', $user->get('uid')), $force);
foreach ($user->Groups as $gid) {
Index: xoops2jp/html/modules/user/class/avatar.php
diff -u xoops2jp/html/modules/user/class/avatar.php:1.1.2.3 xoops2jp/html/modules/user/class/avatar.php:1.1.2.4
--- xoops2jp/html/modules/user/class/avatar.php:1.1.2.3 Tue Mar 28 22:32:03 2006
+++ xoops2jp/html/modules/user/class/avatar.php Wed Jul 19 19:22:04 2006
@@ -34,7 +34,7 @@
{
@unlink(XOOPS_UPLOAD_PATH . "/" . $obj->get('avatar_file'));
if (parent::delete($obj)) {
- $linkHandler =& xoops_getmodulehandler('avatar_user_link');
+ $linkHandler =& xoops_getmodulehandler('avatar_user_link', 'user');
$criteria =& new Criteria('avatar_id', $obj->get('avatar_id'));
$linkHandler->deleteAll($criteria);
From minahito @ users.sourceforge.jp Wed Jul 19 19:22:25 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:22:25 +0900
Subject: [xoops-cvslog 3620] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060719102225.578052AC05C@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php
diff -u /dev/null xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.1
--- /dev/null Wed Jul 19 19:22:25 2006
+++ xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php Wed Jul 19 19:22:25 2006
@@ -0,0 +1,184 @@
+ 0) {
+ $url = XOOPS_MODULE_URL . "/user/index.php?action=UserInfo&uid=" . $uid;
+ }
+ else {
+ $xoopsUser =& $root->mController->getXoopsUser();
+ if (is_object($xoopsUser)) {
+ $url = XOOPS_MODULE_URL . "/user/index.php?action=UserInfo&uid=" . $xoopsUser->get('uid');
+ }
+ }
+
+ $root->mController->executeForward($url);
+ }
+
+ /**
+ * The process for edituser.php. This process doesn't execute anything
+ * directly. Forward to the controller of the user module.
+ */
+ function edituser()
+ {
+ $root =& XCube_Root::getSingleton();
+ $uid = isset($_REQUEST['uid']) ? intval(xoops_getrequest('uid')) : 0;
+
+ $url = XOOPS_URL;
+ if ($uid > 0) {
+ $url = XOOPS_MODULE_URL . "/user/index.php?action=EditUser&uid=" . $uid;
+ }
+ else {
+ $xoopsUser =& $root->mController->getXoopsUser();
+ if (is_object($xoopsUser)) {
+ $url = XOOPS_MODULE_URL . "/user/index.php?action=EditUser&uid=" . $xoopsUser->get('uid');
+ }
+ }
+
+ $root->mController->executeForward($url);
+ }
+
+ /**
+ * The process for register.php. This process doesn't execute anything
+ * directly. Forward to the controller of the user module.
+ */
+ function register()
+ {
+ $root =& XCube_Root::getSingleton();
+ $xoopsUser =& $root->mController->getXoopsUser();
+
+ if (is_object($xoopsUser)) {
+ $root->mController->executeForward(XOOPS_URL);
+ }
+ else {
+ $root->mController->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=UserRegister");
+ }
+ }
+
+ /**
+ * The process for lostpass.php. This process doesn't execute anything
+ * directly. If the current user is registered user, kick out to the top
+ * page. Else, forward to the lost-pass page.
+ */
+ function AccessToLostpass()
+ {
+ $root =& XCube_Root::getSingleton();
+ $xoopsUser =& $root->mController->getXoopsUser();
+
+ if (is_object($xoopsUser)) {
+ $controller->executeForward(XOOPS_URL);
+ }
+ else {
+ $controller->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=LostPass");
+ }
+ }
+
+ /**
+ * The process for user.php. This process doesn't execute anything directly.
+ * Forward to the controller of the user module.
+ */
+ function user()
+ {
+ $root =& XCube_Root::getSingleton();
+ $op = isset($_REQUEST['op']) ? trim(xoops_getrequest('op')) : "main";
+ $xoopsUser =& $root->mController->getXoopsUser();
+
+ switch($op) {
+ case "main":
+ $url = is_object($xoopsUser) ? XOOPS_MODULE_URL . "/user/index.php?action=UserInfo&uid=".$xoopsUser->get('uid')
+ : XOOPS_MODULE_URL . "/user/index.php";
+ $root->mController->executeForward($url);
+ break;
+
+ case "login":
+ $root->mController->checkLogin();
+ break;
+
+ case "logout":
+ $root->mController->logout();
+ break;
+ }
+ }
+
+ function checkLogin(&$xoopsUser)
+ {
+ if (is_object($xoopsUser)) {
+ return;
+ }
+
+ $root =& XCube_Root::getSingleton();
+ $root->mLanguageManager->loadModuleLanguage('user');
+
+ $userHandler =& xoops_gethandler('user');
+
+ $criteria =& new CriteriaCompo();
+ $criteria->add(new Criteria('uname', xoops_getrequest('uname')));
+ $criteria->add(new Criteria('pass', md5(xoops_getrequest('pass'))));
+
+ $userArr =& $userHandler->getObjects($criteria);
+
+ if (count($userArr) != 1) {
+ return;
+ }
+
+ $xoopsUser = $userArr[0];
+
+ if ($xoopsUser->get('level') == 0) {
+ // TODO We should use message "_US_NOACTTPADM"
+ return;
+ }
+
+ //
+ // Regist to session
+ //
+ $_SESSION = array();
+ $_SESSION['xoopsUserId'] = $xoopsUser->get('uid');
+ $_SESSION['xoopsUserGroups'] = $xoopsUser->getGroups();
+ }
+
+ function logout(&$successFlag, $xoopsUser)
+ {
+ $root =& XCube_Root::getSingleton();
+ $xoopsConfig = $root->mController->getConfig();
+
+ $root->mLanguageManager->loadModuleLanguage('user');
+
+ // Reset session
+ $_SESSION = array();
+ session_destroy();
+
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
+ }
+
+ // clear entry from online users table
+ if (is_object($xoopsUser)) {
+ $onlineHandler =& xoops_gethandler('online');
+ $onlineHandler->destroy($xoopsUser->get('uid'));
+ }
+
+ $successFlag = true;
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Wed Jul 19 19:22:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:22:36 +0900
Subject: [xoops-cvslog 3621] CVS update:
xoops2jp/html/modules/user/language/japanese
Message-ID: <20060719102236.170BA2AC05D@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/language/japanese/main.php
diff -u xoops2jp/html/modules/user/language/japanese/main.php:1.1.2.12 xoops2jp/html/modules/user/language/japanese/main.php:1.1.2.13
--- xoops2jp/html/modules/user/language/japanese/main.php:1.1.2.12 Sun Feb 5 19:33:39 2006
+++ xoops2jp/html/modules/user/language/japanese/main.php Wed Jul 19 19:22:35 2006
@@ -6,6 +6,7 @@
define('_MD_USER_ERROR_AVATAR_SIZE', "アバターの画像サイズが許容サイズをオーバーしています");
define('_MD_USER_ERROR_DBUPDATE_FAILED', "データベースの更新に失敗しました");
define('_MD_USER_ERROR_EMAIL_FORMAT', "不正なメールアドレスです");
+define('_MD_USER_ERROR_INJURY', "{0}に指定された値が不正です");
define('_MD_USER_ERROR_INTRANGE', "{0}に対して不正な入力です");
define('_MD_USER_ERROR_MAXLENGTH', "{0}は半角{1}文字以下にして下さい");
define('_MD_USER_ERROR_MINLENGTH', "{0}は半角{1}文字以上にして下さい");
@@ -34,6 +35,8 @@
define('_MD_USER_LANG_CREATE_NEW', "新規作成");
define('_MD_USER_LANG_EMAIL', "電子メール");
define('_MD_USER_LANG_GROUPID', "グループID");
+define('_MD_USER_LANG_NOTIFY_METHOD', "イベント更新通知メッセージの受取方法");
+define('_MD_USER_LANG_NOTIFY_MODE', "イベント通知のタイミング");
define('_MD_USER_LANG_PASS', "パスワード");
define('_MD_USER_LANG_RANK_ID', "ID");
define('_MD_USER_LANG_SELECT', "選択");
@@ -43,6 +46,7 @@
define('_MD_USER_LANG_UNAME', "ユーザー名");
define('_MD_USER_LANG_URL', "URL");
define('_MD_USER_MESSAGE_CONFIRM_DELETE', "本当に削除しますか?");
+define('_MD_USER_MESSAGE_SEND_PASSWORD', "Send password");
define('_US_ACONTACT', "選択されたアカウントは既に承認が完了しています。");
define('_US_ACTKEYNOT', "承認キーが間違っています。");
define('_US_ACTLOGIN', "アカウントを承認しました。登録の際に記入したパスワードを使用してログインしてください。");
From minahito @ users.sourceforge.jp Wed Jul 19 19:22:35 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:22:35 +0900
Subject: [xoops-cvslog 3622] CVS update:
xoops2jp/html/modules/user/language/english
Message-ID: <20060719102235.E9E7A2AC05C@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/language/english/main.php
diff -u xoops2jp/html/modules/user/language/english/main.php:1.1.2.11 xoops2jp/html/modules/user/language/english/main.php:1.1.2.12
--- xoops2jp/html/modules/user/language/english/main.php:1.1.2.11 Sun Feb 5 19:33:39 2006
+++ xoops2jp/html/modules/user/language/english/main.php Wed Jul 19 19:22:35 2006
@@ -6,6 +6,7 @@
define('_MD_USER_ERROR_AVATAR_SIZE', "Uploaded file exceeds the dimensions limit for avatar.");
define('_MD_USER_ERROR_DBUPDATE_FAILED', "Failed updating database");
define('_MD_USER_ERROR_EMAIL_FORMAT', "Incorrect email address");
+define('_MD_USER_ERROR_INJURY', "The specified value {0} is wrong.");
define('_MD_USER_ERROR_INTRANGE', "Incorrect input on {0}.");
define('_MD_USER_ERROR_MAXLENGTH', "Input {0} with {1} or less characters.");
define('_MD_USER_ERROR_MINLENGTH', "Input {0} with {1} or more characters.");
@@ -34,6 +35,8 @@
define('_MD_USER_LANG_CREATE_NEW', "Create new");
define('_MD_USER_LANG_EMAIL', "Email");
define('_MD_USER_LANG_GROUPID', "Group ID");
+define('_MD_USER_LANG_NOTIFY_METHOD', "Notify method");
+define('_MD_USER_LANG_NOTIFY_MODE', "Notify mode");
define('_MD_USER_LANG_PASS', "Password");
define('_MD_USER_LANG_RANK_ID', "ID");
define('_MD_USER_LANG_SELECT', "Select");
@@ -43,6 +46,7 @@
define('_MD_USER_LANG_UNAME', "uname");
define('_MD_USER_LANG_URL', "URL");
define('_MD_USER_MESSAGE_CONFIRM_DELETE', "Do you delete the following data?");
+define('_MD_USER_MESSAGE_SEND_PASSWORD', "Send password");
define('_US_ACONTACT', "Selected account is already activated!");
define('_US_ACTKEYNOT', "Activation key is not correct!");
define('_US_ACTLOGIN', "Your account has been activated. Please login with the registered password.");
From minahito @ users.sourceforge.jp Wed Jul 19 19:23:22 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:23:22 +0900
Subject: [xoops-cvslog 3623] CVS update:
xoops2jp/html/modules/user/preload/Primary
Message-ID: <20060719102322.B4B512AC05C@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/preload/Primary/Primary.class.php
diff -u xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.3 xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.4
--- xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.3 Tue Jun 27 18:16:50 2006
+++ xoops2jp/html/modules/user/preload/Primary/Primary.class.php Wed Jul 19 19:23:22 2006
@@ -1,4 +1,8 @@
mDelegateManager->add("Site.Login", array ("UserCommonEventFunction", "NewLogin"));
+ $root->mDelegateManager->add("Site.Login", "User_Login::login");
+
+ $file = XOOPS_ROOT_PATH . "/modules/user/kernel/LegacypageFunctions.class.php";
+
+ $root->mDelegateManager->add("Legacypage.Userinfo.Access", "User_LegacypageFunctions::userinfo", $file);
+ $root->mDelegateManager->add("Legacypage.Edituser.Access", "User_LegacypageFunctions::edituser", $file);
+ $root->mDelegateManager->add("Legacypage.Register.Access", "User_LegacypageFunctions::register", $file);
+ $root->mDelegateManager->add("Legacypage.User.Access", "User_LegacypageFunctions::user", $file);
+ $root->mDelegateManager->add("Legacypage.Lostpass.Access", "User_LegacypageFunctions::lostpass", $file);
+ $root->mDelegateManager->add("Site.CheckLogin", "User_LegacypageFunctions::checkLogin", $file);
+ $root->mDelegateManager->add("Site.Logout", "User_LegacypageFunctions::logout", $file);
+ }
+}
- $this->mController->mRoot->mEventManager->addProxyRegister(new UserEventProxyRegister());
+/**
+ * This static class has a static member function for login process. Because
+ * this process is always called, this class is always loaded. We may move this
+ * class to other file. This file is a preload and no good for normal class
+ * definition.
+ *
+ * @todo We may move this class to other file.
+ */
+class User_Login
+{
+ function login(&$xoopsUser)
+ {
+ if (is_object($xoopsUser)) {
+ return;
+ }
+
+ if (!empty($_SESSION['xoopsUserId'])) {
+ $memberHandler=xoops_gethandler('member');
+ $user =& $memberHandler->getUser($_SESSION['xoopsUserId']);
+ $xoopsUser = $user;
+ if(!is_object($xoopsUser)) {
+ $xoopsUser = null;
+ $_SESSION = array();
+ }
+ else {
+ $xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
+ }
+ }
}
}
From minahito @ users.sourceforge.jp Wed Jul 19 19:25:14 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:25:14 +0900
Subject: [xoops-cvslog 3624] CVS update: xoops2jp/html
Message-ID: <20060719102514.4F1D72AC00E@users.sourceforge.jp>
Index: xoops2jp/html/lostpass.php
diff -u xoops2jp/html/lostpass.php:1.2.8.2 xoops2jp/html/lostpass.php:1.2.8.3
--- xoops2jp/html/lostpass.php:1.2.8.2 Tue Nov 8 18:49:29 2005
+++ xoops2jp/html/lostpass.php Wed Jul 19 19:25:14 2006
@@ -1,5 +1,5 @@
mEventManager->raiseEvent("Legacypage.Lostpass.Access",$root->mController,$eventArgs);
+
+XCube_DelegateUtils::call("Legacypage.Lostpass.Access");
?>
\ No newline at end of file
Index: xoops2jp/html/edituser.php
diff -u xoops2jp/html/edituser.php:1.2.8.4 xoops2jp/html/edituser.php:1.2.8.5
--- xoops2jp/html/edituser.php:1.2.8.4 Tue Nov 8 18:49:24 2005
+++ xoops2jp/html/edituser.php Wed Jul 19 19:25:14 2006
@@ -1,5 +1,5 @@
mEventManager->raiseEvent("Legacypage.Edituser.Access",$root->mController,$eventArgs);
+XCube_DelegateUtils::call("Legacypage.Edituser.Access");
?>
Index: xoops2jp/html/register.php
diff -u xoops2jp/html/register.php:1.2.8.2 xoops2jp/html/register.php:1.2.8.3
--- xoops2jp/html/register.php:1.2.8.2 Wed Nov 9 20:54:36 2005
+++ xoops2jp/html/register.php Wed Jul 19 19:25:14 2006
@@ -1,5 +1,5 @@
mEventManager->raiseEvent("Legacypage.Register.Access",$root->mController,$eventArgs);
+XCube_DelegateUtils::call("Legacypage.Register.Access");
?>
Index: xoops2jp/html/user.php
diff -u xoops2jp/html/user.php:1.2.8.5 xoops2jp/html/user.php:1.2.8.6
--- xoops2jp/html/user.php:1.2.8.5 Tue Nov 8 18:49:39 2005
+++ xoops2jp/html/user.php Wed Jul 19 19:25:14 2006
@@ -1,5 +1,5 @@
mEventManager->raiseEvent("Legacypage.User.Access",$root->mController,$eventArgs);
+
+XCube_DelegateUtils::call("Legacypage.User.Access");
?>
\ No newline at end of file
Index: xoops2jp/html/userinfo.php
diff -u xoops2jp/html/userinfo.php:1.2.8.3 xoops2jp/html/userinfo.php:1.2.8.4
--- xoops2jp/html/userinfo.php:1.2.8.3 Tue Nov 8 18:49:43 2005
+++ xoops2jp/html/userinfo.php Wed Jul 19 19:25:14 2006
@@ -1,5 +1,5 @@
mEventManager->raiseEvent("Legacypage.Userinfo.Access",$root->mController,$eventArgs);
+XCube_DelegateUtils::call("Legacypage.Userinfo.Access");
-?>
\ No newline at end of file
+?>
From minahito @ users.sourceforge.jp Wed Jul 19 19:28:28 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:28:28 +0900
Subject: [xoops-cvslog 3625] CVS update:
xoops2jp/html/modules/user/preload/Primary
Message-ID: <20060719102828.119FD2AC00E@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/preload/Primary/Primary.class.php
diff -u xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.4 xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.5
--- xoops2jp/html/modules/user/preload/Primary/Primary.class.php:1.1.2.4 Wed Jul 19 19:23:22 2006
+++ xoops2jp/html/modules/user/preload/Primary/Primary.class.php Wed Jul 19 19:28:27 2006
@@ -21,6 +21,7 @@
$root->mDelegateManager->add("Legacypage.User.Access", "User_LegacypageFunctions::user", $file);
$root->mDelegateManager->add("Legacypage.Lostpass.Access", "User_LegacypageFunctions::lostpass", $file);
$root->mDelegateManager->add("Site.CheckLogin", "User_LegacypageFunctions::checkLogin", $file);
+ $root->mDelegateManager->add("Site.CheckLogin.Success", "User_LegacypageFunctions::checkLoginSuccess", $file);
$root->mDelegateManager->add("Site.Logout", "User_LegacypageFunctions::logout", $file);
}
}
From minahito @ users.sourceforge.jp Wed Jul 19 19:28:35 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:28:35 +0900
Subject: [xoops-cvslog 3626] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060719102835.B405D2AC00E@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php
diff -u xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.1 xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.2
--- xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.1 Wed Jul 19 19:22:25 2006
+++ xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php Wed Jul 19 19:28:35 2006
@@ -1,7 +1,7 @@
get('uid');
$_SESSION['xoopsUserGroups'] = $xoopsUser->getGroups();
}
+
+ function checkLoginSuccess(&$xoopsUser)
+ {
+ if (is_object($xoopsUser)) {
+ $handler =& xoops_gethandler('user');
+ $xoopsUser->set('last_login', time());
+
+ $handler->insert($xoopsUser);
+ }
+ }
function logout(&$successFlag, $xoopsUser)
{
From minahito @ users.sourceforge.jp Wed Jul 19 19:30:32 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 19:30:32 +0900
Subject: [xoops-cvslog 3627] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060719103032.DDC6B2AC05D@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/UserEventProxyRegister.class.php
diff -u xoops2jp/html/modules/user/kernel/UserEventProxyRegister.class.php:1.1.2.8 xoops2jp/html/modules/user/kernel/UserEventProxyRegister.class.php:removed
--- xoops2jp/html/modules/user/kernel/UserEventProxyRegister.class.php:1.1.2.8 Thu Jun 22 14:38:46 2006
+++ xoops2jp/html/modules/user/kernel/UserEventProxyRegister.class.php Wed Jul 19 19:30:32 2006
@@ -1,123 +0,0 @@
-_mList;
- }
-
- function &createLegacypage_Userinfo_AccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","AccessToUserinfo");
- return $delegate;
- }
-
- function &createLegacypage_Edituser_AccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","AccessToEdituser");
- return $delegate;
- }
-
- function &createLegacypage_User_AccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","AccessToUser");
- return $delegate;
- }
-
- function &createLegacypage_Register_AccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","AccessToRegister");
- return $delegate;
- }
-
- function &createSite_CheckLoginDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","CheckLogin");
- return $delegate;
- }
-
- function &createSite_LogoutDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","Logout");
- return $delegate;
- }
-
- function &createSite_CheckLogin_SuccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","CheckLoginSuccess");
- return $delegate;
- }
-
- function &createLegacypage_Lostpass_AccessDelegate()
- {
- require_once XOOPS_MODULE_PATH."/user/kernel/UserEventFunction.class.php";
- $delegate=new XCube_Delegate("UserEventFunction","AccessToLostpass");
- return $delegate;
- }
-}
-
-class UserCommonEventFunction
-{
- function &Login(&$controller,&$loginEventArgs)
- {
- if (!empty($_SESSION['xoopsUserId'])) {
- $memberHandler=xoops_gethandler('member');
- $xoopsUser=&$memberHandler->getUser($_SESSION['xoopsUserId']);
- if(!is_object($xoopsUser)) {
- $xoopsUser = null;
- $_SESSION=array();
- }
- else {
- $xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
- }
- $loginEventArgs->setXoopsUser($xoopsUser);
- $controller->mXoopsUser=&$xoopsUser;
- }
-
- return $loginEventArgs;
- }
-
- /**
- * [Notice]
- * New function for new delegate. Of course, we'll change the name before
- * released.
- */
- function NewLogin(&$xoopsUser)
- {
- if (is_object($xoopsUser)) {
- return;
- }
-
- if (!empty($_SESSION['xoopsUserId'])) {
- $memberHandler=xoops_gethandler('member');
- $user =& $memberHandler->getUser($_SESSION['xoopsUserId']);
- $xoopsUser = $user;
- if(!is_object($xoopsUser)) {
- $xoopsUser = null;
- $_SESSION = array();
- }
- else {
- $xoopsUser->setGroups($_SESSION['xoopsUserGroups']);
- }
- }
- }
-}
-
-?>
\ No newline at end of file
Index: xoops2jp/html/modules/user/kernel/UserEventFunction.class.php
diff -u xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.11 xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:removed
--- xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.11 Fri Apr 21 12:03:57 2006
+++ xoops2jp/html/modules/user/kernel/UserEventFunction.class.php Wed Jul 19 19:30:32 2006
@@ -1,200 +0,0 @@
-0) {
- $url=XOOPS_MODULE_URL."/user/index.php?action=UserInfo&uid=".$uid;
- }
- else {
- $xoopsUser=&$controller->getXoopsUser();
- if(is_object($xoopsUser))
- $url=XOOPS_MODULE_URL."/user/index.php?action=UserInfo&uid=".$xoopsUser->get('uid');
- }
-
- $controller->executeForward($url);
- }
-
- /**
- * @param $sender Base_Controller
- */
- function AccessToEdituser(&$controller,&$eventArgs)
- {
- // $controller=(Base_Controller)$sender;
- $uid=isset($_REQUEST['uid']) ? intval($_REQUEST['uid']) : 0;
-
- $url=XOOPS_URL;
- if($uid>0) {
- $url=XOOPS_MODULE_URL."/user/index.php?action=EditUser&uid=".$uid;
- }
- else {
- $xoopsUser=&$controller->getXoopsUser();
- if(is_object($xoopsUser))
- $url=XOOPS_MODULE_URL."/user/index.php?action=EditUser&uid=".$xoopsUser->get('uid');
- }
-
- $controller->executeForward($url);
- }
-
- /**
- * @param $sender Base_Controller
- */
- function AccessToUser(&$controller,&$eventArgs)
- {
- // $controller=(Base_Controller)$sender;
- $op=isset($_REQUEST['op']) ? trim($_REQUEST['op']) : "main";
- $xoopsUser=&$controller->getXoopsUser();
-
- switch($op) {
- case "main":
- $url=is_object($xoopsUser) ? XOOPS_MODULE_URL."/user/index.php?action=UserInfo&uid=".$xoopsUser->get('uid')
- : XOOPS_MODULE_URL."/user/index.php";
- $controller->executeForward($url);
- break;
-
- case "login":
- $checkLoginEventArgs = new CheckLoginEventArgs();
- $controller->mRoot->mEventManager->raiseEvent("Site.CheckLogin",$controller,$checkLoginEventArgs);
- break;
-
- case "logout":
- $args=array();
- $args['successFlag']=false;
- $controller->mRoot->mEventManager->raiseEvent("Site.Logout",$controller,$args);
- break;
- }
- }
-
- /**
- * @param $sender Base_Controller
- */
- function AccessToRegister(&$controller,&$eventArgs)
- {
- $xoopsUser =& $controller->getXoopsUser();
- if (is_object($xoopsUser)) {
- $controller->executeForward(XOOPS_URL);
- }
- else {
- $controller->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=UserRegister");
- }
- }
-
- function CheckLogin(&$controller,&$eventArgs)
- {
- if($eventArgs->isSuccess())
- return;
-
- $controller->mRoot->mLanguageManager->loadModuleLanguage('user');
-
- $userHandler =& xoops_gethandler('user');
-
- $criteria =& new CriteriaCompo();
- $criteria->add(new Criteria('uname', xoops_getrequest('uname')));
- $criteria->add(new Criteria('pass', md5(xoops_getrequest('pass'))));
-
- $userArr =& $userHandler->getObjects($criteria);
-
- if (count($userArr) != 1) {
- $eventArgs->setRedirectUrl(XOOPS_URL."/user.php");
- $eventArgs->setRedirectMessage(_US_INCORRECTLOGIN);
- return;
- }
-
- $user =& $userArr[0];
-
- if($user->get('level')==0) {
- $eventArgs->setRedirectUrl(XOOPS_URL);
- $eventArgs->setRedirectMessage(_US_NOACTTPADM);
- return;
- }
-
- // Regist to session
- $_SESSION = array();
- $_SESSION['xoopsUserId'] = $user->get('uid');
- $_SESSION['xoopsUserGroups'] = $user->getGroups();
-
- if (!empty($_POST['xoops_redirect']) && !strpos($_POST['xoops_redirect'], 'register')) {
- $parsed = parse_url(XOOPS_URL);
- $url = isset($parsed['scheme']) ? $parsed['scheme'].'://' : 'http://';
- if (isset($parsed['host'])) {
- $url .= isset($parsed['port']) ?$parsed['host'].':'.$parsed['port'].trim($_POST['xoops_redirect']): $parsed['host'].trim($_POST['xoops_redirect']);
- } else {
- $url .= xoops_getenv('HTTP_HOST').trim($_POST['xoops_redirect']);
- }
- } else {
- $url = XOOPS_URL.'/index.php';
- }
-
- $eventArgs->setXoopsUser($user);
-
- $eventArgs->setRedirectUrl($url);
- $eventArgs->setSuccessFlag(true);
- }
-
- function Logout(&$controller,&$eventArgs)
- {
- // @Todo: this function depends global variable
- global $xoopsConfig;
- global $xoopsUser;
-
- $controller->mRoot->mLanguageManager->loadModuleLanguage('user');
-
- // Reset session
- $_SESSION = array();
- session_destroy();
-
- if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
- setcookie($xoopsConfig['session_name'], '', time()- 3600, '/', '', 0);
- }
-
- // clear entry from online users table
- if (is_object($xoopsUser)) {
- $onlineHandler =& xoops_gethandler('online');
- $onlineHandler->destroy($xoopsUser->get('uid'));
- }
-
- $eventArgs['successFlag']=true;
- }
-
- /**
- * Update last login time
- */
- function CheckLoginSuccess(&$sender,&$eventArgs)
- {
- if(is_object($eventArgs['xoopsUser'])) {
- $userHandler=&xoops_gethandler('user');
- $eventArgs['xoopsUser']->setVar('last_login', time());
- $userHandler->insert($eventArgs['xoopsUser']);
- }
- }
-
- /**
- * If the current user is registered user, kick out to the top page.
- * Else, forward to the lost-pass page.
- */
- function AccessToLostpass(&$controller, &$eventArgs)
- {
- $xoopsUser =& $controller->getXoopsUser();
- if (is_object($xoopsUser)) {
- $controller->executeForward(XOOPS_URL);
- }
- else {
- $controller->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=LostPass");
- }
- }
-
-}
-
-
-?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Wed Jul 19 20:00:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 20:00:51 +0900
Subject: [xoops-cvslog 3628] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060719110051.4A2D92AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/LostPassMailBuilder.class.php
diff -u xoops2jp/html/modules/user/class/LostPassMailBuilder.class.php:1.1.2.3 xoops2jp/html/modules/user/class/LostPassMailBuilder.class.php:1.1.2.4
--- xoops2jp/html/modules/user/class/LostPassMailBuilder.class.php:1.1.2.3 Wed Jul 19 19:21:16 2006
+++ xoops2jp/html/modules/user/class/LostPassMailBuilder.class.php Wed Jul 19 20:00:51 2006
@@ -1,7 +1,7 @@
Index: xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php
diff -u xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.2 xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.3
--- xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.2 Wed Jul 19 19:28:35 2006
+++ xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php Wed Jul 19 20:00:59 2006
@@ -1,7 +1,7 @@
mController->getXoopsUser();
if (is_object($xoopsUser)) {
- $controller->executeForward(XOOPS_URL);
+ $root->mController->executeForward(XOOPS_URL);
}
else {
- $controller->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=LostPass");
+ $root->mController->executeForward(XOOPS_MODULE_URL . "/user/index.php?action=LostPass");
}
}
From minahito @ users.sourceforge.jp Wed Jul 19 20:01:52 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 19 Jul 2006 20:01:52 +0900
Subject: [xoops-cvslog 3630] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060719110152.11DF82AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/RegistMailBuilder.class.php
diff -u xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.6 xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.7
--- xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.6 Wed Jul 19 19:21:16 2006
+++ xoops2jp/html/modules/user/class/RegistMailBuilder.class.php Wed Jul 19 20:01:51 2006
@@ -1,7 +1,7 @@
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.48 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.49
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.48 Wed Jul 19 19:18:27 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu Jul 20 01:02:45 2006
@@ -778,11 +778,11 @@
if (is_object($xoopsUser)) {
$this->mLogout->call(new XCube_Ref($successFlag), $xoopsUser);
if ($successFlag) {
- XCube_DelegateUtils::call("Site.Logout.Success");
+ XCube_DelegateUtils::call("Site.Logout.Success", $xoopsUser);
$this->executeRedirect(XOOPS_URL, 1, array(_US_LOGGEDOUT, _US_THANKYOUFORVISIT));
}
else {
- XCube_DelegateUtils::call("Site.Logout.Fail");
+ XCube_DelegateUtils::call("Site.Logout.Fail", $xoopsUser);
}
}
else {
From minahito @ users.sourceforge.jp Thu Jul 20 01:13:18 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 01:13:18 +0900
Subject: [xoops-cvslog 3632] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20060719161318.D45B12AC05D@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.13 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.14
--- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.13 Sat Jul 1 16:24:42 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php Thu Jul 20 01:13:18 2006
@@ -202,10 +202,10 @@
}
else {
if (is_object($this->mModule)) {
- $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mModule->get('name')));
+ $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mModule->get('name')));
}
else {
- $this->mModule->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mDirname));
+ $this->mLog->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_INSTALLATION_MODULE_FAILURE, $this->mDirname));
}
}
}
From minahito @ users.sourceforge.jp Thu Jul 20 01:43:58 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 01:43:58 +0900
Subject: [xoops-cvslog 3633] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060719164358.B299B2AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.49 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.50
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.49 Thu Jul 20 01:02:45 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu Jul 20 01:43:58 2006
@@ -761,7 +761,7 @@
}
}
else {
- $this->executeFoward(XOOPS_URL);
+ $this->executeForward(XOOPS_URL);
}
}
From minahito @ users.sourceforge.jp Thu Jul 20 17:10:20 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:10:20 +0900
Subject: [xoops-cvslog 3634] CVS update: xoops2jp/html/class
Message-ID: <20060720081020.0A5622AC041@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_LanguageManager.class.php
diff -u xoops2jp/html/class/XCube_LanguageManager.class.php:1.1.2.2 xoops2jp/html/class/XCube_LanguageManager.class.php:removed
--- xoops2jp/html/class/XCube_LanguageManager.class.php:1.1.2.2 Mon Nov 14 18:02:17 2005
+++ xoops2jp/html/class/XCube_LanguageManager.class.php Thu Jul 20 17:10:19 2006
@@ -1,58 +0,0 @@
- //
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
-
-class XCube_LanguageManager
-{
- var $mLanguageName;
-
- function XCube_LanguageManager($languageName)
- {
- $this->mLanguageName=$languageName;
- }
-
- function loadMainLanguage()
- {
- }
-
- /**
- Load language for module controller.
- @param $dirname module directory name
- */
- function loadModuleLanguage($dirname)
- {
- }
-
- function loadModuleAdminLanguage($dirname)
- {
- }
-
- function loadBlockLanguage($dirname)
- {
- }
-}
-
-?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 20 17:10:58 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:10:58 +0900
Subject: [xoops-cvslog 3635] CVS update: xoops2jp/html/kernel
Message-ID: <20060720081058.19B052AC041@users.sourceforge.jp>
Index: xoops2jp/html/kernel/XCube_Controller.class.php
diff -u xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.12 xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.13
--- xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.12 Tue Jul 11 19:05:26 2006
+++ xoops2jp/html/kernel/XCube_Controller.class.php Thu Jul 20 17:10:57 2006
@@ -1,4 +1,8 @@
_setupDB();
+ $this->_setupLanguage();
+
$this->_setupConfig();
$this->_setupDebugger();
$this->_processPreBlockFilter(); // What's !?
- $languageManager =& $this->_createLanguageManager();
- $this->mRoot->setLanguageManager($languageManager);
-
$this->_processHostAbstractLayer();
$this->_setupSession();
From minahito @ users.sourceforge.jp Thu Jul 20 17:11:48 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:11:48 +0900
Subject: [xoops-cvslog 3636] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060720081148.D67E62AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.50 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.51
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.50 Thu Jul 20 01:43:58 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu Jul 20 17:11:48 2006
@@ -59,6 +59,11 @@
*/
var $mLogout = null;
+ /**
+ * @var XCube_NewDelegate
+ */
+ var $mCreateLanguageManager = null;
+
function Legacy_Controller()
{
//
@@ -75,6 +80,9 @@
$this->mLogout =& new XCube_NewDelegate();
$this->mLogout->register("Site.Logout");
+
+ $this->mCreateLanguageManager =& new XCube_NewDelegate();
+ $this->mCreateLanguageManager->register("Legacy_Controller.CreateLanguageManager");
set_magic_quotes_runtime(0); // ^^;
@@ -127,8 +135,8 @@
$this->_processPreBlockFilter(); // What's !?
- $languageManager =& $this->_createLanguageManager();
- $this->mRoot->setLanguageManager($languageManager);
+ // $languageManager =& $this->_createLanguageManager();
+ // $this->mRoot->setLanguageManager($languageManager);
$this->_processHostAbstractLayer();
@@ -401,27 +409,88 @@
*/
function _setupLanguage()
{
- if (!$this->mLanguage) {
- $configHandler =& xoops_gethandler('config');
- $criteria =& new CriteriaCompo(new Criteria('conf_modid', 0));
- $criteria->add(new Criteria('conf_catid', XOOPS_CONF));
- $criteria->add(new Criteria('conf_name', 'language'));
- $configs =& $configHandler->getConfigs($criteria);
- if (count($configs)) {
- $this->mLanguage = $configs[0]->getVar('conf_value', 'none');
- }
+ require_once XOOPS_BASE_PATH."/kernel/Legacy_LanguageManager.class.php";
+
+ $language = "english";
+
+ $handler =& xoops_gethandler('config');
+ $criteria =& new CriteriaCompo(new Criteria('conf_modid', 0));
+ $criteria->add(new Criteria('conf_catid', XOOPS_CONF));
+ $criteria->add(new Criteria('conf_name', 'language'));
+ $configs =& $handler->getConfigs($criteria);
+
+ if (count($configs) > 0) {
+ $language = $configs[0]->get('conf_value', 'none');
}
- //
- // Load the additional file to control DB.
- if ($this->mLanguage) {
- $filename = XOOPS_MODULE_PATH . '/base/language/' . $this->mLanguage . '/charset_' . XOOPS_DB_TYPE . '.php';
- if (file_exists($filename)) {
- require_once($filename);
- }
- }
+ $this->mRoot->mLanguageManager =& $this->_createLanguageManager($language);
+ $this->mRoot->mLanguageManager->setLanguage($language);
+ $this->mRoot->mLanguageManager->prepare();
+
+ $this->mRoot->mLanguageManager->loadGlobalMessageCatalog();
+
+ // If you use special page, load message catalog for it.
+ if (isset($xoopsOption['pagetype'])) {
+ $this->mRoot->mLanguageManager->loadPageTypeMessageCatalog($xoopsOption['pagetype']);
+ }
}
-
+
+ /**
+ * Factory for the language manager. At first, this member function
+ * delegates to get a instance of LanguageManager. If it can't get it, do
+ * the following process:
+ *
+ * 1) Try creating a instance of 'Legacy_LanguageManager_' . ucfirst($language)
+ * 2) If the class doesn't exist, try loading 'LanguageManager.class.php'
+ * in the specified language.
+ * 3) Re-try creating the instance.
+ *
+ * If it can't create any instances, create a instance of
+ * Legacy_LanguageManager as default.
+ *
+ * @access protected
+ * @param string $language
+ * @return Legacy_LanguageManager
+ */
+ function &_createLanguageManager($language)
+ {
+ require_once XOOPS_BASE_PATH . "/kernel/Legacy_LanguageManager.class.php";
+
+ $languageManager = null;
+
+ $this->mCreateLanguageManager->call(new XCube_Ref($languageManager), $language);
+
+ if (!is_object($languageManager)) {
+ $className = "Legacy_LanguageManager_" . ucfirst(strtolower($language));
+
+ //
+ // If the class exists, create a instance. Else, load the file, and
+ // try creating a instance again.
+ //
+ if (class_exists($className)) {
+ $languageManager =& new $className();
+ }
+ else {
+ $filePath = XOOPS_ROOT_PATH . "/language/" . $language . "/LanguageManager.class.php";
+ if (file_exists($filePath)) {
+ require_once $filePath;
+ }
+
+ if (class_exists($className)) {
+ $languageManager =& new $className();
+ }
+ else {
+ //
+ // Default
+ //
+ $languageManager =& new Legacy_LanguageManager();
+ }
+ }
+ }
+
+ return $languageManager;
+ }
+
function _setupConfig()
{
$configHandler=&xoops_gethandler('config');
@@ -504,22 +573,6 @@
session_start();
}
- function &_createLanguageManager()
- {
- global $xoopsOption;
-
- require_once XOOPS_BASE_PATH."/kernel/Legacy_LanguageManager.class.php";
-
- $languageManager =& new Legacy_LanguageManager($this->mConfig['language']);
- $languageManager->loadMainLanguage();
-
- // If you use special page, load message catalog for it.
- if (isset($xoopsOption['pagetype']))
- $languageManager->loadSpecialTypeLanguage($xoopsOption['pagetype']);
-
- return $languageManager;
- }
-
/**
* @deprecated
*/
@@ -747,7 +800,7 @@
}
}
- $this->mRoot->mLanguageManager->loadModuleLanguage('base');
+ $this->mRoot->mLanguageManager->loadModuleMessageCatalog('base');
$this->executeRedirect($url, 1, XCube_Utils::formatMessage(_MD_BASE_MESSAGE_LOGIN_SUCCESS, $this->mXoopsUser->get('uname')));
}
From minahito @ users.sourceforge.jp Thu Jul 20 17:13:54 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:13:54 +0900
Subject: [xoops-cvslog 3637] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060720081354.DBBDE2AC10E@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php
diff -u xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.3 xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.4
--- xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.3 Wed Jul 19 20:00:59 2006
+++ xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php Thu Jul 20 17:13:54 2006
@@ -1,7 +1,7 @@
mLanguageManager->loadModuleLanguage('user');
+ $root->mLanguageManager->loadModuleMessageCatalog('user');
$userHandler =& xoops_gethandler('user');
From minahito @ users.sourceforge.jp Thu Jul 20 17:14:05 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:14:05 +0900
Subject: [xoops-cvslog 3638] CVS update:
xoops2jp/html/modules/user/admin/actions
Message-ID: <20060720081405.66F2A2AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.7 xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.8
--- xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.7 Fri Jul 14 14:24:18 2006
+++ xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php Thu Jul 20 17:14:05 2006
@@ -1,7 +1,7 @@
mLanguageManager->loadModuleAdminLanguage("system");
- $root->mLanguageManager->loadManifestoLanguage("system");
+ $root->mLanguageManager->loadModuleAdminMessageCatalog("system");
+ $root->mLanguageManager->loadModinfoMessageCatalog("system");
//
// Get member list
From minahito @ users.sourceforge.jp Thu Jul 20 17:14:13 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:14:13 +0900
Subject: [xoops-cvslog 3639] CVS update:
xoops2jp/html/modules/user/admin/actions
Message-ID: <20060720081413.199CC2AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/actions/UserEditAction.class.php
diff -u xoops2jp/html/modules/user/admin/actions/UserEditAction.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/actions/UserEditAction.class.php:1.1.2.5
--- xoops2jp/html/modules/user/admin/actions/UserEditAction.class.php:1.1.2.4 Thu Jul 13 19:46:32 2006
+++ xoops2jp/html/modules/user/admin/actions/UserEditAction.class.php Thu Jul 20 17:14:12 2006
@@ -1,7 +1,7 @@
mController->getConfig('language') . "/notification.php";
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
require_once XOOPS_ROOT_PATH . "/include/notification_constants.php";
$methodOptions = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE,
From minahito @ users.sourceforge.jp Thu Jul 20 17:14:28 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:14:28 +0900
Subject: [xoops-cvslog 3640] CVS update: xoops2jp/html/modules/user/actions
Message-ID: <20060720081428.2977B2AC10F@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/actions/EditUserAction.class.php
diff -u xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.9 xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.10
--- xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.9 Wed Jul 19 19:20:33 2006
+++ xoops2jp/html/modules/user/actions/EditUserAction.class.php Thu Jul 20 17:14:28 2006
@@ -1,7 +1,7 @@
mController->getConfig('language') . "/notification.php";
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
require_once XOOPS_ROOT_PATH . "/include/notification_constants.php";
$methodOptions = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE,
From minahito @ users.sourceforge.jp Thu Jul 20 17:15:41 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:15:41 +0900
Subject: [xoops-cvslog 3641] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060720081541.1B5BD2AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.5 xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.6
--- xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php:1.1.2.5 Tue Mar 28 22:30:15 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_LanguageManager.class.php Thu Jul 20 17:15:40 2006
@@ -1,88 +1,107 @@
//
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
+/**
+ * @package legacy
+ * @version $Id: Legacy_LanguageManager.class.php,v 1.1.2.6 2006/07/20 08:15:40 minahito Exp $
+ */
if (!defined('XOOPS_ROOT_PATH')) exit();
-require_once XOOPS_ROOT_PATH . "/class/XCube_LanguageManager.class.php";
+require_once XOOPS_ROOT_PATH . "/kernel/XCube_LanguageManager.class.php";
class Legacy_LanguageManager extends XCube_LanguageManager
{
- var $mLanguageName;
+ function prepare()
+ {
+ parent::prepare();
+
+ //
+ // Load the additional file to control DB.
+ //
+ $filename = XOOPS_MODULE_PATH . '/base/language/' . $this->mLanguageName . '/charset_' . XOOPS_DB_TYPE . '.php';
+ if (file_exists($filename)) {
+ require_once($filename);
+ }
+ }
- function loadMainLanguage()
+ function loadGlobalMessageCatalog()
{
if (!$this->_loadFile(XOOPS_ROOT_PATH . "/modules/base/language/" . $this->mLanguageName . "/global.php")) {
- $this->_loadFile(XOOPS_ROOT_PATH."/modules/base/language/english/global.php");
+ $this->_loadFile(XOOPS_ROOT_PATH . "/modules/base/language/english/global.php");
}
+ //
// Now, if XOOPS_USE_MULTIBYTES isn't defined, set zero to it.
+ //
if (!defined("XOOPS_USE_MULTIBYTES")) {
- define("XOOPS_USE_MULTIBYTES",0);
+ define("XOOPS_USE_MULTIBYTES", 0);
}
}
- function loadSpecialTypeLanguage($type)
+ /**
+ * Load the special message catalog which is defined has been the XOOPS2
+ * generation.
+ *
+ * @access public
+ * @param string $type
+ */
+ function loadPageTypeMessageCatalog($type)
{
- if (strpos($type,'.') === false) {
+ if (strpos($type, '.') === false) {
$filename = XOOPS_ROOT_PATH . "/language/" . $this->mLanguageName . "/" . $type . ".php";
if (!$this->_loadFile($filename)) {
- $filename = XOOPS_ROOT_PATH . "/language/english/" . $type . ".php";
+ $filename = XOOPS_ROOT_PATH . "/language/" . $this->getFallbackLanguage() . "/" . $type . ".php";
$this->_loadFile($filename);
}
}
}
/**
- Load language for module controller.
- @param $dirname module directory name
+ * Load the message catalog of the specified module.
+ *
+ * @access public
+ * @param $dirname A dirname of module.
*/
- function loadModuleLanguage($dirname)
+ function loadModuleMessageCatalog($moduleName)
{
- $this->_loadLanguage($dirname, "main");
+ $this->_loadLanguage($moduleName, "main");
}
-
- function loadModuleAdminLanguage($dirname)
+
+ /**
+ * Load the message catalog of the specified module for admin.
+ *
+ * @access public
+ * @param $dirname A dirname of module.
+ */
+ function loadModuleAdminMessageCatalog($dirname)
{
$this->_loadLanguage($dirname, "admin");
}
+ /**
+ * Load the message catalog of the specified module for block.
+ *
+ * @access public
+ * @param $dirname A dirname of module.
+ */
function loadBlockLanguage($dirname)
{
$this->_loadLanguage($dirname, "blocks");
}
- function loadManifestoLanguage($dirname)
+ /**
+ * Load the message catalog of the specified module for modinfo.
+ *
+ * @access public
+ * @param $dirname A dirname of module.
+ */
+ function loadModinfoMessageCatalog($dirname)
{
$this->_loadLanguage($dirname, "modinfo");
}
/**
- * @access private
- * @param $dirname module directory name
+ * @access protected
+ * @param $dirname module directory name
* @param $fileBodyName language file body name
*/
function _loadLanguage($dirname, $fileBodyName)
@@ -96,7 +115,7 @@
/**
- * @access private
+ * @access protected
*/
function _loadFile($filename)
{
@@ -111,6 +130,76 @@
return false;
}
+
+ /**
+ * check the exstence of the specified file in the specified section.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return bool
+ */
+ function existFile($section, $filename)
+ {
+ if ($section != null) {
+ $filePath = XOOPS_ROOT_PATH . "/languages/" . $this->mLanguageName . "/${section}/${filename}";
+ }
+ else {
+ $filePath = XOOPS_ROOT_PATH . "/languages/" . $this->mLanguageName . "/${filename}";
+ }
+
+ return file_exists($filePath);
+ }
+
+ /**
+ * Return the file path by the specified section and the specified file.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return string
+ */
+ function getFilepath($section, $filename)
+ {
+ $filepath = null;
+ if ($section != null) {
+ $filepath = XOOPS_ROOT_PATH . "/languages/" . $this->mLanguageName . "/${section}/${filename}";
+ }
+ else {
+ $filepath = XOOPS_ROOT_PATH . "/languages/" . $this->mLanguageName . "/${filename}";
+ }
+
+ if (file_exists($filepath)) {
+ return $filepath;
+ }
+ else {
+ if ($section != null) {
+ return XOOPS_ROOT_PATH . "/languages/" . $this->getFallbackLanguage() . "/${section}/${filename}";
+ }
+ else {
+ return XOOPS_ROOT_PATH . "/languages/" . $this->getFallbackLanguage() . "/${filename}";
+ }
+ }
+ }
+
+ /**
+ * Get file contents and return it.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return string
+ */
+ function loadTextFile($section, $filename)
+ {
+ $filepath = $this->getFilepath($section, $filename);
+ return file_get_contents($filepath);
+ }
+
+ function getFallbackLanguage()
+ {
+ return "english";
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 20 17:16:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:16:36 +0900
Subject: [xoops-cvslog 3642] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060720081636.2EEEA2AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/commentstatus.php
diff -u xoops2jp/html/modules/base/class/commentstatus.php:1.1.2.1 xoops2jp/html/modules/base/class/commentstatus.php:1.1.2.2
--- xoops2jp/html/modules/base/class/commentstatus.php:1.1.2.1 Thu Mar 30 12:54:17 2006
+++ xoops2jp/html/modules/base/class/commentstatus.php Thu Jul 20 17:16:36 2006
@@ -22,7 +22,7 @@
{
$root =& XCube_Root::getSingleton();
$language = $root->mController->getConfig('language');
- include_once XOOPS_ROOT_PATH . '/language/' . $language . '/comment.php';
+ $root->mLanguageManager->loadPageTypeMessageCatalog('comment');
$this->_mResults[XOOPS_COMMENT_PENDING] =& $this->create();
$this->_mResults[XOOPS_COMMENT_PENDING]->setVar('id', XOOPS_COMMENT_PENDING);
From minahito @ users.sourceforge.jp Thu Jul 20 17:16:45 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:16:45 +0900
Subject: [xoops-cvslog 3643] CVS update: xoops2jp/html/modules/base/blocks
Message-ID: <20060720081645.6D40D2AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/blocks/legacy_notification.php
diff -u xoops2jp/html/modules/base/blocks/legacy_notification.php:1.1.2.1 xoops2jp/html/modules/base/blocks/legacy_notification.php:1.1.2.2
--- xoops2jp/html/modules/base/blocks/legacy_notification.php:1.1.2.1 Sun Mar 26 15:07:46 2006
+++ xoops2jp/html/modules/base/blocks/legacy_notification.php Thu Jul 20 17:16:45 2006
@@ -3,7 +3,10 @@
{
global $xoopsConfig, $xoopsUser, $xoopsModule;
include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
- include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
+
+ $root =& XCube_Root::getSingleton();
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
+
// Notification must be enabled, and user must be logged in
if (empty($xoopsUser) || !notificationEnabled('block')) {
return false; // do not display block
From minahito @ users.sourceforge.jp Thu Jul 20 17:17:02 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:17:02 +0900
Subject: [xoops-cvslog 3644] CVS update: xoops2jp/html/include
Message-ID: <20060720081702.31D462AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/calendarjs.php
diff -u xoops2jp/html/include/calendarjs.php:1.1.8.1 xoops2jp/html/include/calendarjs.php:1.1.8.2
--- xoops2jp/html/include/calendarjs.php:1.1.8.1 Wed Oct 19 02:19:03 2005
+++ xoops2jp/html/include/calendarjs.php Thu Jul 20 17:17:02 2006
@@ -2,7 +2,10 @@
if (!defined('XOOPS_ROOT_PATH')) {
exit();
}
-include_once XOOPS_ROOT_PATH.'/language/'.$GLOBALS['xoopsConfig']['language'].'/calendar.php';
+
+$root =& XCube_Root::getSingleton();
+$root->mLanguageManager->loadPageTypeMessageCatalog('calendar');
+
?>
From minahito @ users.sourceforge.jp Thu Jul 20 17:17:15 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:17:15 +0900
Subject: [xoops-cvslog 3645] CVS update: xoops2jp/html/include
Message-ID: <20060720081715.8888C2AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_delete.php
diff -u xoops2jp/html/include/comment_delete.php:1.2.8.1 xoops2jp/html/include/comment_delete.php:1.2.8.2
--- xoops2jp/html/include/comment_delete.php:1.2.8.1 Wed Oct 19 02:19:03 2005
+++ xoops2jp/html/include/comment_delete.php Thu Jul 20 17:17:15 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('comment'); ///< Is this must?
switch ($op) {
case 'delete_one':
From minahito @ users.sourceforge.jp Thu Jul 20 17:17:38 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:17:38 +0900
Subject: [xoops-cvslog 3646] CVS update: xoops2jp/html/include
Message-ID: <20060720081738.7706D2AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_edit.php
diff -u xoops2jp/html/include/comment_edit.php:1.2.8.1 xoops2jp/html/include/comment_edit.php:1.2.8.2
--- xoops2jp/html/include/comment_edit.php:1.2.8.1 Tue Jan 24 23:20:39 2006
+++ xoops2jp/html/include/comment_edit.php Thu Jul 20 17:17:38 2006
@@ -1,5 +1,5 @@
getLanguageManager();
-$langManager->loadModuleLanguage("base");
+$langManager->loadModuleMessageCatalog("base");
if ('system' != $xoopsModule->getVar('dirname') && XOOPS_COMMENT_APPROVENONE == $xoopsModuleConfig['com_rule']) {
exit();
}
-include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+$root->mLanguageManager->loadPageTypeMessageCatalog('comment');
+
$com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
if ($com_mode == '') {
From minahito @ users.sourceforge.jp Thu Jul 20 17:17:46 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:17:46 +0900
Subject: [xoops-cvslog 3647] CVS update: xoops2jp/html/include
Message-ID: <20060720081746.22AA02AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_new.php
diff -u xoops2jp/html/include/comment_new.php:1.2.8.2 xoops2jp/html/include/comment_new.php:1.2.8.3
--- xoops2jp/html/include/comment_new.php:1.2.8.2 Tue Jan 24 23:21:10 2006
+++ xoops2jp/html/include/comment_new.php Thu Jul 20 17:17:45 2006
@@ -1,5 +1,5 @@
getLanguageManager();
-$langManager->loadModuleLanguage("base");
+$root->mLanguageManager->loadModuleMessageCatalog("base");
require_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
@@ -52,7 +51,8 @@
exit();
}
-include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+$root->mLanguageManager->loadPageTypeMessageCatalog('comment'); ///< Is this must?
+
$com_itemid = isset($_GET['com_itemid']) ? intval($_GET['com_itemid']) : 0;
if ($com_itemid > 0) {
From minahito @ users.sourceforge.jp Thu Jul 20 17:17:59 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:17:59 +0900
Subject: [xoops-cvslog 3648] CVS update: xoops2jp/html/include
Message-ID: <20060720081759.2BED92AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_post.php
diff -u xoops2jp/html/include/comment_post.php:1.2.8.2 xoops2jp/html/include/comment_post.php:1.2.8.3
--- xoops2jp/html/include/comment_post.php:1.2.8.2 Mon Feb 20 19:52:44 2006
+++ xoops2jp/html/include/comment_post.php Thu Jul 20 17:17:59 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog("comment"); ///< @todo Is this must?
+
include_once XOOPS_ROOT_PATH.'/include/comment_constants.php';
+//
+// @TODO We have to remove the next line!
+//
require_once XOOPS_ROOT_PATH . "/modules/system/constants.php";
$com_id = isset($_POST['com_id']) ? intval($_POST['com_id']) : 0;
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:07 +0900
Subject: [xoops-cvslog 3649] CVS update: xoops2jp/html/include
Message-ID: <20060720081807.71A112AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_reply.php
diff -u xoops2jp/html/include/comment_reply.php:1.2.8.2 xoops2jp/html/include/comment_reply.php:1.2.8.3
--- xoops2jp/html/include/comment_reply.php:1.2.8.2 Tue Jan 24 23:21:10 2006
+++ xoops2jp/html/include/comment_reply.php Thu Jul 20 17:18:07 2006
@@ -1,5 +1,5 @@
getLanguageManager();
-$langManager->loadModuleLanguage("base");
+$root->mLanguageManager->loadModuleMessageCatalog("base");
+$root->mLanguageManager->loadPageTypeMessageCatalog("comment"); ///< @todo Is this must?
-require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
$com_id = isset($_GET['com_id']) ? intval($_GET['com_id']) : 0;
$com_mode = isset($_GET['com_mode']) ? htmlspecialchars(trim($_GET['com_mode']), ENT_QUOTES) : '';
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:16 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:16 +0900
Subject: [xoops-cvslog 3650] CVS update: xoops2jp/html/include
Message-ID: <20060720081816.7D8BA2AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/comment_view.php
diff -u xoops2jp/html/include/comment_view.php:1.2.8.3 xoops2jp/html/include/comment_view.php:1.2.8.4
--- xoops2jp/html/include/comment_view.php:1.2.8.3 Tue Feb 21 20:37:49 2006
+++ xoops2jp/html/include/comment_view.php Thu Jul 20 17:18:16 2006
@@ -1,5 +1,5 @@
getGroups() : XOOPS_GROUP_ANONYMOUS;
$xoopsTpl->assign( 'xoops_iscommentadmin', $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_COMMENT, $groups) );
- require_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/comment.php';
+ $root =& XCube_Root::getSingleton();
+ $root->mLanguageManager->loadPageTypeMessageCatalog('comment');
$comment_config = $xoopsModule->getInfo('comments');
$com_itemid = (trim($comment_config['itemName']) != '' && isset($_GET[$comment_config['itemName']])) ? intval($_GET[$comment_config['itemName']]) : 0;
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:22 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:22 +0900
Subject: [xoops-cvslog 3651] CVS update: xoops2jp/html/include
Message-ID: <20060720081822.A6B4C2AC041@users.sourceforge.jp>
Index: xoops2jp/html/include/notification_select.php
diff -u xoops2jp/html/include/notification_select.php:1.2.8.1 xoops2jp/html/include/notification_select.php:1.2.8.2
--- xoops2jp/html/include/notification_select.php:1.2.8.1 Tue Nov 15 01:50:21 2005
+++ xoops2jp/html/include/notification_select.php Thu Jul 20 17:18:22 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('notification');
$categories =& notificationSubscribableCategoryInfo();
$event_count = 0;
if (!empty($categories)) {
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:31 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:31 +0900
Subject: [xoops-cvslog 3652] CVS update: xoops2jp/html/kernel
Message-ID: <20060720081831.3592C2AC041@users.sourceforge.jp>
Index: xoops2jp/html/kernel/block.php
diff -u xoops2jp/html/kernel/block.php:1.2.8.8 xoops2jp/html/kernel/block.php:1.2.8.9
--- xoops2jp/html/kernel/block.php:1.2.8.8 Sat Jul 1 13:17:28 2006
+++ xoops2jp/html/kernel/block.php Thu Jul 20 17:18:31 2006
@@ -1,5 +1,5 @@
getVar('dirname').'/blocks/'.$this->getVar('func_file')) ) {
$root=&XCube_Root::getSingleton();
- $languageManager=$root->getLanguageManager();
- $languageManager->loadBlockLanguage($this->getVar('dirname'));
+ $root->mLanguageManager->loadBlockLanguage($this->getVar('dirname'));
require_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
$options = explode('|', $this->getVar('options'));
@@ -246,11 +245,9 @@
return false;
}
if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file'))) {
- if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php')) {
- include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/language/'.$GLOBALS['xoopsConfig']['language'].'/blocks.php';
- } elseif (file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/language/english/blocks.php')) {
- include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/language/english/blocks.php';
- }
+ $root =& XCube_Root::getSingleton();
+ $root->mLanguageManager->loadBlockMessageCatalog($this->getVar('dirname'));
+
include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
$options = explode('|', $this->getVar('options'));
$edit_form = $edit_func($options);
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:39 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:39 +0900
Subject: [xoops-cvslog 3653] CVS update: xoops2jp/html/kernel
Message-ID: <20060720081839.A56082AC029@users.sourceforge.jp>
Index: xoops2jp/html/kernel/module.php
diff -u xoops2jp/html/kernel/module.php:1.2.8.12 xoops2jp/html/kernel/module.php:1.2.8.13
--- xoops2jp/html/kernel/module.php:1.2.8.12 Sun Jul 16 15:41:33 2006
+++ xoops2jp/html/kernel/module.php Thu Jul 20 17:18:39 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadModinfoMessageCatalog($dirname);
+
if (file_exists(XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php')) {
include XOOPS_ROOT_PATH.'/modules/'.$dirname.'/xoops_version.php';
} else {
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:46 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:46 +0900
Subject: [xoops-cvslog 3654] CVS update: xoops2jp/html/kernel
Message-ID: <20060720081846.0978F2AC029@users.sourceforge.jp>
Index: xoops2jp/html/kernel/timezone.php
diff -u xoops2jp/html/kernel/timezone.php:1.1.2.1 xoops2jp/html/kernel/timezone.php:1.1.2.2
--- xoops2jp/html/kernel/timezone.php:1.1.2.1 Sun Jan 8 17:02:33 2006
+++ xoops2jp/html/kernel/timezone.php Thu Jul 20 17:18:45 2006
@@ -22,7 +22,7 @@
//
// Because abstract language style is not decided, we load directly. But we must fix.
//
- require_once XOOPS_ROOT_PATH . '/language/' . $root->mController->mConfig['language'] . '/timezone.php';
+ $root->mLanguageManager->loadPageTypeMessageCatalog('timezone');
//
// This handler not connects to database.
From minahito @ users.sourceforge.jp Thu Jul 20 17:18:55 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:18:55 +0900
Subject: [xoops-cvslog 3655] CVS update: xoops2jp/html/kernel
Message-ID: <20060720081855.4AD942AC10B@users.sourceforge.jp>
Index: xoops2jp/html/kernel/XCube_LanguageManager.class.php
diff -u /dev/null xoops2jp/html/kernel/XCube_LanguageManager.class.php:1.1.2.1
--- /dev/null Thu Jul 20 17:18:55 2006
+++ xoops2jp/html/kernel/XCube_LanguageManager.class.php Thu Jul 20 17:18:55 2006
@@ -0,0 +1,169 @@
+mLanguageName = $this->getFallbackLanguage();
+ $this->mLocalName = $this->getFallbackLocale();
+ }
+
+ /**
+ * Normally, this member function is called soon, after constructor.
+ * To follow the base, initialize.
+ */
+ function prepare()
+ {
+ }
+
+ /**
+ * Set locale name.
+ *
+ * @param string $local locale name
+ */
+ function setLocale($locale)
+ {
+ $this->mLanguageName = $locale;
+ }
+
+ /**
+ * Set language name.
+ *
+ * @param string $language language name
+ */
+ function setLanguage($language)
+ {
+ $this->mLanguageName = $language;
+ }
+
+ /**
+ * Load the global message catalog which is defined in the base module.
+ */
+ function loadGlobalMessageCatalog()
+ {
+ }
+
+ /**
+ * Load the module message catalog which is defined in the specified
+ * module.
+ *
+ * @param string $moduleName A name of module.
+ */
+ function loadModuleMessageCatalog($moduleName)
+ {
+ }
+
+ /**
+ * Load the theme message catalog which is defined in the specified module.
+ *
+ * @param string $themeName A name of theme.
+ */
+ function loadThemeMessageCatalog($themeName)
+ {
+ }
+
+ /**
+ * check the exstence of the specified file in the specified section.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return bool
+ */
+ function existFile($section, $filename)
+ {
+ }
+
+ /**
+ * Return the file path by the specified section and the specified file.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return string
+ */
+ function getFilepath($section, $filename)
+ {
+ }
+
+ /**
+ * Get file contents and return it.
+ *
+ * @access public
+ * @param string $section A name of section.
+ * @param string $filename A name of file
+ * @return string
+ */
+ function loadTextFile($section, $filename)
+ {
+ }
+
+ /**
+ * Return translated message.
+ *
+ * @param string $word
+ * @return string
+ *
+ * @note This member function is test.
+ */
+ function translate($word)
+ {
+ return $word;
+ }
+
+ /**
+ * Return default language name.
+ *
+ * @access protected
+ * @return string
+ */
+ function getFallbackLanguage()
+ {
+ return "eng";
+ }
+
+ /**
+ * Return default locale name.
+ *
+ * @access protected
+ * @return string
+ */
+ function getFallbackLocale()
+ {
+ return "EG";
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 20 17:19:34 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:19:34 +0900
Subject: [xoops-cvslog 3656] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060720081934.B5B0A2AC029@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/ImageListAction.class.php
diff -u xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.2 Tue May 30 12:54:54 2006
+++ xoops2jp/html/modules/base/actions/ImageListAction.class.php Thu Jul 20 17:19:34 2006
@@ -15,7 +15,7 @@
$controller->setDialogMode(true);
$root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleLanguage('base');
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
}
function &_getHandler()
Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.3 xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.4
--- xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.3 Mon May 29 13:52:12 2006
+++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Thu Jul 20 17:19:34 2006
@@ -15,7 +15,7 @@
function prepare(&$controller, &$xoopsUser)
{
$root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleLanguage('base');
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
$handler =& xoops_gethandler('config');
$this->mConfig =& $handler->getConfigsByCat(XOOPS_CONF_SEARCH);
Index: xoops2jp/html/modules/base/actions/ImageUploadAction.class.php
diff -u xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.2 Tue May 30 12:54:54 2006
+++ xoops2jp/html/modules/base/actions/ImageUploadAction.class.php Thu Jul 20 17:19:34 2006
@@ -15,7 +15,7 @@
$controller->setDialogMode(true);
$root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleLanguage('base');
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
}
function &_getHandler()
From minahito @ users.sourceforge.jp Thu Jul 20 17:19:49 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:19:49 +0900
Subject: [xoops-cvslog 3657] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060720081949.9ACBE2AC029@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/SslloginAction.class.php
diff -u xoops2jp/html/modules/base/actions/SslloginAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/SslloginAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/actions/SslloginAction.class.php:1.1.2.2 Tue Mar 28 22:28:25 2006
+++ xoops2jp/html/modules/base/actions/SslloginAction.class.php Thu Jul 20 17:19:49 2006
@@ -18,7 +18,7 @@
// Because this action's template uses USER message catalog, load it.
//
$root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleLanguage('user');
+ $root->mLanguageManager->loadModuleMessageCatalog('user');
$render->setTemplateName("legacy_misc_ssllogin.html");
$render->setAttribute("message", @sprintf(_US_LOGGINGU, $xoopsUser->getVar('uname')));
Index: xoops2jp/html/modules/base/actions/SmiliesAction.class.php
diff -u xoops2jp/html/modules/base/actions/SmiliesAction.class.php:1.1.2.3 xoops2jp/html/modules/base/actions/SmiliesAction.class.php:1.1.2.4
--- xoops2jp/html/modules/base/actions/SmiliesAction.class.php:1.1.2.3 Tue Mar 28 22:28:25 2006
+++ xoops2jp/html/modules/base/actions/SmiliesAction.class.php Thu Jul 20 17:19:49 2006
@@ -42,7 +42,7 @@
// Because this action's template uses BASE message catalog, load it.
//
$root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleLanguage('base');
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
$render->setTemplateName("legacy_misc_smilies.html");
$render->setAttribute("objects", $this->mObjects);
From minahito @ users.sourceforge.jp Thu Jul 20 17:20:10 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:20:10 +0900
Subject: [xoops-cvslog 3658] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060720082010.839772AC029@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.8
--- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.7 Mon Jun 5 00:29:15 2006
+++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Thu Jul 20 17:20:10 2006
@@ -201,7 +201,7 @@
// Load constants
//
$root =& XCube_Root::getSingleton();
- $root->mLanguageManager->loadManifestoLanguage($this->_mMaster->mModule->get('dirname'));
+ $root->mLanguageManager->loadModinfoMessageCatalog($this->_mMaster->mModule->get('dirname'));
$this->_mMaster->mPreparedFlag = true;
}
From minahito @ users.sourceforge.jp Thu Jul 20 17:20:22 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:20:22 +0900
Subject: [xoops-cvslog 3659] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060720082022.56FB02AC10C@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php
diff -u xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.15 xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.16
--- xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.15 Thu Jun 22 14:55:36 2006
+++ xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php Thu Jul 20 17:20:22 2006
@@ -1,5 +1,5 @@
mController->mRoot->getLanguageManager();
- $languageManager->loadModuleAdminLanguage($this->mModuleObject->getVar('dirname'));
- $languageManager->loadManifestoLanguage($this->mModuleObject->getVar('dirname'));
+ $languageManager =& $this->mController->mRoot->getLanguageManager();
+ $languageManager->loadModuleAdminMessageCatalog($this->mModuleObject->getVar('dirname'));
+ $languageManager->loadModinfoMessageCatalog($this->mModuleObject->getVar('dirname'));
}
function _processErrorModuleNotExist()
From minahito @ users.sourceforge.jp Thu Jul 20 17:20:42 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:20:42 +0900
Subject: [xoops-cvslog 3660] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060720082042.26F702AC029@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/HelpAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.8 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.9
--- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.8 Mon Jun 12 12:55:14 2006
+++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php Thu Jul 20 17:20:42 2006
@@ -1,6 +1,6 @@
mCreateHelpSmarty =& new XCube_NewDelegate();
+ $this->mCreateHelpSmarty->add(array(&$this, '_createHelpSmarty'));
+ $this->mCreateHelpSmarty->register('Legacy_HelpAction.CreateHelpSmarty');
+ }
+
function hasPerm(&$controller, &$xoopsUser)
{
$this->_mDirname = xoops_getrequest('dirname');
@@ -120,7 +134,8 @@
//
// Smarty
//
- $smarty =& new Legacy_HelpSmarty();
+ $smarty = null;
+ $this->mCreateHelpSmarty->call(new XCube_Ref($smarty));
$smarty->setDirname($this->_mDirname);
//
@@ -141,6 +156,13 @@
return LEGACY_FRAME_VIEW_SUCCESS;
}
+ function _createHelpSmarty(&$smarty)
+ {
+ if (!is_object($smarty)) {
+ $smarty = new Legacy_HelpSmarty();
+ }
+ }
+
function executeViewSuccess(&$controller, &$xoopsUser, &$renderer)
{
$renderer->setTemplateName("help.html");
From minahito @ users.sourceforge.jp Thu Jul 20 17:20:54 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:20:54 +0900
Subject: [xoops-cvslog 3661] CVS update: xoops2jp/html/class
Message-ID: <20060720082054.5B9CA2AC029@users.sourceforge.jp>
Index: xoops2jp/html/class/xoopslists.php
diff -u xoops2jp/html/class/xoopslists.php:1.2.8.3 xoops2jp/html/class/xoopslists.php:1.2.8.4
--- xoops2jp/html/class/xoopslists.php:1.2.8.3 Tue May 16 22:25:06 2006
+++ xoops2jp/html/class/xoopslists.php Thu Jul 20 17:20:54 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('timezone');
$time_zone_list = array ("-12" => _TZ_GMTM12, "-11" => _TZ_GMTM11, "-10" => _TZ_GMTM10, "-9" => _TZ_GMTM9, "-8" => _TZ_GMTM8, "-7" => _TZ_GMTM7, "-6" => _TZ_GMTM6, "-5" => _TZ_GMTM5, "-4" => _TZ_GMTM4, "-3.5" => _TZ_GMTM35, "-3" => _TZ_GMTM3, "-2" => _TZ_GMTM2, "-1" => _TZ_GMTM1, "0" => _TZ_GMT0, "1" => _TZ_GMTP1, "2" => _TZ_GMTP2, "3" => _TZ_GMTP3, "3.5" => _TZ_GMTP35, "4" => _TZ_GMTP4, "4.5" => _TZ_GMTP45, "5" => _TZ_GMTP5, "5.5" => _TZ_GMTP55, "6" => _TZ_GMTP6, "7" => _TZ_GMTP7, "8" => _TZ_GMTP8, "9" => _TZ_GMTP9, "9.5" => _TZ_GMTP95, "10" => _TZ_GMTP10, "11" => _TZ_GMTP11, "12" => _TZ_GMTP12);
return $time_zone_list;
}
From minahito @ users.sourceforge.jp Thu Jul 20 17:21:00 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:21:00 +0900
Subject: [xoops-cvslog 3662] CVS update: xoops2jp/html/class
Message-ID: <20060720082100.2C6432AC029@users.sourceforge.jp>
Index: xoops2jp/html/class/xoopscomments.php
diff -u xoops2jp/html/class/xoopscomments.php:1.2.8.1 xoops2jp/html/class/xoopscomments.php:1.2.8.2
--- xoops2jp/html/class/xoopscomments.php:1.2.8.1 Wed Oct 19 02:16:40 2005
+++ xoops2jp/html/class/xoopscomments.php Thu Jul 20 17:21:00 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('comment');
class XoopsComments extends XoopsObject
{
From minahito @ users.sourceforge.jp Thu Jul 20 17:21:32 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 20 Jul 2006 17:21:32 +0900
Subject: [xoops-cvslog 3663] CVS update: xoops2jp/html
Message-ID: <20060720082132.85C802AC029@users.sourceforge.jp>
From minahito @ users.sourceforge.jp Tue Jul 25 18:07:54 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 18:07:54 +0900
Subject: [xoops-cvslog 3664] CVS update: xoops2jp/html/include
Message-ID: <20060725090754.7B51C2AC060@users.sourceforge.jp>
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.2.8.4 xoops2jp/html/include/checklogin.php:1.2.8.5
--- xoops2jp/html/include/checklogin.php:1.2.8.4 Mon Nov 14 18:03:28 2005
+++ xoops2jp/html/include/checklogin.php Tue Jul 25 18:07:54 2006
@@ -3,7 +3,7 @@
@package base
@deprecated
*/
-// $Id: checklogin.php,v 1.2.8.4 2005/11/14 09:03:28 minahito Exp $
+// $Id: checklogin.php,v 1.2.8.5 2006/07/25 09:07:54 minahito Exp $
// ------------------------------------------------------------------------ //
// XOOPS - PHP Content Management System //
// Copyright (c) 2005 XOOPS Cube.org //
@@ -29,15 +29,10 @@
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
// ------------------------------------------------------------------------ //
-if (!defined('XOOPS_ROOT_PATH'))
- exit();
+if (!defined('XOOPS_ROOT_PATH')) exit();
-require_once XOOPS_ROOT_PATH."/class/XCube_EventArgs.class.php";
-
-$root=&XCube_Root::getSingleton();
-$checkLoginEventArgs = new CheckLoginEventArgs();
-
-$root->mEventManager->raiseEvent("Site.CheckLogin",$root->mController,$checkLoginEventArgs);
+$root =& XCube_Root::getSingleton();
+$root->mController->checkLogin();
//
// ToDo Add after care!
From minahito @ users.sourceforge.jp Tue Jul 25 19:03:16 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 19:03:16 +0900
Subject: [xoops-cvslog 3665] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060725100316.C8F2B2AC124@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.8 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.9
--- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.8 Thu Jul 20 17:20:10 2006
+++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Tue Jul 25 19:03:15 2006
@@ -16,6 +16,9 @@
function prepare(&$controller, &$xoopsUser)
{
+ $controller->mRoot->mLanguageManager->loadPageTypeMessageCatalog('comment');
+ $controller->mRoot->mLanguageManager->loadPageTypeMessageCatalog('notification');
+
$state = (xoops_getrequest('confmod_id') > 0) ? new Legacy_ModulePreferenceEditState($this) : new Legacy_PreferenceEditState($this);
$state->prepare($controller, $xoopsUser);
@@ -171,6 +174,8 @@
{
function prepare(&$controller, &$xoopsUser)
{
+ parent::prepare($controller, $xoopsUser);
+
$handler =& xoops_gethandler('configcategory');
$this->_mMaster->mCategory =& $handler->get(intval(xoops_getrequest('confcat_id')));
@@ -188,6 +193,8 @@
{
function prepare(&$controller, &$xoopsUser)
{
+ parent::prepare($controller, $xoopsUser);
+
$handler =& xoops_gethandler('module');
$this->_mMaster->mModule =& $handler->get(intval(xoops_getrequest('confmod_id')));
From minahito @ users.sourceforge.jp Tue Jul 25 19:08:42 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 19:08:42 +0900
Subject: [xoops-cvslog 3666] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20060725100842.C67112AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php
diff -u xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.8
--- xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php:1.1.2.7 Sat Jul 1 16:24:17 2006
+++ xoops2jp/html/modules/base/admin/class/AbstractModuleInstaller.class.php Tue Jul 25 19:08:42 2006
@@ -33,6 +33,15 @@
{
$this->mDirname = $dirname;
$this->mLog =& new Legacy_ModuleUtilsSimpleLog();
+
+ //
+ // Load message catalog for the required module installer of 'common'
+ // process.
+ //
+ $root =& XCube_Root::getSingleton();
+ if (is_object($root->mLanguageManager)) {
+ $root->mLanguageManager->loadModuleAdminMessageCatalog('base');
+ }
}
/**
@@ -73,6 +82,12 @@
$this->_processReport();
return false;
}
+
+ $this->_installNotification();
+ if (!$this->mForceMode && $this->mLog->hasError()) {
+ $this->_processReport();
+ return false;
+ }
$this->_installPreference();
if (!$this->mForceMode && $this->mLog->hasError()) {
@@ -131,6 +146,16 @@
}
/**
+ * Install or uninstall notifications, this member function is called by
+ * own execute().
+ *
+ * @access protected
+ */
+ function _installNotification()
+ {
+ }
+
+ /**
* Install or uninstall blocks and their preference, this function is called by own execute().
*/
function _installPreference()
From minahito @ users.sourceforge.jp Tue Jul 25 19:10:44 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 19:10:44 +0900
Subject: [xoops-cvslog 3667] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20060725101044.5B6F42AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.14 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.15
--- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.14 Thu Jul 20 01:13:18 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php Tue Jul 25 19:10:44 2006
@@ -176,6 +176,10 @@
}
}
+ function _installNotification()
+ {
+ }
+
function _installPreference()
{
Legacy_ModuleUtils::insertAllConfigs($this->mModule, $this->mLog);
From minahito @ users.sourceforge.jp Tue Jul 25 19:15:56 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 19:15:56 +0900
Subject: [xoops-cvslog 3668] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20060725101556.DD8F22AC041@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.18 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.19
--- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.18 Sat Jul 1 16:25:12 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Tue Jul 25 19:15:56 2006
@@ -44,8 +44,8 @@
}
/**
- * This provides static methods for the module installation. Methods of this class
- * may move to base class of installers.
+ * This provides static methods for the module installation. Methods of this
+ * class may move to base class of installers.
*/
class Legacy_ModuleUtils
{
@@ -405,9 +405,59 @@
);
}
- // TODO comment
-
- // TODO notification
+ //
+ // Insert comment config by old style.
+ //
+ if ($this->mModule->get('hasnotification') != 0) {
+ require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ require_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+ $t_options = array();
+ $t_options['_NOT_CONFIG_DISABLE'] = XOOPS_NOTIFICATION_DISABLE;
+ $t_options['_NOT_CONFIG_ENABLEBLOCK'] = XOOPS_NOTIFICATION_ENABLEBLOCK;
+ $t_options['_NOT_CONFIG_ENABLEINLINE'] = XOOPS_NOTIFICATION_ENABLEINLINE;
+ $t_options['_NOT_CONFIG_ENABLEBOTH'] = XOOPS_NOTIFICATION_ENABLEBOTH;
+
+ $configInfos[] = array(
+ 'name' => 'notification_enabled',
+ 'title' => '_NOT_CONFIG_ENABLE',
+ 'description' => '_NOT_CONFIG_ENABLEDSC',
+ 'formtype' => 'select',
+ 'valuetype' => 'int',
+ 'default' => XOOPS_NOTIFICATION_ENABLEBOTH,
+ 'options' => $t_options
+ );
+
+ //
+ // FIXME: doesn't work when update module... can't read back the
+ // array of options properly... " changing to "
+ //
+
+ unset ($t_options);
+
+ $t_options = array();
+ $t_categoryArr =& notificationCategoryInfo('', $this->mModule->get('mid'));
+ foreach ($t_categoryArr as $t_category) {
+ $t_eventArr =& notificationEvents($t_category['name'], false, $module->get('mid'));
+ foreach ($t_eventArr as $t_event) {
+ if (!empty($event['invisible'])) {
+ continue;
+ }
+ $t_optionName = $t_category['title'] . ' : ' . $t_event['title'];
+ $t_options[$t_optionName] = $category['name'] . '-' . $t_event['name'];
+ }
+
+ $configInfos[] = array(
+ 'name' => 'notification_events',
+ 'title' => '_NOT_CONFIG_EVENTS',
+ 'description' => '_NOT_CONFIG_EVENTSDSC',
+ 'formtype' => 'select_multi',
+ 'valuetype' => 'array',
+ 'default' => array_values($t_options),
+ 'options' => $t_options
+ );
+ }
+ }
$configHandler =& xoops_gethandler('config');
From minahito @ users.sourceforge.jp Tue Jul 25 19:22:47 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 25 Jul 2006 19:22:47 +0900
Subject: [xoops-cvslog 3669] CVS update:
xoops2jp/html/modules/base/preload/Primary
Message-ID: <20060725102247.B4C372AC979@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php
diff -u xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.1 xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.2
--- xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.1 Tue Jun 27 18:11:38 2006
+++ xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php Tue Jul 25 19:22:47 2006
@@ -8,7 +8,7 @@
{
if(($this->mController->mConfig['closesite']==1)||is_array(XCube_Utils::checkSystemModules())) {
$this->mController->mRoot->mDelegateManager->add("Site.Login", array(&$this, "callbackSiteLogin"), XCUBE_DELEGATE_PRIORITY_FINAL);
- $this->mController->mRoot->mEventManager->add("Site.CheckLogin.Success",new XCube_InstanceDelegate($this,"callbackCheckLoginSuccess"));
+ $this->mController->mRoot->mDelegateManager->add("Site.CheckLogin.Success",array(&$this,"callbackCheckLoginSuccess"));
}
}
@@ -21,7 +21,8 @@
if (is_array($retArray)) {
define('XOOPS_CPFUNC_LOADED',1);
}
- require_once XOOPS_ROOT_PATH.'/include/checklogin.php';
+
+ $this->mController->checkLogin();
return;
} elseif(is_object($this->mController->mXoopsUser)) {
foreach ($this->mController->mXoopsUser->getGroups() as $group) {
@@ -155,29 +156,30 @@
}
}
- function callbackCheckLoginSuccess(&$controller,&$eventArgs)
+ function callbackCheckLoginSuccess(&$xoopsUser)
{
//
// This check is not needed. :)
//
- if(!is_object($eventArgs['xoopsUser']))
+ if(!is_object($xoopsUser)) {
return;
+ }
$user=&$eventArgs['xoopsUser'];
// Site close
- if($controller->getConfig('closesite')) {
+ if($this->mController->getConfig('closesite')) {
$accessAllowed=false;
foreach($user->getGroups() as $group) {
- if(in_array($group,$controller->getConfig('closesite_okgrp')) || ($group==XOOPS_GROUP_ADMIN)) {
+ if(in_array($group,$this->mController->getConfig('closesite_okgrp')) || ($group==XOOPS_GROUP_ADMIN)) {
$accessAllowed=true;
break;
}
}
if(!$accessAllowed) {
- XCube_Utils::redirectHeader(XOOPS_URL,1,_NOPERM);
+ $this->mController->redirectHeader(XOOPS_URL,1,_NOPERM);
}
}
}
From minahito @ users.sourceforge.jp Wed Jul 26 11:54:44 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 11:54:44 +0900
Subject: [xoops-cvslog 3670] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060726025444.7128C2AC175@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.6 xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.7
--- xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.6 Thu Jun 22 14:36:58 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php Wed Jul 26 11:54:44 2006
@@ -1,5 +1,8 @@
mController=&$controller;
+ $this->mController =& $controller;
}
- function getConfig($key=null)
+ function getConfig($key = null)
{
- if($key!=null)
+ if($key != null) {
return isset($this->mConfig[$key]) ? $this->mConfig[$key] : null;
- else
+ }
+ else {
return $this->mConfig;
+ }
}
-
function prepare()
{
// Is this request module process?
- if(!$this->isModuleProcess())
+ if (!$this->isModuleProcess()) {
return;
+ }
$this->_createModuleObject();
- if(!$this->isActive())
+ if (!$this->isActive()) {
return;
+ }
//
// Set config values for this module
@@ -122,7 +129,7 @@
function _createModuleObject()
{
$moduleHandler=&xoops_gethandler('module');
- $this->mModuleObject=&$moduleHandler->getByDirname($this->_getDirname());
+ $this->mModuleObject =& $moduleHandler->getByDirname($this->_getDirname());
}
@@ -135,7 +142,7 @@
function setupLanguage()
{
$languageManager=&$this->mController->mRoot->getLanguageManager();
- $languageManager->loadModuleLanguage($this->mModuleObject->getVar('dirname'));
+ $languageManager->loadModuleMessageCatalog($this->mModuleObject->getVar('dirname'));
}
function _processErrorModuleNotExist()
From minahito @ users.sourceforge.jp Wed Jul 26 19:49:31 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:49:31 +0900
Subject: [xoops-cvslog 3671] CVS update: xoops2jp/html
Message-ID: <20060726104931.5840B2AC0D8@users.sourceforge.jp>
Index: xoops2jp/html/notifications.php
diff -u xoops2jp/html/notifications.php:1.2.8.1 xoops2jp/html/notifications.php:1.2.8.2
--- xoops2jp/html/notifications.php:1.2.8.1 Wed Oct 19 02:13:23 2005
+++ xoops2jp/html/notifications.php Wed Jul 26 19:49:31 2006
@@ -1,222 +1,11 @@
//
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
+/**
+ * @version $Id: notifications.php,v 1.2.8.2 2006/07/26 10:49:31 minahito Exp $
+ */
-$xoopsOption['pagetype'] = 'notification';
-include 'mainfile.php';
+require_once "mainfile.php";
+require_once XOOPS_ROOT_PATH . "/header.php";
-if (empty($xoopsUser)) {
- redirect_header('index.php', 3, _NOT_NOACCESS);
- exit();
-}
-
-$uid = $xoopsUser->getVar('uid');
-
-$op = 'list';
-
-if (isset($_POST['op'])) {
- $op = trim($_POST['op']);
-} elseif (isset($_GET['op'])) {
- $op = trim($_GET['op']);
-}
-if (isset($_POST['delete'])) {
- $op = 'delete';
-} elseif (isset($_GET['delete'])) {
- $op = 'delete';
-}
-if (isset($_POST['delete_ok'])) {
- $op = 'delete_ok';
-}
-if (isset($_POST['delete_cancel'])) {
- $op = 'cancel';
-}
-
-switch ($op) {
-
-case 'cancel':
-
- // FIXME: does this always go back to correct location??
- redirect_header ('index.php');
- break;
-
-case 'list':
-
-// Do we allow other users to see our notifications? Nope, but maybe
-// see who else is monitoring a particular item (or at least how many)?
-// Well, maybe admin can see all...
-
-// TODO: need to span over multiple pages...???
-
- // Get an array of all notifications for the selected user
-
- $criteria = new Criteria ('not_uid', $uid);
- $criteria->setSort ('not_modid,not_category,not_itemid');
- $notification_handler =& xoops_gethandler('notification');
- $notifications =& $notification_handler->getObjects($criteria);
-
- // Generate the info for the template
-
- $module_handler =& xoops_gethandler('module');
- include_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
-
- $modules = array();
- $prev_modid = -1;
- $prev_category = -1;
- $prev_item = -1;
- foreach ($notifications as $n) {
- $modid = $n->getVar('not_modid');
- if ($modid != $prev_modid) {
- $prev_modid = $modid;
- $prev_category = -1;
- $prev_item = -1;
- $module =& $module_handler->get($modid);
- $modules[$modid] = array ('id'=>$modid, 'name'=>$module->getVar('name'), 'categories'=>array());
- // TODO: note, we could auto-generate the url from the id
- // and category info... (except when category has multiple
- // subscription scripts defined...)
- // OR, add one more option to xoops_version 'view_from'
- // which tells us where to redirect... BUT, e.g. forums, it
- // still wouldn't give us all the required info... e.g. the
- // topic ID doesn't give us the ID of the forum which is
- // a required argument...
-
- // Get the lookup function, if exists
- $not_config = $module->getInfo('notification');
- $lookup_func = '';
- if (!empty($not_config['lookup_file'])) {
- $lookup_file = XOOPS_ROOT_PATH . '/modules/' . $module->getVar('dirname') . '/' . $not_config['lookup_file'];
- if (file_exists($lookup_file)) {
- include_once $lookup_file;
- if (!empty($not_config['lookup_func']) && function_exists($not_config['lookup_func'])) {
- $lookup_func = $not_config['lookup_func'];
- }
- }
- }
- }
- $category = $n->getVar('not_category');
- if ($category != $prev_category) {
- $prev_category = $category;
- $prev_item = -1;
- $category_info =& notificationCategoryInfo($category, $modid);
- $modules[$modid]['categories'][$category] = array ('name'=>$category, 'title'=>$category_info['title'], 'items'=>array());
- }
- $item = $n->getVar('not_itemid');
- if ($item != $prev_item) {
- $prev_item = $item;
- if (!empty($lookup_func)) {
- $item_info = $lookup_func($category, $item);
- } else {
- $item_info = array ('name'=>'['._NOT_NAMENOTAVAILABLE.']', 'url'=>'');
- }
- $modules[$modid]['categories'][$category]['items'][$item] = array ('id'=>$item, 'name'=>$item_info['name'], 'url'=>$item_info['url'], 'notifications'=>array());
- }
- $event_info =& notificationEventInfo($category, $n->getVar('not_event'), $n->getVar('not_modid'));
- $modules[$modid]['categories'][$category]['items'][$item]['notifications'][] = array ('id'=>$n->getVar('not_id'), 'module_id'=>$n->getVar('not_modid'), 'category'=>$n->getVar('not_category'), 'category_title'=>$category_info['title'], 'item_id'=>$n->getVar('not_itemid'), 'event'=>$n->getVar('not_event'), 'event_title'=>$event_info['title'], 'user_id'=>$n->getVar('not_uid'));
- }
- $xoopsOption['template_main'] = 'system_notification_list.html';
- include XOOPS_ROOT_PATH.'/header.php';
- $xoopsTpl->assign ('modules', $modules);
- $user_info = array ('uid' => $xoopsUser->getVar('uid'));
- $xoopsTpl->assign ('user', $user_info);
- $xoopsTpl->assign ('lang_cancel', _CANCEL);
- $xoopsTpl->assign ('lang_clear', _NOT_CLEAR);
- $xoopsTpl->assign ('lang_delete', _DELETE);
- $xoopsTpl->assign ('lang_checkall', _NOT_CHECKALL);
- $xoopsTpl->assign ('lang_module', _NOT_MODULE);
- $xoopsTpl->assign ('lang_event', _NOT_EVENT);
- $xoopsTpl->assign ('lang_events', _NOT_EVENTS);
- $xoopsTpl->assign ('lang_category', _NOT_CATEGORY);
- $xoopsTpl->assign ('lang_itemid', _NOT_ITEMID);
- $xoopsTpl->assign ('lang_itemname', _NOT_ITEMNAME);
- $xoopsTpl->assign ('lang_activenotifications', _NOT_ACTIVENOTIFICATIONS);
- include XOOPS_ROOT_PATH.'/footer.php';
-
-// TODO: another display mode... instead of one notification per line,
-// show one line per item_id, with checkboxes for the available options...
-// and an update button to change them... And still have the delete box
-// to delete all notification for that item
-
-// How about one line per ID, showing category, name, id, and list of
-// events...
-
-// TODO: it would also be useful to provide links to other available
-// options so we can say switch from new_message to 'bookmark' if we
-// are receiving too many emails. OR, if we click on 'change options'
-// we get a form for that page...
-
-// TODO: option to specify one-time??? or other modes??
-
- break;
-
-case 'delete':
- if (empty($_POST['del_not'])||!is_array($_POST['del_not'])) {
- redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
- }
- $del_notifications = array();
- foreach($_POST['del_not'] as $not_modid => $not_ids) {
- if (!is_array($not_ids)) {
- redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
- }
- foreach ($not_ids as $not_id) {
- $del_notifications[] = intval($not_modid).'|'.intval($not_id);
- }
- }
- $del_not = implode(',', $del_notifications);
- include XOOPS_ROOT_PATH.'/header.php';
- $hidden_vars = array('delete_ok'=>1, 'del_not'=>$del_not);
- print ''._NOT_DELETINGNOTIFICATIONS.'
';
- xoops_confirm($hidden_vars, xoops_getenv('PHP_SELF'), _NOT_RUSUREDEL);
- include XOOPS_ROOT_PATH.'/footer.php';
- break;
-
-case 'delete_ok':
- if(!xoops_confirm_validate()) {
- redirect_header('notifications.php',2,'Ticket Error');
- }
- if (empty($_POST['del_not'])) {
- redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
- }
- $del_notifications = explode(',', $_POST['del_not']);
- if (!is_array($del_notifications) || count($del_notifications)==0) {
- redirect_header('notifications.php', 2, _NOT_NOTHINGTODELETE);
- }
- $notification_handler =& xoops_gethandler('notification');
- foreach ($del_notifications as $del_notification) {
- $del_notification_items = explode('|',$del_notification);
- if (is_array($del_notification_items) && (count($del_notification_items)==2) && !empty($del_notification_items[0]) && !empty($del_notification_items[1])) {
- $notification =& $notification_handler->get(intval($del_notification_items[1]));
- if (!empty($notification) && ($notification->getVar('not_uid') == $uid) && ($notification->getVar('not_modid') == intval($del_notification_items[0]))) {
- $notification_handler->delete($notification);
- }
- }
- }
- redirect_header('notifications.php', 2, _NOT_DELETESUCCESS);
- break;
-default:
- break;
-}
+XCube_DelegateUtils::call('Legacypage.Notifications.Access');
?>
From minahito @ users.sourceforge.jp Wed Jul 26 19:50:06 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:50:06 +0900
Subject: [xoops-cvslog 3672] CVS update: xoops2jp/html/class
Message-ID: <20060726105006.2EB222AC0D8@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_ActionForm.class.php
diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.35 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.36
--- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.35 Wed Jun 7 17:59:03 2006
+++ xoops2jp/html/class/XCube_ActionForm.class.php Wed Jul 26 19:50:06 2006
@@ -1,4 +1,8 @@
Index: xoops2jp/html/include/notification_functions.php
diff -u xoops2jp/html/include/notification_functions.php:1.2.8.2 xoops2jp/html/include/notification_functions.php:1.2.8.3
--- xoops2jp/html/include/notification_functions.php:1.2.8.2 Tue Jan 24 22:08:06 2006
+++ xoops2jp/html/include/notification_functions.php Wed Jul 26 19:51:37 2006
@@ -1,5 +1,5 @@
get($module_id);
}
$not_config =& $module->getInfo('notification');
- if (empty($category_name)) {
+ if ($category_name == null) {
return $not_config['category'];
}
foreach ($not_config['category'] as $category) {
@@ -188,8 +188,10 @@
}
}
}
+
- include_once XOOPS_ROOT_PATH . '/language/' . $xoopsConfig['language'] . '/notification.php';
+ $root =& XCube_Root::getSingleton();
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
// Insert comment info if applicable
@@ -256,7 +258,6 @@
}
}
-
return $event_array;
}
@@ -277,9 +278,9 @@
{
$config_handler =& xoops_gethandler('config');
$mod_config = $config_handler->getConfigsByCat(0,$module->getVar('mid'));
-
+
$option_name = notificationGenerateConfig ($category, $event, 'option_name');
- if (is_array($option_name) && in_array($option_name, $mod_config['notification_events'])) {
+ if (is_array($mod_config['notification_events']) && in_array($option_name, $mod_config['notification_events'])) {
return true;
}
$notification_handler =& xoops_gethandler('notification');
@@ -328,7 +329,6 @@
$sub_categories = array();
foreach ($all_categories as $category) {
-
// Check the script name
$subscribe_from = $category['subscribe_from'];
From minahito @ users.sourceforge.jp Wed Jul 26 19:52:17 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:52:17 +0900
Subject: [xoops-cvslog 3674] CVS update: xoops2jp/html/include
Message-ID: <20060726105217.7A3DC2AC221@users.sourceforge.jp>
Index: xoops2jp/html/include/notification_select.php
diff -u xoops2jp/html/include/notification_select.php:1.2.8.2 xoops2jp/html/include/notification_select.php:1.2.8.3
--- xoops2jp/html/include/notification_select.php:1.2.8.2 Thu Jul 20 17:18:22 2006
+++ xoops2jp/html/include/notification_select.php Wed Jul 26 19:52:17 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('notification');
$categories =& notificationSubscribableCategoryInfo();
$event_count = 0;
@@ -81,6 +81,8 @@
}
}
-if(isset($xoopsTpl)&&is_object($xoopsTpl))
+if(isset($xoopsTpl)&&is_object($xoopsTpl)) {
$xoopsTpl->assign('xoops_notification', $xoops_notification);
+}
+
?>
From minahito @ users.sourceforge.jp Wed Jul 26 19:52:46 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:52:46 +0900
Subject: [xoops-cvslog 3675] CVS update: xoops2jp/html/modules/base
Message-ID: <20060726105246.9B6452AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/xoops_version.php
diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.24 xoops2jp/html/modules/base/xoops_version.php:1.1.2.25
--- xoops2jp/html/modules/base/xoops_version.php:1.1.2.24 Tue May 30 13:08:55 2006
+++ xoops2jp/html/modules/base/xoops_version.php Wed Jul 26 19:52:46 2006
@@ -1,5 +1,5 @@
Index: xoops2jp/html/modules/base/actions/NotifyCancelAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/NotifyCancelAction.class.php:1.1.2.1
--- /dev/null Wed Jul 26 19:53:00 2006
+++ xoops2jp/html/modules/base/actions/NotifyCancelAction.class.php Wed Jul 26 19:53:00 2006
@@ -0,0 +1,22 @@
+executeForward(XOOPS_URL);
+ }
+
+ function execute(&$contoller, &$xoopsUser)
+ {
+ $contoller->executeForward(XOOPS_URL);
+ }
+}
+
+?>
Index: xoops2jp/html/modules/base/actions/NotifyDeleteAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/NotifyDeleteAction.class.php:1.1.2.1
--- /dev/null Wed Jul 26 19:53:00 2006
+++ xoops2jp/html/modules/base/actions/NotifyDeleteAction.class.php Wed Jul 26 19:53:00 2006
@@ -0,0 +1,87 @@
+mRoot->mLanguageManager->loadPageTypeMessageCatalog('notification');
+ $controller->mRoot->mLanguageManager->loadModuleMessageCatalog('base');
+
+ $this->mActionForm =& new Legacy_NotifyDeleteForm();
+ $this->mActionForm->prepare();
+ }
+
+ function hasPerm(&$controller, &$xoopsUser)
+ {
+ return is_object($xoopsUser);
+ }
+
+ /**
+ * This member function is a special case. Because the confirm is must, it
+ * uses token error for displaying confirm.
+ */
+ function execute(&$contoller, &$xoopsUser)
+ {
+ $this->mActionForm->fetch();
+ $this->mActionForm->validate();
+
+ //
+ // If input values are error, the action form returns fatal error flag.
+ // If it's not fatal, display confirm form.
+ //
+ if ($this->mActionForm->hasError()) {
+ return $this->mActionForm->mFatalError ? LEGACY_FRAME_VIEW_ERROR : LEGACY_FRAME_VIEW_INPUT;
+ }
+
+ //
+ // Execute deleting.
+ //
+ $successFlag = true;
+ $handler =& xoops_gethandler('notification');
+ foreach ($this->mActionForm->mNotifiyIds as $t_idArr) {
+ $t_notify =& $handler->get($t_idArr['id']);
+ if (is_object($t_notify) && $t_notify->get('not_uid') == $xoopsUser->get('uid') && $t_notify->get('not_modid') == $t_idArr['modid']) {
+ $successFlag = $successFlag & $handler->delete($t_notify);
+ }
+ }
+
+ return $successFlag ? LEGACY_FRAME_VIEW_SUCCESS : LEGACY_FRAME_VIEW_ERROR;
+ }
+
+ function executeViewInput(&$controller, &$xoopsUser, &$render)
+ {
+ $render->setTemplateName("legacy_notification_delete.html");
+ $render->setAttribute('actionForm', $this->mActionForm);
+ }
+
+ function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeForward(XOOPS_URL . "/notifications.php");
+ }
+
+ function executeViewError(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeRedirect(XOOPS_URL . "/notifications.php", 2, _NOT_NOTHINGTODELETE);
+ }
+}
+
+?>
Index: xoops2jp/html/modules/base/actions/NotifyListAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/NotifyListAction.class.php:1.1.2.1
--- /dev/null Wed Jul 26 19:53:00 2006
+++ xoops2jp/html/modules/base/actions/NotifyListAction.class.php Wed Jul 26 19:53:00 2006
@@ -0,0 +1,147 @@
+mRoot;
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
+
+ $this->mActionForm =& new Legacy_NotifyDeleteForm();
+ $this->mActionForm->prepare();
+ }
+
+ function hasPerm(&$controller, &$xoopsUser)
+ {
+ return is_object($xoopsUser);
+ }
+
+ function getDefaultView(&$contoller, &$xoopsUser)
+ {
+ $criteria =& new Criteria('not_uid', $xoopsUser->get('uid'));
+ $criteria->setSort('not_modid, not_category, not_itemid');
+
+ $handler =& xoops_gethandler('notification');
+ $notificationArr =& $handler->getObjects($criteria);
+
+ $moduleHandler =& xoops_gethandler('module');
+
+ $prev_modid = -1;
+ $prev_category = -1;
+ $prev_item = -1;
+ foreach ($notificationArr as $notify) {
+ $t_modid = $notify->get('not_modid');
+ if ($t_modid != $prev_modid) {
+ $prev_modid = $t_modid;
+ $prev_category = -1;
+ $prev_item = -1;
+
+ $module =& $moduleHandler->get($t_modid);
+ $this->mModules[$t_modid] = array (
+ 'id' => $t_modid,
+ 'name' => $module->getShow('name'),
+ 'categories' => array()
+ );
+
+
+ //
+ // [ToDo] (Original)
+ // note, we could auto-generate the url from the id
+ // and category info... (except when category has multiple
+ // subscription scripts defined...)
+ // OR, add one more option to xoops_version 'view_from'
+ // which tells us where to redirect... BUT, e.g. forums, it
+ // still wouldn't give us all the required info... e.g. the
+ // topic ID doesn't give us the ID of the forum which is
+ // a required argument...
+
+ //
+ // Get the lookup function, if exists
+ //
+ $notifyConfig = $module->getInfo('notification');
+ $lookupFunc = '';
+ if (!empty($notifyConfig['lookup_file'])) {
+ $t_filepath = XOOPS_ROOT_PATH . '/modules/' . $module->get('dirname') . '/' . $notifyConfig['lookup_file'];
+ if (file_exists($t_filepath)) {
+ require_once $t_filepath;
+ if (!empty($notifyConfig['lookup_func']) && function_exists($notifyConfig['lookup_func'])) {
+ $lookupFunc = $notifyConfig['lookup_func'];
+ }
+ }
+ }
+ }
+
+ $t_category = $notify->get('not_category');
+ if ($t_category != $prev_category) {
+ $prev_category = $t_category;
+ $prev_item = -1;
+ $categoryInfo =& notificationCategoryInfo($t_category, $t_modid);
+ }
+
+ $t_item = $notify->get('not_itemid');
+ if ($t_item != $prev_item) {
+ $prev_item = $t_item;
+ if (!empty($lookupFunc)) {
+ $itemInfo = $lookupFunc($t_category, $t_item);
+ }
+ else {
+ $itemInfo = array ('name' => '[' . _NOT_NAMENOTAVAILABLE . ']', 'url' => '');
+ }
+ $this->mModules[$t_modid]['categories'][$t_category]['items'][$t_item] = array(
+ 'id' => $t_item,
+ 'name' => $itemInfo['name'],
+ 'url' => $itemInfo['url'],
+ 'notifications' => array()
+ );
+ }
+
+ $eventInfo =& notificationEventInfo($t_category, $notify->get('not_event'), $notify->get('not_modid'));
+ $this->mModules[$t_modid]['categories'][$t_category]['items'][$t_item]['notifications'][] = array(
+ 'id' => $notify->get('not_id'),
+ 'module_id' => $notify->get('not_modid'),
+ 'category' => $notify->get('not_category'),
+ 'category_title' => $categoryInfo['title'],
+ 'item_id' => $notify->get('not_itemid'),
+ 'event' => $notify->get('not_event'),
+ 'event_title' => $eventInfo['title'],
+ 'user_id' => $notify->get('not_uid')
+ );
+ }
+
+ return LEGACY_FRAME_VIEW_INDEX;
+ }
+
+ function executeViewIndex(&$controller, &$xoopsUser, &$render)
+ {
+ $render->setTemplateName("legacy_notification_list.html");
+
+ $render->setAttribute('modules', $this->mModules);
+ $render->setAttribute('currentUser', $xoopsUser);
+ $render->setAttribute('actionForm', $this->mActionForm);
+ }
+
+ function executeViewError(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeForward("./index.php?Action=ImageList");
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Wed Jul 26 19:53:34 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:53:34 +0900
Subject: [xoops-cvslog 3677] CVS update: xoops2jp/html/modules/base/admin/class
Message-ID: <20060726105334.F3C252AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php
diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.19 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.20
--- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.19 Tue Jul 25 19:15:56 2006
+++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Wed Jul 26 19:53:34 2006
@@ -444,7 +444,7 @@
continue;
}
$t_optionName = $t_category['title'] . ' : ' . $t_event['title'];
- $t_options[$t_optionName] = $category['name'] . '-' . $t_event['name'];
+ $t_options[$t_optionName] = $t_category['name'] . '-' . $t_event['name'];
}
$configInfos[] = array(
@@ -488,7 +488,10 @@
}
}
- if (!$configHandler->insertConfig($config)) {
+ if ($configHandler->insertConfig($config)) {
+ $log->addReport(XCube_Utils::formatMessage(_AD_BASE_MESSAGE_INSERT_CONFIG, $configInfo['name']));
+ }
+ else {
$log->addError(XCube_Utils::formatMessage(_AD_BASE_ERROR_COULD_NOT_INSERT_CONFIG, $configInfo['name']));
}
From minahito @ users.sourceforge.jp Wed Jul 26 19:54:02 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:54:02 +0900
Subject: [xoops-cvslog 3678] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060726105402.C8B012AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.7 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.8
--- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.7 Fri Jun 23 10:28:54 2006
+++ xoops2jp/html/modules/base/class/ActionFrame.class.php Wed Jul 26 19:54:02 2006
@@ -14,12 +14,27 @@
define ("LEGACY_FRAME_VIEW_INDEX", 4);
define ("LEGACY_FRAME_VIEW_INPUT", 5);
+//
+// Constatns for the mode of the frame.
+//
+define ("LEGACY_FRAME_MODE_MISC", "Misc");
+define ("LEGACY_FRAME_MODE_NOTIFY", "Notify");
+define ("LEGACY_FRAME_MODE_IMAGE", "Image");
+
class Legacy_ActionFrame extends XCube_ActionStrategy
{
var $mActionName = null;
var $mAction = null;
var $mAdminFlag = null;
+ /**
+ * Mode. The rule refers this property to load a file and create an
+ * instance in execute().
+ *
+ * @var string
+ */
+ var $mMode = null;
+
function Legacy_ActionFrame($admin)
{
$this->mAdminFlag = $admin;
@@ -29,12 +44,27 @@
{
$this->mActionName = $name;
}
+
+ /**
+ * Set mode.
+ *
+ * @param string $mode Use constants (LEGACY_FRAME_MODE_MISC and more...)
+ */
+ function setMode($mode)
+ {
+ $this->mMode = $mode;
+ }
function execute(&$controller)
{
if (!preg_match("/^\w+$/", $this->mActionName)) {
die();
}
+
+ //
+ // Add mode.
+ //
+ $this->mActionName = $this->mMode . $this->mActionName;
//
// Create action object by mActionName
From minahito @ users.sourceforge.jp Wed Jul 26 19:54:13 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:54:13 +0900
Subject: [xoops-cvslog 3679] CVS update: xoops2jp/html/modules/base/forms
Message-ID: <20060726105413.E1F892AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/forms/NotifyDeleteForm.class.php
diff -u /dev/null xoops2jp/html/modules/base/forms/NotifyDeleteForm.class.php:1.1.2.1
--- /dev/null Wed Jul 26 19:54:13 2006
+++ xoops2jp/html/modules/base/forms/NotifyDeleteForm.class.php Wed Jul 26 19:54:13 2006
@@ -0,0 +1,43 @@
+addErrorMessage(_MD_BASE_LANG_ERROR);
+ $this->mFatalError = true;
+ return;
+ }
+
+ foreach ($t_arr as $t_modid => $t_idArr) {
+ if (!is_array($t_idArr)) {
+ $this->addErrorMessage(_MD_BASE_LANG_ERROR);
+ $this->mFatalError = true;
+ return;
+ }
+ foreach ($t_idArr as $t_id) {
+ $this->mNotifiyIds[] = array('modid' => intval($t_modid), 'id' => intval($t_id));
+ }
+ }
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Wed Jul 26 19:54:43 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:54:43 +0900
Subject: [xoops-cvslog 3680] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060726105443.BF18C2AC175@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.51 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.52
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.51 Thu Jul 20 17:11:48 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Wed Jul 26 19:54:43 2006
@@ -673,6 +673,7 @@
$renderTarget=&$this->mRenderSystem->getRenderTarget();
+ // require_once XOOPS_ROOT_PATH . '/include/notification_select.php';
// Wmm...
if($renderTarget->getTemplateName()==null) {
@@ -754,6 +755,16 @@
return $manager;
}
+ function &_createDelegateManager()
+ {
+ $manager =& parent::_createDelegateManager();
+
+ $manager->add('Legacypage.Notifications.Access', 'Legacy_NotificationFunctions::notifications', XOOPS_ROOT_PATH . "/modules/base/kernel/NotificationFunctions.class.php");
+ $manager->add('Legacyfunction.Notificatins.Select', 'Legacy_NotificationFunctions::notifications_select', XOOPS_ROOT_PATH . "/modules/base/kernel/NotificationFunctions.class.php");
+
+ return $manager;
+ }
+
function &_createServiceManager()
{
$manager =& parent::_createServiceManager();
From minahito @ users.sourceforge.jp Wed Jul 26 19:55:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:55:07 +0900
Subject: [xoops-cvslog 3681] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060726105507.5CC382AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php
diff -u /dev/null xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php:1.1.2.1
--- /dev/null Wed Jul 26 19:55:07 2006
+++ xoops2jp/html/modules/base/kernel/NotificationFunctions.class.php Wed Jul 26 19:55:07 2006
@@ -0,0 +1,107 @@
+setMode(LEGACY_FRAME_MODE_NOTIFY);
+ $moduleRunner->setActionName($actionName);
+
+ $root->mController->setActionStrategy($moduleRunner);
+
+ $root->mController->executeAction();
+
+ $root->mController->executeView();
+ }
+
+ /**
+ * This functions is add to 'Legacyfunction.Notificatins.Select'.
+ *
+ * @param XCube_RenderBuffer $render
+ */
+ function notifications_select(&$render)
+ {
+ require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ require_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+ $root =& XCube_Root::getSingleton();
+ $xoopsModule =& $root->mController->mModuleController->mModuleObject;
+ $moduleConfig =& $root->mController->mModuleController->mConfig;
+ $xoopsUser =& $root->mController->getXoopsUser();
+
+ $xoops_notification = array();
+ $xoops_notification['show'] = is_object($xoopsModule) && is_object($xoopsUser) && notificationEnabled('inline') ? 1 : 0;
+
+ if ($xoops_notification['show']) {
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
+ $categories =& notificationSubscribableCategoryInfo();
+ $event_count = 0;
+ if (!empty($categories)) {
+ $notification_handler =& xoops_gethandler('notification');
+ foreach ($categories as $category) {
+ $section['name'] = $category['name'];
+ $section['title'] = $category['title'];
+ $section['description'] = $category['description'];
+ $section['itemid'] = $category['item_id'];
+ $section['events'] = array();
+ $subscribed_events =& $notification_handler->getSubscribedEvents($category['name'], $category['item_id'], $xoopsModule->get('mid'), $xoopsUser->get('uid'));
+ foreach (notificationEvents($category['name'], true) as $event) {
+ if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ continue;
+ }
+ if (!empty($event['invisible'])) {
+ continue;
+ }
+ $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0;
+ $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed);
+ $event_count ++;
+ }
+ $xoops_notification['categories'][$category['name']] = $section;
+ }
+ $xoops_notification['target_page'] = "notification_update.php";
+ $xoops_notification['redirect_script'] = xoops_getenv('PHP_SELF');
+ $render->setAttribute('editprofile_url', XOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getShow('uid'));
+ switch ($xoopsUser->getVar('notify_method')) {
+ case XOOPS_NOTIFICATION_METHOD_DISABLE:
+ $render->setAttribute('user_method', _NOT_DISABLE);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_PM:
+ $render->setAttribute('user_method', _NOT_PM);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_EMAIL:
+ $render->setAttribute('user_method', _NOT_EMAIL);
+ break;
+ }
+ } else {
+ $xoops_notification['show'] = 0;
+ }
+ if ($event_count == 0) {
+ $xoops_notification['show'] = 0;
+ }
+ }
+
+ $render->setAttribute('xoops_notification', $xoops_notification);
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Wed Jul 26 19:55:26 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:55:26 +0900
Subject: [xoops-cvslog 3682] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060726105526.E25452AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/japanese/admin.php
diff -u xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.40 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.41
--- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.40 Sat Jul 1 16:26:24 2006
+++ xoops2jp/html/modules/base/language/japanese/admin.php Wed Jul 26 19:55:26 2006
@@ -156,6 +156,7 @@
define('_AD_BASE_MESSAGE_DATABASE_SETUP_FINISHED', "データベーステーブルのセットアップを終了しました");
define('_AD_BASE_MESSAGE_DELETE_MODULEINFO_FROM_DB', "モジュール情報をデータベースから削除しました");
define('_AD_BASE_MESSAGE_DROP_TABLE', "テーブル {0} をドロップしました");
+define('_AD_BASE_MESSAGE_INSERT_CONFIG', "コンフィグ {0} を追加しました");
define('_AD_BASE_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL', "{0} モジュールのインストールに成功しました");
define('_AD_BASE_MESSAGE_TEMPLATE_INSTALLED', "テンプレート {0} をインストールしました");
define('_AD_BASE_MESSAGE_UNINSTALLATION_MODULE_SUCCESSFUL', "{0} モジュールのアンインストールに成功しました");
Index: xoops2jp/html/modules/base/language/japanese/main.php
diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.17 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.18
--- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.17 Wed Jul 19 19:19:42 2006
+++ xoops2jp/html/modules/base/language/japanese/main.php Wed Jul 26 19:55:26 2006
@@ -41,6 +41,7 @@
define('_MD_BASE_LANG_DOXCODE', "XOOPSコードを有効にする ");
define('_MD_BASE_LANG_EDIT_FUNC', "edit func");
define('_MD_BASE_LANG_EMOTION', "emotion");
+define('_MD_BASE_LANG_ERROR', "error");
define('_MD_BASE_LANG_FUNC_FILE', "func file");
define('_MD_BASE_LANG_FUNC_NUM', "func num");
define('_MD_BASE_LANG_ID', "ID");
From minahito @ users.sourceforge.jp Wed Jul 26 19:55:27 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:55:27 +0900
Subject: [xoops-cvslog 3683] CVS update:
xoops2jp/html/modules/base/language/english
Message-ID: <20060726105527.15AFF2AC0D8@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/english/main.php
diff -u xoops2jp/html/modules/base/language/english/main.php:1.1.2.16 xoops2jp/html/modules/base/language/english/main.php:1.1.2.17
--- xoops2jp/html/modules/base/language/english/main.php:1.1.2.16 Wed Jul 19 19:19:46 2006
+++ xoops2jp/html/modules/base/language/english/main.php Wed Jul 26 19:55:26 2006
@@ -41,6 +41,7 @@
define('_MD_BASE_LANG_DOXCODE', "enable XOOPS code");
define('_MD_BASE_LANG_EDIT_FUNC', "edit func");
define('_MD_BASE_LANG_EMOTION', "emotion");
+define('_MD_BASE_LANG_ERROR', "error");
define('_MD_BASE_LANG_FUNC_FILE', "func file");
define('_MD_BASE_LANG_FUNC_NUM', "func num");
define('_MD_BASE_LANG_ID', "ID");
Index: xoops2jp/html/modules/base/language/english/admin.php
diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.33 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.34
--- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.33 Sat Jul 1 16:26:24 2006
+++ xoops2jp/html/modules/base/language/english/admin.php Wed Jul 26 19:55:26 2006
@@ -156,6 +156,7 @@
define('_AD_BASE_MESSAGE_DATABASE_SETUP_FINISHED', "Database table setup finished.");
define('_AD_BASE_MESSAGE_DELETE_MODULEINFO_FROM_DB', "Delete module information from XOOPS database.");
define('_AD_BASE_MESSAGE_DROP_TABLE', "Drop table {0}");
+define('_AD_BASE_MESSAGE_INSERT_CONFIG', "Config {0} added.");
define('_AD_BASE_MESSAGE_INSTALLATION_MODULE_SUCCESSFUL', "Installation of '{1}' module has been successful");
define('_AD_BASE_MESSAGE_TEMPLATE_INSTALLED', "Template '{1}' has been installed.");
define('_AD_BASE_MESSAGE_UNINSTALLATION_MODULE_SUCCESSFUL', "Uninstallation of '{1}' module has been successful");
From minahito @ users.sourceforge.jp Wed Jul 26 19:55:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:55:37 +0900
Subject: [xoops-cvslog 3684] CVS update: xoops2jp/html/modules/base/templates
Message-ID: <20060726105537.6B55C2AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/templates/legacy_notification_select.html
diff -u xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.2
--- xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.1 Sun Apr 9 10:24:04 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_select.html Wed Jul 26 19:55:37 2006
@@ -1,3 +1,5 @@
+<{legacy_notifications_select}>
+
<{if $xoops_notification.show}>
<{$lang_activenotifications}>
Index: xoops2jp/html/modules/base/templates/legacy_notification_list.html
diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_notification_list.html:1.1.2.1
--- /dev/null Wed Jul 26 19:55:37 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_list.html Wed Jul 26 19:55:37 2006
@@ -0,0 +1,40 @@
+<{$smarty.const._NOT_ACTIVENOTIFICATIONS}>
+
+ <{xoops_token form=$actionForm}>
+
+
Index: xoops2jp/html/modules/base/templates/legacy_notification_select_form.html
diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_notification_select_form.html:1.1.2.1
--- /dev/null Wed Jul 26 19:55:37 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_select_form.html Wed Jul 26 19:55:37 2006
@@ -0,0 +1,35 @@
+<{if $xoops_notification.show}>
+
+<{$smarty.const._NOT_ACTIVENOTIFICATIONS}>
+
+
+
+
+<{/if}>
\ No newline at end of file
Index: xoops2jp/html/modules/base/templates/legacy_notification_delete.html
diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_notification_delete.html:1.1.2.1
--- /dev/null Wed Jul 26 19:55:37 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_delete.html Wed Jul 26 19:55:37 2006
@@ -0,0 +1,9 @@
+<{$smarty.const._NOT_DELETINGNOTIFICATIONS}>
+
+ <{xoops_token form=$actionForm}>
+ <{xoops_input type=hidden name=delete value=1}>
+ <{foreach item=ids from=$actionForm->mNotifiyIds}>
+
+ <{/foreach}>
+
+
From minahito @ users.sourceforge.jp Wed Jul 26 19:56:35 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 19:56:35 +0900
Subject: [xoops-cvslog 3685] CVS update:
xoops2jp/html/modules/legacyRender/kernel
Message-ID: <20060726105635.625302AC0D8@users.sourceforge.jp>
Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php
diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.18 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.19
--- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.18 Tue Jul 11 11:58:47 2006
+++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php Wed Jul 26 19:56:35 2006
@@ -1,6 +1,6 @@
mXoopsTpl =& new XoopsTpl();
-
+ $this->mXoopsTpl->register_function("legacy_notifications_select", "LegacyRender_smartyfunction_notifications_select");
+
// compatible
$GLOBALS['xoopsTpl'] =& $this->mXoopsTpl;
@@ -393,4 +394,19 @@
}
}
+function LegacyRender_smartyfunction_notifications_select($params, &$smarty)
+{
+ $renderTarget =& new XCube_RenderTarget();
+ $renderTarget->setType(XCUBE_RENDER_TARGET_TYPE_MAIN);
+ $renderTarget->setTemplateName("legacy_notification_select_form.html");
+
+ XCube_DelegateUtils::call('Legacyfunction.Notificatins.Select', new XCube_Ref($renderTarget));
+
+ $root =& XCube_Root::getSingleton();
+ $renderSystem =& $root->getRenderSystem('Legacy_RenderSystem');
+ $renderSystem->renderWithTarget($renderTarget);
+
+ return $renderTarget->getResult();
+}
+
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Wed Jul 26 20:04:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Wed, 26 Jul 2006 20:04:37 +0900
Subject: [xoops-cvslog 3686] CVS update: xoops2jp/html/modules/base/templates
Message-ID: <20060726110437.E894C2AC02E@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/templates/legacy_notification_select.html
diff -u xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.2 xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.3
--- xoops2jp/html/modules/base/templates/legacy_notification_select.html:1.1.2.2 Wed Jul 26 19:55:37 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_select.html Wed Jul 26 20:04:37 2006
@@ -1,37 +1 @@
<{legacy_notifications_select}>
-
-<{if $xoops_notification.show}>
-
-<{$lang_activenotifications}>
-
-
-
-
-<{/if}>
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 08:49:42 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 08:49:42 +0900
Subject: [xoops-cvslog 3687] CVS update: xoops2jp/extras
Message-ID: <20060726234942.7B92C2AC317@users.sourceforge.jp>
Index: xoops2jp/extras/login.php
diff -u xoops2jp/extras/login.php:1.4 xoops2jp/extras/login.php:1.4.2.1
--- xoops2jp/extras/login.php:1.4 Mon May 1 11:37:24 2006
+++ xoops2jp/extras/login.php Thu Jul 27 08:49:42 2006
@@ -62,6 +62,8 @@
$user->setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
+ require_once XOOPS_ROOT_PATH . '/include/session.php';
+ xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
From onokazu @ users.sourceforge.jp Thu Jul 27 08:49:42 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 08:49:42 +0900
Subject: [xoops-cvslog 3688] CVS update: xoops2jp/html/include
Message-ID: <20060726234942.AB6E72AC324@users.sourceforge.jp>
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.5 xoops2jp/html/include/checklogin.php:1.5.2.1
--- xoops2jp/html/include/checklogin.php:1.5 Mon May 1 11:37:26 2006
+++ xoops2jp/html/include/checklogin.php Thu Jul 27 08:49:42 2006
@@ -1,5 +1,5 @@
setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
+ require_once XOOPS_ROOT_PATH . '/include/session.php';
+ xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
Index: xoops2jp/html/include/session.php
diff -u /dev/null xoops2jp/html/include/session.php:1.1.2.1
--- /dev/null Thu Jul 27 08:49:42 2006
+++ xoops2jp/html/include/session.php Thu Jul 27 08:49:42 2006
@@ -0,0 +1,36 @@
+
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 08:52:33 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 08:52:33 +0900
Subject: [xoops-cvslog 3689] CVS update: xoops2jp/html/install/class
Message-ID: <20060726235233.F31552AC317@users.sourceforge.jp>
Index: xoops2jp/html/install/class/settingmanager.php
diff -u xoops2jp/html/install/class/settingmanager.php:1.2 xoops2jp/html/install/class/settingmanager.php:1.2.18.1
--- xoops2jp/html/install/class/settingmanager.php:1.2 Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/settingmanager.php Thu Jul 27 08:52:33 2006
@@ -29,7 +29,7 @@
* setting manager for XOOPS installer
*
* @author Haruki Setoyama
-* @version $Id: settingmanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $
+* @version $Id: settingmanager.php,v 1.2.18.1 2006/07/26 23:52:33 onokazu Exp $
* @access public
**/
class setting_manager {
@@ -72,7 +72,8 @@
if ( substr($filepath, -1) == "/" ) {
$filepath = substr($filepath, 0, -1);
}
- $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
+ $protocol =
+(!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://';
$this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
}
}
@@ -268,7 +269,7 @@
function getDBList()
{
- return array('mysql');
+ return array('mysql');
//$dirname = '../class/database/';
//$dirlist = array();
//if (is_dir($dirname) && $handle = opendir($dirname)) {
From onokazu @ users.sourceforge.jp Thu Jul 27 08:53:13 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 08:53:13 +0900
Subject: [xoops-cvslog 3690] CVS update: xoops2jp/html/include
Message-ID: <20060726235313.190992AC324@users.sourceforge.jp>
Index: xoops2jp/html/include/version.php
diff -u xoops2jp/html/include/version.php:1.13.2.1 xoops2jp/html/include/version.php:1.13.2.2
--- xoops2jp/html/include/version.php:1.13.2.1 Fri Jun 9 09:14:14 2006
+++ xoops2jp/html/include/version.php Thu Jul 27 08:53:12 2006
@@ -1,4 +1,4 @@
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:09:34 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:09:34 +0900
Subject: [xoops-cvslog 3691] CVS update: xoops2jp/extras
Message-ID: <20060727000934.CE7682AC07D@users.sourceforge.jp>
Index: xoops2jp/extras/login.php
diff -u xoops2jp/extras/login.php:1.4.2.1 xoops2jp/extras/login.php:1.4.2.2
--- xoops2jp/extras/login.php:1.4.2.1 Thu Jul 27 08:49:42 2006
+++ xoops2jp/extras/login.php Thu Jul 27 09:09:34 2006
@@ -62,8 +62,6 @@
$user->setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
- require_once XOOPS_ROOT_PATH . '/include/session.php';
- xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
From onokazu @ users.sourceforge.jp Thu Jul 27 09:09:34 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:09:34 +0900
Subject: [xoops-cvslog 3692] CVS update: xoops2jp/html/include
Message-ID: <20060727000935.00FB82AC328@users.sourceforge.jp>
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.5.2.1 xoops2jp/html/include/checklogin.php:1.5.2.2
--- xoops2jp/html/include/checklogin.php:1.5.2.1 Thu Jul 27 08:49:42 2006
+++ xoops2jp/html/include/checklogin.php Thu Jul 27 09:09:34 2006
@@ -1,5 +1,5 @@
setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
- require_once XOOPS_ROOT_PATH . '/include/session.php';
- xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
Index: xoops2jp/html/include/version.php
diff -u xoops2jp/html/include/version.php:1.13.2.2 xoops2jp/html/include/version.php:1.13.2.3
--- xoops2jp/html/include/version.php:1.13.2.2 Thu Jul 27 08:53:12 2006
+++ xoops2jp/html/include/version.php Thu Jul 27 09:09:34 2006
@@ -1,4 +1,4 @@
\ No newline at end of file
Index: xoops2jp/html/include/session.php
diff -u xoops2jp/html/include/session.php:1.1.2.1 xoops2jp/html/include/session.php:removed
--- xoops2jp/html/include/session.php:1.1.2.1 Thu Jul 27 08:49:42 2006
+++ xoops2jp/html/include/session.php Thu Jul 27 09:09:34 2006
@@ -1,36 +0,0 @@
-
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:09:35 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:09:35 +0900
Subject: [xoops-cvslog 3693] CVS update: xoops2jp/html/install/class
Message-ID: <20060727000935.2C9FD2AC07D@users.sourceforge.jp>
Index: xoops2jp/html/install/class/settingmanager.php
diff -u xoops2jp/html/install/class/settingmanager.php:1.2.18.1 xoops2jp/html/install/class/settingmanager.php:1.2.18.2
--- xoops2jp/html/install/class/settingmanager.php:1.2.18.1 Thu Jul 27 08:52:33 2006
+++ xoops2jp/html/install/class/settingmanager.php Thu Jul 27 09:09:35 2006
@@ -29,7 +29,7 @@
* setting manager for XOOPS installer
*
* @author Haruki Setoyama
-* @version $Id: settingmanager.php,v 1.2.18.1 2006/07/26 23:52:33 onokazu Exp $
+* @version $Id: settingmanager.php,v 1.2.18.2 2006/07/27 00:09:35 onokazu Exp $
* @access public
**/
class setting_manager {
@@ -72,8 +72,7 @@
if ( substr($filepath, -1) == "/" ) {
$filepath = substr($filepath, 0, -1);
}
- $protocol =
-(!empty($_SERVER['HTTPS']) && ($_SERVER['HTTPS'] == 'on')) ? 'https://' : 'http://';
+ $protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
}
}
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:17 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:17 +0900
Subject: [xoops-cvslog 3694] CVS update: xoops2jp/docs
Message-ID: <20060727001717.4B4552AC32B@users.sourceforge.jp>
Index: xoops2jp/docs/CHANGES.txt
diff -u xoops2jp/docs/CHANGES.txt:1.12 xoops2jp/docs/CHANGES.txt:1.13
--- xoops2jp/docs/CHANGES.txt:1.12 Mon May 1 11:37:23 2006
+++ xoops2jp/docs/CHANGES.txt Thu Jul 27 09:17:17 2006
@@ -1,6 +1,17 @@
XOOPS v2 Changelog
============================
+2006/ 6/ 9: Version 2.0.15 JP
+===============================
+ - Fixed user message not being sent to PM when over 100 users to send(modules/system/mailusers/mailusers.php)
+ - Fixed port number always being added to the Host HTTP header(class/snoopy.php)
+ - Fixed some reference notice errors
+ - Fixed some typos
+ - Added patch for possible SQL injection attack(class/criteira.php)
+ - Added patch (of 2.0.14a) for local file inclusion vulnerability(header.php, index.php, misc.php)
+ - Added fix for mail encoding problems in PHP4.4.0/4.4.1(language/japanese/xoopsmailerlocal.php)
+
+
2006/ 4/29: Version 2.0.14 JP
===============================
- Fixed installation failure problem with PHP 5.1.x
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:17 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:17 +0900
Subject: [xoops-cvslog 3695] CVS update: xoops2jp/html/class
Message-ID: <20060727001717.774972AC32C@users.sourceforge.jp>
Index: xoops2jp/html/class/criteria.php
diff -u xoops2jp/html/class/criteria.php:1.5 xoops2jp/html/class/criteria.php:1.6
--- xoops2jp/html/class/criteria.php:1.5 Wed Aug 3 21:39:11 2005
+++ xoops2jp/html/class/criteria.php Thu Jul 27 09:17:17 2006
@@ -1,5 +1,5 @@
value;
if (!in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) {
- if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) {
- $value = "'".$value."'";
- }
+ $value = "'".$value."'";
}
$clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column;
if ( !empty($this->function) ) {
Index: xoops2jp/html/class/module.textsanitizer.php
diff -u xoops2jp/html/class/module.textsanitizer.php:1.7 xoops2jp/html/class/module.textsanitizer.php:1.8
--- xoops2jp/html/class/module.textsanitizer.php:1.7 Mon May 1 11:37:24 2006
+++ xoops2jp/html/class/module.textsanitizer.php Thu Jul 27 09:17:17 2006
@@ -1,5 +1,5 @@
nl2Br($text);
}
- $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18)
+ $text = $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18)
return $text;
}
Index: xoops2jp/html/class/snoopy.php
diff -u xoops2jp/html/class/snoopy.php:1.2 xoops2jp/html/class/snoopy.php:1.3
--- xoops2jp/html/class/snoopy.php:1.2 Mon May 1 11:37:24 2006
+++ xoops2jp/html/class/snoopy.php Thu Jul 27 09:17:17 2006
@@ -43,6 +43,7 @@
var $host = "www.php.net"; // host name we are connecting to
var $port = 80; // port we are connecting to
+ var $host_port = ""; // port for Host Header
var $proxy_host = ""; // proxy host to use
var $proxy_port = ""; // proxy port to use
var $proxy_user = ""; // proxy user to use
@@ -144,8 +145,10 @@
{
case "http":
$this->host = $URI_PARTS["host"];
- if(!empty($URI_PARTS["port"]))
+ if(!empty($URI_PARTS["port"])) {
$this->port = $URI_PARTS["port"];
+ $this->host_port = $URI_PARTS["port"];
+ }
if($this->_connect($fp))
{
if($this->_isproxy)
@@ -208,8 +211,10 @@
if (!is_executable($this->curl_path))
return false;
$this->host = $URI_PARTS["host"];
- if(!empty($URI_PARTS["port"]))
+ if(!empty($URI_PARTS["port"])) {
$this->port = $URI_PARTS["port"];
+ $this->host_port = $URI_PARTS["port"];
+ }
if($this->_isproxy)
{
// using proxy, send entire URI
@@ -296,8 +301,10 @@
{
case "http":
$this->host = $URI_PARTS["host"];
- if(!empty($URI_PARTS["port"]))
+ if(!empty($URI_PARTS["port"])) {
$this->port = $URI_PARTS["port"];
+ $this->host_port = $URI_PARTS["port"];
+ }
if($this->_connect($fp))
{
if($this->_isproxy)
@@ -367,8 +374,10 @@
if (!is_executable($this->curl_path))
return false;
$this->host = $URI_PARTS["host"];
- if(!empty($URI_PARTS["port"]))
+ if(!empty($URI_PARTS["port"])) {
$this->port = $URI_PARTS["port"];
+ $this->host_port = $URI_PARTS["port"];
+ }
if($this->_isproxy)
{
// using proxy, send entire URI
@@ -807,8 +816,8 @@
$headers .= "User-Agent: ".$this->agent."\r\n";
if(!empty($this->host) && !isset($this->rawheaders['Host'])) {
$headers .= "Host: ".$this->host;
- if(!empty($this->port))
- $headers .= ":".$this->port;
+ if(!empty($this->host_port))
+ $headers .= ":".$this->host_port;
$headers .= "\r\n";
}
if(!empty($this->accept))
@@ -884,7 +893,9 @@
if(!preg_match("|\:\/\/|",$matches[2]))
{
// no host in the path, so prepend
- $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host;
+ if(!empty($this->host_port))
+ $this->_redirectaddr .= ":".$this->host_port;
// eliminate double slash
if(!preg_match("|^/|",$matches[2]))
$this->_redirectaddr .= "/".$matches[2];
@@ -971,8 +982,8 @@
if(!empty($this->agent))
$headers[] = "User-Agent: ".$this->agent;
if(!empty($this->host))
- if(!empty($this->port))
- $headers[] = "Host: ".$this->host.":".$this->port;
+ if(!empty($this->host_port))
+ $headers[] = "Host: ".$this->host.":".$this->host_port;
else
$headers[] = "Host: ".$this->host;
if(!empty($this->accept))
@@ -1053,7 +1064,9 @@
if(!preg_match("|\:\/\/|",$matches[2]))
{
// no host in the path, so prepend
- $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port;
+ $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host;
+ if(!empty($this->host_port))
+ $this->_redirectaddr .= ":".$this->host_port;
// eliminate double slash
if(!preg_match("|^/|",$matches[2]))
$this->_redirectaddr .= "/".$matches[2];
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:17 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:17 +0900
Subject: [xoops-cvslog 3696] CVS update: xoops2jp/html
Message-ID: <20060727001717.A64ED2AC32B@users.sourceforge.jp>
Index: xoops2jp/html/header.php
diff -u xoops2jp/html/header.php:1.6 xoops2jp/html/header.php:1.7
--- xoops2jp/html/header.php:1.6 Mon May 1 11:37:26 2006
+++ xoops2jp/html/header.php Thu Jul 27 09:17:17 2006
@@ -1,5 +1,5 @@
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.5 xoops2jp/html/include/checklogin.php:1.6
--- xoops2jp/html/include/checklogin.php:1.5 Mon May 1 11:37:26 2006
+++ xoops2jp/html/include/checklogin.php Thu Jul 27 09:17:17 2006
@@ -1,5 +1,5 @@
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:18 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:18 +0900
Subject: [xoops-cvslog 3698] CVS update:
xoops2jp/html/install/language/japanese
Message-ID: <20060727001718.1E7302AC32C@users.sourceforge.jp>
Index: xoops2jp/html/install/language/japanese/finish.php
diff -u xoops2jp/html/install/language/japanese/finish.php:1.2 xoops2jp/html/install/language/japanese/finish.php:1.3
--- xoops2jp/html/install/language/japanese/finish.php:1.2 Mon May 1 11:37:27 2006
+++ xoops2jp/html/install/language/japanese/finish.php Thu Jul 27 09:17:17 2006
@@ -5,7 +5,7 @@
XOOPSの使い方について
[未記述]
サポート
-XOOPSCube.orgXOOPS Cube公式サイト(英語)か、XOOPS Cube日本語公式サイトへとご訪問ください。
+
XOOPSCube.org(英語)か、XOOPSCube.jp(日本語公式サイト)へとご訪問ください。
";
?>
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:17 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:17 +0900
Subject: [xoops-cvslog 3699] CVS update: xoops2jp/html/install/class
Message-ID: <20060727001717.EED4C2AC32B@users.sourceforge.jp>
Index: xoops2jp/html/install/class/settingmanager.php
diff -u xoops2jp/html/install/class/settingmanager.php:1.2 xoops2jp/html/install/class/settingmanager.php:1.3
--- xoops2jp/html/install/class/settingmanager.php:1.2 Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/settingmanager.php Thu Jul 27 09:17:17 2006
@@ -29,7 +29,7 @@
* setting manager for XOOPS installer
*
* @author Haruki Setoyama
-* @version $Id: settingmanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $
+* @version $Id: settingmanager.php,v 1.3 2006/07/27 00:17:17 onokazu Exp $
* @access public
**/
class setting_manager {
@@ -72,7 +72,7 @@
if ( substr($filepath, -1) == "/" ) {
$filepath = substr($filepath, 0, -1);
}
- $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
+ $protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
$this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
}
}
@@ -268,7 +268,7 @@
function getDBList()
{
- return array('mysql');
+ return array('mysql');
//$dirname = '../class/database/';
//$dirlist = array();
//if (is_dir($dirname) && $handle = opendir($dirname)) {
Index: xoops2jp/html/install/class/textsanitizer.php
diff -u xoops2jp/html/install/class/textsanitizer.php:1.2 xoops2jp/html/install/class/textsanitizer.php:1.3
--- xoops2jp/html/install/class/textsanitizer.php:1.2 Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/textsanitizer.php Thu Jul 27 09:17:17 2006
@@ -1,5 +1,5 @@
should not be allowed since nl2br will be used
- * when storing data
- */
- function TextSanitizer()
- {
-
- }
-
- function &getInstance()
- {
- static $instance;
- if (!isset($instance)) {
- $instance = new TextSanitizer();
- }
- return $instance;
- }
-
- function &makeClickable(&$text)
- {
- $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i");
- $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3");
- return preg_replace($patterns, $replacements, $text);
- }
-
- function &nl2Br($text)
- {
- return preg_replace("/(\015\012)|(\015)|(\012)/","
",$text);
- }
-
- function &addSlashes($text, $force=false)
- {
- if ($force) {
- return addslashes($text);
- }
- if (!get_magic_quotes_gpc()) {
- $text =& addslashes($text);
- }
- return $text;
- }
-
- /*
- * if magic_quotes_gpc is on, stirip back slashes
- */
- function &stripSlashesGPC($text)
- {
- if (get_magic_quotes_gpc()) {
- $text =& stripslashes($text);
- }
- return $text;
- }
-
- /*
- * for displaying data in html textbox forms
- */
- function &htmlSpecialChars($text)
- {
- return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES));
- }
-
- function &undoHtmlSpecialChars(&$text)
- {
- return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text);
- }
-
- /*
- * Filters textarea form data in DB for display
- */
- function &displayText($text, $html=false)
- {
- if (! $html) {
- // html not allowed
- $text =& $this->htmlSpecialChars($text);
- }
- $text =& $this->makeClickable($text);
- $text =& $this->nl2Br($text);
- return $text;
- }
-
- /*
- * Filters textarea form data submitted for preview
- */
- function &previewText($text, $html=false)
- {
- $text =& $this->stripSlashesGPC($text);
- return $this->displayText($text, $html);
- }
+ /*
+ * Constructor of this class
+ * Gets allowed html tags from admin config settings
+ *
should not be allowed since nl2br will be used
+ * when storing data
+ */
+ function TextSanitizer()
+ {
+
+ }
+
+ function &getInstance()
+ {
+ static $instance;
+ if (!isset($instance)) {
+ $instance = new TextSanitizer();
+ }
+ return $instance;
+ }
+
+ function &makeClickable(&$text)
+ {
+ $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i");
+ $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3");
+ $ret = preg_replace($patterns, $replacements, $text);
+ return $ret;
+ }
+
+ function &nl2Br($text)
+ {
+ $ret = preg_replace("/(\015\012)|(\015)|(\012)/","
",$text);
+ return $ret;
+ }
+
+ function &addSlashes($text, $force=false)
+ {
+ if ($force) {
+ $ret = addslashes($text);
+ return $ret;
+ }
+ if (!get_magic_quotes_gpc()) {
+ $text = addslashes($text);
+ }
+ return $text;
+ }
+
+ /*
+ * if magic_quotes_gpc is on, stirip back slashes
+ */
+ function &stripSlashesGPC($text)
+ {
+ if (get_magic_quotes_gpc()) {
+ $text = stripslashes($text);
+ }
+ return $text;
+ }
+
+ /*
+ * for displaying data in html textbox forms
+ */
+ function &htmlSpecialChars($text)
+ {
+ $ret = preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES));
+ return $ret;
+ }
+
+ function &undoHtmlSpecialChars(&$text)
+ {
+ $ret = preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text);
+ return $ret;
+ }
+
+ /*
+ * Filters textarea form data in DB for display
+ */
+ function &displayText($text, $html=false)
+ {
+ if (! $html) {
+ // html not allowed
+ $text =& $this->htmlSpecialChars($text);
+ }
+ $text =& $this->makeClickable($text);
+ $text =& $this->nl2Br($text);
+ return $text;
+ }
+
+ /*
+ * Filters textarea form data submitted for preview
+ */
+ function &previewText($text, $html=false)
+ {
+ $text =& $this->stripSlashesGPC($text);
+ $ret = $this->displayText($text, $html);
+ return $ret;
+ }
##################### Deprecated Methods ######################
- function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
- {
- if ( $allowhtml == 0 ) {
- $text = $this->htmlSpecialChars($text);
- } else {
- //$config =& $GLOBALS['xoopsConfig'];
- //$allowed = $config['allowed_html'];
- //$text = strip_tags($text, $allowed);
- $text = $this->makeClickable($text);
- }
- if ( $smiley == 1 ) {
- $text = $this->smiley($text);
- }
- if ( $bbcode == 1 ) {
- $text = $this->xoopsCodeDecode($text);
- }
- $text = $this->nl2Br($text);
- return $text;
- }
-
- function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
- {
- $text = $this->oopsStripSlashesGPC($text);
- if ( $allowhtml == 0 ) {
- $text = $this->htmlSpecialChars($text);
- } else {
- //$config =& $GLOBALS['xoopsConfig'];
- //$allowed = $config['allowed_html'];
- //$text = strip_tags($text, $allowed);
- $text = $this->makeClickable($text);
- }
- if ( $smiley == 1 ) {
- $text = $this->smiley($text);
- }
- if ( $bbcode == 1 ) {
- $text = $this->xoopsCodeDecode($text);
- }
- $text = $this->nl2Br($text);
- return $text;
- }
-
- function makeTboxData4Save($text)
- {
- //$text = $this->undoHtmlSpecialChars($text);
- return $this->addSlashes($text);
- }
-
- function makeTboxData4Show($text, $smiley=0)
- {
- $text = $this->htmlSpecialChars($text);
- return $text;
- }
-
- function makeTboxData4Edit($text)
- {
- return $this->htmlSpecialChars($text);
- }
-
- function makeTboxData4Preview($text, $smiley=0)
- {
- $text = $this->stripSlashesGPC($text);
- $text = $this->htmlSpecialChars($text);
- return $text;
- }
-
- function makeTboxData4PreviewInForm($text)
- {
- $text = $this->stripSlashesGPC($text);
- return $this->htmlSpecialChars($text);
- }
-
- function makeTareaData4Save($text)
- {
- return $this->addSlashes($text);
- }
-
- function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
- {
- return $this->displayTarea($text, $html, $smiley, $xcode);
- }
-
- function makeTareaData4Edit($text)
- {
- return htmlSpecialChars($text, ENT_QUOTES);
- }
-
- function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
- {
- return $this->previewTarea($text, $html, $smiley, $xcode);
- }
-
- function makeTareaData4PreviewInForm($text)
- {
- //if magic_quotes_gpc is on, do stipslashes
- $text = $this->stripSlashesGPC($text);
- return htmlSpecialChars($text, ENT_QUOTES);
- }
-
- function makeTareaData4InsideQuotes($text)
- {
- return $this->htmlSpecialChars($text);
- }
-
- function &oopsStripSlashesGPC($text)
- {
- return $this->stripSlashesGPC($text);
- }
-
- function &oopsStripSlashesRT($text)
- {
- if (get_magic_quotes_runtime()) {
- $text =& stripslashes($text);
- }
- return $text;
- }
-
- function &oopsAddSlashes($text)
- {
- return $this->addSlashes($text);
- }
-
- function &oopsHtmlSpecialChars($text)
- {
- return $this->htmlSpecialChars($text);
- }
-
- function &oopsNl2Br($text)
- {
- return $this->nl2br($text);
- }
+ function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1)
+ {
+ $text = $this->oopsStripSlashesGPC($text);
+ if ( $allowhtml == 0 ) {
+ $text = $this->htmlSpecialChars($text);
+ } else {
+ //$config =& $GLOBALS['xoopsConfig'];
+ //$allowed = $config['allowed_html'];
+ //$text = strip_tags($text, $allowed);
+ $text = $this->makeClickable($text);
+ }
+ if ( $smiley == 1 ) {
+ $text = $this->smiley($text);
+ }
+ if ( $bbcode == 1 ) {
+ $text = $this->xoopsCodeDecode($text);
+ }
+ $text = $this->nl2Br($text);
+ return $text;
+ }
+
+ function makeTboxData4Save($text)
+ {
+ //$text = $this->undoHtmlSpecialChars($text);
+ return $this->addSlashes($text);
+ }
+
+ function makeTboxData4Show($text, $smiley=0)
+ {
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4Edit($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTboxData4Preview($text, $smiley=0)
+ {
+ $text = $this->stripSlashesGPC($text);
+ $text = $this->htmlSpecialChars($text);
+ return $text;
+ }
+
+ function makeTboxData4PreviewInForm($text)
+ {
+ $text = $this->stripSlashesGPC($text);
+ return $this->htmlSpecialChars($text);
+ }
+
+ function makeTareaData4Save($text)
+ {
+ return $this->addSlashes($text);
+ }
+
+ function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ $ret = $this->displayTarea($text, $html, $smiley, $xcode);
+ return $ret;
+ }
+
+ function makeTareaData4Edit($text)
+ {
+ return htmlSpecialChars($text, ENT_QUOTES);
+ }
+
+ function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1)
+ {
+ $ret = $this->previewTarea($text, $html, $smiley, $xcode);
+ return $ret;
+ }
+
+ function makeTareaData4PreviewInForm($text)
+ {
+ //if magic_quotes_gpc is on, do stipslashes
+ $text = $this->stripSlashesGPC($text);
+ return htmlSpecialChars($text, ENT_QUOTES);
+ }
+
+ function makeTareaData4InsideQuotes($text)
+ {
+ return $this->htmlSpecialChars($text);
+ }
+
+ function &oopsStripSlashesGPC($text)
+ {
+ $ret = $this->stripSlashesGPC($text);
+ return $ret;
+ }
+
+ function &oopsStripSlashesRT($text)
+ {
+ if (get_magic_quotes_runtime()) {
+ $text = stripslashes($text);
+ }
+ return $text;
+ }
+
+ function &oopsAddSlashes($text)
+ {
+ $ret = $this->addSlashes($text);
+ return $ret;
+ }
+
+ function &oopsHtmlSpecialChars($text)
+ {
+ $ret = $this->htmlSpecialChars($text);
+ return $ret;
+ }
+
+ function &oopsNl2Br($text)
+ {
+ $ret = $this->nl2br($text);
+ return $ret;
+ }
}
?>
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:18 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:18 +0900
Subject: [xoops-cvslog 3700] CVS update: xoops2jp/html/kernel
Message-ID: <20060727001718.463292AC32D@users.sourceforge.jp>
Index: xoops2jp/html/kernel/object.php
diff -u xoops2jp/html/kernel/object.php:1.5 xoops2jp/html/kernel/object.php:1.6
--- xoops2jp/html/kernel/object.php:1.5 Mon May 1 11:37:28 2006
+++ xoops2jp/html/kernel/object.php Thu Jul 27 09:17:18 2006
@@ -1,5 +1,5 @@
Index: xoops2jp/html/language/japanese/xoopsmailerlocal.php
diff -u xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.2 xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.3
--- xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.2 Mon Sep 5 05:46:09 2005
+++ xoops2jp/html/language/japanese/xoopsmailerlocal.php Thu Jul 27 09:17:18 2006
@@ -1,5 +1,5 @@
reset();
$this->charSet = 'iso-2022-jp';
$this->encoding = '7bit';
+ $this->multimailer->CharSet = $this->charSet;
}
function encodeFromName($text){
@@ -62,7 +63,7 @@
--------------------------------------*/
function STRtoJIS($str, $from_charset){
if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists.
- $str_JIS = mb_convert_encoding($str, "ISO-2022-JP", $from_charset);
+ $str_JIS = mb_convert_encoding($str, "ISO-2022-JP", $from_charset);
} else if ($from_charset=='EUC-JP') {
$str_JIS = '';
$mode = 0;
@@ -115,27 +116,71 @@
}
}
- function addr_format($addr) {
+ function AddrFormat($addr) {
if(empty($addr[1])) {
$formatted = $addr[0];
} else {
- $formatted = sprintf('%s <%s>', $this->encode_header($addr[1], 'text', true), $addr[0]);
+ $formatted = $this->EncodeHeader($addr[1], 'text') . " <" .
+ $addr[0] . ">";
}
return $formatted;
}
- function encode_header ($str, $position = 'text', $force=false) {
- if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists.
- if ($this->needs_encode || $force) {
- $encoded = mb_convert_encoding($str, _CHARSET, mb_detect_encoding($str));
- $encoded = mb_encode_mimeheader($encoded, "ISO-2022-JP", "B", "\n");
+ function EncodeHeader ($str, $position = 'text', $force=false) {
+ if (!preg_match('/^4\.4\.[01]([^0-9]+|$)/',PHP_VERSION)) {
+ if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists.
+ if ($this->needs_encode || $force) {
+ $encoded = mb_convert_encoding($str, _CHARSET, mb_detect_encoding($str));
+ $encoded = mb_encode_mimeheader($encoded, "ISO-2022-JP", "B", "\n");
+ } else {
+ $encoded = $str;
+ }
} else {
- $encoded = $str;
+ $encoded = parent::EncodeHeader($str, $position);
}
+ return $encoded;
} else {
- $encoded = parent::encode_header($str, $position);
- }
- return $encoded;
+ //Following Logic are made for recovering PHP4.4.0 and 4.4.1 mb_encode_mimeheader() bug.
+ //TODO: If mb_encode_mimeheader() bug is fixed. Replace this to simple logic.
+ $encode_charset = strtoupper($this->CharSet);
+ if (function_exists('mb_convert_encoding')) { //Using mb_string extension if exists.
+ if ($this->needs_encode || $force) {
+ $str_encoding = mb_detect_encoding($str, 'ASCII,'.$encode_charset );
+ if ($str_encoding == 'ASCII') { // Return original if string from only ASCII chars.
+ return $str;
+ } else if ($str_encoding != $encode_charset) { // Maybe this case may not occur.
+ $str = mb_convert_encoding($str, $encode_charset, $str_encoding);
+ }
+ $cut_start = 0;
+ $encoded ='';
+ $cut_length = floor((76-strlen('Subject: =?'.$encode_charset.'?B?'.'?='))/4)*3;
+ while($cut_start < strlen($str)) {
+ $partstr = mb_strcut ( $str, $cut_start, $cut_length, $encode_charset);
+ $partstr_length = strlen($partstr);
+ if (!$partstr_length) break;
+ if ($encode_charset == 'ISO-2022-JP') {
+ //Should Adjust next cutting place for SO & SI char insertion.
+ if ((substr($partstr, 0, 3)===chr(27).'$B')
+ && (substr($str, $cut_start, 3) !== chr(27).'$B')) {
+ $partstr_length -= 3;
+ }
+ if ((substr($partstr,-3)===chr(27).'(B')
+ && (substr($str, $cut_start+$partstr_length-3, 3) !== chr(27).'(B')) {
+ $partstr_length -= 3;
+ }
+ }
+ if ($cut_start) $encoded .= "\r\n\t";
+ $encoded .= '=?' . $encode_charset . '?B?' . base64_encode($partstr) . '?=';
+ $cut_start += $partstr_length;
+ }
+ } else {
+ $encoded = $str;
+ }
+ } else {
+ $encoded = parent::EncodeHeader($str, $position);
+ }
+ return $encoded;
+ }
}
}
?>
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:18 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:18 +0900
Subject: [xoops-cvslog 3702] CVS update:
xoops2jp/html/modules/system/admin/mailusers
Message-ID: <20060727001718.91C912AC32C@users.sourceforge.jp>
Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php
diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.5 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.6
--- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.5 Mon May 1 11:37:30 2006
+++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Thu Jul 27 09:17:18 2006
@@ -1,5 +1,5 @@
makeTboxData4PreviewInForm($_POST['mail_subject']));
$body_hidden = new XoopsFormHidden("mail_body", $myts->makeTareaData4PreviewInForm($_POST['mail_body']));
$start_hidden = new XoopsFormHidden("mail_start", $mail_end);
- $to_hidden = new XoopsFormHidden("mail_send_to[]", "mail");
$op_hidden = new XoopsFormHidden("op", "send");
$submit_button = new XoopsFormButton("", "mail_submit", _AM_SENDNEXT, "submit");
$sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count));
@@ -233,7 +232,14 @@
$form->addElement($femail_hidden);
$form->addElement($subject_hidden);
$form->addElement($body_hidden);
- $form->addElement($to_hidden);
+ if (in_array('mail', $_POST['mail_send_to'])) {
+ $to_hidden = new XoopsFormHidden('mail_send_to[]', 'mail');
+ $form->addElement($to_hidden);
+ }
+ if (in_array('pm', $_POST['mail_send_to']) && empty($_POST['mail_inactive'])) {
+ $to_hidden = new XoopsFormHidden('mail_send_to[]', 'pm');
+ $form->addElement($to_hidden);
+ }
$form->addElement($op_hidden);
$form->addElement($start_hidden);
$form->addElement($submit_button);
From onokazu @ users.sourceforge.jp Thu Jul 27 09:17:18 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:17:18 +0900
Subject: [xoops-cvslog 3703] CVS update:
xoops2jp/html/modules/system/admin/tplsets
Message-ID: <20060727001718.B723F2AC32B@users.sourceforge.jp>
Index: xoops2jp/html/modules/system/admin/tplsets/main.php
diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.5 xoops2jp/html/modules/system/admin/tplsets/main.php:1.6
--- xoops2jp/html/modules/system/admin/tplsets/main.php:1.5 Mon Sep 5 05:46:11 2005
+++ xoops2jp/html/modules/system/admin/tplsets/main.php Thu Jul 27 09:17:18 2006
@@ -1,5 +1,5 @@
getByDirname($ni);
@@ -286,8 +286,8 @@
$tplfile =& $tpltpl_handler->get($id, true);
if (is_object($tplfile)) {
$tplset = $tplfile->getVar('tpl_tplset');
- $tplset4disp = htmlspecialchars($tplset, ENT_QUOTES);
- $tplset4url = urlencode($tplset);
+ $tplset4disp = htmlspecialchars($tplset, ENT_QUOTES);
+ $tplset4url = urlencode($tplset);
$tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => $tplfile->getVar('tpl_source', 'E'), 'tpl_module' => $tplfile->getVar('tpl_module'));
include_once XOOPS_ROOT_PATH.'/modules/system/admin/tplsets/tplform.php';
xoops_cp_header();
From onokazu @ users.sourceforge.jp Thu Jul 27 09:34:59 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:34:59 +0900
Subject: [xoops-cvslog 3704] CVS update: xoops2jp/extras
Message-ID: <20060727003459.BDD1F2AC333@users.sourceforge.jp>
Index: xoops2jp/extras/login.php
diff -u xoops2jp/extras/login.php:1.4 xoops2jp/extras/login.php:1.4.4.1
--- xoops2jp/extras/login.php:1.4 Mon May 1 11:37:24 2006
+++ xoops2jp/extras/login.php Thu Jul 27 09:34:59 2006
@@ -62,6 +62,8 @@
$user->setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
+ require_once XOOPS_ROOT_PATH . '/include/session.php';
+ xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
From onokazu @ users.sourceforge.jp Thu Jul 27 09:34:59 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:34:59 +0900
Subject: [xoops-cvslog 3705] CVS update: xoops2jp/html/include
Message-ID: <20060727003459.E1E8E2AC337@users.sourceforge.jp>
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.6 xoops2jp/html/include/checklogin.php:1.6.2.1
--- xoops2jp/html/include/checklogin.php:1.6 Thu Jul 27 09:17:17 2006
+++ xoops2jp/html/include/checklogin.php Thu Jul 27 09:34:59 2006
@@ -1,5 +1,5 @@
setVar('last_login', time());
if (!$member_handler->insertUser($user)) {
}
+ require_once XOOPS_ROOT_PATH . '/include/session.php';
+ xoops_session_regenerate();
$_SESSION = array();
$_SESSION['xoopsUserId'] = $user->getVar('uid');
$_SESSION['xoopsUserGroups'] = $user->getGroups();
Index: xoops2jp/html/include/session.php
diff -u /dev/null xoops2jp/html/include/session.php:1.1.4.1
--- /dev/null Thu Jul 27 09:34:59 2006
+++ xoops2jp/html/include/session.php Thu Jul 27 09:34:59 2006
@@ -0,0 +1,36 @@
+
\ No newline at end of file
From onokazu @ users.sourceforge.jp Thu Jul 27 09:35:47 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:35:47 +0900
Subject: [xoops-cvslog 3706] CVS update: xoops2jp/html/install/class
Message-ID: <20060727003547.7882B2AC31E@users.sourceforge.jp>
Index: xoops2jp/html/install/class/settingmanager.php
diff -u xoops2jp/html/install/class/settingmanager.php:1.3 xoops2jp/html/install/class/settingmanager.php:1.3.2.1
--- xoops2jp/html/install/class/settingmanager.php:1.3 Thu Jul 27 09:17:17 2006
+++ xoops2jp/html/install/class/settingmanager.php Thu Jul 27 09:35:47 2006
@@ -29,7 +29,7 @@
* setting manager for XOOPS installer
*
* @author Haruki Setoyama
-* @version $Id: settingmanager.php,v 1.3 2006/07/27 00:17:17 onokazu Exp $
+* @version $Id: settingmanager.php,v 1.3.2.1 2006/07/27 00:35:47 onokazu Exp $
* @access public
**/
class setting_manager {
@@ -72,7 +72,7 @@
if ( substr($filepath, -1) == "/" ) {
$filepath = substr($filepath, 0, -1);
}
- $protocol = $_SERVER['HTTPS'] == 'on' ? 'https://' : 'http://';
+ $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
$this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
}
}
From onokazu @ users.sourceforge.jp Thu Jul 27 09:36:20 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:36:20 +0900
Subject: [xoops-cvslog 3707] CVS update: xoops2jp/docs
Message-ID: <20060727003620.A94352AC31E@users.sourceforge.jp>
Index: xoops2jp/docs/CHANGES.txt
diff -u xoops2jp/docs/CHANGES.txt:1.13 xoops2jp/docs/CHANGES.txt:1.13.2.1
--- xoops2jp/docs/CHANGES.txt:1.13 Thu Jul 27 09:17:17 2006
+++ xoops2jp/docs/CHANGES.txt Thu Jul 27 09:36:20 2006
@@ -1,6 +1,12 @@
XOOPS v2 Changelog
============================
+2006/ 7/27: Version 2.0.16 JP
+===============================
+ - Added routine to regenerate session id after succeessful login (extras/login.php, html/include/checklogin.php, html/include/session.php)
+ - Fixed PHP notice error (html/install/class/settingmanager.php)
+
+
2006/ 6/ 9: Version 2.0.15 JP
===============================
- Fixed user message not being sent to PM when over 100 users to send(modules/system/mailusers/mailusers.php)
From onokazu @ users.sourceforge.jp Thu Jul 27 09:36:20 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Thu, 27 Jul 2006 09:36:20 +0900
Subject: [xoops-cvslog 3708] CVS update: xoops2jp/html/include
Message-ID: <20060727003620.CA62D2AC328@users.sourceforge.jp>
Index: xoops2jp/html/include/version.php
diff -u xoops2jp/html/include/version.php:1.14 xoops2jp/html/include/version.php:1.14.2.1
--- xoops2jp/html/include/version.php:1.14 Thu Jul 27 09:17:17 2006
+++ xoops2jp/html/include/version.php Thu Jul 27 09:36:20 2006
@@ -1,4 +1,4 @@
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 14:58:12 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 14:58:12 +0900
Subject: [xoops-cvslog 3709] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060727055812.A5C732AC374@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php:1.1.2.8
--- xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php:1.1.2.7 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/AbstractModuleInstallAction.class.php Thu Jul 27 14:58:11 2006
@@ -1,12 +1,14 @@
mActionForm->fetch();
$this->mActionForm->validate();
From minahito @ users.sourceforge.jp Thu Jul 27 14:58:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 14:58:51 +0900
Subject: [xoops-cvslog 3710] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060727055851.954B22AC374@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.9 xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.10
--- xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.9 Fri Jun 23 10:28:29 2006
+++ xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php Thu Jul 27 14:58:51 2006
@@ -1,6 +1,6 @@
mInstallSuccess =& new XCube_NewDelegate();
+ $this->mInstallSuccess->register('Legacy_ModuleInstallAction.InstallSuccess');
+
+ $this->mInstallFail =& new XCube_NewDelegate();
+ $this->mInstallFail->register('Legacy_ModuleInstallAction.InstallFail');
+ }
+
function &_getInstaller($dirname)
{
$installer =& new Legacy_ModuleInstaller($dirname);
@@ -38,6 +59,9 @@
$file = $this->mModuleObject->modinfo['installer']['licence']['file'];
$language = $root->mController->getConfig('language');
+ //
+ // TODO Replace with language manager.
+ //
$path = XOOPS_MODULE_PATH . "/" . $this->mModuleObject->getVar('dirname') ."/language/" . $language . "/" . $file;
if (!file_exists($path)) {
$path = XOOPS_MODULE_PATH . "/" . $this->mModuleObject->getVar('dirname') . "/language/english/" . $file;
@@ -51,8 +75,14 @@
function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
{
- $root =& XCube_Root::getSingleton();
- $root->mEventManager->raiseEvent("Module.Legacy.ModuleInstall.Success", $this, $this->mModuleObject);
+ if (!$this->mLog->hasError()) {
+ $this->mInstallSuccess->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleInstall.' . ucfirst($this->mModuleObject->get('dirname') . '.Success'), new XCube_Ref($this->mModuleObject));
+ }
+ else {
+ $this->mInstallFail->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleInstall.' . ucfirst($this->mModuleObject->get('dirname') . '.Fail'), new XCube_Ref($this->mModuleObject));
+ }
$renderer->setTemplateName("module_install_success.html");
$renderer->setAttribute('module', $this->mLog->mModuleObject);
@@ -81,6 +111,11 @@
$renderer->setAttribute('module', $this->mModuleObject);
$renderer->setAttribute('actionForm', $this->mActionForm);
}
+
+ function executeViewCancel(&$controller, &$xoopsUser, &$renderer)
+ {
+ $controller->executeForward("./index.php?action=InstallList");
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 14:58:56 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 14:58:56 +0900
Subject: [xoops-cvslog 3711] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060727055856.CA6092AC374@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.6
--- xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.5 Tue May 30 12:55:18 2006
+++ xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php Thu Jul 27 14:58:56 2006
@@ -1,6 +1,7 @@
mUpdateSuccess =& new XCube_NewDelegate();
+ $this->mUpdateSuccess->register('Legacy_ModuleUpdateAction.UpdateSuccess');
+
+ $this->mUpdateFail =& new XCube_NewDelegate();
+ $this->mUpdateFail->register('Legacy_ModuleUpdateAction.UpdateFail');
+ }
+
function &_getInstaller($dirname)
{
$installer =& new Legacy_ModuleUpdater($dirname);
@@ -23,20 +45,32 @@
$this->mActionForm->prepare();
}
- function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
+ function executeViewSuccess(&$controller, &$xoopsUser, &$renderer)
{
- $root =& XCube_Root::getSingleton();
- $root->mEventManager->raiseEvent("Module.Legacy.ModuleUpdate.Success", $this, $this->mModuleObject);
+ if (!$this->mLog->hasError()) {
+ $this->mUpdateSuccess->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleUpdate.' . ucfirst($this->mModuleObject->get('dirname') . '.Success'), new XCube_Ref($this->mModuleObject));
+ }
+ else {
+ $this->mUpdateFail->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleUpdate.' . ucfirst($this->mModuleObject->get('dirname') . '.Fail'), new XCube_Ref($this->mModuleObject));
+ }
$renderer->setTemplateName("module_update_success.html");
- $renderer->setAttribute('log',$this->mLog->mMessages);
+ $renderer->setAttribute('module', $this->mLog->mModuleObject);
+ $renderer->setAttribute('log', $this->mLog->mMessages);
}
- function executeViewIndex(&$controller,&$xoopsUser,&$renderer)
+ function executeViewIndex(&$controller, &$xoopsUser, &$renderer)
{
$renderer->setTemplateName("module_update.html");
- $renderer->setAttribute('module',$this->mModuleObject);
- $renderer->setAttribute('actionForm',$this->mActionForm);
+ $renderer->setAttribute('module', $this->mModuleObject);
+ $renderer->setAttribute('actionForm', $this->mActionForm);
+ }
+
+ function executeViewCancel(&$controller, &$xoopsUser, &$renderer)
+ {
+ $controller->executeForward("./index.php?action=ModuleList");
}
}
Index: xoops2jp/html/modules/base/admin/actions/ModuleUninstallAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ModuleUninstallAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/ModuleUninstallAction.class.php:1.1.2.6
--- xoops2jp/html/modules/base/admin/actions/ModuleUninstallAction.class.php:1.1.2.5 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/ModuleUninstallAction.class.php Thu Jul 27 14:58:56 2006
@@ -1,6 +1,6 @@
mUninstallSuccess =& new XCube_NewDelegate();
+ $this->mUninstallSuccess->register('Legacy_ModuleUninstallAction.UninstallSuccess');
+
+ $this->mUninstallFail =& new XCube_NewDelegate();
+ $this->mUninstallFail->register('Legacy_ModuleUninstallAction.UninstallFail');
+ }
+
function &_getInstaller($dirname)
{
$installer =& new Legacy_ModuleUninstaller($dirname);
@@ -26,22 +47,37 @@
$this->mActionForm->prepare();
}
- function executeViewSuccess(&$controller,&$xoopsUser,&$renderer)
+ function executeViewSuccess(&$controller, &$xoopsUser, &$renderer)
{
+ if (!$this->mLog->hasError()) {
+ $this->mUninstallSuccess->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($this->mModuleObject->get('dirname') . '.Success'), new XCube_Ref($this->mModuleObject));
+ }
+ else {
+ $this->mUninstallFail->call(new XCube_Ref($this->mModuleObject));
+ XCube_DelegateUtils::call('Legacy.Admin.Event.ModuleUninstall.' . ucfirst($this->mModuleObject->get('dirname') . '.Fail'), new XCube_Ref($this->mModuleObject));
+ }
+
$renderer->setTemplateName("module_uninstall_success.html");
- $renderer->setAttribute('log',$this->mLog->mMessages);
+ $renderer->setAttribute('module',$this->mModuleObject);
+ $renderer->setAttribute('log', $this->mLog->mMessages);
}
- function executeViewIndex(&$controller,&$xoopsUser,&$renderer)
+ function executeViewIndex(&$controller, &$xoopsUser, &$renderer)
{
$renderer->setTemplateName("module_uninstall.html");
- $renderer->setAttribute('actionForm',$this->mActionForm);
- $renderer->setAttribute('module',$this->mModuleObject);
+ $renderer->setAttribute('actionForm', $this->mActionForm);
+ $renderer->setAttribute('module', $this->mModuleObject);
+ }
+
+ function executeViewInput(&$controller, &$xoopsUser, &$renderer)
+ {
+ $this->executeViewIndex(&$controller, &$xoopsUser, &$renderer);
}
- function executeViewInput(&$controller,&$xoopsUser,&$renderer)
+ function executeViewCancel(&$controller, &$xoopsUser, &$renderer)
{
- $this->executeViewIndex(&$controller,&$xoopsUser,&$renderer);
+ $controller->executeForward("./index.php?action=ModuleList");
}
}
From minahito @ users.sourceforge.jp Thu Jul 27 14:59:14 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 14:59:14 +0900
Subject: [xoops-cvslog 3712] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20060727055914.EBF282AC3A1@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/module_install.html
diff -u xoops2jp/html/modules/base/admin/templates/module_install.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/module_install.html:1.1.2.5
--- xoops2jp/html/modules/base/admin/templates/module_install.html:1.1.2.4 Wed Jun 14 00:55:25 2006
+++ xoops2jp/html/modules/base/admin/templates/module_install.html Thu Jul 27 14:59:14 2006
@@ -7,31 +7,31 @@
<{$smarty.const._MD_A_BASE_LANG_MODINSTALL_CONF}>
-<{$smarty.const._MD_A_BASE_LANG_MODINSTALL_ADVICE|replace:"_%s_":$module->getVar('name','e')}>
+<{$smarty.const._MD_A_BASE_LANG_MODINSTALL_ADVICE|replace:"_%s_":$module->getShow('name','e')}>
<{xoops_token form=$actionForm}>
-
+
<{$smarty.const._MD_A_BASE_LANG_MODINSTALL_CONF}> |
-
+
<{$module->modinfo.name|escape}>
|
<{$smarty.const._MD_A_BASE_LANG_NAME}> |
- <{$module->getVar('name',e)}> |
+ <{$module->getShow('name')}> |
<{$smarty.const._MD_A_BASE_LANG_MOD_DIR_NAME}> |
- <{$module->getVar('dirname',e)}> |
+ <{$module->getShow('dirname')}> |
<{$smarty.const._MD_A_BASE_LANG_VERSION}> |
- <{math equation="v/100" v=$module->getVar('version') format="%.2f"}>
- <{if $module->getVar('version') != $module->modinfo.version * 100 }>
+ | <{math equation="v/100" v=$module->get('version') format="%.2f"}>
+ <{if $module->get('version') != $module->modinfo.version * 100 }>
» <{math equation=$module->modinfo.version format="%.2f"}>
<{/if}>
|
@@ -39,8 +39,8 @@
<{$smarty.const._MD_A_BASE_LANG_MID}> |
- <{if $module->getVar('mid')}>
- <{$module->getVar('mid')}>
+ <{if $module->get('mid')}>
+ <{$module->getShow('mid')}>
<{else}>
--
<{/if}>
@@ -49,8 +49,8 @@
|
<{$smarty.const._MD_A_BASE_LANG_LASTUPDATE}> |
- <{if $module->getVar('last_update')}>
- <{$module->getVar('last_update')|xoops_formattimestamp:l}>
+ <{if $module->get('last_update')}>
+ <{$module->get('last_update')|xoops_formattimestamp:l}>
<{else}>
--
<{/if}>
@@ -62,8 +62,8 @@
|
Index: xoops2jp/html/modules/base/admin/templates/module_update_success.html
diff -u xoops2jp/html/modules/base/admin/templates/module_update_success.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/module_update_success.html:1.1.2.6
--- xoops2jp/html/modules/base/admin/templates/module_update_success.html:1.1.2.5 Mon Jan 30 23:53:50 2006
+++ xoops2jp/html/modules/base/admin/templates/module_update_success.html Thu Jul 27 14:59:14 2006
@@ -10,11 +10,11 @@
<{foreach item=msg from=$log}>
<{if $msg.type=="error"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{elseif $msg.type=="warning"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{else}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{/if}>
<{/foreach}>
Index: xoops2jp/html/modules/base/admin/templates/module_uninstall.html
diff -u xoops2jp/html/modules/base/admin/templates/module_uninstall.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/module_uninstall.html:1.1.2.2
--- xoops2jp/html/modules/base/admin/templates/module_uninstall.html:1.1.2.1 Thu Feb 2 21:27:06 2006
+++ xoops2jp/html/modules/base/admin/templates/module_uninstall.html Thu Jul 27 14:59:14 2006
@@ -7,33 +7,34 @@
<{$smarty.const._MD_A_BASE_LANG_MODUNINSTALL_CONF}>
- - <{$smarty.const._MD_A_BASE_LANG_MODUNINSTALL_ADVICE|replace:"_%s_":$module->getVar('name','e')}>
+
- <{$smarty.const._MD_A_BASE_LANG_MODUNINSTALL_ADVICE|replace:"_%s_":$module->getShow('name')}>
<{xoops_token form=$actionForm}>
-
+<{xoops_input type=hidden name=dirname value=$module->get('dirname')}>
+
<{$smarty.const._MD_A_BASE_LANG_MODUNINSTALL_CONF}> |
-
+
<{$module->modinfo.name|escape}>
|
<{$smarty.const._MD_A_BASE_LANG_NAME}> |
- <{$module->getVar('name',e)}> |
+ <{$module->getShow('name')}> |
<{$smarty.const._MD_A_BASE_LANG_MOD_DIR_NAME}> |
- <{$module->getVar('dirname',e)}> |
+ <{$module->getShow('dirname')}> |
<{$smarty.const._MD_A_BASE_LANG_VERSION}> |
- <{math equation="v/100" v=$module->getVar('version') format="%.2f"}>
- <{if $module->getVar('version') != $module->modinfo.version * 100 }>
+ <{math equation="v/100" v=$module->get('version') format="%.2f"}>
+ <{if $module->get('version') != $module->modinfo.version * 100 }>
» <{math equation=$module->modinfo.version format="%.2f"}>
<{/if}>
|
@@ -41,8 +42,8 @@
<{$smarty.const._MD_A_BASE_LANG_MID}> |
- <{if $module->getVar('mid')}>
- <{$module->getVar('mid')}>
+ <{if $module->get('mid')}>
+ <{$module->getShow('mid')}>
<{else}>
--
<{/if}>
@@ -51,8 +52,8 @@
|
<{$smarty.const._MD_A_BASE_LANG_LASTUPDATE}> |
- <{if $module->getVar('last_update')}>
- <{$module->getVar('last_update')|xoops_formattimestamp:l}>
+ <{if $module->get('last_update')}>
+ <{$module->get('last_update')|xoops_formattimestamp:l}>
<{else}>
--
<{/if}>
@@ -69,7 +70,8 @@
|
Index: xoops2jp/html/modules/base/admin/templates/module_install_success.html
diff -u xoops2jp/html/modules/base/admin/templates/module_install_success.html:1.1.2.7 xoops2jp/html/modules/base/admin/templates/module_install_success.html:1.1.2.8
--- xoops2jp/html/modules/base/admin/templates/module_install_success.html:1.1.2.7 Wed Jun 14 01:12:53 2006
+++ xoops2jp/html/modules/base/admin/templates/module_install_success.html Thu Jul 27 14:59:14 2006
@@ -12,11 +12,11 @@
<{foreach item=msg from=$log}>
<{if $msg.type=="error"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{elseif $msg.type=="warning"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{else}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{/if}>
<{/foreach}>
Index: xoops2jp/html/modules/base/admin/templates/module_uninstall_success.html
diff -u xoops2jp/html/modules/base/admin/templates/module_uninstall_success.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/module_uninstall_success.html:1.1.2.5
--- xoops2jp/html/modules/base/admin/templates/module_uninstall_success.html:1.1.2.4 Mon Jan 30 23:53:50 2006
+++ xoops2jp/html/modules/base/admin/templates/module_uninstall_success.html Thu Jul 27 14:59:14 2006
@@ -10,11 +10,11 @@
<{foreach item=msg from=$log}>
<{if $msg.type=="error"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{elseif $msg.type=="warning"}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{else}>
- - <{$msg.message}>
+ - <{$msg.message|escape}>
<{/if}>
<{/foreach}>
Index: xoops2jp/html/modules/base/admin/templates/module_update.html
diff -u xoops2jp/html/modules/base/admin/templates/module_update.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/module_update.html:1.1.2.4
--- xoops2jp/html/modules/base/admin/templates/module_update.html:1.1.2.3 Wed Jun 14 00:55:25 2006
+++ xoops2jp/html/modules/base/admin/templates/module_update.html Thu Jul 27 14:59:14 2006
@@ -6,31 +6,31 @@
<{$smarty.const._MD_A_BASE_LANG_MODUPDATE_CONF}>
-<{$smarty.const._MD_A_BASE_LANG_MODUPDATE_ADVICE|replace:"_%s_":$module->getVar('name','e')}>
+<{$smarty.const._MD_A_BASE_LANG_MODUPDATE_ADVICE|replace:"_%s_":$module->getShow('name')}>
<{xoops_token form=$actionForm}>
-
+<{xoops_input type=hidden name=dirname value=$module->get('dirname')}>
<{$smarty.const._MD_A_BASE_LANG_MODUPDATE_CONF}> |
-
+
<{$module->modinfo.name|escape}>
|
<{$smarty.const._MD_A_BASE_LANG_NAME}> |
- <{$module->getVar('name',e)}> |
+ <{$module->getShow('name')}> |
<{$smarty.const._MD_A_BASE_LANG_MOD_DIR_NAME}> |
- <{$module->getVar('dirname',e)}> |
+ <{$module->getShow('dirname')}> |
<{$smarty.const._MD_A_BASE_LANG_VERSION}> |
- <{math equation="v/100" v=$module->getVar('version') format="%.2f"}>
- <{if $module->getVar('version') != $module->modinfo.version * 100 }>
+ | <{math equation="v/100" v=$module->get('version') format="%.2f"}>
+ <{if $module->get('version') != $module->modinfo.version * 100 }>
» <{math equation=$module->modinfo.version format="%.2f"}>
<{/if}>
|
@@ -38,8 +38,8 @@
<{$smarty.const._MD_A_BASE_LANG_MID}> |
- <{if $module->getVar('mid')}>
- <{$module->getVar('mid')}>
+ <{if $module->get('mid')}>
+ <{$module->getShow('mid')}>
<{else}>
--
<{/if}>
@@ -48,8 +48,8 @@
|
<{$smarty.const._MD_A_BASE_LANG_LASTUPDATE}> |
- <{if $module->getVar('last_update')}>
- <{$module->getVar('last_update')|xoops_formattimestamp:l}>
+ <{if $module->get('last_update')}>
+ <{$module->get('last_update')|xoops_formattimestamp:l}>
<{else}>
--
<{/if}>
@@ -61,8 +61,8 @@
|
From minahito @ users.sourceforge.jp Thu Jul 27 14:59:40 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 14:59:40 +0900
Subject: [xoops-cvslog 3713] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060727055940.452A92AC3A1@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.8 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.9
--- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.8 Wed Jul 26 19:54:02 2006
+++ xoops2jp/html/modules/base/class/ActionFrame.class.php Thu Jul 27 14:59:40 2006
@@ -13,6 +13,8 @@
define ("LEGACY_FRAME_VIEW_ERROR", 3);
define ("LEGACY_FRAME_VIEW_INDEX", 4);
define ("LEGACY_FRAME_VIEW_INPUT", 5);
+define ("LEGACY_FRAME_VIEW_PREVIEW", 6);
+define ("LEGACY_FRAME_VIEW_CANCEL", 7);
//
// Constatns for the mode of the frame.
@@ -126,6 +128,14 @@
case LEGACY_FRAME_VIEW_INPUT:
$this->mAction->executeViewInput($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
break;
+
+ case LEGACY_FRAME_VIEW_PREVIEW:
+ $this->mAction->executeViewPreview($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
+ break;
+
+ case LEGACY_FRAME_VIEW_CANCEL:
+ $this->mAction->executeViewCancel($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
+ break;
}
}
}
@@ -189,6 +199,14 @@
function executeViewInput(&$controller, &$xoopsUser, &$render)
{
}
+
+ function executeViewPreview(&$controller, &$xoopsUser, &$render)
+ {
+ }
+
+ function executeViewCancel(&$controller, &$xoopsUser, &$render)
+ {
+ }
}
?>
From minahito @ users.sourceforge.jp Thu Jul 27 15:00:23 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 15:00:23 +0900
Subject: [xoops-cvslog 3714] CVS update: xoops2jp/html/modules/base/templates
Message-ID: <20060727060023.C2E042AC374@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/templates/legacy_notification_select_form.html
diff -u xoops2jp/html/modules/base/templates/legacy_notification_select_form.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_notification_select_form.html:1.1.2.2
--- xoops2jp/html/modules/base/templates/legacy_notification_select_form.html:1.1.2.1 Wed Jul 26 19:55:37 2006
+++ xoops2jp/html/modules/base/templates/legacy_notification_select_form.html Thu Jul 27 15:00:23 2006
@@ -29,7 +29,7 @@
<{/if}>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 15:11:56 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 15:11:56 +0900
Subject: [xoops-cvslog 3715] CVS update:
xoops2jp/html/modules/legacyRender/preload
Message-ID: <20060727061156.57F7F2AC32E@users.sourceforge.jp>
Index: xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php
diff -u xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php:1.1.2.2
--- xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php:1.1.2.1 Sat Jul 8 11:20:47 2006
+++ xoops2jp/html/modules/legacyRender/preload/Cacheclear.class.php Thu Jul 27 15:11:56 2006
@@ -1,14 +1,19 @@
mController->mRoot->mEventManager->add('Module.Legacy.ModuleInstall.Success', new XCube_Delegate("legacyRender_Cacheclear", "callback"));
- $this->mController->mRoot->mEventManager->add('Module.Legacy.ModuleUpdate.Success', new XCube_Delegate("legacyRender_Cacheclear", "callback"));
+ $this->mController->mRoot->mDelegateManager->add('Legacy_ModuleInstallAction.InstallSuccess', 'legacyRender_Cacheclear::cacheClear');
+ $this->mController->mRoot->mDelegateManager->add('Legacy_ModuleUpdateAction.UpdateSuccess', 'legacyRender_Cacheclear::cacheClear');
}
- function callback(&$action, &$module)
+ function cacheClear(&$module)
{
$handler =& xoops_getmodulehandler('tplfile', 'legacyRender');
From nobunobu @ users.sourceforge.jp Thu Jul 27 15:53:12 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Thu, 27 Jul 2006 15:53:12 +0900
Subject: [xoops-cvslog 3716] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060727065312.BCDD62AC3C2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.52 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.53
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.52 Wed Jul 26 19:54:43 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu Jul 27 15:53:12 2006
@@ -821,7 +821,7 @@
//
// Fall back process for login fail.
//
- $this->executeRedirect(XOOPS_ROOT_PATH . "/user.php", 1, _US_INCORRECTLOGIN);
+ $this->executeRedirect(XOOPS_URL . "/user.php", 1, _US_INCORRECTLOGIN);
}
}
else {
From nobunobu @ users.sourceforge.jp Thu Jul 27 15:54:48 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Thu, 27 Jul 2006 15:54:48 +0900
Subject: [xoops-cvslog 3717] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060727065448.5FF7C2AC3CE@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php
diff -u xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.4 xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.5
--- xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php:1.1.2.4 Thu Jul 20 17:13:54 2006
+++ xoops2jp/html/modules/user/kernel/LegacypageFunctions.class.php Thu Jul 27 15:54:48 2006
@@ -1,7 +1,7 @@
mController->getConfig();
- $root->mLanguageManager->loadModuleLanguage('user');
+ $root->mLanguageManager->loadModuleMessageCatalog('user');
// Reset session
$_SESSION = array();
From minahito @ users.sourceforge.jp Thu Jul 27 18:29:31 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:29:31 +0900
Subject: [xoops-cvslog 3718] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060727092931.2A6BE2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.53 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.54
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.53 Thu Jul 27 15:53:12 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu Jul 27 18:29:30 2006
@@ -740,41 +740,33 @@
}
}
- function &_createEventManager()
- {
- $manager=&parent::_createEventManager();
-
- require_once XOOPS_ROOT_PATH."/modules/base/kernel/MiscEventFunctions.class.php";
- $manager->setAnchorDelegate("Legacypage.Misc.Access", new XCube_Delegate("Legacy_MiscEventFunction","AccessToMisc"));
-
- require_once XOOPS_ROOT_PATH . "/modules/base/kernel/Legacy_EventFunctions.class.php";
- $manager->setAnchorDelegate("Legacypage.Imagemanager.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToImageManager"));
- $manager->setAnchorDelegate("Legacypage.Backend.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToBackend"));
- $manager->setAnchorDelegate("Legacypage.Search.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToSearch"));
-
- return $manager;
- }
-
function &_createDelegateManager()
{
- $manager =& parent::_createDelegateManager();
+ $delegateManager =& parent::_createDelegateManager();
- $manager->add('Legacypage.Notifications.Access', 'Legacy_NotificationFunctions::notifications', XOOPS_ROOT_PATH . "/modules/base/kernel/NotificationFunctions.class.php");
- $manager->add('Legacyfunction.Notificatins.Select', 'Legacy_NotificationFunctions::notifications_select', XOOPS_ROOT_PATH . "/modules/base/kernel/NotificationFunctions.class.php");
+ $file = XOOPS_ROOT_PATH . "/modules/base/kernel/Legacy_EventFunctions.class.php";
- return $manager;
+ $delegateManager->add('Legacypage.Notifications.Access', 'Legacy_EventFunction::notifications', $file);
+ $delegateManager->add('Legacyfunction.Notificatins.Select', 'Legacy_EventFunction::notifications_select', $file);
+ $delegateManager->add('Legacypage.Search.Access', 'Legacy_EventFunction::search', $file);
+ $delegateManager->add('Legacypage.Imagemanager.Access', 'Legacy_EventFunction::imageManager', $file);
+ $delegateManager->add('Legacypage.Backend.Access', 'Legacy_EventFunction::backend', $file);
+ $delegateManager->add('Legacypage.Misc.Access', 'Legacy_EventFunction::misc', $file);
+
+ return $delegateManager;
}
function &_createServiceManager()
{
- $manager =& parent::_createServiceManager();
+ $serviceManager =& parent::_createServiceManager();
require_once XOOPS_ROOT_PATH . "/modules/base/service/LegacySearchService.class.php";
- $service =& new LegacySearchService();
- $manager->addXCubeService("LegacySearch", $service);
- unset($service);
+ $searchService =& new Legacy_SearchService();
+ $searchService->prepare();
+
+ $serviceManager->addService('LegacySearch', $searchService);
- return $manager;
+ return $serviceManager;
}
/**
From minahito @ users.sourceforge.jp Thu Jul 27 18:30:24 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:30:24 +0900
Subject: [xoops-cvslog 3719] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060727093024.4D6562AC41C@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.7 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.8
--- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.7 Tue May 30 12:58:04 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Thu Jul 27 18:30:24 2006
@@ -1,55 +1,184 @@
setActionName('Image' . $action);
+ $moduleRunner->setMode(LEGACY_FRAME_MODE_IMAGE);
+ $moduleRunner->setActionName($action);
- $controller->setActionStrategy($moduleRunner);
+ $root->mController->setActionStrategy($moduleRunner);
- $controller->executeAction();
+ $root->mController->executeAction();
- $controller->executeView();
+ $root->mController->executeView();
}
- function AccessToBackend(&$controller,$eventArgs)
+ function backend()
{
require_once XOOPS_MODULE_PATH . "/base/class/ActionFrame.class.php";
+ $root =& XCube_Root::getSingleton();
+
$moduleRunner =& new Legacy_ActionFrame(false);
$moduleRunner->setActionName('Backend');
- $controller->setActionStrategy($moduleRunner);
+ $root->mController->setActionStrategy($moduleRunner);
- $controller->executeAction();
+ $root->mController->executeAction();
- $controller->executeView();
+ $root->mController->executeView();
}
- function AccessToSearch(&$controller,$eventArgs)
+ function search()
{
require_once XOOPS_MODULE_PATH . "/base/class/ActionFrame.class.php";
+ $root =& XCube_Root::getSingleton();
+
$moduleRunner =& new Legacy_ActionFrame(false);
- $moduleRunner->setActionName('Search' . ucfirst(xoops_getrequest('action')));
+ $moduleRunner->setMode(LEGACY_FRAME_MODE_SEARCH);
+ $moduleRunner->setActionName(ucfirst(xoops_getrequest('action')));
+
+ $root->mController->setActionStrategy($moduleRunner);
+
+ $root->mController->executeAction();
+
+ $root->mController->executeView();
+
+ }
+
+ function misc()
+ {
+ require_once XOOPS_BASE_PATH . "/class/ActionFrame.class.php";
+
+ $root =& XCube_Root::getSingleton();
+
+ $actionName = isset($_REQUEST['type']) ? ucfirst(xoops_getrequest('type')) : "Smilies";
- $controller->setActionStrategy($moduleRunner);
+ $moduleRunner = new Legacy_ActionFrame(false);
+ $moduleRunner->setMode(LEGACY_FRAME_MODE_MISC);
+ $moduleRunner->setActionName($actionName);
- $controller->executeAction();
+ $root->mController->setActionStrategy($moduleRunner);
- $controller->executeView();
+ $root->mController->setDialogMode(true);
+
+ $root->mController->executeAction();
+
+ $root->mController->executeView();
+ }
+
+ function notifications()
+ {
+ require_once XOOPS_BASE_PATH . "/class/ActionFrame.class.php";
+
+ $root =& XCube_Root::getSingleton();
+
+ //
+ // 'Notify' is prefix to guard accessing from misc.php.
+ //
+ $actionName = isset($_REQUEST['op']) ? trim(xoops_getrequest('op')) : "List";
+ if (isset($_REQUEST['delete'])) {
+ $actionName = "Delete";
+ }
+ if (isset($_REQUEST['delete_cancel'])) {
+ $actionName = "Cancel";
+ }
+
+ $moduleRunner = new Legacy_ActionFrame(false);
+ $moduleRunner->setMode(LEGACY_FRAME_MODE_NOTIFY);
+ $moduleRunner->setActionName($actionName);
+
+ $root->mController->setActionStrategy($moduleRunner);
+
+ $root->mController->executeAction();
+
+ $root->mController->executeView();
+ }
+
+ /**
+ * This functions is add to 'Legacyfunction.Notificatins.Select'.
+ *
+ * @param XCube_RenderBuffer $render
+ */
+ function notifications_select(&$render)
+ {
+ require_once XOOPS_ROOT_PATH . '/include/notification_constants.php';
+ require_once XOOPS_ROOT_PATH . '/include/notification_functions.php';
+
+ $root =& XCube_Root::getSingleton();
+ $xoopsModule =& $root->mController->mModuleController->mModuleObject;
+ $moduleConfig =& $root->mController->mModuleController->mConfig;
+ $xoopsUser =& $root->mController->getXoopsUser();
+
+ $xoops_notification = array();
+ $xoops_notification['show'] = is_object($xoopsModule) && is_object($xoopsUser) && notificationEnabled('inline') ? 1 : 0;
+
+ if ($xoops_notification['show']) {
+ $root->mLanguageManager->loadPageTypeMessageCatalog('notification');
+ $categories =& notificationSubscribableCategoryInfo();
+ $event_count = 0;
+ if (!empty($categories)) {
+ $notification_handler =& xoops_gethandler('notification');
+ foreach ($categories as $category) {
+ $section['name'] = $category['name'];
+ $section['title'] = $category['title'];
+ $section['description'] = $category['description'];
+ $section['itemid'] = $category['item_id'];
+ $section['events'] = array();
+ $subscribed_events =& $notification_handler->getSubscribedEvents($category['name'], $category['item_id'], $xoopsModule->get('mid'), $xoopsUser->get('uid'));
+ foreach (notificationEvents($category['name'], true) as $event) {
+ if (!empty($event['admin_only']) && !$xoopsUser->isAdmin($xoopsModule->getVar('mid'))) {
+ continue;
+ }
+ if (!empty($event['invisible'])) {
+ continue;
+ }
+ $subscribed = in_array($event['name'], $subscribed_events) ? 1 : 0;
+ $section['events'][$event['name']] = array ('name'=>$event['name'], 'title'=>$event['title'], 'caption'=>$event['caption'], 'description'=>$event['description'], 'subscribed'=>$subscribed);
+ $event_count ++;
+ }
+ $xoops_notification['categories'][$category['name']] = $section;
+ }
+ $xoops_notification['target_page'] = "notification_update.php";
+ $xoops_notification['redirect_script'] = xoops_getenv('PHP_SELF');
+
+ $render->setAttribute('editprofile_url', $urlXOOPS_URL . '/edituser.php?uid=' . $xoopsUser->getShow('uid'));
+
+ switch ($xoopsUser->getVar('notify_method')) {
+ case XOOPS_NOTIFICATION_METHOD_DISABLE:
+ $render->setAttribute('user_method', _NOT_DISABLE);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_PM:
+ $render->setAttribute('user_method', _NOT_PM);
+ break;
+ case XOOPS_NOTIFICATION_METHOD_EMAIL:
+ $render->setAttribute('user_method', _NOT_EMAIL);
+ break;
+ }
+ } else {
+ $xoops_notification['show'] = 0;
+ }
+ if ($event_count == 0) {
+ $xoops_notification['show'] = 0;
+ }
+ }
+
+ $render->setAttribute('xoops_notification', $xoops_notification);
}
}
From minahito @ users.sourceforge.jp Thu Jul 27 18:31:02 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:31:02 +0900
Subject: [xoops-cvslog 3720] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060727093102.C11DF2AC41B@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/MiscSmiliesAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/MiscSmiliesAction.class.php:1.1.2.1
--- /dev/null Thu Jul 27 18:31:02 2006
+++ xoops2jp/html/modules/base/actions/MiscSmiliesAction.class.php Thu Jul 27 18:31:02 2006
@@ -0,0 +1,58 @@
+mTargetName = xoops_getrequest('target');
+ return parent::getDefaultView($controller, $xoopsUser);
+ }
+
+ function executeViewIndex(&$controller, &$xoopsUser, &$render)
+ {
+ //
+ // Because this action's template uses BASE message catalog, load it.
+ //
+ $root =& $controller->mRoot;
+ $root->mLanguageManager->loadModuleMessageCatalog('base');
+
+ $render->setTemplateName("legacy_misc_smilies.html");
+ $render->setAttribute("objects", $this->mObjects);
+ $render->setAttribute("pageNavi", $this->mNavi);
+ $render->setAttribute("targetName", $this->mTargetName);
+ }
+}
+
+?>
Index: xoops2jp/html/modules/base/actions/SslloginAction.class.php
diff -u xoops2jp/html/modules/base/actions/SslloginAction.class.php:1.1.2.3 xoops2jp/html/modules/base/actions/SslloginAction.class.php:removed
--- xoops2jp/html/modules/base/actions/SslloginAction.class.php:1.1.2.3 Thu Jul 20 17:19:49 2006
+++ xoops2jp/html/modules/base/actions/SslloginAction.class.php Thu Jul 27 18:31:02 2006
@@ -1,28 +0,0 @@
-mRoot;
- $root->mLanguageManager->loadModuleMessageCatalog('user');
-
- $render->setTemplateName("legacy_misc_ssllogin.html");
- $render->setAttribute("message", @sprintf(_US_LOGGINGU, $xoopsUser->getVar('uname')));
- }
-}
-
-?>
Index: xoops2jp/html/modules/base/actions/OnlineAction.class.php
diff -u xoops2jp/html/modules/base/actions/OnlineAction.class.php:1.1.2.3 xoops2jp/html/modules/base/actions/OnlineAction.class.php:removed
--- xoops2jp/html/modules/base/actions/OnlineAction.class.php:1.1.2.3 Tue Mar 28 22:28:25 2006
+++ xoops2jp/html/modules/base/actions/OnlineAction.class.php Thu Jul 27 18:31:02 2006
@@ -1,41 +0,0 @@
-setTemplateName("legacy_misc_online.html");
-
- foreach (array_keys($this->mObjects) as $key) {
- $this->mObjects[$key]->loadModule();
- }
-
- $render->setAttribute("objects", $this->mObjects);
- $render->setAttribute("pageNavi", $this->mNavi);
- }
-}
-
-?>
Index: xoops2jp/html/modules/base/actions/SmiliesAction.class.php
diff -u xoops2jp/html/modules/base/actions/SmiliesAction.class.php:1.1.2.4 xoops2jp/html/modules/base/actions/SmiliesAction.class.php:removed
--- xoops2jp/html/modules/base/actions/SmiliesAction.class.php:1.1.2.4 Thu Jul 20 17:19:49 2006
+++ xoops2jp/html/modules/base/actions/SmiliesAction.class.php Thu Jul 27 18:31:02 2006
@@ -1,54 +0,0 @@
-mTargetName = xoops_getrequest('target');
- return parent::getDefaultView($controller, $xoopsUser);
- }
-
- function executeViewIndex(&$controller, &$xoopsUser, &$render)
- {
- //
- // Because this action's template uses BASE message catalog, load it.
- //
- $root =& $controller->mRoot;
- $root->mLanguageManager->loadModuleMessageCatalog('base');
-
- $render->setTemplateName("legacy_misc_smilies.html");
- $render->setAttribute("objects", $this->mObjects);
- $render->setAttribute("pageNavi", $this->mNavi);
- $render->setAttribute("targetName", $this->mTargetName);
- }
-}
-
-?>
Index: xoops2jp/html/modules/base/actions/MiscSslloginAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/MiscSslloginAction.class.php:1.1.2.1
--- /dev/null Thu Jul 27 18:31:02 2006
+++ xoops2jp/html/modules/base/actions/MiscSslloginAction.class.php Thu Jul 27 18:31:02 2006
@@ -0,0 +1,28 @@
+mRoot;
+ $root->mLanguageManager->loadModuleMessageCatalog('user');
+
+ $render->setTemplateName("legacy_misc_ssllogin.html");
+ $render->setAttribute("message", @sprintf(_US_LOGGINGU, $xoopsUser->getVar('uname')));
+ }
+}
+
+?>
Index: xoops2jp/html/modules/base/actions/MiscOnlineAction.class.php
diff -u /dev/null xoops2jp/html/modules/base/actions/MiscOnlineAction.class.php:1.1.2.1
--- /dev/null Thu Jul 27 18:31:02 2006
+++ xoops2jp/html/modules/base/actions/MiscOnlineAction.class.php Thu Jul 27 18:31:02 2006
@@ -0,0 +1,45 @@
+setTemplateName("legacy_misc_online.html");
+
+ foreach (array_keys($this->mObjects) as $key) {
+ $this->mObjects[$key]->loadModule();
+ }
+
+ $render->setAttribute("objects", $this->mObjects);
+ $render->setAttribute("pageNavi", $this->mNavi);
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Jul 27 18:31:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:31:36 +0900
Subject: [xoops-cvslog 3721] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060727093136.44FDD2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.4 xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.5
--- xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.4 Thu Jul 20 17:19:34 2006
+++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Thu Jul 27 18:31:36 2006
@@ -4,6 +4,8 @@
require_once XOOPS_MODULE_PATH . "/base/forms/SearchResultsForm.class.php";
+define('LEGACY_SEARCH_DEFAULT_OFFSET', 20);
+
class Legacy_SearchResultsAction extends Legacy_Action
{
var $mActionForm = null;
@@ -53,16 +55,15 @@
// TODO ErrorHandling
//
$root =& $controller->mRoot;
- $service =& $root->mServiceManager->searchXCubeService("LegacySearch");
- if ($service) {
- $client =& new XCube_ServiceClient($service);
+ $service =& $root->mServiceManager->getService("LegacySearch");
+ if (is_object($service)) {
+ $client =& $root->mServiceManager->createClient($service);
- $parameters = array();
- $parameters['current_uid'] = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0;
+ $params['current_uid'] = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0;
- $this->mActionForm->update($parameters);
+ $this->mActionForm->update($params);
- $this->mSearchResults = $client->call("getItems", $parameters);
+ $this->mSearchResults = $client->call('GetItems', $params['uid'], $params['current_uid'], $params['queries'], $params['andor'], $params['max_hit'], $params['offset'], $params['mids']);
}
else {
return LEGACY_FRAME_VIEW_ERROR;
From minahito @ users.sourceforge.jp Thu Jul 27 18:31:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:31:51 +0900
Subject: [xoops-cvslog 3722] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060727093151.77F852AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/SearchShowallAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.2 Sun May 28 14:07:29 2006
+++ xoops2jp/html/modules/base/actions/SearchShowallAction.class.php Thu Jul 27 18:31:51 2006
@@ -1,4 +1,8 @@
mActionForm->get('start') - 20;
+ $prevStart = $this->mActionForm->get('start') - LEGACY_SEARCH_DEFAULT_OFFSET;
if ($prevStart < 0) {
$prevStart = 0;
}
$render->setAttribute('prevStart', $prevStart);
- $render->setAttribute('nextStart', $this->mActionForm->get('start') + 20);
+ $render->setAttribute('nextStart', $this->mActionForm->get('start') + LEGACY_SEARCH_DEFAULT_OFFSET);
}
}
From minahito @ users.sourceforge.jp Thu Jul 27 18:32:46 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:32:46 +0900
Subject: [xoops-cvslog 3723] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060727093246.D2FC12AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.2 Sun May 28 14:07:29 2006
+++ xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php Thu Jul 27 18:32:46 2006
@@ -1,4 +1,8 @@
Index: xoops2jp/html/modules/base/actions/SearchAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/SearchAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/actions/SearchAction.class.php:1.1.2.1 Mon May 29 13:51:51 2006
+++ xoops2jp/html/modules/base/actions/SearchAction.class.php Thu Jul 27 18:32:51 2006
@@ -1,4 +1,8 @@
Index: xoops2jp/html/modules/base/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.9 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.10
--- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.9 Thu Jul 27 14:59:40 2006
+++ xoops2jp/html/modules/base/class/ActionFrame.class.php Thu Jul 27 18:33:51 2006
@@ -22,6 +22,7 @@
define ("LEGACY_FRAME_MODE_MISC", "Misc");
define ("LEGACY_FRAME_MODE_NOTIFY", "Notify");
define ("LEGACY_FRAME_MODE_IMAGE", "Image");
+define ("LEGACY_FRAME_MODE_SEARCH", "Search");
class Legacy_ActionFrame extends XCube_ActionStrategy
{
@@ -59,9 +60,17 @@
function execute(&$controller)
{
- if (!preg_match("/^\w+$/", $this->mActionName)) {
+ if (strlen($this->mActionName) > 0 && !preg_match("/^\w+$/", $this->mActionName)) {
die();
}
+
+ //
+ // Actions of the public side in this module are hook type. So it's
+ // necessary to load catalog here.
+ //
+ if (!$this->mAdminFlag) {
+ $controller->mRoot->mLanguageManager->loadModuleMessageCatalog('base');
+ }
//
// Add mode.
From minahito @ users.sourceforge.jp Thu Jul 27 18:34:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:34:36 +0900
Subject: [xoops-cvslog 3726] CVS update: xoops2jp/html/modules/base/forms
Message-ID: <20060727093436.A25E52AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/forms/SearchShowallForm.class.php
diff -u xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.1 xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.2
--- xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.1 Sat May 27 22:06:39 2006
+++ xoops2jp/html/modules/base/forms/SearchShowallForm.class.php Thu Jul 27 18:34:36 2006
@@ -32,7 +32,7 @@
function update(&$params)
{
- $params['mid'] = $this->get('mid');
+ $params['mids'][] = $this->get('mid');
$params['queries'] = $this->mQueries;
$params['andor'] = $this->get('andor');
$params['maxhit'] = 20;
From minahito @ users.sourceforge.jp Thu Jul 27 18:34:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:34:51 +0900
Subject: [xoops-cvslog 3727] CVS update:
xoops2jp/html/modules/base/preload/Primary
Message-ID: <20060727093451.CEA422AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php
diff -u xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.4 xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.5
--- xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php:1.1.2.4 Fri Jul 7 11:56:14 2006
+++ xoops2jp/html/modules/base/preload/Primary/NuSoapLoader.class.php Thu Jul 27 18:34:51 2006
@@ -22,7 +22,7 @@
$client = new Legacy_SoapClient($service);
}
else {
- $client = new XCube_ServiceClienet($service);
+ $client = new XCube_ServiceClient($service);
}
}
}
From minahito @ users.sourceforge.jp Thu Jul 27 18:35:08 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:35:08 +0900
Subject: [xoops-cvslog 3728] CVS update: xoops2jp/html/modules/base/service
Message-ID: <20060727093508.72FD22AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/service/LegacySearchService.class.php
diff -u xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.4 xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.5
--- xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.4 Sat May 27 22:09:41 2006
+++ xoops2jp/html/modules/base/service/LegacySearchService.class.php Thu Jul 27 18:35:08 2006
@@ -7,30 +7,32 @@
/**
* Sample class
*/
-class LegacySearchService extends XCube_Service
+class Legacy_SearchService extends XCube_Service
{
+ function prepare()
+ {
+ $this->register('GetItems');
+ }
+
/**
* @param $parameters['uid'] Target user's id
* @param $parameters['current_uid'] Current user's id
* @param $parameters['maxhit'] Max hit count of each modules. The default value is 5.
* @param $parameters['mid'] If this is specified, search only one module.
*/
- function doGetItems(&$parameters)
+ function GetItems($uid = 0, $current_uid = 0, $queries = null, $andor = null, $max_hit = 5, $start = null, $mids = null)
{
$ret = array();
- $uid = isset($parameters['uid']) ? intval($parameters['uid']) : 0;
- $queries = isset($parameters['queries']) ? $parameters['queries'] : null;
- $andor = isset($parameters['andor']) ? $parameters['andor'] : null;
+ $uid = intval($uid);
+ $current_uid = intval($current_uid);
+
if ($andor == null) {
$andor == "AND";
}
- $maxhit = isset($parameters['maxhit']) ? intval($parameters['maxhit']) : 5;
- $start = isset($parameters['offset']) ? intval($parameters['offset']) : null;
-
$userHandler =& xoops_gethandler('user');
- $currentUser =& $userHandler->get($parameters['current_uid']);
+ $currentUser =& $userHandler->get($current_uid);
$gpermHandler = & xoops_gethandler( 'groupperm' );
$groups = is_object($currentUser) ? $currentUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
@@ -40,14 +42,7 @@
//
$moduleHandler =& xoops_gethandler('module');
- $mids = array();
- if (isset($parameters['mids']) && is_array($parameters['mids'])) {
- $mids = $parameters['mids'];
- }
- elseif (isset($parameters['mid'])) {
- $mids[] = intval($parameters['mid']);
- }
- else {
+ if (!is_array($mids) || (is_array($mids) && count($mids) == 0)) {
$criteria =& new CriteriaCompo(new Criteria('hassearch', 1));
$criteria->add(new Criteria('isactive', 1));
$mids =& array_keys($moduleHandler->getList($criteria));
@@ -107,6 +102,11 @@
return $ret;
}
+
+ function isOuterService()
+ {
+ return false;
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 18:35:19 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:35:19 +0900
Subject: [xoops-cvslog 3729] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060727093519.12B752AC418@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/japanese/main.php
diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.18 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.19
--- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.18 Wed Jul 26 19:55:26 2006
+++ xoops2jp/html/modules/base/language/japanese/main.php Thu Jul 27 18:35:18 2006
@@ -12,6 +12,7 @@
define('_MD_BASE_LANG_BID', "bid");
define('_MD_BASE_LANG_BLOCK_TYPE', "block type");
define('_MD_BASE_LANG_C_TYPE', "c type");
+define('_MD_BASE_LANG_CLICKASMILIE', "画像をクリックすると顔アイコン(スマイリー)を本文に追加することができます。");
define('_MD_BASE_LANG_CODE', "code");
define('_MD_BASE_LANG_COM_CREATED', "作成日時");
define('_MD_BASE_LANG_COM_EXPARAMS', "com exparams");
@@ -44,6 +45,7 @@
define('_MD_BASE_LANG_ERROR', "error");
define('_MD_BASE_LANG_FUNC_FILE', "func file");
define('_MD_BASE_LANG_FUNC_NUM', "func num");
+define('_MD_BASE_LANG_GUEST', "ゲスト");
define('_MD_BASE_LANG_ID', "ID");
define('_MD_BASE_LANG_IMAGE', "image");
define('_MD_BASE_LANG_IMAGE_FILE', "イメージファイル");
@@ -66,6 +68,7 @@
define('_MD_BASE_LANG_SHOW_FUNC', "show func");
define('_MD_BASE_LANG_SIDE', "side");
define('_MD_BASE_LANG_SMILE_URL', "smile url");
+define('_MD_BASE_LANG_SMILIES', "顔アイコン");
define('_MD_BASE_LANG_SUBMIT', "送信");
define('_MD_BASE_LANG_TEMPLATE', "template");
define('_MD_BASE_LANG_TITLE', "title");
From minahito @ users.sourceforge.jp Thu Jul 27 18:35:19 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:35:19 +0900
Subject: [xoops-cvslog 3730] CVS update:
xoops2jp/html/modules/base/language/english
Message-ID: <20060727093519.357A62AC41B@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/english/main.php
diff -u xoops2jp/html/modules/base/language/english/main.php:1.1.2.17 xoops2jp/html/modules/base/language/english/main.php:1.1.2.18
--- xoops2jp/html/modules/base/language/english/main.php:1.1.2.17 Wed Jul 26 19:55:26 2006
+++ xoops2jp/html/modules/base/language/english/main.php Thu Jul 27 18:35:19 2006
@@ -12,6 +12,7 @@
define('_MD_BASE_LANG_BID', "bid");
define('_MD_BASE_LANG_BLOCK_TYPE', "block type");
define('_MD_BASE_LANG_C_TYPE', "c type");
+define('_MD_BASE_LANG_CLICKASMILIE', "Click a smilie to insert it into your message.");
define('_MD_BASE_LANG_CODE', "code");
define('_MD_BASE_LANG_COM_CREATED', "Created");
define('_MD_BASE_LANG_COM_EXPARAMS', "com exparams");
@@ -44,6 +45,7 @@
define('_MD_BASE_LANG_ERROR', "error");
define('_MD_BASE_LANG_FUNC_FILE', "func file");
define('_MD_BASE_LANG_FUNC_NUM', "func num");
+define('_MD_BASE_LANG_GUEST', "Guest");
define('_MD_BASE_LANG_ID', "ID");
define('_MD_BASE_LANG_IMAGE', "image");
define('_MD_BASE_LANG_IMAGE_FILE', "Image file");
@@ -64,6 +66,7 @@
define('_MD_BASE_LANG_SHOW_FUNC', "show func");
define('_MD_BASE_LANG_SIDE', "side");
define('_MD_BASE_LANG_SMILE_URL', "Image");
+define('_MD_BASE_LANG_SMILIES', "Smilies");
define('_MD_BASE_LANG_SUBMIT', "Submit");
define('_MD_BASE_LANG_TEMPLATE', "template");
define('_MD_BASE_LANG_TITLE', "title");
From minahito @ users.sourceforge.jp Thu Jul 27 18:36:00 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:36:00 +0900
Subject: [xoops-cvslog 3731] CVS update: xoops2jp/html/modules/base/templates
Message-ID: <20060727093600.7E2932AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/templates/legacy_misc_online.html
diff -u xoops2jp/html/modules/base/templates/legacy_misc_online.html:1.1.2.4 xoops2jp/html/modules/base/templates/legacy_misc_online.html:1.1.2.5
--- xoops2jp/html/modules/base/templates/legacy_misc_online.html:1.1.2.4 Fri Feb 3 02:00:56 2006
+++ xoops2jp/html/modules/base/templates/legacy_misc_online.html Thu Jul 27 18:36:00 2006
@@ -8,7 +8,7 @@
<{if $obj->get('uid')}>
<{$obj->getVar('uname')}>
<{else}>
- <{$smarty.const._GUEST}>
+ <{$smarty.const._MD_BASE_LANG_GUEST}>
<{/if}>
From minahito @ users.sourceforge.jp Thu Jul 27 18:37:57 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:37:57 +0900
Subject: [xoops-cvslog 3732] CVS update: xoops2jp/html
Message-ID: <20060727093757.0A4702AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/imagemanager.php
diff -u xoops2jp/html/imagemanager.php:1.2.8.3 xoops2jp/html/imagemanager.php:1.2.8.4
--- xoops2jp/html/imagemanager.php:1.2.8.3 Tue May 30 12:59:32 2006
+++ xoops2jp/html/imagemanager.php Thu Jul 27 18:37:56 2006
@@ -2,18 +2,13 @@
/**
* This file was full scratched in XOOPS Cube Legacy project.
*
- * @version $Id: imagemanager.php,v 1.2.8.3 2006/05/30 03:59:32 minahito Exp $
+ * @package Legacy
+ * @version $Id: imagemanager.php,v 1.2.8.4 2006/07/27 09:37:56 minahito Exp $
*/
require_once "mainfile.php";
-require_once "./header.php";
+require_once XOOPS_ROOT_PATH . "/header.php";
-//
-// This is old page controller in Xoops 2.0.x
-// Raise event "Legacypage.Imagemanager.Access"
-//
-$root=&XCube_Root::getSingleton();
-$eventArgs = array();
-$root->mEventManager->raiseEvent("Legacypage.Imagemanager.Access", $root->mController, $eventArgs);
+XCube_DelegateUtils::call('Legacypage.Imagemanager.Access');
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 18:38:10 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:38:10 +0900
Subject: [xoops-cvslog 3733] CVS update: xoops2jp/html
Message-ID: <20060727093810.2806E2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/misc.php
diff -u xoops2jp/html/misc.php:1.2.8.4 xoops2jp/html/misc.php:1.2.8.5
--- xoops2jp/html/misc.php:1.2.8.4 Mon Dec 26 21:16:07 2005
+++ xoops2jp/html/misc.php Thu Jul 27 18:38:10 2006
@@ -1,38 +1,14 @@
//
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
require_once "mainfile.php";
require_once XOOPS_ROOT_PATH . "/header.php";
-$root =& XCube_Root::getSingleton();
-$eventArgs = array();
-$root->mEventManager->raiseEvent("Legacypage.Misc.Access", $root->mController, $eventArgs);
+XCube_DelegateUtils::call('Legacypage.Misc.Access');
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 18:38:19 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:38:19 +0900
Subject: [xoops-cvslog 3734] CVS update: xoops2jp/html
Message-ID: <20060727093819.746752AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/search.php
diff -u xoops2jp/html/search.php:1.2.8.2 xoops2jp/html/search.php:1.2.8.3
--- xoops2jp/html/search.php:1.2.8.2 Sat May 27 22:11:01 2006
+++ xoops2jp/html/search.php Thu Jul 27 18:38:19 2006
@@ -2,7 +2,7 @@
/**
* This file was full scratched in XOOPS Cube Legacy project.
*
- * @version $Id: search.php,v 1.2.8.2 2006/05/27 13:11:01 minahito Exp $
+ * @version $Id: search.php,v 1.2.8.3 2006/07/27 09:38:19 minahito Exp $
*/
require_once "mainfile.php";
@@ -12,8 +12,6 @@
// This is old page controller in Xoops 2.0.x
// Raise event "Legacypage.Search.Access"
//
-$root=&XCube_Root::getSingleton();
-$eventArgs = array();
-$root->mEventManager->raiseEvent("Legacypage.Search.Access", $root->mController, $eventArgs);
+XCube_DelegateUtils::call('Legacypage.Search.Access');
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Jul 27 18:38:40 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:38:40 +0900
Subject: [xoops-cvslog 3735] CVS update: xoops2jp/html/include
Message-ID: <20060727093840.96C722AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/include/notification_update.php
diff -u xoops2jp/html/include/notification_update.php:1.2.8.1 xoops2jp/html/include/notification_update.php:1.2.8.2
--- xoops2jp/html/include/notification_update.php:1.2.8.1 Wed Oct 19 02:20:06 2005
+++ xoops2jp/html/include/notification_update.php Thu Jul 27 18:38:40 2006
@@ -1,5 +1,5 @@
mLanguageManager->loadPageTypeMessageCatalog('notification');
if (!isset($_POST['not_submit'])) {
exit();
From minahito @ users.sourceforge.jp Thu Jul 27 18:39:31 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:39:31 +0900
Subject: [xoops-cvslog 3736] CVS update: xoops2jp/html/modules/pm
Message-ID: <20060727093931.7F5592AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/xoops_version.php
diff -u xoops2jp/html/modules/pm/xoops_version.php:1.1.2.13 xoops2jp/html/modules/pm/xoops_version.php:1.1.2.14
--- xoops2jp/html/modules/pm/xoops_version.php:1.1.2.13 Fri Jul 7 12:21:03 2006
+++ xoops2jp/html/modules/pm/xoops_version.php Thu Jul 27 18:39:31 2006
@@ -1,5 +1,5 @@
Index: xoops2jp/html/modules/pm/.xml/pm_delete_one.xml
diff -u /dev/null xoops2jp/html/modules/pm/.xml/pm_delete_one.xml:1.1.2.1
--- /dev/null Thu Jul 27 18:39:40 2006
+++ xoops2jp/html/modules/pm/.xml/pm_delete_one.xml Thu Jul 27 18:39:40 2006
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From minahito @ users.sourceforge.jp Thu Jul 27 18:39:58 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:39:58 +0900
Subject: [xoops-cvslog 3738] CVS update: xoops2jp/html/modules/pm/actions
Message-ID: <20060727093958.B54932AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/actions/DeleteAction.class.php
diff -u xoops2jp/html/modules/pm/actions/DeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/pm/actions/DeleteAction.class.php:1.1.2.3
--- xoops2jp/html/modules/pm/actions/DeleteAction.class.php:1.1.2.2 Fri Jul 14 17:51:13 2006
+++ xoops2jp/html/modules/pm/actions/DeleteAction.class.php Thu Jul 27 18:39:58 2006
@@ -1,12 +1,11 @@
Index: xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php
diff -u /dev/null xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php:1.1.2.1
--- /dev/null Thu Jul 27 18:40:18 2006
+++ xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php Thu Jul 27 18:40:18 2006
@@ -0,0 +1,69 @@
+mActionForm =& new Pm_DeleteOneForm();
+ $this->mActionForm->prepare();
+ }
+
+ function hasPermission(&$controller, &$xoopsUser, $moduleConfig)
+ {
+ if (parent::hasPermission($controller, $xoopsUser, $moduleConfig)) {
+ return $xoopsUser->get('uid') == $this->mObject->get('to_userid');
+ }
+ else {
+ return false;
+ }
+ }
+
+ function executeViewInput(&$controller, &$xoopsUser, &$render)
+ {
+ $render->setTemplateName("pm_delete_one.html");
+ $render->setAttribute('actionForm', $this->mActionForm);
+ $render->setAttribute('object', $this->mObject);
+ }
+
+ function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeForward(XOOPS_URL . "/viewpmsg.php");
+ }
+
+ function executeViewError(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeRedirect(XOOPS_URL . "/viewpmsg.php", 1, _MD_PM_ERROR_ACCESS);
+ }
+
+ function executeViewCancel(&$controller, &$xoopsUser, &$render)
+ {
+ if (is_object($this->mObject)) {
+ $controller->executeForward(XOOPS_MODULE_URL . "/pm/index.php?action=read&msg_id=" . $this->mObject->get('msg_id'));
+ }
+ else {
+ $controller->executeForward(XOOPS_URL . "/viewpmsg.php");
+ }
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Jul 27 18:40:43 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:40:43 +0900
Subject: [xoops-cvslog 3740] CVS update: xoops2jp/html/modules/pm/actions
Message-ID: <20060727094043.89F162AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/actions/ReadAction.class.php
diff -u xoops2jp/html/modules/pm/actions/ReadAction.class.php:1.1.2.2 xoops2jp/html/modules/pm/actions/ReadAction.class.php:1.1.2.3
--- xoops2jp/html/modules/pm/actions/ReadAction.class.php:1.1.2.2 Fri Jul 14 17:51:13 2006
+++ xoops2jp/html/modules/pm/actions/ReadAction.class.php Thu Jul 27 18:40:43 2006
@@ -1,7 +1,7 @@
executeForward(XOOPS_MODULE_URL . "/pm/index.php?action=DeleteOne&msg_id=" . xoops_getrequest('msg_id'));
+ }
function executeViewError(&$controller, &$xoopsUser, &$render)
{
From minahito @ users.sourceforge.jp Thu Jul 27 18:40:56 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:40:56 +0900
Subject: [xoops-cvslog 3741] CVS update: xoops2jp/html/modules/pm/class
Message-ID: <20060727094056.E5E5E2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/class/AbstractEditAction.class.php
diff -u xoops2jp/html/modules/pm/class/AbstractEditAction.class.php:1.1.2.1 xoops2jp/html/modules/pm/class/AbstractEditAction.class.php:1.1.2.2
--- xoops2jp/html/modules/pm/class/AbstractEditAction.class.php:1.1.2.1 Tue Jul 4 18:48:34 2006
+++ xoops2jp/html/modules/pm/class/AbstractEditAction.class.php Thu Jul 27 18:40:56 2006
@@ -1,7 +1,7 @@
mObject == null) {
- return PM2_FRAME_VIEW_ERROR;
+ return PM_FRAME_VIEW_ERROR;
+ }
+
+ if (isset($_REQUEST['_form_control_cancel'])) {
+ return PM_FRAME_VIEW_CANCEL;
}
$this->mActionForm->load($this->mObject);
From minahito @ users.sourceforge.jp Thu Jul 27 18:41:38 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:41:38 +0900
Subject: [xoops-cvslog 3742] CVS update: xoops2jp/html/modules/pm/class
Message-ID: <20060727094138.277AE2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.1 xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.2
--- xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.1 Tue Jul 4 18:48:34 2006
+++ xoops2jp/html/modules/pm/class/ActionFrame.class.php Thu Jul 27 18:41:38 2006
@@ -1,7 +1,7 @@
mAction->executeViewInput($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
break;
+
+ case PM_FRAME_VIEW_PREVIEW:
+ $this->mAction->executeViewPreview($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
+ break;
+
+ case PM_FRAME_VIEW_CANCEL:
+ $this->mAction->executeViewCancel($controller, $controller->getXoopsUser(), $controller->mRenderSystem);
+ break;
}
}
@@ -160,6 +170,14 @@
function executeViewInput(&$controller, &$xoopsUser, &$render)
{
}
+
+ function executeViewPreview(&$controller, &$xoopsUser, &$render)
+ {
+ }
+
+ function executeViewCancel(&$controller, &$xoopsUser, &$render)
+ {
+ }
}
?>
From minahito @ users.sourceforge.jp Thu Jul 27 18:41:49 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:41:49 +0900
Subject: [xoops-cvslog 3743] CVS update: xoops2jp/html/modules/pm/forms
Message-ID: <20060727094149.4EF3C2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php
diff -u /dev/null xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php:1.1.2.1
--- /dev/null Thu Jul 27 18:41:49 2006
+++ xoops2jp/html/modules/pm/forms/DeleteOneForm.class.php Thu Jul 27 18:41:49 2006
@@ -0,0 +1,43 @@
+get('msg_id');
+ }
+
+ function prepare()
+ {
+ //
+ // Set form properties
+ //
+ $this->mFormProperties['msg_id'] =& new XCube_IntProperty('msg_id');
+
+ //
+ // Set field properties
+ //
+ $this->mFieldProperties['msg_id'] =& new XCube_FieldProperty($this);
+ $this->mFieldProperties['msg_id']->setDependsByArray(array('required','objectExist'));
+ $this->mFieldProperties['msg_id']->addMessage('required', _MD_PM_ERROR_REQUIRED, _MD_PM_LANG_MSG_ID);
+ $this->mFieldProperties['msg_id']->addMessage('objectExist', _MD_PM_ERROR_OBJECTEXIST, _MD_PM_LANG_MSG_ID);
+ $this->mFieldProperties['msg_id']->addVar('handler', 'privmessage');
+ }
+
+ function load(&$obj)
+ {
+ $this->set('msg_id', $obj->get('msg_id'));
+ }
+
+ function update(&$obj)
+ {
+ $obj->set('msg_id', $this->get('msg_id'));
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Jul 27 18:42:05 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:42:05 +0900
Subject: [xoops-cvslog 3744] CVS update:
xoops2jp/html/modules/pm/language/japanese
Message-ID: <20060727094205.1535E2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/language/japanese/main.php
diff -u xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.8 xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.9
--- xoops2jp/html/modules/pm/language/japanese/main.php:1.1.2.8 Tue Jul 4 18:49:53 2006
+++ xoops2jp/html/modules/pm/language/japanese/main.php Thu Jul 27 18:42:04 2006
@@ -9,6 +9,7 @@
define('_MD_PM_LANG_MESSAGE_DETAIL', "メッセージの詳細");
define('_MD_PM_LANG_MSG_ID', "msg id");
define('_MD_PM_LANG_SUBJECTC', "件名: ");
+define('_MD_PM_MESSAGE_CONFIRM_DELETE_PM', "以下のプライベートメッセージを本当に削除しますか?");
define('_PM_CANCELSEND', "キャンセル");
define('_PM_CLEAR', "クリア");
define('_PM_CLICKHERE', "プライベートメッセージの受信箱を表示する");
From minahito @ users.sourceforge.jp Thu Jul 27 18:42:15 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:42:15 +0900
Subject: [xoops-cvslog 3745] CVS update: xoops2jp/html/modules/pm/templates
Message-ID: <20060727094215.37D522AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/templates/pm_delete_one.html
diff -u /dev/null xoops2jp/html/modules/pm/templates/pm_delete_one.html:1.1.2.1
--- /dev/null Thu Jul 27 18:42:15 2006
+++ xoops2jp/html/modules/pm/templates/pm_delete_one.html Thu Jul 27 18:42:15 2006
@@ -0,0 +1,14 @@
+<{$smarty.const._MD_PM_MESSAGE_CONFIRM_DELETE_PM}>
+
+
+ <{xoops_token form=$actionForm}>
+ <{xoops_input type=hidden name=msg_id value=$actionForm->get('msg_id')}>
+
+
From minahito @ users.sourceforge.jp Thu Jul 27 18:42:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:42:53 +0900
Subject: [xoops-cvslog 3746] CVS update: xoops2jp/html/modules/pm/templates
Message-ID: <20060727094253.3F4502AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/templates/readpmsg.html
diff -u xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.14 xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.15
--- xoops2jp/html/modules/pm/templates/readpmsg.html:1.1.2.14 Wed Jul 5 11:37:06 2006
+++ xoops2jp/html/modules/pm/templates/readpmsg.html Thu Jul 27 18:42:53 2006
@@ -3,52 +3,54 @@
<{$smarty.const._PM_PROFILE}> »»
<{/if}>
<{$smarty.const._PM_INBOX}> »» <{$privMessage->getShow('subject')}>
-
-
- hasAvatar()}>colspan="2"<{/if}>><{$smarty.const._MD_PM_LANG_MESSAGE_DETAIL}> |
-
-
- <{if $sendUser->hasAvatar()}>
-
-
- <{if $sendUser->getShow('user_from')}>
- <{$sendUser->getShow('user_from')}>
+'>
+
+
+ hasAvatar()}>colspan="2"<{/if}>><{$smarty.const._MD_PM_LANG_MESSAGE_DETAIL}> |
+
+
+ <{if $sendUser->hasAvatar()}>
+
+
+ <{if $sendUser->getShow('user_from')}>
+ <{$sendUser->getShow('user_from')}>
+ <{/if}>
+ |
+ <{/if}>
+ <{$smarty.const._PM_FROMC}><{$sendUser->getShow('uname')}>
+
+ |
+
+
+ <{$smarty.const._PM_SENTC}><{$privMessage->get("msg_time")|xoops_formattimestamp}> |
+
+
+ <{$smarty.const._MD_PM_LANG_SUBJECTC}> <{$privMessage->getShow('subject')}> |
+
+
+
+ <{$privMessage->getShow('msg_text')}>
+ |
+
+
+
+ hasAvatar()}>colspan="2"<{/if}> style="text-align:right;">
+ <{if $previousMessage}>
+ <{$smarty.const._PM_PREVIOUS}>
+ <{/if}>
+ <{if $nextMessage}>
+ <{if $previousMessage}> | <{/if}>
+ <{$smarty.const._PM_NEXT}>
<{/if}>
|
- <{/if}>
- <{$smarty.const._PM_FROMC}><{$sendUser->getShow('uname')}>
-
- |
-
-
- <{$smarty.const._PM_SENTC}><{$privMessage->get("msg_time")|xoops_formattimestamp}> |
-
-
- <{$smarty.const._MD_PM_LANG_SUBJECTC}> <{$privMessage->getShow('subject')}> |
-
-
-
- <{$privMessage->getShow('msg_text')}>
- |
-
-
-
- hasAvatar()}>colspan="2"<{/if}> style="text-align:right;">
- <{if $previousMessage}>
- <{$smarty.const._PM_PREVIOUS}>
- <{/if}>
- <{if $nextMessage}>
- <{if $previousMessage}> | <{/if}>
- <{$smarty.const._PM_NEXT}>
- <{/if}>
- |
-
-
+ |
+
+
From minahito @ users.sourceforge.jp Thu Jul 27 18:43:26 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:43:26 +0900
Subject: [xoops-cvslog 3747] CVS update: xoops2jp/html/modules/user/actions
Message-ID: <20060727094326.2B0D52AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/actions/UserInfoAction.class.php
diff -u xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.4 xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.5
--- xoops2jp/html/modules/user/actions/UserInfoAction.class.php:1.1.2.4 Wed Jul 19 19:20:33 2006
+++ xoops2jp/html/modules/user/actions/UserInfoAction.class.php Thu Jul 27 18:43:26 2006
@@ -1,7 +1,7 @@
mRoot;
$service =& $root->mServiceManager->getService("LegacySearch");
- if ($service) {
- $current_uid = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0;
+ if (is_object($service)) {
+ $client =& $root->mServiceManager->createClient($service);
- $client =& new XCube_ServiceClient($service);
+ $current_uid = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0;
- $parameters = array("uid" => $uid, 'current_uid' => $current_uid);
- $this->mSearchResults = $client->call("getItems", $parameters);
+ $this->mSearchResults = $client->call('GetItems', $uid, $current_uid);
}
return USER_FRAME_VIEW_SUCCESS;
From minahito @ users.sourceforge.jp Thu Jul 27 18:43:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 18:43:53 +0900
Subject: [xoops-cvslog 3748] CVS update:
xoops2jp/html/modules/user/admin/templates
Message-ID: <20060727094353.29C5F2AC3E2@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/templates/group_delete.html
diff -u xoops2jp/html/modules/user/admin/templates/group_delete.html:1.1.2.11 xoops2jp/html/modules/user/admin/templates/group_delete.html:1.1.2.12
--- xoops2jp/html/modules/user/admin/templates/group_delete.html:1.1.2.11 Thu Jul 13 19:53:25 2006
+++ xoops2jp/html/modules/user/admin/templates/group_delete.html Thu Jul 27 18:43:53 2006
@@ -52,6 +52,7 @@
|
From minahito @ users.sourceforge.jp Thu Jul 27 22:04:05 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 27 Jul 2006 22:04:05 +0900
Subject: [xoops-cvslog 3749] CVS update: xoops2jp/html/modules/pm/actions
Message-ID: <20060727130405.AF32B2AC462@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php
diff -u xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php:1.1.2.1 xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php:1.1.2.2
--- xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php:1.1.2.1 Thu Jul 27 18:40:18 2006
+++ xoops2jp/html/modules/pm/actions/DeleteOneAction.class.php Thu Jul 27 22:04:05 2006
@@ -1,7 +1,7 @@
setTemplateName("pm_delete_one.html");
$render->setAttribute('actionForm', $this->mActionForm);
$render->setAttribute('object', $this->mObject);
+
+ $sendUser =& $this->mObject->getFromUser();
+ if (is_object($sendUser) && $sendUser->isActive()) {
+ $render->setAttribute("sendUser", $sendUser);
+ }
}
function executeViewSuccess(&$controller, &$xoopsUser, &$render)
From tom_g3x @ users.sourceforge.jp Thu Jul 27 22:26:25 2006
From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa)
Date: Thu, 27 Jul 2006 22:26:25 +0900
Subject: [xoops-cvslog 3750] CVS update: xoops2jp/html/modules/pm/templates
Message-ID: <20060727132625.C77D92AC454@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/templates/pm_delete_one.html
diff -u xoops2jp/html/modules/pm/templates/pm_delete_one.html:1.1.2.1 xoops2jp/html/modules/pm/templates/pm_delete_one.html:1.1.2.2
--- xoops2jp/html/modules/pm/templates/pm_delete_one.html:1.1.2.1 Thu Jul 27 18:42:15 2006
+++ xoops2jp/html/modules/pm/templates/pm_delete_one.html Thu Jul 27 22:26:25 2006
@@ -1,10 +1,37 @@
-<{$smarty.const._MD_PM_MESSAGE_CONFIRM_DELETE_PM}>
+<{$smarty.const._MD_PM_MESSAGE_CONFIRM_DELETE_PM}>
<{xoops_token form=$actionForm}>
<{xoops_input type=hidden name=msg_id value=$actionForm->get('msg_id')}>
+ <{$smarty.const._MD_PM_MESSAGE_CONFIRM_DELETE_PM}> |
+
+
+ <{$smarty.const._PM_FROMC}> |
+ ">
+ <{if $sendUser->getShow('uname')}>
+ <{$sendUser->getShow('uname')}>
+ <{/if}>
+ |
+
+
+ <{$smarty.const._PM_SENTC}> |
+ ">
+ <{$object->get("msg_time")|xoops_formattimestamp}>
+ |
+
+
+ <{$smarty.const._MD_PM_LANG_SUBJECTC}> |
+ ">
+
+<{$object->getShow('subject')}>
+ |
+
+
+ " colspan="2"><{$object->getShow('msg_text')}> |
+
+
+
From nobunobu @ users.sourceforge.jp Fri Jul 28 14:20:32 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Fri, 28 Jul 2006 14:20:32 +0900
Subject: [xoops-cvslog 3751] CVS update: xoops2jp/html/settings
Message-ID: <20060728052033.01A4A2AC166@users.sourceforge.jp>
Index: xoops2jp/html/settings/site_default.ini.php
diff -u xoops2jp/html/settings/site_default.ini.php:1.1.2.14 xoops2jp/html/settings/site_default.ini.php:1.1.2.15
--- xoops2jp/html/settings/site_default.ini.php:1.1.2.14 Tue Jun 27 18:17:27 2006
+++ xoops2jp/html/settings/site_default.ini.php Fri Jul 28 14:20:32 2006
@@ -28,7 +28,7 @@
protectorLE_Filter=/modules/base/preload/protectorLE/protectorLE.class.php
Legacy_SiteClose=/modules/base/preload/Primary/SiteClose.class.php
User_PrimaryFilter=/modules/user/preload/Primary/Primary.class.php
-# Legacy_NuSoapLoader=/modules/base/preload/Primary/NuSoapLoader.class.php
+Legacy_NuSoapLoader=/modules/base/preload/Primary/NuSoapLoader.class.php
# #
# components #
From minahito @ users.sourceforge.jp Fri Jul 28 17:55:38 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:55:38 +0900
Subject: [xoops-cvslog 3752] CVS update:
xoops2jp/html/modules/user/admin/actions
Message-ID: <20060728085538.595932AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/actions/UserViewAction.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/actions/UserViewAction.class.php:1.1.2.1
--- /dev/null Fri Jul 28 17:55:38 2006
+++ xoops2jp/html/modules/user/admin/actions/UserViewAction.class.php Fri Jul 28 17:55:38 2006
@@ -0,0 +1,142 @@
+mGetUserPosts =& new XCube_NewDelegate();
+ $this->mGetUserPosts->register('User_UserViewAction.GetUserPosts');
+ }
+
+ function prepare(&$controller, &$xoopsUser, $moduleConfig)
+ {
+ parent::prepare($controller, $xoopsUser, $moduleConfig);
+ $this->mActionForm =& new User_RecountForm();
+ $this->mActionForm->prepare();
+ }
+
+ function _getId()
+ {
+ return xoops_getrequest('uid');
+ }
+
+ function &_getHandler()
+ {
+ $handler =& xoops_getmodulehandler('users');
+ return $handler;
+ }
+
+ function getDefaultView(&$controller, &$xoopsUser)
+ {
+ if (is_object($this->mObject)) {
+ $this->mActionForm->load($this->mObject);
+ }
+
+ $ret = parent::getDefaultView($controller, $xoopsUser);
+
+ //
+ // Because this class implemented 'execute()', convet the status here.
+ //
+ if ($ret == USER_FRAME_VIEW_SUCCESS) {
+ return USER_FRAME_VIEW_INDEX;
+ }
+ else {
+ return $ret;
+ }
+ }
+
+ function execute(&$controller, &$xoopsUser)
+ {
+ if ($this->mObject == null) {
+ return USER_FRAME_VIEW_ERROR;
+ }
+
+ $this->mActionForm->load($this->mObject);
+
+ $this->mActionForm->fetch();
+ $this->mActionForm->validate();
+
+ if ($this->mActionForm->hasError()) {
+ return $this->getDefaultView($controller, $xoopsUser);
+ }
+
+ //
+ // Do 'recount'
+ //
+ $posts = 0;
+ $this->mGetUserPosts->call(new XCube_Ref($posts), $xoopsUser);
+
+ $this->mObject->set('posts', $posts);
+
+ $handler =& xoops_getmodulehandler('users');
+ return $handler->insert($this->mObject) ? USER_FRAME_VIEW_SUCCESS
+ : USER_FRAME_VIEW_ERROR;
+ }
+
+ function executeViewIndex(&$controller, &$xoopsUser, &$render)
+ {
+ $render->setTemplateName("user_view.html");
+ $render->setAttribute('actionForm', $this->mActionForm);
+ $render->setAttribute('object', $this->mObject);
+
+ $handler =& xoops_getmodulehandler('ranks');
+ $rank =& $handler->get($this->mObject->get('rank'));
+ $render->setAttribute('rank', $rank);
+
+ $handler =& xoops_gethandler('timezone');
+ $timezone =& $handler->get($this->mObject->get('timezone_offset'));
+ $render->setAttribute('timezone', $timezone);
+
+ //
+ // TODO dirty code... :(
+ //
+ $umodeOptions = array("nest" => _NESTED, "flat" => _FLAT, "thread" => _THREADED);
+ $render->setAttribute('umode', $umodeOptions[$this->mObject->get('umode')]);
+
+ $uorderOptions = array(0 => _OLDESTFIRST, 1 => _NEWESTFIRST);
+ $render->setAttribute('uorder', $uorderOptions[$this->mObject->get('uorder')]);
+
+ //
+ // Notifications. (TODO Also dirty...)
+ //
+ $controller->mRoot->mLanguageManager->loadPageTypeMessageCatalog('notification');
+ require_once XOOPS_ROOT_PATH . "/include/notification_constants.php";
+
+ $methodOptions = array(XOOPS_NOTIFICATION_METHOD_DISABLE => _NOT_METHOD_DISABLE,
+ XOOPS_NOTIFICATION_METHOD_PM => _NOT_METHOD_PM,
+ XOOPS_NOTIFICATION_METHOD_EMAIL => _NOT_METHOD_EMAIL
+ );
+ $render->setAttribute('notify_method', $methodOptions[$this->mObject->get('notify_method')]);
+
+ $modeOptions = array(XOOPS_NOTIFICATION_MODE_SENDALWAYS => _NOT_MODE_SENDALWAYS,
+ XOOPS_NOTIFICATION_MODE_SENDONCETHENDELETE => _NOT_MODE_SENDONCE,
+ XOOPS_NOTIFICATION_MODE_SENDONCETHENWAIT => _NOT_MODE_SENDONCEPERLOGIN
+ );
+ $render->setAttribute('notify_mode', $modeOptions[$this->mObject->get('notify_mode')]);
+ }
+
+ function executeViewSuccess(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeRedirect("./index.php?action=UserView&uid=" . $this->mObject->get('uid'), 1, _AD_USER_MESSAGE_RECOUNT_SUCCESS);
+ }
+
+ function executeViewError(&$controller, &$xoopsUser, &$render)
+ {
+ $controller->executeRedirect("./index.php?action=UserList", 1, _AD_USER_ERROR_CONTENT_IS_NOT_FOUND);
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Fri Jul 28 17:55:58 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:55:58 +0900
Subject: [xoops-cvslog 3753] CVS update: xoops2jp/html/modules/user/admin/forms
Message-ID: <20060728085558.3539E2AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/forms/UserRecountForm.class.php
diff -u /dev/null xoops2jp/html/modules/user/admin/forms/UserRecountForm.class.php:1.1.2.1
--- /dev/null Fri Jul 28 17:55:58 2006
+++ xoops2jp/html/modules/user/admin/forms/UserRecountForm.class.php Fri Jul 28 17:55:58 2006
@@ -0,0 +1,48 @@
+get('uid');
+ }
+
+ function prepare()
+ {
+ //
+ // Set form properties
+ //
+ $this->mFormProperties['uid'] =& new XCube_IntProperty('uid');
+
+ //
+ // Set field properties
+ //
+ $this->mFieldProperties['uid'] =& new XCube_FieldProperty($this);
+ $this->mFieldProperties['uid']->setDependsByArray(array('required','objectExist'));
+ $this->mFieldProperties['uid']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_UID);
+ $this->mFieldProperties['uid']->addMessage('objectExist', _AD_USER_ERROR_OBJECTEXIST, _AD_USER_LANG_UID);
+ $this->mFieldProperties['uid']->addVar('handler', 'users');
+ $this->mFieldProperties['uid']->addVar('module', 'user');
+ }
+
+ function load(&$obj)
+ {
+ $this->set('uid', $obj->get('uid'));
+ }
+
+ function update(&$obj)
+ {
+ $obj->set('uid', $this->get('uid'));
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Fri Jul 28 17:56:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:56:07 +0900
Subject: [xoops-cvslog 3754] CVS update:
xoops2jp/html/modules/user/admin/templates
Message-ID: <20060728085607.C9BA72AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/templates/user_view.html
diff -u /dev/null xoops2jp/html/modules/user/admin/templates/user_view.html:1.1.2.1
--- /dev/null Fri Jul 28 17:56:07 2006
+++ xoops2jp/html/modules/user/admin/templates/user_view.html Fri Jul 28 17:56:07 2006
@@ -0,0 +1,202 @@
+
+
+
+ <{$smarty.const._AD_USER_TIPS_RECOUNT_POSTS}>
+
+
+
From minahito @ users.sourceforge.jp Fri Jul 28 17:56:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:56:37 +0900
Subject: [xoops-cvslog 3755] CVS update:
xoops2jp/html/modules/user/admin/templates
Message-ID: <20060728085637.57F872AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/templates/user_list.html
diff -u xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.13 xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.14
--- xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.13 Thu Jul 13 19:53:25 2006
+++ xoops2jp/html/modules/user/admin/templates/user_list.html Fri Jul 28 17:56:37 2006
@@ -39,13 +39,14 @@
" alt="<{$smarty.const._AD_USER_LANG_USER}>" title="<{$smarty.const._AD_USER_LANG_USER}>" /> |
<{$user->getShow('uid')}> |
- <{$user->getShow('uname')}> |
+ <{$user->getShow('uname')}> |
<{$user->getShow('name')}> |
<{$user->get('user_regdate')|xoops_formattimestamp}> |
<{$user->get('last_login')|xoops_formattimestamp:l}> |
<{$user->getShow('posts')}> |
<{$user->getShow('level')}> |
+ " alt="<{$smarty.const._VIEW}>" title="<{$smarty.const._VIEW}>" />
" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" />
<{if $user->get('uid') != 1 }>
" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
From minahito @ users.sourceforge.jp Fri Jul 28 17:56:52 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:56:52 +0900
Subject: [xoops-cvslog 3756] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060728085652.533912AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/AbstractViewAction.class.php
diff -u /dev/null xoops2jp/html/modules/user/class/AbstractViewAction.class.php:1.1.2.1
--- /dev/null Fri Jul 28 17:56:52 2006
+++ xoops2jp/html/modules/user/class/AbstractViewAction.class.php Fri Jul 28 17:56:52 2006
@@ -0,0 +1,49 @@
+_getId();
+
+ $this->mObjectHandler =& $this->_getHandler();
+
+ $this->mObject =& $this->mObjectHandler->get($id);
+ }
+
+ function prepare(&$controller, &$xoopsUser, &$moduleConfig)
+ {
+ $this->_setupObject();
+ }
+
+ function getDefaultView(&$controller, &$xoopsUser)
+ {
+ if ($this->mObject == null) {
+ return USER_FRAME_VIEW_ERROR;
+ }
+
+ return USER_FRAME_VIEW_SUCCESS;
+ }
+
+ function execute(&$controller, &$xoopsUser)
+ {
+ return $this->getDefaultView($controller, $xoopsUser);
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Fri Jul 28 17:57:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:57:07 +0900
Subject: [xoops-cvslog 3757] CVS update:
xoops2jp/html/modules/user/language/english
Message-ID: <20060728085707.318292AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/language/english/admin.php
diff -u xoops2jp/html/modules/user/language/english/admin.php:1.1.2.17 xoops2jp/html/modules/user/language/english/admin.php:1.1.2.18
--- xoops2jp/html/modules/user/language/english/admin.php:1.1.2.17 Thu Jul 13 19:55:49 2006
+++ xoops2jp/html/modules/user/language/english/admin.php Fri Jul 28 17:57:07 2006
@@ -1,6 +1,7 @@
X days ago");
define('_AD_USER_LANG_REGDATE_MORE', "Joined date is more than X days ago");
@@ -159,14 +162,17 @@
define('_AD_USER_LANG_USER_REGDATE', "user regdate");
define('_AD_USER_LANG_USER_SEARCH_LIST', "User search list");
define('_AD_USER_LANG_USER_SIG', "Signature");
+define('_AD_USER_LANG_USER_VIEW', "user view");
define('_AD_USER_LANG_USER_VIEWEMAIL', "Allow other users to view my email address.");
define('_AD_USER_LANG_USER_YIM', "YIM");
define('_AD_USER_LANG_VPASS', "Verify password");
define('_AD_USER_MESSAGE_CONFIRM_DELETE', "Are you sure you want to delete?");
define('_AD_USER_MESSAGE_CONFIRM_DELETE_RANK', "Do you delete the user rank?");
define('_AD_USER_MESSAGE_DELETE_RANK_SUCCESS', "The user rank has been deleted.");
+define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "Recount success");
define('_AD_USER_MESSAGE_SAVE_RANK_SUCCESS', "The user rank has been saved.");
define('_AD_USER_TIP_DELETE_AVATAR', "Avatars of users who are using this avatar will be changed to blank.gif.");
-define('_AD_USER_TIPS_MAILJOB_SEND', "Mailjob send");
+define('_AD_USER_TIPS_MAILJOB_SEND', "If there are too many letters, the server may not return response message on screen. In the case, do reload. By repeating reload, you can send all of letters.");
+define('_AD_USER_TIPS_RECOUNT_POSTS', "If posts of this user are a wrong, you may recount it with clicking 'Recount' button.");
?>
From minahito @ users.sourceforge.jp Fri Jul 28 17:57:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:57:07 +0900
Subject: [xoops-cvslog 3758] CVS update:
xoops2jp/html/modules/user/language/japanese
Message-ID: <20060728085707.558DE2AC609@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/language/japanese/admin.php
diff -u xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.26 xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.27
--- xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.26 Thu Jul 13 19:55:55 2006
+++ xoops2jp/html/modules/user/language/japanese/admin.php Fri Jul 28 17:57:07 2006
@@ -1,6 +1,7 @@
X日以内");
define('_AD_USER_LANG_REGDATE_MORE', "ユーザ登録日時がX日以上前");
@@ -159,14 +162,17 @@
define('_AD_USER_LANG_USER_REGDATE', "登録日時");
define('_AD_USER_LANG_USER_SEARCH_LIST', "ユーザー検索結果");
define('_AD_USER_LANG_USER_SIG', "署名");
+define('_AD_USER_LANG_USER_VIEW', "ユーザー閲覧");
define('_AD_USER_LANG_USER_VIEWEMAIL', "このメールアドレスを公開する");
define('_AD_USER_LANG_USER_YIM', "YIM");
define('_AD_USER_LANG_VPASS', "パスワード確認");
define('_AD_USER_MESSAGE_CONFIRM_DELETE', "本当に削除しますか?");
define('_AD_USER_MESSAGE_CONFIRM_DELETE_RANK', "このユーザーランクを本当に削除しますか?");
define('_AD_USER_MESSAGE_DELETE_RANK_SUCCESS', "指定ユーザーランクを削除しました");
+define('_AD_USER_MESSAGE_RECOUNT_SUCCESS', "再集計に成功しました");
define('_AD_USER_MESSAGE_SAVE_RANK_SUCCESS', "ユーザーランクを保存しました");
define('_AD_USER_TIP_DELETE_AVATAR', "このアバターを使用しているユーザーのアバターはブランクに変更されます");
define('_AD_USER_TIPS_MAILJOB_SEND', "送信対象ユーザー数が多すぎる場合、反応が返ってこないケース(真っ白になるなど)があります。 その場合はブラウザでリロード(再読込)操作を行ってください。操作を繰り返すことで全ユーザーへ送信できます。");
+define('_AD_USER_TIPS_RECOUNT_POSTS', "もし投稿数が間違っているようであれば、再計算することができます。");
?>
From minahito @ users.sourceforge.jp Fri Jul 28 17:58:02 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:58:02 +0900
Subject: [xoops-cvslog 3759] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060728085802.42DF02AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.54 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.55
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.54 Thu Jul 27 18:29:30 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri Jul 28 17:58:02 2006
@@ -752,6 +752,7 @@
$delegateManager->add('Legacypage.Imagemanager.Access', 'Legacy_EventFunction::imageManager', $file);
$delegateManager->add('Legacypage.Backend.Access', 'Legacy_EventFunction::backend', $file);
$delegateManager->add('Legacypage.Misc.Access', 'Legacy_EventFunction::misc', $file);
+ $delegateManager->add('User_UserViewAction.GetUserPosts', 'Legacy_EventFunction::recountPost', $file);
return $delegateManager;
}
From minahito @ users.sourceforge.jp Fri Jul 28 17:58:27 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 17:58:27 +0900
Subject: [xoops-cvslog 3760] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060728085827.CCCAB2AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.8 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.9
--- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.8 Thu Jul 27 18:30:24 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Fri Jul 28 17:58:27 2006
@@ -1,7 +1,7 @@
setAttribute('xoops_notification', $xoops_notification);
}
+
+ /**
+ * This member function is added to 'User_UserViewAction.GetUserPosts'.
+ * Recount posts of $xoopsUser in the comment system.
+ *
+ * @static
+ */
+ function recountPost(&$posts, $xoopsUser)
+ {
+ $handler =& xoops_gethandler('comment');
+ $criteria =& new Criteria('com_uid', $xoopsUser->get('uid'));
+ $posts += $handler->getCount($criteria);
+ }
}
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Fri Jul 28 18:00:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 18:00:51 +0900
Subject: [xoops-cvslog 3761] CVS update: xoops2jp/html/modules/user/admin/.xml
Message-ID: <20060728090051.3AD032AC609@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/.xml/user_recount.xml
diff -u /dev/null xoops2jp/html/modules/user/admin/.xml/user_recount.xml:1.1.2.1
--- /dev/null Fri Jul 28 18:00:51 2006
+++ xoops2jp/html/modules/user/admin/.xml/user_recount.xml Fri Jul 28 18:00:51 2006
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From minahito @ users.sourceforge.jp Fri Jul 28 18:04:39 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 28 Jul 2006 18:04:39 +0900
Subject: [xoops-cvslog 3762] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060728090439.D3B3A2AC080@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.55 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.56
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.55 Fri Jul 28 17:58:02 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri Jul 28 18:04:39 2006
@@ -784,8 +784,8 @@
if(is_object($this->mXoopsUser)) {
// RMV-NOTIFY
// Perform some maintenance of notification records
- // $notification_handler =& xoops_gethandler('notification');
- // $notification_handler->doLoginMaintenance($user->getVar('uid'));
+ $notification_handler =& xoops_gethandler('notification');
+ $notification_handler->doLoginMaintenance($this->mXoopsUser->get('uid'));
XCube_DelegateUtils::call("Site.CheckLogin.Success", new XCube_Ref($this->mXoopsUser));
From minahito @ users.sourceforge.jp Mon Jul 31 18:45:43 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 18:45:43 +0900
Subject: [xoops-cvslog 3763] CVS update: xoops2jp/html
Message-ID: <20060731094543.D9C002AC0FA@users.sourceforge.jp>
Index: xoops2jp/html/backend.php
diff -u xoops2jp/html/backend.php:1.2.8.2 xoops2jp/html/backend.php:1.2.8.3
--- xoops2jp/html/backend.php:1.2.8.2 Fri May 26 21:08:31 2006
+++ xoops2jp/html/backend.php Mon Jul 31 18:45:43 2006
@@ -2,10 +2,11 @@
/**
* This file was full scratched in XOOPS Cube Legacy project.
*
- * @version $Id: backend.php,v 1.2.8.2 2006/05/26 12:08:31 minahito Exp $
+ * @package Legacy
+ * @version $Id: backend.php,v 1.2.8.3 2006/07/31 09:45:43 minahito Exp $
*/
-require_once "mainfile.php";
+require_once "./mainfile.php";
require_once XOOPS_ROOT_PATH . "/header.php";
//
@@ -13,7 +14,6 @@
// Raise event "Legacypage.Backend.Access"
//
$root=&XCube_Root::getSingleton();
-$eventArgs = array();
-$root->mEventManager->raiseEvent("Legacypage.Backend.Access", $root->mController, $eventArgs);
+XCube_DelegateUtils::call("Legacypage.Backend.Access");
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Mon Jul 31 18:45:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 18:45:51 +0900
Subject: [xoops-cvslog 3764] CVS update: xoops2jp/html
Message-ID: <20060731094551.918872AC0FA@users.sourceforge.jp>
Index: xoops2jp/html/index.php
diff -u xoops2jp/html/index.php:1.2.8.2 xoops2jp/html/index.php:1.2.8.3
--- xoops2jp/html/index.php:1.2.8.2 Fri Dec 30 17:19:38 2005
+++ xoops2jp/html/index.php Mon Jul 31 18:45:51 2006
@@ -1,19 +1,16 @@
mEventManager->raiseEvent("Legacypage.Top.Access", $root->mController, $eventArgs);
+$root=&XCube_Root::getSingleton();
$xoopsOption['show_cblock'] = 1;
+XCube_DelegateUtils::call("Legacypage.Top.Access");
require_once "./footer.php";
-
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Mon Jul 31 18:52:26 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 18:52:26 +0900
Subject: [xoops-cvslog 3765] CVS update: xoops2jp/html/class
Message-ID: <20060731095226.CE6D12AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/class/module.textsanitizer.php
diff -u xoops2jp/html/class/module.textsanitizer.php:1.2.8.5 xoops2jp/html/class/module.textsanitizer.php:1.2.8.6
--- xoops2jp/html/class/module.textsanitizer.php:1.2.8.5 Sat Feb 18 23:51:46 2006
+++ xoops2jp/html/class/module.textsanitizer.php Mon Jul 31 18:52:26 2006
@@ -1,5 +1,5 @@
mMakeClickablePre =& new XCube_NewDelegate();
+ $this->mMakeClickablePre->register('MyTextSanitizer.MakeClickablePre');
+
+ $this->mMakeClickablePostFilter =& new XCube_NewDelegate();
+ $this->mMakeClickablePostFilter->register('MyTextSanitizer.MakeClickablePostFilter');
+
+ $this->mXoopsCodePre =& new XCube_NewDelegate();
+ $this->mXoopsCodePre->register('MyTextSanitizer.XoopsCodePre');
+
+ $this->mXoopsCodePostFilter =& new XCube_NewDelegate();
+ $this->mXoopsCodePostFilter->register('MyTextSanitizer.XoopsCodePostFilter');
}
/**
@@ -133,27 +163,22 @@
$patterns = array("/(^|[^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/])ftp\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/(^|[^]_a-z0-9-=\"'\/:\.])([a-z0-9\-_\.]+?)@([^, \r\n\"\(\)'<>\[\]]+)/i");
$replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1ftp.\\2.\\3", "\\1\\2@\\3");
- // RaiseEvent 'Legacy.TextSanitizer.MakeClicablePre'
+ // RaiseEvent 'MyTextSanitizer.MakeClickablePre' ('Legacy.TextSanitizer.MakeClicablePre')
// Delegate may replace makeClickable conversion table
// varArgs :
// 'patterns' [I/O] : &Array of pattern RegExp
// 'replacements' [I/O] : &Array of replacing string
//
- if ($result =& XCube_EventUtils::quickRaiseEvent('Legacy.TextSanitizer.MakeClickablePre',
- array('patterns'=> &$patterns,
- 'replacements' => &$replacements))) {
- $patterns =& $result['patterns'];
- $replacements =& $result['replacements'];
- }
+ $this->mMakeClickablePre->call(new XCube_Ref($patterns), new XCube_Ref($replacements));
$text = preg_replace($patterns, $replacements, $text);
- // RaiseEvent : 'Legacy.TextSanitizer.MakeClicablePostFilter'
+ // RaiseEvent : 'MyTextSanitizer.MakeClickablePostFilter' ('Legacy.TextSanitizer.MakeClicablePostFilter')
// Delegate may convert output text with quickApplyFilter rule
// varArgs :
// 'string' [I/O] : Text to convert;
//
- $text = XCube_EventUtils::quickApplyFilter('Legacy.TextSanitizer.MakeClickablePostFilter', $text);
+ $this->mMakeClickablePostFilter->call(new XCube_Ref($text));
return $text;
}
@@ -226,31 +251,24 @@
$patterns[] = "/about:/si";
$replacements[] = "about :";
- // RaiseEvent 'Legacy.TextSanitizer.XoopsCodePre'
+ // RaiseEvent 'MyTextSanitizer.XoopsCodePre' ('Legacy.TextSanitizer.XoopsCodePre')
// Delegate may replace conversion table
// varArgs :
// 'patterns' [I/O] : &Array of pattern RegExp
// 'replacements' [I/O] : &Array of replacing string
// 'allowimage' [I] : xoopsCodeDecode $allowimage parameter
//
- if ($result =& XCube_EventUtils::quickRaiseEvent('Legacy.TextSanitizer.XoopsCodePre',
- array('patterns'=> &$patterns,
- 'replacements' => &$replacements,
- 'allowimage'=>$allowimage))) {
- $patterns =& $result['patterns'];
- $replacements =& $result['replacements'];
- }
+ $this->mXoopsCodePre->call(new XCube_Ref($patterns), new XCube_Ref($replacements), $allowimage);
$text = preg_replace($patterns, $replacements, $text);
- // RaiseEvent : 'Legacy.TextSanitizer.XoopsCodePostFilter'
+ // RaiseEvent : 'MyTextSanitizer.XoopsCodePostFilter' ('Legacy.TextSanitizer.XoopsCodePostFilter')
// Delegate may convert output text with quickApplyFilter rule
// varArgs :
// 'string' [I/O] : Text to convert;
// 'allowimage' [I] : xoopsCodeDecode $allowimage parameter
//
- $text = XCube_EventUtils::quickApplyFilter('Legacy.TextSanitizer.XoopsCodePostFilter', $text,
- array('allowimage'=>$allowimage));
+ $this->mXoopsCodePostFilter->call(new XCube_Ref($text), $allowimage);
return $text;
}
From minahito @ users.sourceforge.jp Mon Jul 31 18:56:29 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 18:56:29 +0900
Subject: [xoops-cvslog 3766] CVS update: xoops2jp/html/class
Message-ID: <20060731095630.01DBA2AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/class/template.php
diff -u xoops2jp/html/class/template.php:1.2.8.6 xoops2jp/html/class/template.php:1.2.8.7
--- xoops2jp/html/class/template.php:1.2.8.6 Wed May 10 12:34:12 2006
+++ xoops2jp/html/class/template.php Mon Jul 31 18:56:29 2006
@@ -1,5 +1,5 @@
XOOPS_UPLOAD_URL
));
- // RaiseEvent 'Legacy.XoopsTpl.New'
+ // Delegate 'XoopsTpl.New'
// Delegate may define additional initialization code for XoopTpl Instance;
// varArgs :
// 'xoopsTpl' [I/O] : $this
//
- $dmy =& XCube_EventUtils::quickRaiseEvent('Legacy.XoopsTpl.New', array('xoopsTpl' => &$this));
+ XCube_DelegateUtils::call('XoopsTpl.New', new XCube_Ref($this));
}
/**
@@ -258,13 +258,16 @@
**/
function xoops_template_touch($tpl_id, $clear_old = true)
{
+ $result = null;
+
// RaiseEvent 'Legacy.XoopsTpl.TemplateTouch'
// Delegate may define new template touch logic (with XC21, only for clear cache & compiled template)
// varArgs :
// 'xoopsTpl' [I/O] : $this
//
- if (! $eventResult =& XCube_EventUtils::quickRaiseEvent('Legacy.XoopsTpl.TemplateTouch',
- array('tpl_id' => $tpl_id,'clear_old' => $clear_old,'result'=>false))) {
+ XCube_DelegateUtils::call('Legacy.XoopsTpl.TemplateTouch', $tpl_id, $clear_old, new XCube_Ref($result));
+
+ if ($result === null) {
$tpl = new XoopsTpl();
$tpl->force_compile = true;
$tplfile_handler =& xoops_gethandler('tplfile');
@@ -280,7 +283,7 @@
}
return false;
} else {
- return $eventResult['result'];
+ return $result;
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 18:57:26 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 18:57:26 +0900
Subject: [xoops-cvslog 3767] CVS update: xoops2jp/html/class
Message-ID: <20060731095726.E0B6D2AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_Utils.class.php
diff -u xoops2jp/html/class/XCube_Utils.class.php:1.1.2.4 xoops2jp/html/class/XCube_Utils.class.php:1.1.2.5
--- xoops2jp/html/class/XCube_Utils.class.php:1.1.2.4 Tue Apr 11 17:39:06 2006
+++ xoops2jp/html/class/XCube_Utils.class.php Mon Jul 31 18:57:26 2006
@@ -1,29 +1,8 @@
//
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
+/**
+ * @package XCube
+ * @version $Id: XCube_Utils.class.php,v 1.1.2.5 2006/07/31 09:57:26 minahito Exp $
+ */
class XCube_Utils
{
@@ -35,69 +14,13 @@
@param $url string
@param $time intval
@param $message If you want to multiline message, you must set message as array.
+
+ @deprecated Don't use static function of XCube layer for redirect.
*/
- function redirectHeader($url,$time,$messages=_TAKINGBACK)
+ function redirectHeader($url, $time, $messages = null)
{
- global $xoopsConfig, $xoopsRequestUri;
-
- if (preg_match("/(javascript|vbscript):/si", $url) )
- $url = XOOPS_URL;
-
-
- $displayMessage = is_array($messages) ? implode(" ",$messages) : $messages;
-
- if (!defined('XOOPS_CPFUNC_LOADED')) {
- require_once XOOPS_ROOT_PATH.'/class/template.php';
- $xoopsTpl = new XoopsTpl();
- $xoopsTpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES));
- $xoopsTpl->assign('langcode', _LANGCODE);
- $xoopsTpl->assign('charset', _CHARSET);
- $xoopsTpl->assign('time', $time);
-
- if (defined('SID') && (! isset($_COOKIE[session_name()]) || ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '' && !isset($_COOKIE[$xoopsConfig['session_name']])))) {
- if (!strstr($url, '?')) {
- $url .= '?' . SID;
- }
- else {
- $url .= '&'.SID;
- }
- }
-
- $url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
- $xoopsTpl->assign('url', $url);
- $xoopsTpl->assign('message', $displayMessage);
- $xoopsTpl->assign('lang_ifnotreload', sprintf(_IFNOTRELOAD, $url));
- $GLOBALS['xoopsModuleUpdate'] = 1;
- $xoopsTpl->display('db:system_redirect.html');
- } else {
- $url = preg_replace("/&/i", '&', htmlspecialchars($url, ENT_QUOTES));
- echo '
-
-
- '.htmlspecialchars($xoopsConfig['sitename']).'
-
-
-
-
-
-
-
- '.$displayMessage.'
-
- '.sprintf(_IFNOTRELOAD, $url).'
-
-
-
- ';
- }
-
- exit();
+ $root =& XCube_Root::getSingleton();
+ $root->mController->executeRedirect($url, $time, $messages);
}
function formatMessage()
From minahito @ users.sourceforge.jp Mon Jul 31 19:01:29 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:01:29 +0900
Subject: [xoops-cvslog 3768] CVS update: xoops2jp/html/kernel
Message-ID: <20060731100129.160372AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/kernel/notification.php
diff -u xoops2jp/html/kernel/notification.php:1.2.8.2 xoops2jp/html/kernel/notification.php:1.2.8.3
--- xoops2jp/html/kernel/notification.php:1.2.8.2 Tue May 16 22:25:07 2006
+++ xoops2jp/html/kernel/notification.php Mon Jul 31 19:01:28 2006
@@ -1,5 +1,5 @@
mTrigger =& new XCube_NewDelegate();
+ $this->mTrigger->register('XoopsNotificationHandler.Trigger');
+ }
/**
* Create a {@link XoopsNotification}
@@ -585,7 +597,7 @@
break;
}
}
- // RaiseEvent 'Legacy.Notify.Trigger'
+ // RaiseEvent 'XoopsNotificationHandler.Trigger' ('Legacy.Notify.Trigger')
// Delegate may hanldle notified event
// varArgs :
// 'category' [I] : Paramater $category of triggerEvent()
@@ -599,6 +611,7 @@
// 'force_return' [O] : If force return this triggerEvents method, set it True
//
if ($event_correct) {
+ /*
$varArgs = array('category' => $category,
'event' => $event,
'itemId' => $item_id,
@@ -608,11 +621,14 @@
'omitUid' => $omit_user_id,
'eventConfig' => $not_config,
'force_return' => false,
- );
- if ($result =& XCube_EventUtils::quickRaiseEvent('Legacy.Notify.Trigger', $varArgs )) {
- if ($result['force_return']) return;
- }
+ );*/
+
+ $force_return = false;
+ $this->mTrigger->call($category, $event, $item_id, $extra_tags, new XCube_Ref($module), $user_list, $omit_user_id, $not_config, new XCube_Ref($force_return));
+ if ($force_return) {
+ return;
+ }
}
// Check if event is enabled
From minahito @ users.sourceforge.jp Mon Jul 31 19:02:17 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:02:17 +0900
Subject: [xoops-cvslog 3769] CVS update: xoops2jp/html/kernel
Message-ID: <20060731100217.320852AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/kernel/XCube_Controller.class.php
diff -u xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.13 xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.14
--- xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.13 Thu Jul 20 17:10:57 2006
+++ xoops2jp/html/kernel/XCube_Controller.class.php Mon Jul 31 19:02:17 2006
@@ -1,7 +1,7 @@
mRoot=&$root;
- $this->mRoot->setEventManager($this->_createEventManager());
$this->mRoot->setDelegateManager($this->_createDelegateManager());
$this->mRoot->setServiceManager($this->_createServiceManager());
}
@@ -219,14 +216,6 @@
function _setupUser()
{
- $eventManager=&$this->mRoot->getEventManager();
- if($eventManager!=null) {
- $eventArgs= new LoginEventArgs();
- $eventManager->raiseEvent("Site.Login",$this,$eventArgs);
-
- if($eventArgs->hasUser())
- $this->mUser=&$eventArgs->getUser();
- }
}
function _setupModuleController()
@@ -335,13 +324,6 @@
}
}
- function &_createEventManager()
- {
- require_once XOOPS_ROOT_PATH."/class/XCube_EventManager.class.php";
- $eventManager=new XCube_EventManager();
- return $eventManager;
- }
-
/**
* Create an instance of delegate manager and return it.
*
@@ -355,8 +337,8 @@
function &_createServiceManager()
{
- require_once XOOPS_ROOT_PATH."/class/XCube_ServiceManager.class.php";
- $serviceManager=new XCube_ServiceManager();
+ require_once XOOPS_ROOT_PATH . "/class/XCube_ServiceManager.class.php";
+ $serviceManager =& new XCube_ServiceManager();
return $serviceManager;
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:02:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:02:53 +0900
Subject: [xoops-cvslog 3770] CVS update: xoops2jp/html/kernel
Message-ID: <20060731100253.403EC2AC0D1@users.sourceforge.jp>
Index: xoops2jp/html/kernel/XCube_Root.class.php
diff -u xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.15 xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.16
--- xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.15 Tue Jul 11 19:05:58 2006
+++ xoops2jp/html/kernel/XCube_Root.class.php Mon Jul 31 19:02:53 2006
@@ -1,7 +1,7 @@
mEventManager =& $eventManager;
- }
-
- /**
- * Return the instance of the event manager.
- *
- * @return XCube_EventManager
- */
- function &getEventManager()
- {
- return $this->mEventManager;
- }
-
- /**
* Set the instance of the delegate manager.
*
* @param $delegateManager XCube_DelegateManager
From minahito @ users.sourceforge.jp Mon Jul 31 19:04:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:04:53 +0900
Subject: [xoops-cvslog 3771] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060731100453.6EE4F2AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/BackendAction.class.php
diff -u xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.4 xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.5
--- xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.4 Sat May 27 23:07:40 2006
+++ xoops2jp/html/modules/base/actions/BackendAction.class.php Mon Jul 31 19:04:53 2006
@@ -6,22 +6,6 @@
{
var $mItems = array();
- function getDefaultView(&$controll, &$xoopsUser)
- {
- $items= $this->_getRSSInformation();
-
- $sortArr = array();
- foreach ($items as $item) {
- $i = intval($item['pubdate']);
- for (; isset($sortArr[$i]) ; $i++);
-
- $sortArr[$i] = $item;
- }
- krsort($sortArr);
- $this->mItems = $sortArr;
- return LEGACY_FRAME_VIEW_INDEX;
- }
-
/**
* The spec of getRSS():
* append your RSS item to $eventArgs array. You don't need to sanitize your values. Use raw value.
@@ -33,14 +17,34 @@
* $item['description'] ... not required.
* $item['category'] ... not required.
* $item['author'] ... not required.
- */
- function _getRSSInformation()
+ *
+ * @var XCube_NewDelegate
+ */
+ var $mGetRSSItems = null;
+
+ function Legacy_BackendAction($flag)
{
- $root =& XCube_Root::getSingleton();
- $eventArgs = array();
- $root->mEventManager->raiseEvent("Module.Legacy.Backend.getRSS", $this, $eventArgs);
+ parent::Legacy_Action($flag);
- return $eventArgs;
+ $this->mGetRSSItems =& new XCube_NewDelegate();
+ $this->mGetRSSItems->register('Legacy_BackendAction.GetRSSItems');
+ }
+
+ function getDefaultView(&$controll, &$xoopsUser)
+ {
+ $items = array();
+ $this->mGetRSSItems->call(new XCube_Ref($items));
+
+ $sortArr = array();
+ foreach ($items as $item) {
+ $i = intval($item['pubdate']);
+ for (; isset($sortArr[$i]) ; $i++);
+
+ $sortArr[$i] = $item;
+ }
+ krsort($sortArr);
+ $this->mItems = $sortArr;
+ return LEGACY_FRAME_VIEW_INDEX;
}
function executeViewIndex(&$controller, &$xoopsUser, &$render)
From minahito @ users.sourceforge.jp Mon Jul 31 19:05:08 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:05:08 +0900
Subject: [xoops-cvslog 3772] CVS update: xoops2jp/html/modules/base/actions
Message-ID: <20060731100508.264BB2AC0A5@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php
diff -u xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.5 xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.6
--- xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.5 Thu Jul 27 18:31:36 2006
+++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Mon Jul 31 19:05:07 2006
@@ -34,7 +34,7 @@
function hasPerm(&$controller, &$xoopsUser)
{
if ($this->mConfig['enable_search'] != 1) {
- XCube_Utils::redirectHeader(XOOPS_URL, 3, _MD_BASE_ERROR_SEARCH_NOT_ENABLED);
+ $controller->executeRedirect(XOOPS_URL, 3, _MD_BASE_ERROR_SEARCH_NOT_ENABLED);
return false;
}
return true;
From minahito @ users.sourceforge.jp Mon Jul 31 19:22:13 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:22:13 +0900
Subject: [xoops-cvslog 3773] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060731102213.DBF932AC0D2@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/comment.php
diff -u xoops2jp/html/modules/base/class/comment.php:1.1.2.8 xoops2jp/html/modules/base/class/comment.php:1.1.2.9
--- xoops2jp/html/modules/base/class/comment.php:1.1.2.8 Fri Apr 14 15:02:09 2006
+++ xoops2jp/html/modules/base/class/comment.php Mon Jul 31 19:22:13 2006
@@ -73,15 +73,29 @@
var $mTable = "xoopscomments";
var $mPrimary = "com_id";
var $mClass = "BaseCommentObject";
+
+ /**
+ * @var XCube_NewDelegate
+ */
+ var $mUpdateSuccess;
+
+ /**
+ * @var XCube_NewDelegate
+ */
+ var $mDeleteSuccess;
+
+ function BaseCommentHandler(&$db)
+ {
+ parent::XoopsObjectGenericHandler($db);
+
+ $this->mUpdateSuccess =& new XCube_NewDelegate();
+ $this->mDeleteSuccess =& new XCube_NewDelegate();
+ }
function insert(&$comment, $force = false)
{
if (parent::insert($comment, $force)) {
- $root =& XCube_Root::getSingleton();
- $eventArgs = array();
- $eventArgs['comment'] =& $comment;
- $root->mEventManager->raiseEvent('Module.Legacy.Comment.Update.Success', $this, $eventArgs);
-
+ $this->mUpdateSuccess->call($comment);
return true;
}
else {
@@ -98,10 +112,8 @@
$this->deleteAll($criteria);
if (parent::delete($comment, $force)) {
- $root =& XCube_Root::getSingleton();
- $eventArgs = array();
- $eventArgs['comment'] =& $comment;
- $root->mEventManager->raiseEvent('Module.Legacy.Comment.Delete.Success', $this, $eventArgs);
+ $this->mDeleteSuccess->call($comment);
+ return true;
}
else{
return false;
From minahito @ users.sourceforge.jp Mon Jul 31 19:22:42 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:22:42 +0900
Subject: [xoops-cvslog 3774] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060731102242.AF8692AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php:1.1.2.8
--- xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php:1.1.2.7 Tue Apr 11 12:50:50 2006
+++ xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php Mon Jul 31 19:22:42 2006
@@ -1,4 +1,8 @@
mEventManager->add("Module.Legacy.Comment.Delete.Success", new XCube_InstanceDelegate($this, "doDelete"));
- }
-
function _getId()
{
- return isset($_REQUEST['com_id']) ? $_REQUEST['com_id'] : 0;
+ return isset($_REQUEST['com_id']) ? xoops_getrequest('com_id') : 0;
}
function &_getHandler()
{
$handler =& xoops_getmodulehandler('comment');
+ $handler->mDeleteSuccess->add(array(&$this, "doDelete"));
return $handler;
}
@@ -69,13 +66,11 @@
function executeViewError(&$controller, &$xoopsUser, &$render)
{
- redirect_header("./index.php?action=CommentList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED);
+ $controller->executeRedirect("./index.php?action=CommentList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED);
}
- function doDelete(&$sender, &$eventArgs)
+ function doDelete($comment)
{
- $comment =& $eventArgs['comment'];
-
//
// Adjust user's post count.
//
Index: xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.8 xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.9
--- xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.8 Tue Apr 11 12:51:10 2006
+++ xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php Mon Jul 31 19:22:42 2006
@@ -39,15 +39,11 @@
{
if ($this->mObject->get('com_status') == 1) {
$this->mActionForm =& new Legacy_PendingCommentAdminEditForm();
-
- $root =& XCube_Root::getSingleton();
- $root->mEventManager->add("Module.Legacy.Comment.Update.Success", new XCube_InstanceDelegate($this, "doApprove"));
+ $this->mObjectHandler->mUpdateSuccess->add(array(&$this, "doApprove"));
}
else {
$this->mActionForm =& new Legacy_ApprovalCommentAdminEditForm();
-
- $root =& XCube_Root::getSingleton();
- $root->mEventManager->add("Module.Legacy.Comment.Update.Success", new XCube_InstanceDelegate($this, "doUpdate"));
+ $this->mObjectHandler->mUpdateSuccess->add(array(&$this, "doUpdate"));
}
$this->mActionForm->prepare();
}
@@ -118,7 +114,7 @@
return $comment_config;
}
- function doApprove(&$sender, &$eventArgs)
+ function doApprove($comment)
{
$comment =& $eventArgs['comment'];
$comment_config = Legacy_CommentEditAction::loadCallbackFile($comment);
@@ -133,13 +129,18 @@
call_user_func($function, $comment);
}
- Legacy_CommentEditAction::addUserPost($comment);
+ $handler =& xoops_gethandler('member');
+
+ //
+ // TODO We should adjust the following lines and handler's design.
+ // We think we should not use getUser() and updateUserByField in XCube 2.1.
+ //
+ $user =& $handler->getUser($comment->get('com_uid'));
+ $handler->updateUserByField($user, 'posts', $user->get('posts') + 1);
}
- function doUpdate(&$sender, &$eventArgs)
+ function doUpdate($comment)
{
- $comment =& $eventArgs['comment'];
-
//
// Adjust user's post count.
//
From minahito @ users.sourceforge.jp Mon Jul 31 19:28:54 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:28:54 +0900
Subject: [xoops-cvslog 3775] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20060731102854.5C8442AC0FA@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/comment_list.html
diff -u xoops2jp/html/modules/base/admin/templates/comment_list.html:1.1.2.11 xoops2jp/html/modules/base/admin/templates/comment_list.html:1.1.2.12
--- xoops2jp/html/modules/base/admin/templates/comment_list.html:1.1.2.11 Sat Apr 15 14:23:42 2006
+++ xoops2jp/html/modules/base/admin/templates/comment_list.html Mon Jul 31 19:28:54 2006
@@ -11,10 +11,10 @@
<{foreach item=module from=$moduleArr}>
<{if $pageNavi->mExtra.com_modid == $module->get('mid')}>
-
+
<{else}>
<{$pageNavi->mExtra.com_modid}>
-
+
<{/if}>
<{/foreach}>
@@ -23,9 +23,9 @@
<{foreach item=status from=$statusArr}>
<{if $pageNavi->mExtra.com_status == $status->get('id')}>
-
+
<{else}>
-
+
<{/if}>
<{/foreach}>
@@ -63,14 +63,18 @@
|
<{foreach item=obj from=$objects}>
- <{$obj->getVar('com_id')}> |
- <{$obj->mModule->getVar('name')}> |
- <{$obj->getVar('com_title')}> |
- <{$obj->getVar('com_created')|xoops_formattimestamp:l}> |
- <{$obj->getVar('com_modified')|xoops_formattimestamp:l}> |
- <{if $obj->mUser}><{$obj->mUser->getVar('uname')}><{else}><{$smarty.const._GUESTS}><{/if}> |
- <{$obj->getVar('com_ip')}> |
- <{$obj->mStatus->getVar('name')}> |
+ <{$obj->getShow('com_id')}> |
+
+ <{if $obj->mModule}>
+ <{$obj->mModule->getShow('name')}>
+ <{/if}>
+ |
+ <{$obj->getShow('com_title')}> |
+ <{$obj->getShow('com_created')|xoops_formattimestamp:l}> |
+ <{$obj->getShow('com_modified')|xoops_formattimestamp:l}> |
+ <{if $obj->mUser}><{$obj->mUser->getShow('uname')}><{else}><{$smarty.const._GUESTS}><{/if}> |
+ <{$obj->getShow('com_ip')}> |
+ <{$obj->mStatus->getShow('name')}> |
" alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" />
" alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
Index: xoops2jp/html/modules/base/admin/templates/comment_delete.html
diff -u xoops2jp/html/modules/base/admin/templates/comment_delete.html:1.1.2.9 xoops2jp/html/modules/base/admin/templates/comment_delete.html:1.1.2.10
--- xoops2jp/html/modules/base/admin/templates/comment_delete.html:1.1.2.9 Wed Jun 14 00:41:26 2006
+++ xoops2jp/html/modules/base/admin/templates/comment_delete.html Mon Jul 31 19:28:54 2006
@@ -17,79 +17,83 @@
|
<{$smarty.const._AD_BASE_LANG_COM_ID}> |
- "><{$object->getVar('com_id')}> |
+ "><{$object->getShow('com_id')}> |
<{$smarty.const._AD_BASE_LANG_COM_PID}> |
- "><{$object->getVar('com_pid')}> |
+ "><{$object->getShow('com_pid')}> |
<{$smarty.const._AD_BASE_LANG_COM_ROOTID}> |
- "><{$object->getVar('com_rootid')}> |
+ "><{$object->getShow('com_rootid')}> |
<{$smarty.const._AD_BASE_LANG_COM_MODID}> |
- "><{$object->mModule->getVar('name')}> |
+ ">
+ <{if $obj->mModule}>
+ <{$obj->mModule->getShow('name')}>
+ <{/if}>
+ |
<{$smarty.const._AD_BASE_LANG_COM_ITEMID}> |
- "><{$object->getVar('com_itemid')}> |
+ "><{$object->getShow('com_itemid')}> |
<{$smarty.const._AD_BASE_LANG_COM_ICON}> |
- "> |
+ "> |
<{$smarty.const._AD_BASE_LANG_COM_CREATED}> |
- "><{$object->getVar('com_created')|xoops_formattimestamp:l}> |
+ "><{$object->getShow('com_created')|xoops_formattimestamp:l}> |
<{$smarty.const._AD_BASE_LANG_COM_MODIFIED}> |
- "><{$object->getVar('com_modified')|xoops_formattimestamp:l}> |
+ "><{$object->getShow('com_modified')|xoops_formattimestamp:l}> |
<{$smarty.const._AD_BASE_LANG_COM_UID}> |
- "><{$object->mUser->getVar('uname')}> |
+ "><{$object->mUser->getShow('uname')}> |
<{$smarty.const._AD_BASE_LANG_COM_IP}> |
- "><{$object->getVar('com_ip')}> |
+ "><{$object->getShow('com_ip')}> |
<{$smarty.const._AD_BASE_LANG_COM_TITLE}> |
- "><{$object->getVar('com_title')}> |
+ "><{$object->getShow('com_title')}> |
<{$smarty.const._AD_BASE_LANG_COM_TEXT}> |
- "><{$object->getVar('com_text')}> |
+ "><{$object->getShow('com_text')}> |
<{$smarty.const._AD_BASE_LANG_COM_SIG}> |
">
- <{xoops_input type=radio name=com_sig value=1 default=$object->getVar('com_sig') disabled=true}><{$smarty.const._YES}>
- <{xoops_input type=radio name=com_sig value=0 default=$object->getVar('com_sig') disabled=true}><{$smarty.const._NO}>
+ <{xoops_input type=radio name=com_sig value=1 default=$object->getShow('com_sig') disabled=true}><{$smarty.const._YES}>
+ <{xoops_input type=radio name=com_sig value=0 default=$object->getShow('com_sig') disabled=true}><{$smarty.const._NO}>
|
<{$smarty.const._AD_BASE_LANG_COM_STATUS}> |
- "><{$object->mStatus->getVar('name')}> |
+ "><{$object->mStatus->getShow('name')}> |
<{$smarty.const._AD_BASE_LANG_COM_EXPARAMS}> |
- "><{$object->getVar('com_exparams')}> |
+ "><{$object->getShow('com_exparams')}> |
<{$smarty.const._AD_BASE_LANG_CONTROL}> |
">
- <{xoops_input type=checkbox name=dohtml value=1 default=$object->getVar('dohtml') disabled=true}>
+ <{xoops_input type=checkbox name=dohtml value=1 default=$object->getShow('dohtml') disabled=true}>
<{$smarty.const._AD_BASE_LANG_DOHTML}>
- <{xoops_input type=checkbox name=dosmiley value=1 default=$object->getVar('dosmiley') disabled=true}>
+ <{xoops_input type=checkbox name=dosmiley value=1 default=$object->getShow('dosmiley') disabled=true}>
<{$smarty.const._AD_BASE_LANG_DOSMILEY}>
- <{xoops_input type=checkbox name=doxcode value=1 default=$object->getVar('doxcode') disabled=true}>
+ <{xoops_input type=checkbox name=doxcode value=1 default=$object->getShow('doxcode') disabled=true}>
<{$smarty.const._AD_BASE_LANG_DOXCODE}>
- <{xoops_input type=checkbox name=doimage value=1 default=$object->getVar('doimage') disabled=true}>
+ <{xoops_input type=checkbox name=doimage value=1 default=$object->getShow('doimage') disabled=true}>
<{$smarty.const._AD_BASE_LANG_DOIMAGE}>
- <{xoops_input type=checkbox name=dobr value=1 default=$object->getVar('dobr') disabled=true}>
+ <{xoops_input type=checkbox name=dobr value=1 default=$object->getShow('dobr') disabled=true}>
<{$smarty.const._AD_BASE_LANG_DOBR}>
|
@@ -117,15 +121,19 @@
<{foreach item=obj from=$children}>
- <{$obj->getVar('com_id')}> |
- <{$obj->mModule->getVar('name')}> |
- <{$obj->getVar('com_title')}> |
- <{$obj->getVar('com_created')|xoops_formattimestamp:l}> |
- <{$obj->getVar('com_modified')|xoops_formattimestamp:l}> |
- <{if $obj->mUser}><{$obj->mUser->getVar('uname')}><{else}><{$smarty.const._GUESTS}><{/if}> |
- <{$obj->getVar('com_ip')}> |
+ <{$obj->getShow('com_id')}> |
+
+ <{if $obj->mModule}>
+ <{$obj->mModule->getShow('name')}>
+ <{/if}>
+ |
+ <{$obj->getShow('com_title')}> |
+ <{$obj->getShow('com_created')|xoops_formattimestamp:l}> |
+ <{$obj->getShow('com_modified')|xoops_formattimestamp:l}> |
+ <{if $obj->mUser}><{$obj->mUser->getShow('uname')}><{else}><{$smarty.const._GUESTS}><{/if}> |
+ <{$obj->getShow('com_ip')}> |
- <{if $obj->getVar('com_status') == 1 }>
+ <{if $obj->get('com_status') == 1 }>
" />
<{/if}>
|
From minahito @ users.sourceforge.jp Mon Jul 31 19:31:40 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:31:40 +0900
Subject: [xoops-cvslog 3776] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060731103140.DF8C42AC0FA@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php:1.1.2.6
--- xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php:1.1.2.5 Tue Apr 11 19:03:38 2006
+++ xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php Mon Jul 31 19:31:40 2006
@@ -75,6 +75,16 @@
var $mModuleRecords=null;
var $mRecords=null;
var $mActionForm;
+
+ var $mSearchAction = null;
+
+ function Legacy_ActSearchAction($flag)
+ {
+ parent::Legacy_Action($flag);
+
+ $this->mSearchAction =& new XCube_NewDelegate();
+ $this->mSearchAction->register('Legacy_ActSearchAction.SearchAction');
+ }
function prepare(&$controller,&$xoopsUser)
{
@@ -132,7 +142,7 @@
return LEGACY_FRAME_VIEW_INPUT;
$eventArgs=new ActionSearchEventArgs($this->mActionForm->getVar('keywords'));
- $controller->mRoot->mEventManager->raiseEvent("Module.Admin.ActionSearch",$this,$eventArgs);
+ $this->mSearchAction->call(new XCube_Ref($eventArgs));
if($eventArgs->hasRecord()) {
$this->mRecords=&$eventArgs->getRecords();
From minahito @ users.sourceforge.jp Mon Jul 31 19:32:24 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:32:24 +0900
Subject: [xoops-cvslog 3777] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060731103224.9DC502AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php
diff -u xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.7 xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.8
--- xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.7 Fri May 12 19:21:11 2006
+++ xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php Mon Jul 31 19:32:24 2006
@@ -10,25 +10,32 @@
class Legacy_ModuleAdapter extends XCube_Module
{
var $mAdaptee;
+
+ /**
+ * @var XCube_NewDelegate
+ */
+ var $mSearchAction = null;
function Legacy_ModuleAdapter(&$xoopsModule)
{
- $this->mAdaptee=&$xoopsModule;
+ $this->mAdaptee =& $xoopsModule;
+ $this->mSearchAction =& new XCube_NewDelegate();
+ $this->mSearchAction->register('Legacy_ModuleAdapter.SearchAction');
}
function prepareAdmin(&$controller)
{
$this->mAdaptee->loadAdminMenu();
if(count($this->mAdaptee->adminmenu)>0 || isset($this->mAdaptee->modinfo['config']) ) {
- $delegate=new XCube_InstanceDelegate($this,"callbackSearchAction");
- $controller->mRoot->mEventManager->add("Module.Admin.ActionSearch",$delegate);
+ $controller->mRoot->mDelegateManager->add('Legacy_ActSearchAction.SearchAction', array(&$this, 'callbackSearchAction'));
}
}
- function callbackSearchAction(&$sender,&$eventArgs)
+ function callbackSearchAction(&$searchArgs)
{
- if(!is_object($eventArgs))
+ if(!is_object($searchArgs)) {
return;
+ }
//
// Search preference
@@ -48,12 +55,12 @@
}
$findFlag=true;
- foreach($eventArgs->getKeywords() as $word) {
+ foreach($searchArgs->getKeywords() as $word) {
$findFlag&=(stristr(implode(" ",$configInfos),$word)!==false);
}
if($findFlag) {
- $eventArgs->addRecord($this->mAdaptee->getVar('name'),
+ $searchArgs->addRecord($this->mAdaptee->getVar('name'),
XOOPS_URL.'/modules/base/admin/index.php?action=PreferenceEdit&confmod_id='.$this->mAdaptee->getVar('mid'),
_PREFERENCES );
}
@@ -65,7 +72,7 @@
if(count($this->mAdaptee->adminmenu)>0) {
foreach($this->mAdaptee->adminmenu as $menu) {
$findFlag=true;
- foreach($eventArgs->getKeywords() as $word) {
+ foreach($searchArgs->getKeywords() as $word) {
$tmpFlag=false;
$tmpFlag|=(stristr($menu['title'],$word)!==false);
@@ -93,7 +100,7 @@
//
// Add record
//
- $eventArgs->addRecord($this->mAdaptee->getVar('name'),$url,$menu['title']);
+ $searchArgs->addRecord($this->mAdaptee->getVar('name'),$url,$menu['title']);
}
}
}
@@ -115,10 +122,10 @@
}
$lines = file($dir . "/" . $helpfile);
foreach ($lines as $line) {
- foreach($eventArgs->getKeywords() as $word) {
+ foreach($searchArgs->getKeywords() as $word) {
if (stristr($line, $word) !== false) {
$url = XOOPS_MODULE_URL . "/base/admin/index.php?action=Help&dirname=" . $this->mAdaptee->getVar('dirname');
- $eventArgs->addRecord($this->mAdaptee->getVar('name'), $url, _HELP);
+ $searchArgs->addRecord($this->mAdaptee->getVar('name'), $url, _HELP);
return;
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:32:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:32:51 +0900
Subject: [xoops-cvslog 3778] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060731103251.7DA3F2AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/HelpAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.9 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.10
--- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.9 Thu Jul 20 17:20:42 2006
+++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php Mon Jul 31 19:32:51 2006
@@ -1,6 +1,6 @@
mErrorMessage);
+ $controller->executeRedirect('./index.php?action=ModuleList', 1, $this->mErrorMessage);
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:33:06 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:33:06 +0900
Subject: [xoops-cvslog 3779] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060731103306.51B002AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/ModuleInfoAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ModuleInfoAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/ModuleInfoAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/actions/ModuleInfoAction.class.php:1.1.2.2 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/ModuleInfoAction.class.php Mon Jul 31 19:33:06 2006
@@ -1,6 +1,6 @@
executeRedirect('./index.php?action=ModuleList', 1, "*Module not found*");
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:33:16 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:33:16 +0900
Subject: [xoops-cvslog 3780] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060731103316.04D7C2AC0FA@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/ModuleListAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ModuleListAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/ModuleListAction.class.php:1.1.2.6
--- xoops2jp/html/modules/base/admin/actions/ModuleListAction.class.php:1.1.2.5 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/ModuleListAction.class.php Mon Jul 31 19:33:15 2006
@@ -1,6 +1,6 @@
executeRedirect('./index.php?action=ModuleList', 1, "*ERROR*");
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:34:02 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:34:02 +0900
Subject: [xoops-cvslog 3781] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060731103402.3019D2AC144@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php
diff -u xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.56 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.57
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.56 Fri Jul 28 18:04:39 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Mon Jul 31 19:34:02 2006
@@ -1,6 +1,7 @@
mModuleController->hasPermission()) {
- XCube_Utils::redirectHeader(XOOPS_URL,1,_NOPERM); // TODO Depens on const message catalog.
+ $this->executeRedirect(XOOPS_URL,1,_NOPERM); // TODO Depens on const message catalog.
}
$this->mModuleController->setupLanguage();
From minahito @ users.sourceforge.jp Mon Jul 31 19:34:15 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:34:15 +0900
Subject: [xoops-cvslog 3782] CVS update: xoops2jp/html/modules/base/preload
Message-ID: <20060731103415.1074D2AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/preload/ThemeSelect.class.php
diff -u xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.4 xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.5
--- xoops2jp/html/modules/base/preload/ThemeSelect.class.php:1.1.2.4 Tue Jul 11 19:06:58 2006
+++ xoops2jp/html/modules/base/preload/ThemeSelect.class.php Mon Jul 31 19:34:14 2006
@@ -1,29 +1,8 @@
//
-// ------------------------------------------------------------------------ //
-// 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. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
+/**
+ * @package Legacy
+ * @version $Id: ThemeSelect.class.php,v 1.1.2.5 2006/07/31 10:34:14 minahito Exp $
+ */
if (!defined('XOOPS_ROOT_PATH')) exit();
@@ -56,25 +35,16 @@
$this->mController->setMainTheme($_SESSION['xoopsUserTheme']);
}
- $delegate = new XCube_Delegate("Base_ThemeSelect","callbackCheckLoginSuccess");
- $this->mController->mRoot->mEventManager->add("Site.CheckLogin.Success",$delegate);
+ $this->mController->mRoot->mDelegateManager->add("Site.CheckLogin.Success", "Base_ThemeSelect::callbackCheckLoginSuccess");
}
- function callbackCheckLoginSuccess(&$controller,&$eventArgs)
+ function callbackCheckLoginSuccess(&$xoopsUser)
{
//
- // This check is not needed. :)
- //
- if(!is_object($eventArgs['xoopsUser']))
- return;
-
- $user=&$eventArgs['xoopsUser'];
-
- //
// Check Theme and set it to session.
//
- $userTheme=$eventArgs['xoopsUser']->getVar('theme');
- if(is_array($userTheme) && in_array($userTheme,$controller->getConfig('theme_set_allowed'))) {
+ $userTheme = $xoopsUser->get('theme');
+ if (is_array($userTheme) && in_array($userTheme, $this->mController->getConfig('theme_set_allowed'))) {
$_SESSION['xoopsUserTheme'] = $userTheme;
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:34:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:34:37 +0900
Subject: [xoops-cvslog 3783] CVS update:
xoops2jp/html/modules/base/preload/Primary
Message-ID: <20060731103437.AA55C2AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php
diff -u xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.2 xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.3
--- xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php:1.1.2.2 Tue Jul 25 19:22:47 2006
+++ xoops2jp/html/modules/base/preload/Primary/SiteClose.class.php Mon Jul 31 19:34:37 2006
@@ -78,7 +78,7 @@
}
}
}
- XCube_Utils::redirectHeader(XOOPS_URL,1);
+ $this->mController->executeRedirect(XOOPS_URL,1);
} else if (!empty($_GET['cube_module_uninstall'])) {
require_once XOOPS_ROOT_PATH.'/class/template.php';
$xoopsTpl = new XoopsTpl();
@@ -99,7 +99,7 @@
$uninstaller = new Legacy_ModuleUninstaller($module);
$uninstaller->execute();
}
- XCube_Utils::redirectHeader(XOOPS_URL,1);
+ $this->mController->executeRedirect(XOOPS_URL,1);
} else {
$handler =& xoops_getmodulehandler('non_installation_module','base');
$objects = $handler->getObjects();
From minahito @ users.sourceforge.jp Mon Jul 31 19:36:50 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:36:50 +0900
Subject: [xoops-cvslog 3784] CVS update: xoops2jp/html/preload
Message-ID: <20060731103650.D2E242AC0E0@users.sourceforge.jp>
Index: xoops2jp/html/preload/IndexRedirector.class.php
diff -u xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.3 xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.4
--- xoops2jp/html/preload/IndexRedirector.class.php:1.1.2.3 Fri Jul 14 17:37:24 2006
+++ xoops2jp/html/preload/IndexRedirector.class.php Mon Jul 31 19:36:50 2006
@@ -9,17 +9,16 @@
{
function preBlockFilter()
{
- $delegate =& new XCube_Delegate("IndexRedirector", "redirect");
- $this->mController->mRoot->mEventManager->add("Legacypage.Top.Access", $delegate);
+ $this->mController->mRoot->mDelegateManager->add("Legacypage.Top.Access", array(&$this, "redirect"));
}
- function redirect(&$controller, &$eventArgs)
+ function redirect()
{
- $startPage = $controller->getConfig('startpage');
+ $startPage = $this->mController->getConfig('startpage');
$handler =& xoops_gethandler('module');
$module =& $handler->get($startPage);
if ($startPage != null && $startPage != "--" && !is_object($module)) {
- $controller->executeForward(XOOPS_URL . '/modules/' . $module->getShow('dirname') . '/');
+ $this->mController->executeForward(XOOPS_URL . '/modules/' . $module->getShow('dirname') . '/');
}
}
}
From minahito @ users.sourceforge.jp Mon Jul 31 19:38:40 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:38:40 +0900
Subject: [xoops-cvslog 3785] CVS update: xoops2jp/html/modules/user/actions
Message-ID: <20060731103840.E59DB2AC15F@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/actions/UserRegister_confirmAction.class.php
diff -u xoops2jp/html/modules/user/actions/UserRegister_confirmAction.class.php:1.1.2.8 xoops2jp/html/modules/user/actions/UserRegister_confirmAction.class.php:1.1.2.9
--- xoops2jp/html/modules/user/actions/UserRegister_confirmAction.class.php:1.1.2.8 Wed Jul 19 19:20:33 2006
+++ xoops2jp/html/modules/user/actions/UserRegister_confirmAction.class.php Mon Jul 31 19:38:40 2006
@@ -1,7 +1,7 @@
mConfig = $moduleConfig;
- $controller->mRoot->mEventManager->add("Module.User.Regist.Success",
- new XCube_InstanceDelegate($this, "eventNotifyMail"));
-
$this->_getRegistForm($controller);
$this->_processActionForm();
}
@@ -63,8 +60,9 @@
$this->_clearRegistForm($controller);
$this->_processMail($controller);
- $eventArgs = array();
- $controller->mRoot->mEventManager->raiseEvent("Module.User.Regist.Success", $controller, $eventArgs);
+ $this->_eventNotifyMail($controller);
+
+ XCube_DelegateUtils::call('Legacy.Event.ResgistUser.Success')
return USER_FRAME_VIEW_SUCCESS;
}
@@ -114,7 +112,7 @@
$mailer->send(); // TODO CHECKS
}
- function eventNotifyMail(&$controller,&$eventArgs)
+ function _eventNotifyMail(&$controller)
{
if($this->mConfig['new_user_notify'] == 1 && !empty($this->mConfig['new_user_notify_group'])) {
$director =& new User_UserRegistMailDirector($this->mNewUser, $controller->getConfig(), $this->mConfig);
From minahito @ users.sourceforge.jp Mon Jul 31 19:40:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:40:36 +0900
Subject: [xoops-cvslog 3786] CVS update: xoops2jp/html/modules/pm/class
Message-ID: <20060731104036.AEA372AC15F@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.2 xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.3
--- xoops2jp/html/modules/pm/class/ActionFrame.class.php:1.1.2.2 Thu Jul 27 18:41:38 2006
+++ xoops2jp/html/modules/pm/class/ActionFrame.class.php Mon Jul 31 19:40:36 2006
@@ -1,7 +1,7 @@
mAction->prepare($controller, $controller->getXoopsUser(), $moduleConfig);
if (!$this->mAction->hasPermission($controller, $controller->getXoopsUser(), $moduleConfig)) {
- $this->doPermissionError();
+ $this->doPermissionError($controller);
return;
}
@@ -113,10 +113,10 @@
}
}
- function doPermissionError()
+ function doPermissionError(&$controller)
{
$errorMessages = array(_PM_SORRY, _PM_PLZREG);
- XCube_Utils::redirectHeader(XOOPS_URL, 2, $errorMessages);
+ $controller->executeRedirect(XOOPS_URL, 2, $errorMessages);
}
function doActionNotFoundError($controller)
From minahito @ users.sourceforge.jp Mon Jul 31 19:40:48 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:40:48 +0900
Subject: [xoops-cvslog 3787] CVS update:
xoops2jp/html/modules/pm/language/english
Message-ID: <20060731104048.D46CC2AC15F@users.sourceforge.jp>
Index: xoops2jp/html/modules/pm/language/english/main.php
diff -u xoops2jp/html/modules/pm/language/english/main.php:1.1.2.4 xoops2jp/html/modules/pm/language/english/main.php:1.1.2.5
--- xoops2jp/html/modules/pm/language/english/main.php:1.1.2.4 Tue Jul 4 18:49:53 2006
+++ xoops2jp/html/modules/pm/language/english/main.php Mon Jul 31 19:40:48 2006
@@ -9,6 +9,7 @@
define('_MD_PM_LANG_MESSAGE_DETAIL', "Details of message");
define('_MD_PM_LANG_MSG_ID', "msg id");
define('_MD_PM_LANG_SUBJECTC', "Subject: ");
+define('_MD_PM_MESSAGE_CONFIRM_DELETE_PM', "Do you delete the following private message?");
define('_PM_CANCELSEND', "Cancel sending");
define('_PM_CLEAR', "Clear");
define('_PM_CLICKHERE', "You can click here to view your private messages");
From minahito @ users.sourceforge.jp Mon Jul 31 19:44:14 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Mon, 31 Jul 2006 19:44:14 +0900
Subject: [xoops-cvslog 3788] CVS update: xoops2jp/html/kernel
Message-ID: <20060731104414.068FA2AC035@users.sourceforge.jp>
Index: xoops2jp/html/kernel/XCube_Root.class.php
diff -u xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.16 xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.17
--- xoops2jp/html/kernel/XCube_Root.class.php:1.1.2.16 Mon Jul 31 19:02:53 2006
+++ xoops2jp/html/kernel/XCube_Root.class.php Mon Jul 31 19:44:13 2006
@@ -1,7 +1,7 @@