From nobunobu @ users.sourceforge.jp Sat Apr 1 10:31:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 1 Apr 2006 10:31:04 +0900 Subject: [xoops-cvslog 2606] CVS update: xoops2jp/html/install/wizards Message-ID: <20060401013104.EAD212AC01F@users.sourceforge.jp> From nobunobu @ users.sourceforge.jp Sat Apr 1 10:32:57 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 1 Apr 2006 10:32:57 +0900 Subject: [xoops-cvslog 2607] CVS update: xoops2jp/html/install/custom Message-ID: <20060401013257.531ED2AC01F@users.sourceforge.jp> Index: xoops2jp/html/install/custom/custom.inc.dist.php diff -u xoops2jp/html/install/custom/custom.inc.dist.php:1.1.2.1 xoops2jp/html/install/custom/custom.inc.dist.php:1.1.2.2 --- xoops2jp/html/install/custom/custom.inc.dist.php:1.1.2.1 Tue Mar 7 22:11:39 2006 +++ xoops2jp/html/install/custom/custom.inc.dist.php Sat Apr 1 10:32:57 2006 @@ -1,3 +1,3 @@ insertAfter('start', 'envcheck', 'Enviromment Check'); + $wizardSeq->insertAfter('start', 'envcheck', 'Enviromment Check'); ?> Index: xoops2jp/html/install/custom/install_envcheck.inc.php diff -u xoops2jp/html/install/custom/install_envcheck.inc.php:1.1.2.1 xoops2jp/html/install/custom/install_envcheck.inc.php:1.1.2.2 --- xoops2jp/html/install/custom/install_envcheck.inc.php:1.1.2.1 Tue Mar 7 22:11:39 2006 +++ xoops2jp/html/install/custom/install_envcheck.inc.php Sat Apr 1 10:32:57 2006 @@ -1,4 +1,4 @@ setTemplatePath(dirname(__FILE__)); - $widzard->render('install_envcheck.tpl.php'); + $wizard->setTemplatePath(dirname(__FILE__)); + $wizard->render('install_envcheck.tpl.php'); ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Sat Apr 1 10:32:57 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 1 Apr 2006 10:32:57 +0900 Subject: [xoops-cvslog 2608] CVS update: xoops2jp/html/install Message-ID: <20060401013257.7EA2E2AC057@users.sourceforge.jp> Index: xoops2jp/html/install/index.php diff -u xoops2jp/html/install/index.php:1.2.8.3 xoops2jp/html/install/index.php:1.2.8.4 --- xoops2jp/html/install/index.php:1.2.8.3 Tue Mar 7 22:11:39 2006 +++ xoops2jp/html/install/index.php Sat Apr 1 10:32:57 2006 @@ -1,5 +1,5 @@ '); define('_NGIMG', ' '); -include_once './class/simplewidzard.php'; -$widzard = new SimpleWidzard; -$widzard->setBaseTemplate('install_tpl.php'); -$widzard->setTemplatePath('templates'); - -$widzardSeq = new SimpleWidzardSequence; - -$widzardSeq->add('langselect', _INSTALL_L0, 'start', _INSTALL_L80); -$widzardSeq->add('start', _INSTALL_L0, 'modcheck', _INSTALL_L81); -$widzardSeq->add('modcheck', _INSTALL_L82, 'dbform', _INSTALL_L89); -$widzardSeq->add('dbform', _INSTALL_L90, 'dbconfirm', _INSTALL_L91); -$widzardSeq->add('dbconfirm', _INSTALL_L53, 'dbsave', _INSTALL_L92, '', _INSTALL_L93); -$widzardSeq->add('dbsave', _INSTALL_L92, 'mainfile', _INSTALL_L94); -$widzardSeq->add('mainfile', _INSTALL_L94, 'initial', _INSTALL_L102, 'start', _INSTALL_L103, true); -$widzardSeq->add('initial', _INSTALL_L102, 'checkDB', _INSTALL_L104, 'start', _INSTALL_L103, true); -$widzardSeq->add('checkDB', _INSTALL_L104, 'createDB', _INSTALL_L105, 'start', _INSTALL_L103, true); -$widzardSeq->add('createDB', _INSTALL_L105, 'checkDB', _INSTALL_L104); -$widzardSeq->add('createTables',_INSTALL_L40, 'siteInit', _INSTALL_L112); -$widzardSeq->add('siteInit', _INSTALL_L112, 'insertData', _INSTALL_L116); -$widzardSeq->add('insertData', _INSTALL_L116, 'finish', _INSTALL_L117); -$widzardSeq->add('finish', _INSTALL_L32); +include_once './class/simplewizard.php'; +$wizard = new SimpleWizard; +$wizard->setBaseTemplate('install_tpl.php'); +$wizard->setTemplatePath('templates'); + +$wizardSeq = new SimpleWizardSequence; + +$wizardSeq->add('langselect', _INSTALL_L0, 'start', _INSTALL_L80); +$wizardSeq->add('start', _INSTALL_L0, 'modcheck', _INSTALL_L81); +$wizardSeq->add('modcheck', _INSTALL_L82, 'dbform', _INSTALL_L89); +$wizardSeq->add('dbform', _INSTALL_L90, 'dbconfirm', _INSTALL_L91); +$wizardSeq->add('dbconfirm', _INSTALL_L53, 'dbsave', _INSTALL_L92, '', _INSTALL_L93); +$wizardSeq->add('dbsave', _INSTALL_L92, 'mainfile', _INSTALL_L94); +$wizardSeq->add('mainfile', _INSTALL_L94, 'initial', _INSTALL_L102, 'start', _INSTALL_L103, true); +$wizardSeq->add('initial', _INSTALL_L102, 'checkDB', _INSTALL_L104, 'start', _INSTALL_L103, true); +$wizardSeq->add('checkDB', _INSTALL_L104, 'createDB', _INSTALL_L105, 'start', _INSTALL_L103, true); +$wizardSeq->add('createDB', _INSTALL_L105, 'checkDB', _INSTALL_L104); +$wizardSeq->add('createTables',_INSTALL_L40, 'siteInit', _INSTALL_L112); +$wizardSeq->add('siteInit', _INSTALL_L112, 'insertData', _INSTALL_L116); +$wizardSeq->add('insertData', _INSTALL_L116, 'finish', _INSTALL_L117); +$wizardSeq->add('finish', _INSTALL_L32); if (file_exists('./custom/custom.inc.php')) { include './custom/custom.inc.php'; @@ -100,16 +100,16 @@ } else { $op = 'langselect'; } -$widzard->setOp($op); +$wizard->setOp($op); $op=basename($op); -$fname = './widzards/install_'.$op.'.inc.php'; +$fname = './wizards/install_'.$op.'.inc.php'; $custom_fname = './custom/install_'.$op.'.inc.php'; if (file_exists($fname)) { include $fname; } else if(file_exists($custom_fname)) { include $custom_fname; } else { - $widzard->render(); + $wizard->render(); } ?> \ No newline at end of file Index: xoops2jp/html/install/install_tpl.php diff -u xoops2jp/html/install/install_tpl.php:1.1.8.2 xoops2jp/html/install/install_tpl.php:1.1.8.3 --- xoops2jp/html/install/install_tpl.php:1.1.8.2 Tue Mar 7 22:05:59 2006 +++ xoops2jp/html/install/install_tpl.php Sat Apr 1 10:32:57 2006 @@ -1,7 +1,7 @@
-'._INSTALL_L31.'
'); - $widzard->setNext(array('checkDB', _INSTALL_L104)); - $widzard->setBack(array('start', _INSTALL_L103)); - } else { - $widzard->setContent(''.sprintf(_INSTALL_L43, XOOPS_DB_NAME).'
'); - } - $widzard->render(); -?> Index: xoops2jp/html/install/widzards/install_createTables.inc.php diff -u xoops2jp/html/install/widzards/install_createTables.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_createTables.inc.php:removed --- xoops2jp/html/install/widzards/install_createTables.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_createTables.inc.php Sat Apr 1 10:32:57 2006 @@ -1,16 +0,0 @@ -queryFromFile('./sql/'.XOOPS_DB_TYPE.'.structure.sql'); - $widzard->assign('reports',$dbm->report()); - if(! $result ){ - $widzard->assign('message',_INSTALL_L114); - $widzard->setBack(array('start', _INSTALL_L103)); - }else{ - $widzard->assign('message',_INSTALL_L115); - } - $widzard->render('install_createTables.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_dbconfirm.inc.php diff -u xoops2jp/html/install/widzards/install_dbconfirm.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_dbconfirm.inc.php:removed --- xoops2jp/html/install/widzards/install_dbconfirm.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_dbconfirm.inc.php Sat Apr 1 10:32:57 2006 @@ -1,14 +0,0 @@ -checkData(); - if (!empty($content)) { - $widzard->setTitle(_INSTALL_L93); - $widzard->setContent($content . $sm->editform()); - $widzard->setNext(array('dbconfirm',_INSTALL_L91)); - } else { - $widzard->setContent($sm->confirmForm()); - } - $widzard->render(); -?> Index: xoops2jp/html/install/widzards/install_dbform.inc.php diff -u xoops2jp/html/install/widzards/install_dbform.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_dbform.inc.php:removed --- xoops2jp/html/install/widzards/install_dbform.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_dbform.inc.php Sat Apr 1 10:32:57 2006 @@ -1,8 +0,0 @@ -readConstant(); - $widzard->setContent($sm->editform()); - $widzard->render(); -?> Index: xoops2jp/html/install/widzards/install_dbsave.inc.php diff -u xoops2jp/html/install/widzards/install_dbsave.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_dbsave.inc.php:removed --- xoops2jp/html/install/widzards/install_dbsave.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_dbsave.inc.php Sat Apr 1 10:32:57 2006 @@ -1,42 +0,0 @@ -copyDistFile(); - if(! $ret){ - $widzard->setContent(_INSTALL_L60); - $widzard->error(); - exit(); - } - - $mm->setRewrite('XOOPS_ROOT_PATH', $myts->stripSlashesGPC($_POST['root_path'])); - $mm->setRewrite('XOOPS_URL', $myts->stripSlashesGPC($_POST['xoops_url'])); - $mm->setRewrite('XOOPS_DB_TYPE', $myts->stripSlashesGPC($_POST['database'])); - $mm->setRewrite('XOOPS_DB_PREFIX', $myts->stripSlashesGPC($_POST['prefix'])); - $mm->setRewrite('XOOPS_DB_HOST', $myts->stripSlashesGPC($_POST['dbhost'])); - $mm->setRewrite('XOOPS_DB_USER', $myts->stripSlashesGPC($_POST['dbuname'])); - $mm->setRewrite('XOOPS_DB_PASS', $myts->stripSlashesGPC($_POST['dbpass'])); - $mm->setRewrite('XOOPS_DB_NAME', $myts->stripSlashesGPC($_POST['dbname'])); - $mm->setRewrite('XOOPS_DB_PCONNECT', intval($_POST['db_pconnect'])); - $mm->setRewrite('XOOPS_GROUP_ADMIN', 1); - $mm->setRewrite('XOOPS_GROUP_USERS', 2); - $mm->setRewrite('XOOPS_GROUP_ANONYMOUS', 3); - - // Check if XOOPS_CHECK_PATH should be initially set or not - $xoopsPathTrans = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME']; - if ( DIRECTORY_SEPARATOR != '/' ) { - // IIS6 doubles the \ chars - $xoopsPathTrans = str_replace( strpos( $xoopsPathTrans, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsPathTrans); - } - $mm->setRewrite('XOOPS_CHECK_PATH', strcasecmp( substr($xoopsPathTrans, 0, strlen(XOOPS_ROOT_PATH)), $_POST['root_path']) ? 0 : 1 ); - - $ret = $mm->doRewrite(); - if(! $ret){ - $widzard->setContent(_INSTALL_L60); - $widzard->error(); - exit(); - } - $widzard->assign('reports', $mm->report()); - $widzard->assign('message',_INSTALL_L62); - $widzard->render('install_dbsave.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_finish.inc.php diff -u xoops2jp/html/install/widzards/install_finish.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_finish.inc.php:removed --- xoops2jp/html/install/widzards/install_finish.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_finish.inc.php Sat Apr 1 10:32:57 2006 @@ -1,5 +0,0 @@ -assign('finish', $content); - $widzard->render('install_finish.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_initial.inc.php diff -u xoops2jp/html/install/widzards/install_initial.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_initial.inc.php:removed --- xoops2jp/html/install/widzards/install_initial.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_initial.inc.php Sat Apr 1 10:32:57 2006 @@ -1,5 +0,0 @@ -render('install_initial.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_insertData.inc.php diff -u xoops2jp/html/install/widzards/install_insertData.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_insertData.inc.php:removed --- xoops2jp/html/install/widzards/install_insertData.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_insertData.inc.php Sat Apr 1 10:32:57 2006 @@ -1,58 +0,0 @@ -stripSlashesGPC(trim($_POST['adminname'])); - $adminpass = $myts->stripSlashesGPC($_POST['adminpass']); - $adminmail = $myts->stripSlashesGPC(trim($_POST['adminmail'])); - - if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$adminmail)) { - $widzard->setContent(''._INSTALL_L73.'
'); - $widzard->setBack(array('', _INSTALL_L112)); - $widzard->error(); - exit(); - } - if ( !isset($adminname) || !isset($adminpass) || !isset($adminmail) || $adminmail == "" || $adminname =="" || $adminpass =="" || $adminpass != $adminpass2) { - $widzard->setContent(''._INSTALL_L41.'
'); - $widzard->setBack(array('', _INSTALL_L112)); - $widzard->error(); - exit(); - } - - include_once '../mainfile.php'; - include_once './include/makedata.php'; - include_once './class/dbmanager.php'; - $dbm = new db_manager; - include_once './class/cachemanager.php'; - $cm = new cache_manager; - - $language = check_language($language); - if ( file_exists('./language/'.$language.'/install2.php') ) { - include_once './language/'.$language.'/install2.php'; - } elseif ( file_exists('./language/english/install2.php') ) { - include_once './language/english/install2.php'; - $language = 'english'; - } else { - echo 'no language file (install2.php).'; - exit(); - } - - //$tables = array(); - $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.data.sql'); - - $result = $dbm->queryFromFile('./language/'.$language.'/'.XOOPS_DB_TYPE.'.lang.data.sql'); - - $group = make_groups($dbm); - $result = make_data($dbm, $cm, $adminname, $adminpass, $adminmail, $language, $group); - - $widzard->assign('dbm_reports',$dbm->report()); - $widzard->assign('cm_reports',$cm->report()); - - include_once './class/mainfilemanager.php'; - $mm = new mainfile_manager('../mainfile.php'); - foreach($group as $key => $val){ - $mm->setRewrite($key, intval($val)); - } - $result = $mm->doRewrite(); - $widzard->assign('mm_reports',$mm->report()); - - setcookie('xoops_session', '', time() - 3600); - $widzard->render('install_insertData.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_langselect.inc.php diff -u xoops2jp/html/install/widzards/install_langselect.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_langselect.inc.php:removed --- xoops2jp/html/install/widzards/install_langselect.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_langselect.inc.php Sat Apr 1 10:32:57 2006 @@ -1,15 +0,0 @@ -addArray('languages', $lang); - if (strtolower($lang) == $language) { - $widzard->addArray('selected','selected="selected"'); - } else { - $widzard->addArray('selected',''); - } - } - $widzard->render('install_langselect.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_mainfile.inc.php diff -u xoops2jp/html/install/widzards/install_mainfile.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_mainfile.inc.php:removed --- xoops2jp/html/install/widzards/install_mainfile.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_mainfile.inc.php Sat Apr 1 10:32:57 2006 @@ -1,30 +0,0 @@ -addArray('checks', _NGIMG._INSTALL_L95); - } elseif ( XOOPS_ROOT_PATH != $detected ) { - $widzard->addArray('checks', _NGIMG.sprintf(_INSTALL_L96,$detected)); - } else { - $widzard->addArray('checks', _OKIMG._INSTALL_L97); - } - - if(!is_dir(XOOPS_ROOT_PATH)){ - $widzard->addArray('checks', _NGIMG._INSTALL_L99); - } - - if(preg_match('/^http[s]?:\/\/(.*)[^\/]+$/i',XOOPS_URL)){ - $widzard->addArray('checks', _OKIMG._INSTALL_L100); - }else{ - $widzard->addArray('checks', _NGIMG._INSTALL_L101); - } - - $widzard->render('install_mainfile.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_modcheck.inc.php diff -u xoops2jp/html/install/widzards/install_modcheck.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_modcheck.inc.php:removed --- xoops2jp/html/install/widzards/install_modcheck.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_modcheck.inc.php Sat Apr 1 10:32:57 2006 @@ -1,33 +0,0 @@ -addArray('checks',_NGIMG.sprintf(_INSTALL_L83, $wok)); - $error = true; - }else{ - $widzard->addArray('checks',_OKIMG.sprintf(_INSTALL_L84, $wok)); - } - } - } else { - @chmod('../'.$wok, 0777); - if (! is_writeable('../'.$wok)) { - $widzard->addArray('checks',_NGIMG.sprintf(_INSTALL_L85, $wok)); - $error = true; - }else{ - $widzard->addArray('checks',_OKIMG.sprintf(_INSTALL_L86, $wok)); - } - } - } - - if(! $error) { - $widzard->assign('message',_INSTALL_L87); - }else{ - $widzard->assign('message',_INSTALL_L46); - $widzard->setReload(true); - } - $widzard->render('install_modcheck.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_siteInit.inc.php diff -u xoops2jp/html/install/widzards/install_siteInit.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_siteInit.inc.php:removed --- xoops2jp/html/install/widzards/install_siteInit.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_siteInit.inc.php Sat Apr 1 10:32:57 2006 @@ -1,4 +0,0 @@ -render('install_siteInit.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_start.inc.php diff -u xoops2jp/html/install/widzards/install_start.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_start.inc.php:removed --- xoops2jp/html/install/widzards/install_start.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_start.inc.php Sat Apr 1 10:32:57 2006 @@ -1,5 +0,0 @@ -assign('welcome', $content); - $widzard->render('install_start.tpl.php'); -?> Index: xoops2jp/html/install/widzards/install_updateAvatars.inc.php diff -u xoops2jp/html/install/widzards/install_updateAvatars.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_updateAvatars.inc.php:removed --- xoops2jp/html/install/widzards/install_updateAvatars.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_updateAvatars.inc.php Sat Apr 1 10:32:57 2006 @@ -1,5 +0,0 @@ -'._INSTALL_L151.''; - $b_next = array('updateAvatars_go', _INSTALL_L139); - include 'install_tpl.php'; -?> Index: xoops2jp/html/install/widzards/install_updateAvatars_go.inc.php diff -u xoops2jp/html/install/widzards/install_updateAvatars_go.inc.php:1.1.2.1 xoops2jp/html/install/widzards/install_updateAvatars_go.inc.php:removed --- xoops2jp/html/install/widzards/install_updateAvatars_go.inc.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/widzards/install_updateAvatars_go.inc.php Sat Apr 1 10:32:57 2006 @@ -1,57 +0,0 @@ -query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif'"); - $avt_handler =& xoops_gethandler('avatar'); - if (!defined('XOOPS_UPLOAD_PATH')) { - define('XOOPS_UPLOAD_PATH', '../uploads'); - } - foreach ($avatars as $avatar_file) { - if (preg_match("/^([0-9]+)\.([a-zA-Z]+)$/", $avatar_file, $matched)) { - $user_id = intval($matched[1]); - if ($user_id > 0 && false != $fp = fopen('../images/avatar/users/'.$avatar_file, 'rb')) { - $binary = fread($fp, filesize('../images/avatar/users/'.$avatar_file)); - fclose($fp); - $newavatar = uniqid('cavt').'.'.strtolower($matched[2]); - if (false != $fp = fopen(XOOPS_UPLOAD_PATH.'/'.$newavatar, 'wb')) { - if (-1 != fwrite($fp, $binary)) { - $error = false; - if (!$xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='".$newavatar."' WHERE uid=".$user_id)) { - $error = true; - } else { - $avatar =& $avt_handler->create(); - $avatar->setVar('avatar_file', $newavatar); - $avatar->setVar('avatar_name', 'custom'); - $avatar->setVar('avatar_mimetype', ''); - $avatar->setVar('avatar_display', 1); - $avatar->setVar('avatar_type', 'C'); - if(!$avt_handler->insert($avatar)) { - $error = true; - } else { - $avt_handler->addUser($avatar->getVar('avatar_id'), $user['uid']); - } - } - if (false != $error) { - $content .= _NGIMG.sprintf(_INSTALL_L153, $avatar_file).'Could not update '.$modules[$mid]->getVar('name').'
'; - } else { - $newmid = $modules[$mid]->getVar('mid'); - $msgs = array(); - $msgs[] = 'Module data updated.'; - $tplfile_handler =& xoops_gethandler('tplfile'); - $templates = $modules[$mid]->getInfo('templates'); - if ($templates != false) { - $msgs[] = 'Generating templates...'; - foreach ($templates as $tpl) { - $tpl['file'] = trim($tpl['file']); - $tpldata =& xoops_module_gettemplate($dirname, $tpl['file']); - $tplfile =& $tplfile_handler->create(); - $tplfile->setVar('tpl_refid', $newmid); - $tplfile->setVar('tpl_lastimported', 0); - $tplfile->setVar('tpl_lastmodified', time()); - if (preg_match("/\.css$/i", $tpl['file'])) { - $tplfile->setVar('tpl_type', 'css'); - } else { - $tplfile->setVar('tpl_type', 'module'); - //if ($xoopsConfig['default_theme'] == 'default') { - // include_once XOOPS_ROOT_PATH.'/class/template.php'; - // xoops_template_touch($tplfile->getVar('tpl_id')); - //} - } - $tplfile->setVar('tpl_source', $tpldata, true); - $tplfile->setVar('tpl_module', $dirname); - $tplfile->setVar('tpl_tplset', 'default'); - $tplfile->setVar('tpl_file', $tpl['file'], true); - $tplfile->setVar('tpl_desc', $tpl['description'], true); - if (!$tplfile_handler->insert($tplfile)) { - $msgs[] = ' ERROR: Could not insert template '.$tpl['file'].' to the database.'; - } else { - $msgs[] = ' Template '.$tpl['file'].' inserted to the database.'; - } - unset($tpldata); - } - } - $blocks = $modules[$mid]->getInfo('blocks'); - $msgs[] = 'Rebuilding blocks...'; - $showfuncs = array(); - $funcfiles = array(); - if ($blocks != false) { - $count = count($blocks); - include_once(XOOPS_ROOT_PATH.'/class/xoopsblock.php'); - for ( $i = 1; $i <= $count; $i++ ) { - if (isset($blocks[$i]['show_func']) && $blocks[$i]['show_func'] != '' && isset($blocks[$i]['file']) && $blocks[$i]['file'] != '') { - $editfunc = isset($blocks[$i]['edit_func']) ? $blocks[$i]['edit_func'] : ''; - $showfuncs[] = $blocks[$i]['show_func']; - $funcfiles[] = $blocks[$i]['file']; - $template = ''; - if ((isset($blocks[$i]['template']) && trim($blocks[$i]['template']) != '')) { - $content =& xoops_module_gettemplate($dirname, $blocks[$i]['template'], true); - $template = $blocks[$i]['template']; - } - if (!$content) { - $content = ''; - } - $options = ''; - if (isset($blocks[$i]['options']) && $blocks[$i]['options'] != '') { - $options = $blocks[$i]['options']; - } - $sql = "SELECT bid, name FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND func_num=".$i; - $fresult = $xoopsDB->query($sql); - $fcount = 0; - while ($fblock = $xoopsDB->fetchArray($fresult)) { - $fcount++; - $sql = "UPDATE ".$xoopsDB->prefix("newblocks")." SET name='".addslashes($blocks[$i]['name'])."', title='".addslashes($blocks[$i]['name'])."', dirname='".addslashes($dirname)."', func_file='".addslashes($blocks[$i]['file'])."', show_func='".addslashes($blocks[$i]['show_func'])."', template='".addslashes($template)."', edit_func='".addslashes($editfunc)."', options='".addslashes($options)."', content='', template='".$template."', last_modified=".time()." WHERE bid=".$fblock['bid']; - $result = $xoopsDB->query($sql); - if (!$result) { - $msgs[] = ' ERROR: Could not update '.$fblock['name']; - } else { - $msgs[] = ' Block '.$fblock['name'].' updated. Block ID: '.$fblock['bid'].''; - if ($template != '') { - $tplfile =& $tplfile_handler->create(); - $tplfile->setVar('tpl_refid', $fblock['bid']); - $tplfile->setVar('tpl_source', $content, true); - $tplfile->setVar('tpl_tplset', 'default'); - $tplfile->setVar('tpl_file', $blocks[$i]['template']); - $tplfile->setVar('tpl_module', $dirname); - $tplfile->setVar('tpl_type', 'block'); - $tplfile->setVar('tpl_desc', $blocks[$i]['description'], true); - $tplfile->setVar('tpl_lastimported', 0); - $tplfile->setVar('tpl_lastmodified', time()); - if (!$tplfile_handler->insert($tplfile)) { - $msgs[] = ' ERROR: Could not insert template '.$blocks[$i]['template'].' to the database.'; - } else { - $msgs[] = ' Template '.$blocks[$i]['template'].' inserted to the database.'; - //if ($xoopsConfig['default_theme'] == 'default') { - // if (!xoops_template_touch($tplfile[0]->getVar('tpl_id'))) { - // $msgs[] = ' ERROR: Could not recompile template '.$blocks[$i]['template'].'.'; - // } else { - // $msgs[] = ' Template '.$blocks[$i]['template'].' recompiled.'; - // } - //} - } - } - } - } - if ($fcount == 0) { - $newbid = $xoopsDB->genId($xoopsDB->prefix('newblocks').'_bid_seq'); - $block_name = addslashes($blocks[$i]['name']); - $sql = "INSERT INTO ".$xoopsDB->prefix("newblocks")." (bid, mid, func_num, options, name, title, content, side, weight, visible, block_type, isactive, dirname, func_file, show_func, edit_func, template, last_modified) VALUES (".$newbid.", ".$mid.", ".$i.",'".addslashes($options)."','".$block_name."', '".$block_name."', '', 0, 0, 0, 'M', 1, '".addslashes($dirname)."', '".addslashes($blocks[$i]['file'])."', '".addslashes($blocks[$i]['show_func'])."', '".addslashes($editfunc)."', '".$template."', ".time().")"; - $result = $xoopsDB->query($sql); - if (!$result) { - $msgs[] = ' ERROR: Could not create '.$blocks[$i]['name']; - } else { - if (empty($newbid)) { - $newbid = $xoopsDB->getInsertId(); - } - if ($template != '') { - $tplfile =& $tplfile_handler->create(); - $tplfile->setVar('tpl_module', $dirname); - $tplfile->setVar('tpl_refid', $newbid); - $tplfile->setVar('tpl_source', $content, true); - $tplfile->setVar('tpl_tplset', 'default'); - $tplfile->setVar('tpl_file', $blocks[$i]['template'], true); - $tplfile->setVar('tpl_type', 'block'); - $tplfile->setVar('tpl_lastimported', 0); - $tplfile->setVar('tpl_lastmodified', time()); - $tplfile->setVar('tpl_desc', $blocks[$i]['description'], true); - if (!$tplfile_handler->insert($tplfile)) { - $msgs[] = ' ERROR: Could not insert template '.$blocks[$i]['template'].' to the database.'; - } else { - $msgs[] = ' Template '.$blocks[$i]['template'].' inserted to the database.'; - } - } - $msgs[] = ' Block '.$blocks[$i]['name'].' created. Block ID: '.$newbid.''; - } - } - } - } - } - $block_arr = XoopsBlock::getByModule($mid); - foreach ($block_arr as $block) { - if (!in_array($block->getVar('show_func'), $showfuncs) || !in_array($block->getVar('func_file'), $funcfiles)) { - $sql = sprintf("DELETE FROM %s WHERE bid = %u", $xoopsDB->prefix('newblocks'), $block->getVar('bid')); - if(!$xoopsDB->query($sql)) { - $msgs[] = ' ERROR: Could not delete block '.$block->getVar('name').'. Block ID: '.$block->getVar('bid').''; - } else { - $msgs[] = ' Block '.$block->getVar('name').' deleted. Block ID: '.$block->getVar('bid').''; - } - } - } - - $configs = $modules[$mid]->getInfo('config'); - if ($configs != false) { - if ($modules[$mid]->getVar('hascomments') != 0) { - include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); - array_push($configs, array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN))); - array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); - } - } else { - if ($modules[$mid]->getVar('hascomments') != 0) { - $configs = array(); - include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); - $configs[] = array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)); - array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); - } - } - // RMV-NOTIFY - if ($modules[$mid]->getVar('hasnotification') != 0) { - if (empty($configs)) { - $configs = array(); - } - include_once(XOOPS_ROOT_PATH.'/include/notification_constants.php'); - $configs[] = array ('name' => 'notification_enabled', 'title' => '_NOT_CONFIG_ENABLED', 'description' => '_NOT_CONFIG_ENABLEDDSC', 'formtype' => 'select', 'valuetype' => 'int', 'default' => XOOPS_NOTIFICATION_ENABLEBOTH, 'options' => $options); - } - - if ($configs != false) { - $msgs[] = 'Adding module config data...'; - $config_handler =& xoops_gethandler('config'); - $order = 0; - foreach ($configs as $config) { - $confobj =& $config_handler->createConfig(); - $confobj->setVar('conf_modid', $newmid); - $confobj->setVar('conf_catid', 0); - $confobj->setVar('conf_name', $config['name']); - $confobj->setVar('conf_title', $config['title'], true); - $confobj->setVar('conf_desc', $config['description'], true); - $confobj->setVar('conf_formtype', $config['formtype']); - $confobj->setVar('conf_valuetype', $config['valuetype']); - $confobj->setVar('conf_value', $config['default'], true); - $confobj->setVar('conf_order', $order); - $confop_msgs = ''; - if (isset($config['options']) && is_array($config['options'])) { - foreach ($config['options'] as $key => $value) { - $confop =& $config_handler->createConfigOption(); - $confop->setVar('confop_name', $key, true); - $confop->setVar('confop_value', $value, true); - $confobj->setConfOptions($confop); - $confop_msgs .= ''.$msg.'
\n"; - $content .= ob_get_contents(); - $content .= " |
'._INSTALL_L158.' | '._INSTALL_L159.' | '._INSTALL_L160.' | '._INSTALL_L161.' |
'.$myrow['name'].' | |||
'.$myrow['name'].' | |||
'.$myrow['name'].' |
"._INSTALL_L135."
\n"; - $b_back = array(); - } else { - $content .= ""._INSTALL_L136."
\n"; - $b_next = array('updateConfig', _INSTALL_L14); - } - include 'install_tpl.php'; -?> From nobunobu @ users.sourceforge.jp Sat Apr 1 10:33:00 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 1 Apr 2006 10:33:00 +0900 Subject: [xoops-cvslog 2611] CVS update: xoops2jp/html/install/wizards Message-ID: <20060401013300.F19942AC01F@users.sourceforge.jp> Index: xoops2jp/html/install/wizards/index.html diff -u /dev/null xoops2jp/html/install/wizards/index.html:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/index.html Sat Apr 1 10:33:00 2006 @@ -0,0 +1 @@ + \ No newline at end of file Index: xoops2jp/html/install/wizards/install_checkDB.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_checkDB.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_checkDB.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,32 @@ +isConnectable()) { + $wizard->addArray('checks',_NGIMG._INSTALL_L106); + $wizard->addArray('msgs',_INSTALL_L107); + $wizard->setBack(array('start', _INSTALL_L103)); + $wizard->setReload(true); + } else { + $wizard->addArray('checks',_OKIMG._INSTALL_L108); + if (! $dbm->dbExists()) { + $wizard->addArray('checks',_NGIMG.sprintf(_INSTALL_L109, XOOPS_DB_NAME)); + $wizard->addArray('msgs',_INSTALL_L21.''._INSTALL_L31.'
'); + $wizard->setNext(array('checkDB', _INSTALL_L104)); + $wizard->setBack(array('start', _INSTALL_L103)); + } else { + $wizard->setContent(''.sprintf(_INSTALL_L43, XOOPS_DB_NAME).'
'); + } + $wizard->render(); +?> Index: xoops2jp/html/install/wizards/install_createTables.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_createTables.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_createTables.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,16 @@ +queryFromFile('./sql/'.XOOPS_DB_TYPE.'.structure.sql'); + $wizard->assign('reports',$dbm->report()); + if(! $result ){ + $wizard->assign('message',_INSTALL_L114); + $wizard->setBack(array('start', _INSTALL_L103)); + }else{ + $wizard->assign('message',_INSTALL_L115); + } + $wizard->render('install_createTables.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_dbconfirm.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_dbconfirm.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_dbconfirm.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,14 @@ +checkData(); + if (!empty($content)) { + $wizard->setTitle(_INSTALL_L93); + $wizard->setContent($content . $sm->editform()); + $wizard->setNext(array('dbconfirm',_INSTALL_L91)); + } else { + $wizard->setContent($sm->confirmForm()); + } + $wizard->render(); +?> Index: xoops2jp/html/install/wizards/install_dbform.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_dbform.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_dbform.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,8 @@ +readConstant(); + $wizard->setContent($sm->editform()); + $wizard->render(); +?> Index: xoops2jp/html/install/wizards/install_dbsave.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_dbsave.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_dbsave.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,42 @@ +copyDistFile(); + if(! $ret){ + $wizard->setContent(_INSTALL_L60); + $wizard->error(); + exit(); + } + + $mm->setRewrite('XOOPS_ROOT_PATH', $myts->stripSlashesGPC($_POST['root_path'])); + $mm->setRewrite('XOOPS_URL', $myts->stripSlashesGPC($_POST['xoops_url'])); + $mm->setRewrite('XOOPS_DB_TYPE', $myts->stripSlashesGPC($_POST['database'])); + $mm->setRewrite('XOOPS_DB_PREFIX', $myts->stripSlashesGPC($_POST['prefix'])); + $mm->setRewrite('XOOPS_DB_HOST', $myts->stripSlashesGPC($_POST['dbhost'])); + $mm->setRewrite('XOOPS_DB_USER', $myts->stripSlashesGPC($_POST['dbuname'])); + $mm->setRewrite('XOOPS_DB_PASS', $myts->stripSlashesGPC($_POST['dbpass'])); + $mm->setRewrite('XOOPS_DB_NAME', $myts->stripSlashesGPC($_POST['dbname'])); + $mm->setRewrite('XOOPS_DB_PCONNECT', intval($_POST['db_pconnect'])); + $mm->setRewrite('XOOPS_GROUP_ADMIN', 1); + $mm->setRewrite('XOOPS_GROUP_USERS', 2); + $mm->setRewrite('XOOPS_GROUP_ANONYMOUS', 3); + + // Check if XOOPS_CHECK_PATH should be initially set or not + $xoopsPathTrans = isset($_SERVER['PATH_TRANSLATED']) ? $_SERVER['PATH_TRANSLATED'] : $_SERVER['SCRIPT_FILENAME']; + if ( DIRECTORY_SEPARATOR != '/' ) { + // IIS6 doubles the \ chars + $xoopsPathTrans = str_replace( strpos( $xoopsPathTrans, '\\\\', 2 ) ? '\\\\' : DIRECTORY_SEPARATOR, '/', $xoopsPathTrans); + } + $mm->setRewrite('XOOPS_CHECK_PATH', strcasecmp( substr($xoopsPathTrans, 0, strlen(XOOPS_ROOT_PATH)), $_POST['root_path']) ? 0 : 1 ); + + $ret = $mm->doRewrite(); + if(! $ret){ + $wizard->setContent(_INSTALL_L60); + $wizard->error(); + exit(); + } + $wizard->assign('reports', $mm->report()); + $wizard->assign('message',_INSTALL_L62); + $wizard->render('install_dbsave.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_finish.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_finish.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_finish.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,5 @@ +assign('finish', $content); + $wizard->render('install_finish.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_initial.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_initial.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_initial.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,5 @@ +render('install_initial.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_insertData.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_insertData.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_insertData.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,58 @@ +stripSlashesGPC(trim($_POST['adminname'])); + $adminpass = $myts->stripSlashesGPC($_POST['adminpass']); + $adminmail = $myts->stripSlashesGPC(trim($_POST['adminmail'])); + + if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$adminmail)) { + $wizard->setContent(''._INSTALL_L73.'
'); + $wizard->setBack(array('', _INSTALL_L112)); + $wizard->error(); + exit(); + } + if ( !isset($adminname) || !isset($adminpass) || !isset($adminmail) || $adminmail == "" || $adminname =="" || $adminpass =="" || $adminpass != $adminpass2) { + $wizard->setContent(''._INSTALL_L41.'
'); + $wizard->setBack(array('', _INSTALL_L112)); + $wizard->error(); + exit(); + } + + include_once '../mainfile.php'; + include_once './include/makedata.php'; + include_once './class/dbmanager.php'; + $dbm = new db_manager; + include_once './class/cachemanager.php'; + $cm = new cache_manager; + + $language = check_language($language); + if ( file_exists('./language/'.$language.'/install2.php') ) { + include_once './language/'.$language.'/install2.php'; + } elseif ( file_exists('./language/english/install2.php') ) { + include_once './language/english/install2.php'; + $language = 'english'; + } else { + echo 'no language file (install2.php).'; + exit(); + } + + //$tables = array(); + $result = $dbm->queryFromFile('./sql/'.XOOPS_DB_TYPE.'.data.sql'); + + $result = $dbm->queryFromFile('./language/'.$language.'/'.XOOPS_DB_TYPE.'.lang.data.sql'); + + $group = make_groups($dbm); + $result = make_data($dbm, $cm, $adminname, $adminpass, $adminmail, $language, $group); + + $wizard->assign('dbm_reports',$dbm->report()); + $wizard->assign('cm_reports',$cm->report()); + + include_once './class/mainfilemanager.php'; + $mm = new mainfile_manager('../mainfile.php'); + foreach($group as $key => $val){ + $mm->setRewrite($key, intval($val)); + } + $result = $mm->doRewrite(); + $wizard->assign('mm_reports',$mm->report()); + + setcookie('xoops_session', '', time() - 3600); + $wizard->render('install_insertData.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_langselect.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_langselect.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_langselect.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,15 @@ +addArray('languages', $lang); + if (strtolower($lang) == $language) { + $wizard->addArray('selected','selected="selected"'); + } else { + $wizard->addArray('selected',''); + } + } + $wizard->render('install_langselect.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_mainfile.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_mainfile.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_mainfile.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,30 @@ +addArray('checks', _NGIMG._INSTALL_L95); + } elseif ( XOOPS_ROOT_PATH != $detected ) { + $wizard->addArray('checks', _NGIMG.sprintf(_INSTALL_L96,$detected)); + } else { + $wizard->addArray('checks', _OKIMG._INSTALL_L97); + } + + if(!is_dir(XOOPS_ROOT_PATH)){ + $wizard->addArray('checks', _NGIMG._INSTALL_L99); + } + + if(preg_match('/^http[s]?:\/\/(.*)[^\/]+$/i',XOOPS_URL)){ + $wizard->addArray('checks', _OKIMG._INSTALL_L100); + }else{ + $wizard->addArray('checks', _NGIMG._INSTALL_L101); + } + + $wizard->render('install_mainfile.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_modcheck.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_modcheck.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_modcheck.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,33 @@ +addArray('checks',_NGIMG.sprintf(_INSTALL_L83, $wok)); + $error = true; + }else{ + $wizard->addArray('checks',_OKIMG.sprintf(_INSTALL_L84, $wok)); + } + } + } else { + @chmod('../'.$wok, 0777); + if (! is_writeable('../'.$wok)) { + $wizard->addArray('checks',_NGIMG.sprintf(_INSTALL_L85, $wok)); + $error = true; + }else{ + $wizard->addArray('checks',_OKIMG.sprintf(_INSTALL_L86, $wok)); + } + } + } + + if(! $error) { + $wizard->assign('message',_INSTALL_L87); + }else{ + $wizard->assign('message',_INSTALL_L46); + $wizard->setReload(true); + } + $wizard->render('install_modcheck.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_siteInit.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_siteInit.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_siteInit.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,4 @@ +render('install_siteInit.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_start.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_start.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_start.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,5 @@ +assign('welcome', $content); + $wizard->render('install_start.tpl.php'); +?> Index: xoops2jp/html/install/wizards/install_updateAvatars.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_updateAvatars.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_updateAvatars.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,5 @@ +'._INSTALL_L151.''; + $b_next = array('updateAvatars_go', _INSTALL_L139); + include 'install_tpl.php'; +?> Index: xoops2jp/html/install/wizards/install_updateAvatars_go.inc.php diff -u /dev/null xoops2jp/html/install/wizards/install_updateAvatars_go.inc.php:1.1.2.1 --- /dev/null Sat Apr 1 10:33:00 2006 +++ xoops2jp/html/install/wizards/install_updateAvatars_go.inc.php Sat Apr 1 10:33:00 2006 @@ -0,0 +1,57 @@ +query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='blank.gif'"); + $avt_handler =& xoops_gethandler('avatar'); + if (!defined('XOOPS_UPLOAD_PATH')) { + define('XOOPS_UPLOAD_PATH', '../uploads'); + } + foreach ($avatars as $avatar_file) { + if (preg_match("/^([0-9]+)\.([a-zA-Z]+)$/", $avatar_file, $matched)) { + $user_id = intval($matched[1]); + if ($user_id > 0 && false != $fp = fopen('../images/avatar/users/'.$avatar_file, 'rb')) { + $binary = fread($fp, filesize('../images/avatar/users/'.$avatar_file)); + fclose($fp); + $newavatar = uniqid('cavt').'.'.strtolower($matched[2]); + if (false != $fp = fopen(XOOPS_UPLOAD_PATH.'/'.$newavatar, 'wb')) { + if (-1 != fwrite($fp, $binary)) { + $error = false; + if (!$xoopsDB->query("UPDATE ".$xoopsDB->prefix('users')." SET user_avatar='".$newavatar."' WHERE uid=".$user_id)) { + $error = true; + } else { + $avatar =& $avt_handler->create(); + $avatar->setVar('avatar_file', $newavatar); + $avatar->setVar('avatar_name', 'custom'); + $avatar->setVar('avatar_mimetype', ''); + $avatar->setVar('avatar_display', 1); + $avatar->setVar('avatar_type', 'C'); + if(!$avt_handler->insert($avatar)) { + $error = true; + } else { + $avt_handler->addUser($avatar->getVar('avatar_id'), $user['uid']); + } + } + if (false != $error) { + $content .= _NGIMG.sprintf(_INSTALL_L153, $avatar_file).'Could not update '.$modules[$mid]->getVar('name').'
'; + } else { + $newmid = $modules[$mid]->getVar('mid'); + $msgs = array(); + $msgs[] = 'Module data updated.'; + $tplfile_handler =& xoops_gethandler('tplfile'); + $templates = $modules[$mid]->getInfo('templates'); + if ($templates != false) { + $msgs[] = 'Generating templates...'; + foreach ($templates as $tpl) { + $tpl['file'] = trim($tpl['file']); + $tpldata =& xoops_module_gettemplate($dirname, $tpl['file']); + $tplfile =& $tplfile_handler->create(); + $tplfile->setVar('tpl_refid', $newmid); + $tplfile->setVar('tpl_lastimported', 0); + $tplfile->setVar('tpl_lastmodified', time()); + if (preg_match("/\.css$/i", $tpl['file'])) { + $tplfile->setVar('tpl_type', 'css'); + } else { + $tplfile->setVar('tpl_type', 'module'); + //if ($xoopsConfig['default_theme'] == 'default') { + // include_once XOOPS_ROOT_PATH.'/class/template.php'; + // xoops_template_touch($tplfile->getVar('tpl_id')); + //} + } + $tplfile->setVar('tpl_source', $tpldata, true); + $tplfile->setVar('tpl_module', $dirname); + $tplfile->setVar('tpl_tplset', 'default'); + $tplfile->setVar('tpl_file', $tpl['file'], true); + $tplfile->setVar('tpl_desc', $tpl['description'], true); + if (!$tplfile_handler->insert($tplfile)) { + $msgs[] = ' ERROR: Could not insert template '.$tpl['file'].' to the database.'; + } else { + $msgs[] = ' Template '.$tpl['file'].' inserted to the database.'; + } + unset($tpldata); + } + } + $blocks = $modules[$mid]->getInfo('blocks'); + $msgs[] = 'Rebuilding blocks...'; + $showfuncs = array(); + $funcfiles = array(); + if ($blocks != false) { + $count = count($blocks); + include_once(XOOPS_ROOT_PATH.'/class/xoopsblock.php'); + for ( $i = 1; $i <= $count; $i++ ) { + if (isset($blocks[$i]['show_func']) && $blocks[$i]['show_func'] != '' && isset($blocks[$i]['file']) && $blocks[$i]['file'] != '') { + $editfunc = isset($blocks[$i]['edit_func']) ? $blocks[$i]['edit_func'] : ''; + $showfuncs[] = $blocks[$i]['show_func']; + $funcfiles[] = $blocks[$i]['file']; + $template = ''; + if ((isset($blocks[$i]['template']) && trim($blocks[$i]['template']) != '')) { + $content =& xoops_module_gettemplate($dirname, $blocks[$i]['template'], true); + $template = $blocks[$i]['template']; + } + if (!$content) { + $content = ''; + } + $options = ''; + if (isset($blocks[$i]['options']) && $blocks[$i]['options'] != '') { + $options = $blocks[$i]['options']; + } + $sql = "SELECT bid, name FROM ".$xoopsDB->prefix('newblocks')." WHERE mid=".$mid." AND func_num=".$i; + $fresult = $xoopsDB->query($sql); + $fcount = 0; + while ($fblock = $xoopsDB->fetchArray($fresult)) { + $fcount++; + $sql = "UPDATE ".$xoopsDB->prefix("newblocks")." SET name='".addslashes($blocks[$i]['name'])."', title='".addslashes($blocks[$i]['name'])."', dirname='".addslashes($dirname)."', func_file='".addslashes($blocks[$i]['file'])."', show_func='".addslashes($blocks[$i]['show_func'])."', template='".addslashes($template)."', edit_func='".addslashes($editfunc)."', options='".addslashes($options)."', content='', template='".$template."', last_modified=".time()." WHERE bid=".$fblock['bid']; + $result = $xoopsDB->query($sql); + if (!$result) { + $msgs[] = ' ERROR: Could not update '.$fblock['name']; + } else { + $msgs[] = ' Block '.$fblock['name'].' updated. Block ID: '.$fblock['bid'].''; + if ($template != '') { + $tplfile =& $tplfile_handler->create(); + $tplfile->setVar('tpl_refid', $fblock['bid']); + $tplfile->setVar('tpl_source', $content, true); + $tplfile->setVar('tpl_tplset', 'default'); + $tplfile->setVar('tpl_file', $blocks[$i]['template']); + $tplfile->setVar('tpl_module', $dirname); + $tplfile->setVar('tpl_type', 'block'); + $tplfile->setVar('tpl_desc', $blocks[$i]['description'], true); + $tplfile->setVar('tpl_lastimported', 0); + $tplfile->setVar('tpl_lastmodified', time()); + if (!$tplfile_handler->insert($tplfile)) { + $msgs[] = ' ERROR: Could not insert template '.$blocks[$i]['template'].' to the database.'; + } else { + $msgs[] = ' Template '.$blocks[$i]['template'].' inserted to the database.'; + //if ($xoopsConfig['default_theme'] == 'default') { + // if (!xoops_template_touch($tplfile[0]->getVar('tpl_id'))) { + // $msgs[] = ' ERROR: Could not recompile template '.$blocks[$i]['template'].'.'; + // } else { + // $msgs[] = ' Template '.$blocks[$i]['template'].' recompiled.'; + // } + //} + } + } + } + } + if ($fcount == 0) { + $newbid = $xoopsDB->genId($xoopsDB->prefix('newblocks').'_bid_seq'); + $block_name = addslashes($blocks[$i]['name']); + $sql = "INSERT INTO ".$xoopsDB->prefix("newblocks")." (bid, mid, func_num, options, name, title, content, side, weight, visible, block_type, isactive, dirname, func_file, show_func, edit_func, template, last_modified) VALUES (".$newbid.", ".$mid.", ".$i.",'".addslashes($options)."','".$block_name."', '".$block_name."', '', 0, 0, 0, 'M', 1, '".addslashes($dirname)."', '".addslashes($blocks[$i]['file'])."', '".addslashes($blocks[$i]['show_func'])."', '".addslashes($editfunc)."', '".$template."', ".time().")"; + $result = $xoopsDB->query($sql); + if (!$result) { + $msgs[] = ' ERROR: Could not create '.$blocks[$i]['name']; + } else { + if (empty($newbid)) { + $newbid = $xoopsDB->getInsertId(); + } + if ($template != '') { + $tplfile =& $tplfile_handler->create(); + $tplfile->setVar('tpl_module', $dirname); + $tplfile->setVar('tpl_refid', $newbid); + $tplfile->setVar('tpl_source', $content, true); + $tplfile->setVar('tpl_tplset', 'default'); + $tplfile->setVar('tpl_file', $blocks[$i]['template'], true); + $tplfile->setVar('tpl_type', 'block'); + $tplfile->setVar('tpl_lastimported', 0); + $tplfile->setVar('tpl_lastmodified', time()); + $tplfile->setVar('tpl_desc', $blocks[$i]['description'], true); + if (!$tplfile_handler->insert($tplfile)) { + $msgs[] = ' ERROR: Could not insert template '.$blocks[$i]['template'].' to the database.'; + } else { + $msgs[] = ' Template '.$blocks[$i]['template'].' inserted to the database.'; + } + } + $msgs[] = ' Block '.$blocks[$i]['name'].' created. Block ID: '.$newbid.''; + } + } + } + } + } + $block_arr = XoopsBlock::getByModule($mid); + foreach ($block_arr as $block) { + if (!in_array($block->getVar('show_func'), $showfuncs) || !in_array($block->getVar('func_file'), $funcfiles)) { + $sql = sprintf("DELETE FROM %s WHERE bid = %u", $xoopsDB->prefix('newblocks'), $block->getVar('bid')); + if(!$xoopsDB->query($sql)) { + $msgs[] = ' ERROR: Could not delete block '.$block->getVar('name').'. Block ID: '.$block->getVar('bid').''; + } else { + $msgs[] = ' Block '.$block->getVar('name').' deleted. Block ID: '.$block->getVar('bid').''; + } + } + } + + $configs = $modules[$mid]->getInfo('config'); + if ($configs != false) { + if ($modules[$mid]->getVar('hascomments') != 0) { + include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); + array_push($configs, array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN))); + array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); + } + } else { + if ($modules[$mid]->getVar('hascomments') != 0) { + $configs = array(); + include_once(XOOPS_ROOT_PATH.'/include/comment_constants.php'); + $configs[] = array('name' => 'com_rule', 'title' => '_CM_COMRULES', 'description' => '', 'formtype' => 'select', 'valuetype' => 'int', 'default' => 1, 'options' => array('_CM_COMAPPROVEALL' => XOOPS_COMMENT_APPROVEALL, '_CM_COMAPPROVEUSER' => XOOPS_COMMENT_APPROVEUSER, '_CM_COMAPPROVEADMIN' => XOOPS_COMMENT_APPROVEADMIN)); + array_push($configs, array('name' => 'com_anonpost', 'title' => '_CM_COMANONPOST', 'description' => '', 'formtype' => 'yesno', 'valuetype' => 'int', 'default' => 0)); + } + } + // RMV-NOTIFY + if ($modules[$mid]->getVar('hasnotification') != 0) { + if (empty($configs)) { + $configs = array(); + } + include_once(XOOPS_ROOT_PATH.'/include/notification_constants.php'); + $configs[] = array ('name' => 'notification_enabled', 'title' => '_NOT_CONFIG_ENABLED', 'description' => '_NOT_CONFIG_ENABLEDDSC', 'formtype' => 'select', 'valuetype' => 'int', 'default' => XOOPS_NOTIFICATION_ENABLEBOTH, 'options' => $options); + } + + if ($configs != false) { + $msgs[] = 'Adding module config data...'; + $config_handler =& xoops_gethandler('config'); + $order = 0; + foreach ($configs as $config) { + $confobj =& $config_handler->createConfig(); + $confobj->setVar('conf_modid', $newmid); + $confobj->setVar('conf_catid', 0); + $confobj->setVar('conf_name', $config['name']); + $confobj->setVar('conf_title', $config['title'], true); + $confobj->setVar('conf_desc', $config['description'], true); + $confobj->setVar('conf_formtype', $config['formtype']); + $confobj->setVar('conf_valuetype', $config['valuetype']); + $confobj->setVar('conf_value', $config['default'], true); + $confobj->setVar('conf_order', $order); + $confop_msgs = ''; + if (isset($config['options']) && is_array($config['options'])) { + foreach ($config['options'] as $key => $value) { + $confop =& $config_handler->createConfigOption(); + $confop->setVar('confop_name', $key, true); + $confop->setVar('confop_value', $value, true); + $confobj->setConfOptions($confop); + $confop_msgs .= ''.$msg.'
\n"; + $content .= ob_get_contents(); + $content .= " |
'._INSTALL_L158.' | '._INSTALL_L159.' | '._INSTALL_L160.' | '._INSTALL_L161.' |
'.$myrow['name'].' | |||
'.$myrow['name'].' | |||
'.$myrow['name'].' |
"._INSTALL_L135."
\n"; + $b_back = array(); + } else { + $content .= ""._INSTALL_L136."
\n"; + $b_next = array('updateConfig', _INSTALL_L14); + } + include 'install_tpl.php'; +?> From nobunobu @ users.sourceforge.jp Sun Apr 2 22:06:01 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:06:01 +0900 Subject: [xoops-cvslog 2612] CVS update: xoops2jp/html/class Message-ID: <20060402130601.D0F452AC059@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_ModuleController.class.php diff -u xoops2jp/html/class/XCube_ModuleController.class.php:1.1.2.6 xoops2jp/html/class/XCube_ModuleController.class.php:1.1.2.7 --- xoops2jp/html/class/XCube_ModuleController.class.php:1.1.2.6 Wed Jan 11 12:34:39 2006 +++ xoops2jp/html/class/XCube_ModuleController.class.php Sun Apr 2 22:06:01 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/kernel/XCube_Controller.class.php diff -u xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.6 xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.7 --- xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.6 Fri Feb 3 15:01:38 2006 +++ xoops2jp/html/kernel/XCube_Controller.class.php Sun Apr 2 22:06:01 2006 @@ -238,7 +238,7 @@ if(!$this->mModuleController->isActive()) die('NOT ACTIVE'); ///< @todo - if(!$this->mModuleController->isPermission()) + if(!$this->mModuleController->hasPermission()) XCube_Utils::redirectHeader(XOOPS_URL,1,_NOPERM); // TODO Depens on const message catalog. $this->mModuleController->setupLanguage(); From nobunobu @ users.sourceforge.jp Sun Apr 2 22:06:02 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:06:02 +0900 Subject: [xoops-cvslog 2614] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060402130602.382492AC0C9@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.12 xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.13 --- xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.12 Tue Mar 28 22:29:21 2006 +++ xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php Sun Apr 2 22:06:02 2006 @@ -1,5 +1,5 @@ mController->getXoopsUser(); From nobunobu @ users.sourceforge.jp Sun Apr 2 22:06:02 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:06:02 +0900 Subject: [xoops-cvslog 2615] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060402130602.605B52AC0CA@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.4 xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.5 --- xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php:1.1.2.4 Tue Mar 28 22:30:15 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_ModuleController.class.php Sun Apr 2 22:06:02 2006 @@ -1,5 +1,5 @@ mController->mXoopsUser; $xoopsModule=&$this->mModuleObject; From nobunobu @ users.sourceforge.jp Sun Apr 2 22:07:47 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:07:47 +0900 Subject: [xoops-cvslog 2616] CVS update: xoops2jp/html/class Message-ID: <20060402130747.BDACD2AC059@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_Utils.class.php diff -u xoops2jp/html/class/XCube_Utils.class.php:1.1.2.2 xoops2jp/html/class/XCube_Utils.class.php:1.1.2.3 --- xoops2jp/html/class/XCube_Utils.class.php:1.1.2.2 Tue Nov 15 21:42:56 2005 +++ xoops2jp/html/class/XCube_Utils.class.php Sun Apr 2 22:07:47 2006 @@ -1,5 +1,5 @@ getSiteConfig('Cube','SystemModules')); + $moduleHandler =& xoops_gethandler('module'); + $uninstalledModules = array(); + $disabledModules = array(); + foreach($systemModules as $systemModule) { + if(!empty($systemModule)) { + if(!($moduleObject =& $moduleHandler->getByDirname($systemModule))) { + $uninstalledModules[] = $systemModule; + } else if(!$moduleObject->getVar('isactive')) { + $disabledModules[] = $systemModule; + } + } + } + if ((count($uninstalledModules)==0)&&(count($disabledModules)==0)) { + return true; + } else { + return array('uninstalled' =>$uninstalledModules, 'disabled'=>$disabledModules); + } + } } ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Sun Apr 2 22:07:47 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:07:47 +0900 Subject: [xoops-cvslog 2617] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060402130747.E1BCE2AC0C9@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/global.php diff -u xoops2jp/html/modules/base/language/english/global.php:1.1.2.3 xoops2jp/html/modules/base/language/english/global.php:1.1.2.4 --- xoops2jp/html/modules/base/language/english/global.php:1.1.2.3 Thu Jan 12 14:49:12 2006 +++ xoops2jp/html/modules/base/language/english/global.php Sun Apr 2 22:07:47 2006 @@ -1,7 +1,14 @@ Index: xoops2jp/html/modules/base/language/japanese/global.php diff -u xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.3 xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.4 --- xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.3 Thu Jan 12 14:49:06 2006 +++ xoops2jp/html/modules/base/language/japanese/global.php Sun Apr 2 22:07:47 2006 @@ -1,6 +1,13 @@ Index: xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php diff -u xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.5 xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.6 --- xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.5 Tue Mar 28 22:30:25 2006 +++ xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php Sun Apr 2 22:07:48 2006 @@ -6,7 +6,7 @@ { function preBlockFilter() { - if($this->mController->mConfig['closesite']==1) { + if(($this->mController->mConfig['closesite']==1)||is_array(XCube_Utils::checkSystemModules())) { $this->mController->mRoot->mEventManager->add("Site.Login",new XCube_InstanceDelegate($this,"callbackSiteLogin")); $this->mController->mRoot->mEventManager->add("Site.CheckLogin.Success",new XCube_InstanceDelegate($this,"callbackCheckLoginSuccess")); } @@ -27,6 +27,101 @@ } } } + // @todo Devide following lines to another preload file + if ($accessAllowFlag) { + $retArray = XCube_Utils::checkSystemModules(); + if (is_array($retArray)) { + if (in_array(XOOPS_GROUP_ADMIN, $this->mController->mXoopsUser->getGroups())) { + $GLOBALS['xoopsUser'] = $this->mController->mXoopsUser; + if (!empty($_POST['cube_module_install'])) { //@todo use Ticket + require_once XOOPS_BASE_PATH."/admin/class/ModuleInstaller.class.php"; + if (isset($_POST['uninstalled_modules']) && is_array($_POST['uninstalled_modules']) ){ + foreach($_POST['uninstalled_modules'] as $module) { + $module = basename($module); + if (in_array($module, $retArray['uninstalled'])) { + $installer = new Legacy_ModuleInstaller($module); + $installer->execute(); + } + } + } + if (isset($_POST['disabled_modules']) &&is_array($_POST['disabled_modules'])){ + $moduleHandler =& xoops_gethandler('module'); + foreach($_POST['disabled_modules'] as $module) { + $module = basename($module); + if (in_array($module, $retArray['disabled'])) { + if($moduleObject =& $moduleHandler->getByDirname($module)) { + $moduleObject->setVar('isactive',1); + $moduleHandler->insert($moduleObject); + } + } + } + } + if (isset($_POST['option_modules']) && is_array($_POST['option_modules']) ){ + $handler =& xoops_getmodulehandler('non_installation_module','base'); + $objects = $handler->getObjects(); + $optionModules = array(); + foreach($objects as $module) { + if (!in_array($module->getVar('dirname'), $retArray['uninstalled'])) { + $optionModules[] = $module->getVar('dirname'); + } + } + foreach($_POST['option_modules'] as $module) { + $module = basename($module); + if (in_array($module, $optionModules)) { + $installer = new Legacy_ModuleInstaller($module); + $installer->execute(); + } + } + } + XCube_Utils::redirectHeader(XOOPS_URL,1); + } else if (!empty($_GET['cube_module_uninstall'])) { + require_once XOOPS_ROOT_PATH.'/class/template.php'; + $xoopsTpl = new XoopsTpl(); + $xoopsTpl->assign('cube_module_uninstall',htmlspecialchars($_GET['cube_module_uninstall'],ENT_QUOTES)); + $xoopsTpl->assign( array( + 'xoops_sitename' => htmlspecialchars($this->mController->mConfig['sitename']), + 'xoops_themecss' => xoops_getcss(), + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$this->mController->mConfig['theme_set'].'/', + )); + ///< @todo filebase template with absolute file path + $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_uninstall_modules.html'); + exit(); + } else if (!empty($_POST['cube_module_uninstallok'])) { //@todo use Ticket + require_once XOOPS_BASE_PATH."/admin/class/ModuleUninstaller.class.php"; + $module = basename($_POST['cube_module_uninstallok']); + if (in_array($module, $retArray['disabled'])) { + $uninstaller = new Legacy_ModuleUninstaller($module); + $uninstaller->execute(); + } + XCube_Utils::redirectHeader(XOOPS_URL,1); + } else { + $handler =& xoops_getmodulehandler('non_installation_module','base'); + $objects = $handler->getObjects(); + $optionModules = array(); + foreach($objects as $module) { + if (!in_array($module->getVar('dirname'), $retArray['uninstalled'])) { + $optionModules[] = $module->getVar('dirname'); + } + } + require_once XOOPS_ROOT_PATH.'/class/template.php'; + $xoopsTpl = new XoopsTpl(); + $xoopsTpl->assign('uninstalled',$retArray['uninstalled']); + $xoopsTpl->assign('disabled',$retArray['disabled']); + $xoopsTpl->assign('option',$optionModules); + $xoopsTpl->assign( array( + 'xoops_sitename' => htmlspecialchars($this->mController->mConfig['sitename']), + 'xoops_themecss' => xoops_getcss(), + 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$this->mController->mConfig['theme_set'].'/', + )); + ///< @todo filebase template with absolute file path + $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_install_modules.html'); + exit(); + } + } else { + $accessAllowFlag = false; + } + } + } if (!$accessAllowFlag) { require_once XOOPS_ROOT_PATH.'/class/template.php'; @@ -39,7 +134,8 @@ 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $this->mController->mConfig['closesite_text'])); $xoopsTpl->xoops_setCaching(1); - $xoopsTpl->display('db:system_siteclosed.html'); ///< @todo depends schema + // @todo filebase template with absolute file path + $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_site_closed.html'); exit(); } } From nobunobu @ users.sourceforge.jp Sun Apr 2 22:07:48 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:07:48 +0900 Subject: [xoops-cvslog 2620] CVS update: xoops2jp/html/settings Message-ID: <20060402130748.619D82AC059@users.sourceforge.jp> Index: xoops2jp/html/settings/site_default.ini.php diff -u xoops2jp/html/settings/site_default.ini.php:1.1.2.7 xoops2jp/html/settings/site_default.ini.php:1.1.2.8 --- xoops2jp/html/settings/site_default.ini.php:1.1.2.7 Thu Mar 23 17:17:20 2006 +++ xoops2jp/html/settings/site_default.ini.php Sun Apr 2 22:07:48 2006 @@ -3,11 +3,10 @@ [Cube] Controller=Legacy_Controller - +SystemModules=base, user,legacyRender CacheSystem.path=/modules/stdCache/kernel CacheSystem.class=StdRenderCache - # # You can register plural render systems. # From nobunobu @ users.sourceforge.jp Sun Apr 2 22:07:48 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 2 Apr 2006 22:07:48 +0900 Subject: [xoops-cvslog 2621] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060402130748.8969F2AC0C9@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_install_modules.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_install_modules.html:1.1.2.1 --- /dev/null Sun Apr 2 22:07:48 2006 +++ xoops2jp/html/modules/base/templates/legacy_install_modules.html Sun Apr 2 22:07:48 2006 @@ -0,0 +1,70 @@ + + + + + ++ | + |
+ |
<{$smarty.const._SYSTEM_MODULE_ERROR}> |
+
+ |
+ | + |
+ |
<{$lang_siteclosemsg}> |
+
+ |
+ | + |
+ |
<{$smarty.const._UNINSTALL_CONFIRM}> |
+
+ |
- <{$smary.const._MB_BASE_HOME}> + <{$smarty.const._MB_BASE_HOME}> <{foreach item=module from=$block.modules}> <{$module.name}> <{foreach item=sublink from=$module.sublinks}> From nobunobu @ users.sourceforge.jp Mon Apr 3 14:44:19 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 3 Apr 2006 14:44:19 +0900 Subject: [xoops-cvslog 2626] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060403054419.BEAD12AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/modulePreloadWating.class.php diff -u xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.1 xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.2 --- xoops2jp/html/modules/base/class/modulePreloadWating.class.php:1.1.2.1 Sun Apr 2 23:54:54 2006 +++ xoops2jp/html/modules/base/class/modulePreloadWating.class.php Mon Apr 3 14:44:19 2006 @@ -9,78 +9,79 @@ } function callbackWatingShow(&$controller,&$eventArgs) { + $xoopsDB =& Database::getInstance(); // for News Module $module_handler =& xoops_gethandler('module'); if ($module_handler->getCount(new Criteria('dirname', 'news'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("stories")." WHERE published=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("stories")." WHERE published=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/news/admin/index.php?op=newarticle"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_SUBMS; $eventArgs['modules'][] = $blockVal; } } // for MyLinks Module if ($module_handler->getCount(new Criteria('dirname', 'mylinks'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_links")." WHERE status=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_links")." WHERE status=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listNewLinks"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_WLNKS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_broken")); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_broken")); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listBrokenLinks"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_BLNK; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mylinks_mod")); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mylinks_mod")); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mylinks/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_MLNKS; $eventArgs['modules'][] = $blockVal; } } // for MyDownloads Modules if ($module_handler->getCount(new Criteria('dirname', 'mydownloads'))) { - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_downloads")." WHERE status=0"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status=0"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listNewDownloads"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_WDLS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_broken").""); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_broken").""); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listBrokenDownloads"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_BFLS; $eventArgs['modules'][] = $blockVal; } - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("mydownloads_mod").""); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("mydownloads_mod").""); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/mydownloads/admin/index.php?op=listModReq"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] = _MB_BASE_MFLS; $eventArgs['modules'][] = $blockVal; } } // for Comments - $result = $GLOBALS['xoopsDB']->query("SELECT COUNT(*) FROM ".$GLOBALS['xoopsDB']->prefix("xoopscomments")." WHERE com_status=1"); + $result = $xoopsDB->query("SELECT COUNT(*) FROM ".$xoopsDB->prefix("xoopscomments")." WHERE com_status=1"); if ( $result ) { $blockVal = array(); $blockVal['adminlink'] = XOOPS_URL."/modules/system/admin.php?module=0&status=1&fct=comments"; - list($blockVal['pendingnum']) = $GLOBALS['xoopsDB']->fetchRow($result); + list($blockVal['pendingnum']) = $xoopsDB->fetchRow($result); $blockVal['lang_linkname'] =_MB_BASE_COMPEND; $eventArgs['modules'][] = $blockVal; } From nobunobu @ users.sourceforge.jp Mon Apr 3 14:44:24 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 3 Apr 2006 14:44:24 +0900 Subject: [xoops-cvslog 2627] CVS update: xoops2jp/html/modules/base/blocks Message-ID: <20060403054424.6877A2AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/base/blocks/legacy_mainmenu.php diff -u xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:1.1.2.1 xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:1.1.2.2 --- xoops2jp/html/modules/base/blocks/legacy_mainmenu.php:1.1.2.1 Sun Mar 26 15:07:46 2006 +++ xoops2jp/html/modules/base/blocks/legacy_mainmenu.php Mon Apr 3 14:44:24 2006 @@ -1,7 +1,11 @@ mController->mModuleController->mModuleObject; + $xoopsUser =& $root->mController->mXoopsUser; + $block = array(); + $module_handler =& xoops_gethandler('module'); $criteria = new CriteriaCompo(new Criteria('hasmain', 1)); $criteria->add(new Criteria('isactive', 1)); Index: xoops2jp/html/modules/base/blocks/legacy_usermenu.php diff -u xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.1 xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.2 --- xoops2jp/html/modules/base/blocks/legacy_usermenu.php:1.1.2.1 Sun Mar 26 15:07:46 2006 +++ xoops2jp/html/modules/base/blocks/legacy_usermenu.php Mon Apr 3 14:44:24 2006 @@ -1,7 +1,9 @@ mController->mXoopsUser; + if (is_object($xoopsUser)) { $pm_handler =& xoops_gethandler('privmessage'); $block = array(); From minahito @ users.sourceforge.jp Wed Apr 5 11:34:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 5 Apr 2006 11:34:23 +0900 Subject: [xoops-cvslog 2628] CVS update: xoops2jp/html/install/templates Message-ID: <20060405023423.09E782AC00E@users.sourceforge.jp> Index: xoops2jp/html/install/templates/install_insertData.tpl.php diff -u xoops2jp/html/install/templates/install_insertData.tpl.php:1.1.2.1 xoops2jp/html/install/templates/install_insertData.tpl.php:1.1.2.2 --- xoops2jp/html/install/templates/install_insertData.tpl.php:1.1.2.1 Tue Mar 7 22:11:40 2006 +++ xoops2jp/html/install/templates/install_insertData.tpl.php Wed Apr 5 11:34:22 2006 @@ -4,8 +4,10 @@ |
-v('cm_reports') as $report) { ?>
- +v('cm_reports'))) { ?> + v('cm_reports') as $report) { ?> + + |
From nobunobu @ users.sourceforge.jp Wed Apr 5 17:40:57 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Wed, 5 Apr 2006 17:40:57 +0900 Subject: [xoops-cvslog 2629] CVS update: xoops2jp/html/modules/user/admin/templates Message-ID: <20060405084057.8735C2AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/templates/user_edit.html diff -u xoops2jp/html/modules/user/admin/templates/user_edit.html:1.1.2.11 xoops2jp/html/modules/user/admin/templates/user_edit.html:1.1.2.12 --- xoops2jp/html/modules/user/admin/templates/user_edit.html:1.1.2.11 Sat Feb 4 16:28:25 2006 +++ xoops2jp/html/modules/user/admin/templates/user_edit.html Wed Apr 5 17:40:57 2006 @@ -158,7 +158,7 @@ | <{$smarty.const._AD_USER_LANG_RANK}> | "> | <{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | ">
|
@@ -57,9 +53,7 @@
<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | ">
|
From minahito @ users.sourceforge.jp Thu Apr 6 12:38:20 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 12:38:20 +0900
Subject: [xoops-cvslog 2645] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060406033820.ED2012AC013@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.1 Wed Apr 5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Thu Apr 6 12:38:20 2006
@@ -38,9 +38,10 @@
// lazy loading
//
$this->mObject->loadModule();
+ $this->mObject->loadGroup();
$render->setAttribute('object', $this->mObject);
-
+
$handler =& xoops_gethandler('module');
$moduleArr =& $handler->getObjects();
$render->setAttribute('moduleArr', $moduleArr);
From minahito @ users.sourceforge.jp Thu Apr 6 12:38:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 12:38:37 +0900
Subject: [xoops-cvslog 2646] CVS update: xoops2jp/html/class/smarty/plugins
Message-ID: <20060406033837.E7E882AC013@users.sourceforge.jp>
Index: xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php
diff -u /dev/null xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.1
--- /dev/null Thu Apr 6 12:38:37 2006
+++ xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php Thu Apr 6 12:38:37 2006
@@ -0,0 +1,47 @@
+get($params['value']), ENT_QUOTES);
+ $label = htmlspecialchars($object->get($params['label']), ENT_QUOTES);
+
+ $selected = "";
+ if (is_array($default) && in_array($default, $object->get($params['value']))) {
+ $selected = " selected";
+ }
+ elseif (!is_array($default) && $object->get($params['value']) == $default) {
+ $selected = " selected";
+ }
+
+ $tags .= "\n";
+ }
+
+ print $tags;
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Apr 6 13:20:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 13:20:53 +0900
Subject: [xoops-cvslog 2647] CVS update: xoops2jp/html/class/smarty/plugins
Message-ID: <20060406042053.C52942AC013@users.sourceforge.jp>
Index: xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php
diff -u xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.1 xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.2
--- xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php:1.1.2.1 Thu Apr 6 12:38:37 2006
+++ xoops2jp/html/class/smarty/plugins/function.xoops_optionsArray.php Thu Apr 6 13:20:53 2006
@@ -31,7 +31,7 @@
$label = htmlspecialchars($object->get($params['label']), ENT_QUOTES);
$selected = "";
- if (is_array($default) && in_array($default, $object->get($params['value']))) {
+ if (is_array($default) && in_array($object->get($params['value']), $default)) {
$selected = " selected";
}
elseif (!is_array($default) && $object->get($params['value']) == $default) {
From minahito @ users.sourceforge.jp Thu Apr 6 14:58:32 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 14:58:32 +0900
Subject: [xoops-cvslog 2648] CVS update:
xoops2jp/html/modules/base/language/english
Message-ID: <20060406055832.17EBF2AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/english/admin.php
diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.19 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.20
--- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.19 Wed Apr 5 19:59:03 2006
+++ xoops2jp/html/modules/base/language/english/admin.php Thu Apr 6 14:58:31 2006
@@ -8,6 +8,7 @@
define('_AD_BASE_ERROR_PLEASE_AGREE', "Please agree the following licence.");
define('_AD_BASE_ERROR_REQUIRED', "{0} is required.");
define('_AD_BASE_ERROR_SMILE_URL_REQUIRED', "Upload the image file of smilies.");
+define('_AD_BASE_LANG_ALL_MODULES', "All modules");
define('_AD_BASE_LANG_ALL_STATUS', "All status");
define('_AD_BASE_LANG_BCACHETIME', "bcachetime");
define('_AD_BASE_LANG_BID', "bid");
@@ -76,6 +77,7 @@
define('_AD_BASE_LANG_TARGET_MODULES', "Target modules");
define('_AD_BASE_LANG_TEMPLATE', "template");
define('_AD_BASE_LANG_TITLE', "title");
+define('_AD_BASE_LANG_TOPPAGE', "Toppage");
define('_AD_BASE_LANG_VISIBLE', "visible");
define('_AD_BASE_LANG_WEIGHT', "weight");
define('_AD_BASE_MESSAGE_CHILDREN_DELETED_TOGETHER', "Children deleted together");
From minahito @ users.sourceforge.jp Thu Apr 6 14:58:41 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 14:58:41 +0900
Subject: [xoops-cvslog 2649] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060406055841.6391B2AC04F@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.23 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.24
--- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.23 Wed Apr 5 19:59:03 2006
+++ xoops2jp/html/modules/base/language/japanese/admin.php Thu Apr 6 14:58:41 2006
@@ -8,6 +8,7 @@
define('_AD_BASE_ERROR_PLEASE_AGREE', "ライセンスに同意してください");
define('_AD_BASE_ERROR_REQUIRED', "{0}は必ず入力して下さい");
define('_AD_BASE_ERROR_SMILE_URL_REQUIRED', "顔アイコンをアップロードして下さい");
+define('_AD_BASE_LANG_ALL_MODULES', "すべてのモジュール");
define('_AD_BASE_LANG_ALL_STATUS', "すべてのステータス");
define('_AD_BASE_LANG_BCACHETIME', "bcachetime");
define('_AD_BASE_LANG_BID', "bid");
@@ -76,6 +77,7 @@
define('_AD_BASE_LANG_TARGET_MODULES', "Target modules");
define('_AD_BASE_LANG_TEMPLATE', "template");
define('_AD_BASE_LANG_TITLE', "title");
+define('_AD_BASE_LANG_TOPPAGE', "トップページ");
define('_AD_BASE_LANG_VISIBLE', "visible");
define('_AD_BASE_LANG_WEIGHT', "weight");
define('_AD_BASE_MESSAGE_CHILDREN_DELETED_TOGETHER', "一緒に削除されるデータ");
From minahito @ users.sourceforge.jp Thu Apr 6 14:59:33 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 14:59:33 +0900
Subject: [xoops-cvslog 2650] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060406055933.644812AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/block_module_link.php
diff -u /dev/null xoops2jp/html/modules/base/class/block_module_link.php:1.1.2.1
--- /dev/null Thu Apr 6 14:59:33 2006
+++ xoops2jp/html/modules/base/class/block_module_link.php Thu Apr 6 14:59:33 2006
@@ -0,0 +1,21 @@
+initVar('block_id', XOBJ_DTYPE_INT, '0', true);
+ $this->initVar('module_id', XOBJ_DTYPE_INT, '0', true);
+ }
+}
+
+class BaseBlock_module_linkHandler extends XoopsObjectGenericHandler
+{
+ var $mTable = "block_module_link";
+ var $mPrimary = "block_id";
+ var $mClass = "BaseBlock_module_linkObject";
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Apr 6 15:00:25 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:00:25 +0900
Subject: [xoops-cvslog 2651] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060406060025.B04B42AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/newblocks.php
diff -u xoops2jp/html/modules/base/class/newblocks.php:1.1.2.2 xoops2jp/html/modules/base/class/newblocks.php:1.1.2.3
--- xoops2jp/html/modules/base/class/newblocks.php:1.1.2.2 Thu Apr 6 12:37:37 2006
+++ xoops2jp/html/modules/base/class/newblocks.php Thu Apr 6 15:00:25 2006
@@ -10,8 +10,14 @@
* Array of group objects who can access this object.
* It need lazy loading to access.
*/
- var $mGroup = null;
+ var $mGroup = array();
+ var $mBmodule = array();
+
+ var $mColumn = null;
+
+ var $mCachetime = null;
+
function BaseNewblocksObject()
{
$this->initVar('bid', XOBJ_DTYPE_INT, '', true);
@@ -62,6 +68,26 @@
$this->mGroup[] =& $handler->get($gperm->get('gperm_groupid'));
}
}
+
+ function loadBmodule()
+ {
+ $handler =& xoops_getmodulehandler('block_module_link', 'base');
+ $criteria =& new Criteria('block_id', $this->get('bid'));
+
+ $this->mBmodule =& $handler->getObjects($criteria);
+ }
+
+ function loadColumn()
+ {
+ $handler =& xoops_getmodulehandler('columnside', 'base');
+ $this->mColumn =& $handler->get($this->get('side'));
+ }
+
+ function loadCachetime()
+ {
+ $handler =& xoops_gethandler('cachetime');
+ $this->mCachetime =& $handler->get($this->get('bcachetime'));
+ }
}
class BaseNewblocksHandler extends XoopsObjectGenericHandler
@@ -69,6 +95,61 @@
var $mTable = "newblocks";
var $mPrimary = "bid";
var $mClass = "BaseNewblocksObject";
+
+ function insert(&$obj, $force=false)
+ {
+ if (parent::insert($obj, $force)) {
+ $handler =& xoops_getmodulehandler('block_module_link', 'base');
+ $handler->deleteAll(new Criteria('block_id', $obj->get('bid')));
+ foreach ($obj->mBmodule as $bmodule) {
+ $handler->insert($bmodule);
+ }
+
+ //
+ // Insert group permissions.
+ //
+ $currentGroupid = array();
+ foreach ($obj->mGroup as $group) {
+ $currentGroupid[] = $group->get('groupid');
+ }
+
+ $permHandler =& xoops_gethandler('groupperm');
+ $criteria =& new CriteriaCompo();
+ $criteria->add(new Criteria('gperm_modid', 1));
+ $criteria->add(new Criteria('gperm_itemid', $obj->get('bid')));
+ $criteria->add(new Criteria('gperm_name', 'block_read'));
+
+ $gpermArr =& $permHandler->getObjects($criteria);
+ foreach ($gpermArr as $gperm) {
+ if (!in_array($gperm->get('gperm_groupid', $currentGroupid))) {
+ $permHandler->delete($gperm, $force);
+ }
+ }
+
+ foreach ($obj->mGroup as $group) {
+ $insertFlag = true;
+ foreach ($gpermArr as $gperm) {
+ if ($gperm->get('gperm_groupid') == $group->get('group_id')) {
+ $insertFlag = false;
+ }
+ }
+
+ if ($insertFlag) {
+ $gperm =& $permHandler->create();
+ $gperm->set('gperm_modid', 1);
+ $gperm->set('gperm_groupid', $group->get('groupid'));
+ $gperm->set('gperm_itemid', $obj->get('bid'));
+ $gperm->set('gperm_name', 'block_read');
+
+ $permHandler->insert($gperm, $force);
+ }
+ }
+
+ return true;
+ }
+
+ return false;
+ }
}
?>
From minahito @ users.sourceforge.jp Thu Apr 6 15:00:56 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:00:56 +0900
Subject: [xoops-cvslog 2652] CVS update:
xoops2jp/html/modules/base/admin/templates
Message-ID: <20060406060056.8A16C2AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/templates/block_uninstall.html
diff -u xoops2jp/html/modules/base/admin/templates/block_uninstall.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/block_uninstall.html:1.1.2.2
--- xoops2jp/html/modules/base/admin/templates/block_uninstall.html:1.1.2.1 Wed Apr 5 19:58:23 2006
+++ xoops2jp/html/modules/base/admin/templates/block_uninstall.html Thu Apr 6 15:00:56 2006
@@ -35,7 +35,9 @@
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$smarty.const._AD_BASE_LANG_SIDE}> | -"><{$object->getVar('side')}> | +"> + <{if $object->mColumn}><{$object->mColumn->getVar('name')}><{/if}> + | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | @@ -79,11 +81,13 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | -"><{$object->getVar('bcachetime')}> | +"> + <{if $object->mCachetime}><{$object->mCachetime->getVar('label')}><{/if}> + | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_LAST_MODIFIED}> | -"><{$object->getVar('last_modified')}> | +"><{$object->getVar('last_modified')|xoops_formattimestamp:l}> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From minahito @ users.sourceforge.jp Thu Apr 6 15:01:02 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 6 Apr 2006 15:01:02 +0900 Subject: [xoops-cvslog 2653] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060406060102.C01FA2AC04F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/block_list.html diff -u xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.1 Wed Apr 5 19:58:23 2006 +++ xoops2jp/html/modules/base/admin/templates/block_list.html Thu Apr 6 15:01:02 2006 @@ -20,9 +20,6 @@ | <{$smarty.const._AD_BASE_LANG_WEIGHT}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
- <{$smarty.const._AD_BASE_LANG_VISIBLE}> - " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" /> |
<{$smarty.const._AD_BASE_LANG_BLOCK_TYPE}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
@@ -40,16 +37,15 @@
<{foreach item=obj from=$objects}>
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$obj->getVar('bid')}> | -<{$obj->getVar('mid')}> | +<{$obj->mModule->getVar('name')}> | <{$obj->getVar('name')}> | <{$obj->getVar('title')}> | -<{$obj->getVar('side')}> | +<{if $obj->mColumn}><{$obj->mColumn->getVar('name')}><{/if}> | <{$obj->getVar('weight')}> | -<{$obj->getVar('visible')}> | <{$obj->getVar('block_type')}> | <{$obj->getVar('c_type')}> | -<{$obj->getVar('bcachetime')}> | -<{$obj->getVar('last_modified')}> | +<{if $obj->mCachetime}><{$obj->mCachetime->getVar('label')}><{/if}> | +<{$obj->getVar('last_modified')|xoops_formattimestamp:l}> | " alt="<{$smarty.const._EDIT}>" /> " alt="<{$smarty.const._DELETE}>" /> Index: xoops2jp/html/modules/base/admin/templates/block_edit.html diff -u xoops2jp/html/modules/base/admin/templates/block_edit.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/block_edit.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/block_edit.html:1.1.2.2 Thu Apr 6 12:37:57 2006 +++ xoops2jp/html/modules/base/admin/templates/block_edit.html Thu Apr 6 15:01:02 2006 @@ -38,14 +38,16 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | ">
- <{xoops_input type=text name=bcachetime value=$actionForm->getVar('bcachetime')}>
+ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | ">
|
<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | ">
|
From minahito @ users.sourceforge.jp Thu Apr 6 15:01:28 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:01:28 +0900
Subject: [xoops-cvslog 2654] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060406060128.767902AC052@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.1 Wed Apr 5 19:58:07 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php Thu Apr 6 15:01:28 2006
@@ -68,6 +68,16 @@
$this->set('side', $obj->get('side'));
$this->set('weight', $obj->get('weight'));
$this->set('bcachetime', $obj->get('bcachetime'));
+
+ $i = 0;
+ foreach ($obj->mBmodule as $module) {
+ $this->set('bmodule', $i++, $module->get('module_id'));
+ }
+
+ $i = 0;
+ foreach ($obj->mGroup as $group) {
+ $this->set('groupid', $i++, $group->get('groupid'));
+ }
}
function update(&$obj)
@@ -81,6 +91,22 @@
$obj->set('bcachetime', $this->get('bcachetime'));
$obj->set('last_modified', time());
+
+ $obj->mBmodule = array();
+ $handler =& xoops_getmodulehandler('block_module_link', 'base');
+ foreach ($this->get('bmodule') as $mid) {
+ $t_obj =& $handler->create();
+ $t_obj->set('block_id', $this->get('bid'));
+ $t_obj->set('module_id', $mid);
+ $obj->mBmodule[] =& $t_obj;
+ unset($t_obj);
+ }
+
+ $obj->mGroup = array();
+ $handler =& xoops_gethandler('group');
+ foreach ($this->get('groupid') as $groupid) {
+ $obj->mGroup[] =& $handler->get($groupid);
+ }
}
}
From minahito @ users.sourceforge.jp Thu Apr 6 15:01:39 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:01:39 +0900
Subject: [xoops-cvslog 2655] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060406060139.9CF6A2AC055@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.1 Wed Apr 5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php Thu Apr 6 15:01:39 2006
@@ -33,6 +33,8 @@
// lazy loading
//
$this->mObject->loadModule();
+ $this->mObject->loadColumn();
+ $this->mObject->loadCachetime();
$render->setAttribute('object', $this->mObject);
}
From minahito @ users.sourceforge.jp Thu Apr 6 15:01:43 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:01:43 +0900
Subject: [xoops-cvslog 2656] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060406060143.971792AC052@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.1 Wed Apr 5 19:57:52 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php Thu Apr 6 15:01:43 2006
@@ -31,6 +31,8 @@
#cubson::lazy_load_array('newblocks', $this->mObjects);
foreach (array_keys($this->mObjects) as $key) {
$this->mObjects[$key]->loadModule();
+ $this->mObjects[$key]->loadColumn();
+ $this->mObjects[$key]->loadCachetime();
}
$render->setAttribute("objects", $this->mObjects);
From minahito @ users.sourceforge.jp Thu Apr 6 15:01:47 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:01:47 +0900
Subject: [xoops-cvslog 2657] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060406060147.7F36A2AC052@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.2 Thu Apr 6 12:38:20 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Thu Apr 6 15:01:47 2006
@@ -23,6 +23,13 @@
return $handler;
}
+ function _setupObject()
+ {
+ parent::_setupObject();
+ $this->mObject->loadGroup();
+ $this->mObject->loadBmodule();
+ }
+
function _setupActionForm()
{
$this->mActionForm =& new Legacy_BlockEditForm();
@@ -38,12 +45,27 @@
// lazy loading
//
$this->mObject->loadModule();
- $this->mObject->loadGroup();
$render->setAttribute('object', $this->mObject);
+ //
+ // Build active modules list and set.
+ //
$handler =& xoops_gethandler('module');
- $moduleArr =& $handler->getObjects();
+ $moduleArr[0] =& $handler->create();
+ $moduleArr[0]->set('mid', -1);
+ $moduleArr[0]->set('name', _AD_BASE_LANG_ALL_MODULES);
+
+ $moduleArr[1] =& $handler->create();
+ $moduleArr[1]->set('mid', 0);
+ $moduleArr[1]->set('name', _AD_BASE_LANG_TOPPAGE);
+
+ $criteria =& new CriteriaCompo();
+ $criteria->add(new Criteria('hasmain', 1));
+ $criteria->add(new Criteria('isactive', 1));
+
+ $t_Arr =& $handler->getObjects($criteria);
+ $moduleArr = array_merge($moduleArr, $t_Arr);
$render->setAttribute('moduleArr', $moduleArr);
$handler =& xoops_getmodulehandler('columnside');
@@ -55,6 +77,13 @@
$render->setAttribute('groupArr', $groupArr);
//
+ // Build cachetime list and set.
+ //
+ $handler =& xoops_gethandler('cachetime');
+ $cachetimeArr =& $handler->getObjects();
+ $render->setAttribute('cachetimeArr', $cachetimeArr);
+
+ //
// Get html of option form rendered.
//
if ($this->mObject->get('func_file') && $this->mObject->get('edit_func')) {
From minahito @ users.sourceforge.jp Thu Apr 6 15:11:32 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:11:32 +0900
Subject: [xoops-cvslog 2658] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060406061132.550E12AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.1 Wed Apr 5 19:58:07 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php Thu Apr 6 15:11:32 2006
@@ -30,7 +30,7 @@
class Legacy_BlockFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
- var $mSortKeys = array(
+ var $_mSortKeys = array(
NEWBLOCKS_SORT_KEY_DEFAULT => 'bid',
NEWBLOCKS_SORT_KEY_BID => 'bid',
NEWBLOCKS_SORT_KEY_MID => 'mid',
From minahito @ users.sourceforge.jp Thu Apr 6 15:11:37 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:11:37 +0900
Subject: [xoops-cvslog 2659] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060406061137.F10B42AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.2
--- xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.1 Wed Apr 5 19:58:07 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php Thu Apr 6 15:11:37 2006
@@ -30,7 +30,7 @@
class Legacy_BlockInstallFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
- var $mSortKeys = array(
+ var $_mSortKeys = array(
NEWBLOCKS_SORT_KEY_DEFAULT => 'bid',
NEWBLOCKS_SORT_KEY_BID => 'bid',
NEWBLOCKS_SORT_KEY_MID => 'mid',
From minahito @ users.sourceforge.jp Thu Apr 6 15:12:29 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:12:29 +0900
Subject: [xoops-cvslog 2660] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060406061229.D74C22AC04F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.2 Thu Apr 6 15:01:43 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php Thu Apr 6 15:12:29 2006
@@ -22,7 +22,7 @@
function _getBaseUrl()
{
- return "./index.php?action=NewblocksList";
+ return "./index.php?action=BlockList";
}
function executeViewIndex(&$controller, &$xoopsUser, &$render)
From minahito @ users.sourceforge.jp Thu Apr 6 15:24:11 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:24:11 +0900
Subject: [xoops-cvslog 2661] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060406062411.410E92AC075@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/japanese/modinfo.php
diff -u xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.12 xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.13
--- xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.12 Wed Apr 5 19:59:03 2006
+++ xoops2jp/html/modules/base/language/japanese/modinfo.php Thu Apr 6 15:24:11 2006
@@ -1,38 +1,38 @@
-
+
Index: xoops2jp/html/modules/base/language/japanese/main.php
diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.10 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.11
--- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.10 Wed Apr 5 19:59:03 2006
+++ xoops2jp/html/modules/base/language/japanese/main.php Thu Apr 6 15:24:11 2006
@@ -1,95 +1,95 @@
-%s件のデータが見つかりました。");
-define('_SR_IGNOREDWORDS', "次の語句は短すぎる(%u 文字以下)ため検索に使用されていません。");
-define('_SR_KEYIGNORE', "文字数が ");
-define('_SR_KEYTOOSHORT', "キーワードは %s 文字以上で指定してください。");
-define('_SR_KEYWORDS', "キーワード");
-define('_SR_NEXT', "次のページ >>");
-define('_SR_NOMATCH', "該当データなし。");
-define('_SR_PLZENTER', "必要なデータを全て入力してください。");
-define('_SR_PREVIOUS', "<< 前のページ");
-define('_SR_SEARCH', "検索");
-define('_SR_SEARCHIN', "検索対象のモジュール");
-define('_SR_SEARCHRESULTS', "検索結果");
-define('_SR_SEARCHRULE', "検索のルール");
-define('_SR_SHOWALLR', "すべて表示");
-define('_SR_SHOWING', "(%d 〜 %d 件目を表示)");
-define('_SR_TYPE', "検索の種類");
-
-?>
+%s件のデータが見つかりました。");
+define('_SR_IGNOREDWORDS', "次の語句は短すぎる(%u 文字以下)ため検索に使用されていません。");
+define('_SR_KEYIGNORE', "文字数が ");
+define('_SR_KEYTOOSHORT', "キーワードは %s 文字以上で指定してください。");
+define('_SR_KEYWORDS', "キーワード");
+define('_SR_NEXT', "次のページ >>");
+define('_SR_NOMATCH', "該当データなし。");
+define('_SR_PLZENTER', "必要なデータを全て入力してください。");
+define('_SR_PREVIOUS', "<< 前のページ");
+define('_SR_SEARCH', "検索");
+define('_SR_SEARCHIN', "検索対象のモジュール");
+define('_SR_SEARCHRESULTS', "検索結果");
+define('_SR_SEARCHRULE', "検索のルール");
+define('_SR_SHOWALLR', "すべて表示");
+define('_SR_SHOWING', "(%d 〜 %d 件目を表示)");
+define('_SR_TYPE', "検索の種類");
+
+?>
From minahito @ users.sourceforge.jp Thu Apr 6 15:48:39 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:48:39 +0900
Subject: [xoops-cvslog 2662] CVS update: xoops2jp/html/kernel
Message-ID: <20060406064839.D309A2AC06F@users.sourceforge.jp>
Index: xoops2jp/html/kernel/cachetime.php
diff -u /dev/null xoops2jp/html/kernel/cachetime.php:1.1.2.1
--- /dev/null Thu Apr 6 15:48:39 2006
+++ xoops2jp/html/kernel/cachetime.php Thu Apr 6 15:48:39 2006
@@ -0,0 +1,89 @@
+initVar('cachetime', XOBJ_DTYPE_OTHER, null, false);
+ $this->initVar('label', XOBJ_DTYPE_TXTBOX, null, true, 255);
+ }
+}
+
+class XoopsCachetimeHandler extends XoopsObjectHandler
+{
+ var $_mResult;
+
+ function XoopsCachetimeHandler(&$db)
+ {
+ parent::XoopsObjectHandler($db);
+
+ //
+ // This handler not connects to database.
+ //
+ $this->_mResult = array(
+ "0" => _NOCACHE,
+ "30" => sprintf(_SECONDS, 30),
+ "60" => _MINUTE,
+ "300" => sprintf(_MINUTES, 5),
+ "1800" => sprintf(_MINUTES, 30),
+ "3600" => _HOUR,
+ "18000" => sprintf(_HOURS, 5),
+ "86400" => _DAY,
+ "259200" => sprintf(_DAYS, 3),
+ "604800" => _WEEK,
+ "2592000" => _MONTH
+ );
+ }
+
+ function &create()
+ {
+ $ret =& new XoopsCachetime();
+ return $ret;
+ }
+
+ function &get($cachetime)
+ {
+ if (isset($this->_mResult[$cachetime])) {
+ $obj =& new XoopsCachetime();
+ $obj->setVar('cachetime', $cachetime);
+ $obj->setVar('label', $this->_mResult[$cachetime]);
+
+ return $obj;
+ }
+
+ $ret = null;
+ return $ret;
+ }
+
+ function &getObjects($criteria = null, $key_as_id = false)
+ {
+ $ret = array();
+
+ foreach ($this->_mResult as $cachetime => $label) {
+ $obj =& new XoopsCachetime();
+ $obj->setVar('cachetime', $cachetime);
+ $obj->setVar('label', $label);
+ if ($key_as_id) {
+ $ret[$cachetime] =& $obj;
+ }
+ else {
+ $ret[] =& $obj;
+ }
+ unset($obj);
+ }
+
+ return $ret;
+ }
+
+ function insert(&$obj)
+ {
+ return false;
+ }
+
+ function delete(&$obj)
+ {
+ return false;
+ }
+}
+
+?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Thu Apr 6 15:49:35 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 15:49:35 +0900
Subject: [xoops-cvslog 2663] CVS update: xoops2jp/html/class
Message-ID: <20060406064935.676352AC04F@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_ActionForm.class.php
diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.30 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.31
--- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.30 Tue Mar 28 22:28:16 2006
+++ xoops2jp/html/class/XCube_ActionForm.class.php Thu Apr 6 15:49:35 2006
@@ -312,6 +312,8 @@
function fetch($key = null)
{
+ unset($this->mProperties);
+ $this->mProperties = array();
if (isset($_REQUEST[$this->mName]) && is_array($_REQUEST[$this->mName])) {
foreach ($_REQUEST[$this->mName] as $_key => $_val) {
$this->mProperties[$_key] =& new $this->mPropertyClassName($this->mName);
From minahito @ users.sourceforge.jp Thu Apr 6 16:51:41 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 16:51:41 +0900
Subject: [xoops-cvslog 2664] CVS update: xoops2jp/html/modules/base/admin/.xml
Message-ID: <20060406075141.EC9622AC01F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/.xml/customblock_edit.xml
diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/customblock_edit.xml:1.1.2.1
--- /dev/null Thu Apr 6 16:51:41 2006
+++ xoops2jp/html/modules/base/admin/.xml/customblock_edit.xml Thu Apr 6 16:51:41 2006
@@ -0,0 +1,20 @@
+
+
<{$smarty.const._AD_BASE_LANG_NAME}> | -"> - <{xoops_input type=text name=name value=$actionForm->getVar('name') size=15 maxlength=150}> - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | "> <{xoops_input type=text name=title value=$actionForm->getVar('title') size=15 maxlength=255}> @@ -40,7 +34,9 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | ">
- <{xoops_input type=text name=bcachetime value=$actionForm->getVar('bcachetime')}>
+ |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$obj->getVar('bid')}> | -<{$obj->mModule->getVar('name')}> | ++ <{if $obj->mModule}> + <{$obj->mModule->getVar('name')}> + <{else}> + + <{/if}> + | <{$obj->getVar('name')}> | <{$obj->getVar('title')}> | <{if $obj->mColumn}><{$obj->mColumn->getVar('name')}><{/if}> | @@ -47,7 +60,11 @@<{if $obj->mCachetime}><{$obj->mCachetime->getVar('label')}><{/if}> | <{$obj->getVar('last_modified')|xoops_formattimestamp:l}> | - " alt="<{$smarty.const._EDIT}>" /> + <{if $obj->get('block_type') == 'C'}> + " alt="<{$smarty.const._EDIT}>" /> + <{else}> + " alt="<{$smarty.const._EDIT}>" /> + <{/if}> " alt="<{$smarty.const._DELETE}>" /> |
<{$smarty.const._AD_BASE_LANG_BID}> @@ -30,7 +33,13 @@ <{foreach item=obj from=$objects}> | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$obj->getVar('bid')}> | -<{$obj->mModule->getVar('name')}> | ++ <{if $obj->mModule}> + <{$obj->mModule->getVar('name')}> + <{else}> + + <{/if}> + | <{$obj->getVar('name')}> | <{$obj->getVar('title')}> | <{$obj->getVar('block_type')}> | @@ -38,6 +47,9 @@<{$obj->getVar('template')}> | " alt="<{$smarty.const._MD_A_BASE_LANG_INSTALL}>" /> + <{if $obj->get('block_type') == 'C'}> + " alt="<{$smarty.const._DELETE}>" /> + <{/if}> |
<{$smarty.const._AD_BASE_LANG_NAME}> | -"> - <{xoops_input type=text name=name value=$actionForm->getVar('name') size=15 maxlength=150}> - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | ">
<{xoops_input type=text name=title value=$actionForm->getVar('title') size=15 maxlength=255}>
From minahito @ users.sourceforge.jp Thu Apr 6 16:55:08 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 16:55:08 +0900
Subject: [xoops-cvslog 2671] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060406075508.BD4272AC015@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/blockctype.php
diff -u /dev/null xoops2jp/html/modules/base/class/blockctype.php:1.1.2.1
--- /dev/null Thu Apr 6 16:55:08 2006
+++ xoops2jp/html/modules/base/class/blockctype.php Thu Apr 6 16:55:08 2006
@@ -0,0 +1,77 @@
+initVar('type', XOBJ_DTYPE_STRING, '', true);
+ $this->initVar('label', XOBJ_DTYPE_STRING, '', true, 255);
+ }
+}
+
+class BaseBlockctypeHandler extends XoopsObjectHandler
+{
+ var $_mResults = array();
+
+ function BaseBlockctypeHandler(&$db)
+ {
+ $t_arr = array (
+ 'H' => _AM_HTML,
+ 'P' => _AM_PHP,
+ 'S' => _AM_AFWSMILE,
+ 'T' => _AM_AFNOSMILE
+ );
+
+ foreach ($t_arr as $id => $name) {
+ $this->_mResults[$id] =& $this->create();
+ $this->_mResults[$id]->setVar('type', $id);
+ $this->_mResults[$id]->setVar('label', $name);
+ }
+ }
+
+ function &create()
+ {
+ $ret =& new BaseBlockctypeObject();
+ return $ret;
+ }
+
+ function get($id)
+ {
+ if (isset($this->_mResults[$id])) {
+ return $this->_mResults[$id];
+ }
+
+ $ret = null;
+ return $ret;
+ }
+
+ function &getObjects($criteria = null, $id_as_key = false)
+ {
+ if ($id_as_key) {
+ return $this->_mResults;
+ }
+ else {
+ $ret = array();
+
+ foreach (array_keys($this->_mResults) as $key) {
+ $ret[] =& $this->_mResults[$key];
+ }
+
+ return $ret;
+ }
+ }
+
+ function insert(&$obj)
+ {
+ return false;
+ }
+
+ function delete(&$obj)
+ {
+ return false;
+ }
+}
+
+?>
From minahito @ users.sourceforge.jp Thu Apr 6 16:55:41 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Thu, 6 Apr 2006 16:55:41 +0900
Subject: [xoops-cvslog 2672] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060406075541.031DA2AC015@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.24 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.25
--- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.24 Thu Apr 6 14:58:41 2006
+++ xoops2jp/html/modules/base/language/japanese/admin.php Thu Apr 6 16:55:40 2006
@@ -8,6 +8,7 @@
define('_AD_BASE_ERROR_PLEASE_AGREE', "ライセンスに同意してください");
define('_AD_BASE_ERROR_REQUIRED', "{0}は必ず入力して下さい");
define('_AD_BASE_ERROR_SMILE_URL_REQUIRED', "顔アイコンをアップロードして下さい");
+define('_AD_BASE_LANG_ADD_CUSTOM_BLOCK', "カスタムブロック追加");
define('_AD_BASE_LANG_ALL_MODULES', "すべてのモジュール");
define('_AD_BASE_LANG_ALL_STATUS', "すべてのステータス");
define('_AD_BASE_LANG_BCACHETIME', "bcachetime");
@@ -41,6 +42,10 @@
define('_AD_BASE_LANG_CONTENT', "content");
define('_AD_BASE_LANG_CONTROL', "コントロール");
define('_AD_BASE_LANG_CREATE_NEW', "新規作成");
+define('_AD_BASE_LANG_CUSTOM_HTML', "カスタム(HTML)");
+define('_AD_BASE_LANG_CUSTOM_PHP', "カスタム(PHP)");
+define('_AD_BASE_LANG_CUSTOM_WITH_SMILIES', "カスタム(顔アイコン有効)");
+define('_AD_BASE_LANG_CUSTOM_WITHOUT_SMILIES', "カスタム(顔アイコン無効)");
define('_AD_BASE_LANG_DIRNAME', "dirname");
define('_AD_BASE_LANG_DISPLAY', "表示");
define('_AD_BASE_LANG_DOBR', "改行を自動挿入する");
@@ -82,8 +87,10 @@
define('_AD_BASE_LANG_WEIGHT', "weight");
define('_AD_BASE_MESSAGE_CHILDREN_DELETED_TOGETHER', "一緒に削除されるデータ");
define('_AD_BASE_MESSAGE_CONFIRM_DELETE', "削除確認");
+define('_AD_BASE_TIPS_ADD_CUSTOM_BLOCK', "新しいブロックをインストールして、サイトをカスタマイズしましょう。 モジュール付属のブロック以外にも、カスタムブロックを追加して、自由なメッセージをブロックカラムに追加できます。"); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "Q:ブロックをアンインストールすると? A:すべての設定を記録したまま、表示やリストから消えます。設定を記録してますので、簡単に再インストールすることができます。"); -define('_AD_BASE_TIPS_INSTALL_BLOCK', "ブロックをインストールしてサイトをカスタマイズしましょう。インストール時に表示オプションなどを調整できます。"); +define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Q:カスタムブロックをアンインストールすると? A:削除されずに、すべての設定を記録したまま、未インストールブロックリストへ移動します。未インストールリストから削除できるほか、再インストール操作で簡単に復活させることができます。"); +define('_AD_BASE_TIPS_INSTALL_BLOCK', "ブロックをインストールしてサイトをカスタマイズしましょう。インストール時に表示オプションなどを調整できます。 ウェルカムメッセージなど、文章を表示したい場合は、カスタムブロックを追加しましょう。"); define('_MB_A_BASE_LANG_ACTIONSEARCH', "アクションサーチ"); define('_MB_A_BASE_LANG_ACTIONSEARCH_INFO', "管理メニューやヘルプから入力されたキーワードを検索します。 管理メニューの位置を忘れたときに使いましょう (例)利用許諾文"); define('_MB_A_BASE_LANG_MENU', "メニュー"); From minahito @ users.sourceforge.jp Thu Apr 6 16:55:41 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 6 Apr 2006 16:55:41 +0900 Subject: [xoops-cvslog 2673] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060406075541.284762AC01F@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/admin.php diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.20 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.21 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.20 Thu Apr 6 14:58:31 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Thu Apr 6 16:55:41 2006 @@ -8,6 +8,7 @@ define('_AD_BASE_ERROR_PLEASE_AGREE', "Please agree the following licence."); define('_AD_BASE_ERROR_REQUIRED', "{0} is required."); define('_AD_BASE_ERROR_SMILE_URL_REQUIRED', "Upload the image file of smilies."); +define('_AD_BASE_LANG_ADD_CUSTOM_BLOCK', "Add custom block"); define('_AD_BASE_LANG_ALL_MODULES', "All modules"); define('_AD_BASE_LANG_ALL_STATUS', "All status"); define('_AD_BASE_LANG_BCACHETIME', "bcachetime"); @@ -41,6 +42,10 @@ define('_AD_BASE_LANG_CONTENT', "content"); define('_AD_BASE_LANG_CONTROL', "Control"); define('_AD_BASE_LANG_CREATE_NEW', "Add a new"); +define('_AD_BASE_LANG_CUSTOM_HTML', "Custom HTML"); +define('_AD_BASE_LANG_CUSTOM_PHP', "Custom PHP"); +define('_AD_BASE_LANG_CUSTOM_WITH_SMILIES', "Custom with Smilies"); +define('_AD_BASE_LANG_CUSTOM_WITHOUT_SMILIES', "Custom without Smilies"); define('_AD_BASE_LANG_DIRNAME', "dirname"); define('_AD_BASE_LANG_DISPLAY', "Display"); define('_AD_BASE_LANG_DOBR', "Insert line-break automaticall"); @@ -82,7 +87,9 @@ define('_AD_BASE_LANG_WEIGHT', "weight"); define('_AD_BASE_MESSAGE_CHILDREN_DELETED_TOGETHER', "Children deleted together"); define('_AD_BASE_MESSAGE_CONFIRM_DELETE', "Confirm to delete"); +define('_AD_BASE_TIPS_ADD_CUSTOM_BLOCK', "Add custom block"); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "block uninstall"); +define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Custom block uninstall"); define('_AD_BASE_TIPS_INSTALL_BLOCK', "Let's customize your site with installing your favorite blocks. You can edit the block's options when you install the block."); define('_MB_A_BASE_LANG_ACTIONSEARCH', "Action Search"); define('_MB_A_BASE_LANG_ACTIONSEARCH_INFO', "what's Action Search...."); From minahito @ users.sourceforge.jp Fri Apr 7 13:47:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Apr 2006 13:47:10 +0900 Subject: [xoops-cvslog 2674] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060407044710.61B2A2AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php:1.1.2.1 --- /dev/null Fri Apr 7 13:47:10 2006 +++ xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php Fri Apr 7 13:47:10 2006 @@ -0,0 +1,53 @@ +mActionForm =& new Legacy_CustomBlockDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("customblock_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + + // + // lazy loading + // + $this->mObject->loadModule(); + $this->mObject->loadColumn(); + $this->mObject->loadCachetime(); + + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=BlockInstallList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=BlockInstallList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Fri Apr 7 13:47:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Apr 2006 13:47:24 +0900 Subject: [xoops-cvslog 2675] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060407044724.AB2022AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/CustomBlockDeleteForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/CustomBlockDeleteForm.class.php:1.1.2.1 --- /dev/null Fri Apr 7 13:47:24 2006 +++ xoops2jp/html/modules/base/admin/forms/CustomBlockDeleteForm.class.php Fri Apr 7 13:47:24 2006 @@ -0,0 +1,41 @@ +get('bid'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['bid'] =& new XCube_IntProperty('bid'); + + // + // Set field properties + // + + $this->mFieldProperties['bid'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['bid']->setDependsByArray(array('required')); + $this->mFieldProperties['bid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_BID); + } + + function load(&$obj) + { + $this->set('bid', $obj->get('bid')); + } + + function update(&$obj) + { + } +} + +?> From minahito @ users.sourceforge.jp Fri Apr 7 13:47:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Apr 2006 13:47:35 +0900 Subject: [xoops-cvslog 2676] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060407044735.890E32AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/BlockUninstallForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/BlockUninstallForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/BlockUninstallForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/forms/BlockUninstallForm.class.php:1.1.2.1 Wed Apr 5 19:58:07 2006 +++ xoops2jp/html/modules/base/admin/forms/BlockUninstallForm.class.php Fri Apr 7 13:47:35 2006 @@ -2,40 +2,18 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); -require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; -require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php"; +require_once XOOPS_MODULE_PATH . "/base/admin/forms/CustomBlockDeleteForm.class.php"; -class Legacy_BlockUninstallForm extends XCube_ActionForm +class Legacy_BlockUninstallForm extends Legacy_CustomBlockDeleteForm { function getTokenName() { return "module.base.BlockUninstallForm.TOKEN" . $this->get('bid'); } - function prepare() - { - // - // Set form properties - // - $this->mFormProperties['bid'] =& new XCube_IntProperty('bid'); - - // - // Set field properties - // - - $this->mFieldProperties['bid'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['bid']->setDependsByArray(array('required')); - $this->mFieldProperties['bid']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_BID); - } - - function load(&$obj) - { - $this->set('bid', $obj->get('bid')); - } - function update(&$obj) { - $obj->set('bid', $this->get('bid')); + parent::update($obj); $obj->set('last_modified', time()); $obj->set('visible', false); } From minahito @ users.sourceforge.jp Fri Apr 7 13:47:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 7 Apr 2006 13:47:50 +0900 Subject: [xoops-cvslog 2677] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060407044750.305262AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/customblock_delete.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/customblock_delete.html:1.1.2.1 --- /dev/null Fri Apr 7 13:47:50 2006 +++ xoops2jp/html/modules/base/admin/templates/customblock_delete.html Fri Apr 7 13:47:50 2006 @@ -0,0 +1,97 @@ + <{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}> + +
-
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Fri Apr 7 18:02:36 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 7 Apr 2006 18:02:36 +0900
Subject: [xoops-cvslog 2682] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060407090236.761462AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.4
--- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.3 Thu Apr 6 15:01:47 2006
+++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Fri Apr 7 18:02:36 2006
@@ -36,6 +36,64 @@
$this->mActionForm->prepare();
}
+ function execute(&$controller, &$xoopsUser)
+ {
+ $ret = parent::execute($controller, $xoopsUser);
+
+ if ($ret == LEGACY_FRAME_VIEW_SUCCESS) {
+ //
+ // Reset block_module_link.
+ //
+ $handler =& xoops_getmodulehandler('block_module_link', 'base');
+ $handler->deleteAll(new Criteria('block_id', $this->mObject->get('bid')));
+ foreach ($this->mObject->mBmodule as $bmodule) {
+ $handler->insert($bmodule);
+ }
+
+ //
+ // Insert group permissions.
+ //
+ $currentGroupid = array();
+ foreach ($this->mObject->mGroup as $group) {
+ $currentGroupid[] = $group->get('groupid');
+ }
+
+ $permHandler =& xoops_gethandler('groupperm');
+ $criteria =& new CriteriaCompo();
+ $criteria->add(new Criteria('gperm_modid', 1));
+ $criteria->add(new Criteria('gperm_itemid', $this->mObject->get('bid')));
+ $criteria->add(new Criteria('gperm_name', 'block_read'));
+
+ $gpermArr =& $permHandler->getObjects($criteria);
+ foreach ($gpermArr as $gperm) {
+ if (!in_array($gperm->get('gperm_groupid', $currentGroupid))) {
+ $permHandler->delete($gperm, $force);
+ }
+ }
+
+ foreach ($this->mObject->mGroup as $group) {
+ $insertFlag = true;
+ foreach ($gpermArr as $gperm) {
+ if ($gperm->get('gperm_groupid') == $group->get('group_id')) {
+ $insertFlag = false;
+ }
+ }
+
+ if ($insertFlag) {
+ $gperm =& $permHandler->create();
+ $gperm->set('gperm_modid', 1);
+ $gperm->set('gperm_groupid', $group->get('groupid'));
+ $gperm->set('gperm_itemid', $this->mObject->get('bid'));
+ $gperm->set('gperm_name', 'block_read');
+
+ $permHandler->insert($gperm, $force);
+ }
+ }
+ }
+
+ return $ret;
+ }
+
function executeViewInput(&$controller, &$xoopsUser, &$render)
{
$render->setTemplateName("block_edit.html");
From minahito @ users.sourceforge.jp Fri Apr 7 18:03:01 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 7 Apr 2006 18:03:01 +0900
Subject: [xoops-cvslog 2683] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060407090301.75EA02AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/newblocks.php
diff -u xoops2jp/html/modules/base/class/newblocks.php:1.1.2.3 xoops2jp/html/modules/base/class/newblocks.php:1.1.2.4
--- xoops2jp/html/modules/base/class/newblocks.php:1.1.2.3 Thu Apr 6 15:00:25 2006
+++ xoops2jp/html/modules/base/class/newblocks.php Fri Apr 7 18:03:01 2006
@@ -95,61 +95,6 @@
var $mTable = "newblocks";
var $mPrimary = "bid";
var $mClass = "BaseNewblocksObject";
-
- function insert(&$obj, $force=false)
- {
- if (parent::insert($obj, $force)) {
- $handler =& xoops_getmodulehandler('block_module_link', 'base');
- $handler->deleteAll(new Criteria('block_id', $obj->get('bid')));
- foreach ($obj->mBmodule as $bmodule) {
- $handler->insert($bmodule);
- }
-
- //
- // Insert group permissions.
- //
- $currentGroupid = array();
- foreach ($obj->mGroup as $group) {
- $currentGroupid[] = $group->get('groupid');
- }
-
- $permHandler =& xoops_gethandler('groupperm');
- $criteria =& new CriteriaCompo();
- $criteria->add(new Criteria('gperm_modid', 1));
- $criteria->add(new Criteria('gperm_itemid', $obj->get('bid')));
- $criteria->add(new Criteria('gperm_name', 'block_read'));
-
- $gpermArr =& $permHandler->getObjects($criteria);
- foreach ($gpermArr as $gperm) {
- if (!in_array($gperm->get('gperm_groupid', $currentGroupid))) {
- $permHandler->delete($gperm, $force);
- }
- }
-
- foreach ($obj->mGroup as $group) {
- $insertFlag = true;
- foreach ($gpermArr as $gperm) {
- if ($gperm->get('gperm_groupid') == $group->get('group_id')) {
- $insertFlag = false;
- }
- }
-
- if ($insertFlag) {
- $gperm =& $permHandler->create();
- $gperm->set('gperm_modid', 1);
- $gperm->set('gperm_groupid', $group->get('groupid'));
- $gperm->set('gperm_itemid', $obj->get('bid'));
- $gperm->set('gperm_name', 'block_read');
-
- $permHandler->insert($gperm, $force);
- }
- }
-
- return true;
- }
-
- return false;
- }
}
?>
From minahito @ users.sourceforge.jp Fri Apr 7 18:03:23 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 7 Apr 2006 18:03:23 +0900
Subject: [xoops-cvslog 2684] CVS update:
xoops2jp/html/modules/base/language/english
Message-ID: <20060407090323.91B552AC012@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/language/english/admin.php
diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.21 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.22
--- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.21 Thu Apr 6 16:55:41 2006
+++ xoops2jp/html/modules/base/language/english/admin.php Fri Apr 7 18:03:23 2006
@@ -4,6 +4,7 @@
define('_AD_BASE_ERROR_EXTENSION', "Uploaded file's extension does not match any entry in the allowed list.");
define('_AD_BASE_ERROR_INTRANGE', "{0} is wrong.");
define('_AD_BASE_ERROR_MAXLENGTH', "Input {0} with {1} or less characters.");
+define('_AD_BASE_ERROR_OBJECTEXIST', "Objectexist");
define('_AD_BASE_ERROR_OPTIONS', "options");
define('_AD_BASE_ERROR_PLEASE_AGREE', "Please agree the following licence.");
define('_AD_BASE_ERROR_REQUIRED', "{0} is required.");
From minahito @ users.sourceforge.jp Fri Apr 7 18:03:29 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Fri, 7 Apr 2006 18:03:29 +0900
Subject: [xoops-cvslog 2685] CVS update:
xoops2jp/html/modules/base/language/japanese
Message-ID: <20060407090329.51EEA2AC012@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.25 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.26
--- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.25 Thu Apr 6 16:55:40 2006
+++ xoops2jp/html/modules/base/language/japanese/admin.php Fri Apr 7 18:03:29 2006
@@ -4,6 +4,7 @@
define('_AD_BASE_ERROR_EXTENSION', "許可されたファイル形式ではありません");
define('_AD_BASE_ERROR_INTRANGE', "{0}の値が不正です");
define('_AD_BASE_ERROR_MAXLENGTH', "{0}は半角{1}文字以下で入力して下さい");
+define('_AD_BASE_ERROR_OBJECTEXIST', "Objectexist");
define('_AD_BASE_ERROR_OPTIONS', "オプションの値が不正です");
define('_AD_BASE_ERROR_PLEASE_AGREE', "ライセンスに同意してください");
define('_AD_BASE_ERROR_REQUIRED', "{0}は必ず入力して下さい");
From onokazu @ users.sourceforge.jp Sat Apr 8 14:10:37 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Sat, 8 Apr 2006 14:10:37 +0900
Subject: [xoops-cvslog 2686] CVS update: xoops2jp/html/include
Message-ID: <20060408051037.C5F5A2AC02C@users.sourceforge.jp>
Index: xoops2jp/html/include/checklogin.php
diff -u xoops2jp/html/include/checklogin.php:1.4 xoops2jp/html/include/checklogin.php:1.4.6.1
--- xoops2jp/html/include/checklogin.php:1.4 Wed Aug 3 21:39:11 2005
+++ xoops2jp/html/include/checklogin.php Sat Apr 8 14:10:37 2006
@@ -1,99 +1,99 @@
- //
-// ------------------------------------------------------------------------ //
-// 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 //
-// ------------------------------------------------------------------------ //
-// Author: Kazumi Ono (AKA onokazu) //
-// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
-// Project: The XOOPS Project (http://www.xoops.org/) //
-// ------------------------------------------------------------------------- //
-
-if (!defined('XOOPS_ROOT_PATH')) {
- exit();
-}
-include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
-$uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']);
-$pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']);
-if ($uname == '' || $pass == '') {
- redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
- exit();
-}
-$member_handler =& xoops_gethandler('member');
-$myts =& MyTextsanitizer::getInstance();
-$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), addslashes($myts->stripSlashesGPC($pass)));
-if (false != $user) {
- if (0 == $user->getVar('level')) {
- redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
- exit();
- }
- if ($xoopsConfig['closesite'] == 1) {
- $allowed = false;
- foreach ($user->getGroups() as $group) {
- if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
- $allowed = true;
- break;
- }
- }
- if (!$allowed) {
- redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
- exit();
- }
- }
- $user->setVar('last_login', time());
- if (!$member_handler->insertUser($user)) {
- }
- $_SESSION = array();
- $_SESSION['xoopsUserId'] = $user->getVar('uid');
- $_SESSION['xoopsUserGroups'] = $user->getGroups();
- if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
- setcookie($xoopsConfig['session_name'], session_id(), time()+(60 * $xoopsConfig['session_expire']), '/', '', 0);
- }
- $user_theme = $user->getVar('theme');
- if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
- $_SESSION['xoopsUserTheme'] = $user_theme;
- }
- 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';
- }
-
- // RMV-NOTIFY
- // Perform some maintenance of notification records
- $notification_handler =& xoops_gethandler('notification');
- $notification_handler->doLoginMaintenance($user->getVar('uid'));
-
- redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')));
-} else {
-
- redirect_header(XOOPS_URL.'/user.php',1,_US_INCORRECTLOGIN);
-}
-exit();
-?>
+ //
+// ------------------------------------------------------------------------ //
+// 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 //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.xoops.org/ http://jp.xoops.org/ http://www.myweb.ne.jp/ //
+// Project: The XOOPS Project (http://www.xoops.org/) //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+include_once XOOPS_ROOT_PATH.'/language/'.$xoopsConfig['language'].'/user.php';
+$uname = !isset($_POST['uname']) ? '' : trim($_POST['uname']);
+$pass = !isset($_POST['pass']) ? '' : trim($_POST['pass']);
+if ($uname == '' || $pass == '') {
+ redirect_header(XOOPS_URL.'/user.php', 1, _US_INCORRECTLOGIN);
+ exit();
+}
+$member_handler =& xoops_gethandler('member');
+$myts =& MyTextsanitizer::getInstance();
+$user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($uname)), $myts->stripSlashesGPC($pass));
+if (false != $user) {
+ if (0 == $user->getVar('level')) {
+ redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
+ exit();
+ }
+ if ($xoopsConfig['closesite'] == 1) {
+ $allowed = false;
+ foreach ($user->getGroups() as $group) {
+ if (in_array($group, $xoopsConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) {
+ $allowed = true;
+ break;
+ }
+ }
+ if (!$allowed) {
+ redirect_header(XOOPS_URL.'/index.php', 1, _NOPERM);
+ exit();
+ }
+ }
+ $user->setVar('last_login', time());
+ if (!$member_handler->insertUser($user)) {
+ }
+ $_SESSION = array();
+ $_SESSION['xoopsUserId'] = $user->getVar('uid');
+ $_SESSION['xoopsUserGroups'] = $user->getGroups();
+ if ($xoopsConfig['use_mysession'] && $xoopsConfig['session_name'] != '') {
+ setcookie($xoopsConfig['session_name'], session_id(), time()+(60 * $xoopsConfig['session_expire']), '/', '', 0);
+ }
+ $user_theme = $user->getVar('theme');
+ if (in_array($user_theme, $xoopsConfig['theme_set_allowed'])) {
+ $_SESSION['xoopsUserTheme'] = $user_theme;
+ }
+ 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';
+ }
+
+ // RMV-NOTIFY
+ // Perform some maintenance of notification records
+ $notification_handler =& xoops_gethandler('notification');
+ $notification_handler->doLoginMaintenance($user->getVar('uid'));
+
+ redirect_header($url, 1, sprintf(_US_LOGGINGU, $user->getVar('uname')));
+} else {
+
+ redirect_header(XOOPS_URL.'/user.php',1,_US_INCORRECTLOGIN);
+}
+exit();
+?>
From onokazu @ users.sourceforge.jp Sat Apr 8 14:10:38 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Sat, 8 Apr 2006 14:10:38 +0900
Subject: [xoops-cvslog 2687] CVS update: xoops2jp/html/kernel
Message-ID: <20060408051038.1A72F2AC039@users.sourceforge.jp>
Index: xoops2jp/html/kernel/member.php
diff -u xoops2jp/html/kernel/member.php:1.4.6.1 xoops2jp/html/kernel/member.php:1.4.6.2
--- xoops2jp/html/kernel/member.php:1.4.6.1 Sun Feb 5 14:19:52 2006
+++ xoops2jp/html/kernel/member.php Sat Apr 8 14:10:37 2006
@@ -1,5 +1,5 @@
add(new Criteria('pass', md5($pwd)));
- $user =& $this->_uHandler->getObjects($criteria, false);
- if (!$user || count($user) != 1) {
- $ret = false;
- return $ret;
- }
- return $user[0];
+ $user =& $this->loginUserMd5($uname, md5($pwd));
+ return $user;
}
/**
- * logs in a user with an nd5 encrypted password
+ * logs in a user with an md5 encrypted password
*
* @param string $uname username
* @param string $md5pwd password encrypted with md5
- * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ * @return mixed XoopsUser reference to the logged in user. FALSE if failed to log in
*/
function &loginUserMd5($uname, $md5pwd)
{
From onokazu @ users.sourceforge.jp Sun Apr 9 03:32:51 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Sun, 9 Apr 2006 03:32:51 +0900
Subject: [xoops-cvslog 2688] CVS update: xoops2jp/extras
Message-ID: <20060408183251.3D6792AC090@users.sourceforge.jp>
Index: xoops2jp/extras/login.php
diff -u xoops2jp/extras/login.php:1.3 xoops2jp/extras/login.php:1.3.6.1
--- xoops2jp/extras/login.php:1.3 Sat Jun 11 11:32:37 2005
+++ xoops2jp/extras/login.php Sun Apr 9 03:32:51 2006
@@ -40,7 +40,7 @@
if ($op == 'dologin') {
$member_handler =& xoops_gethandler('member');
$myts =& MyTextsanitizer::getInstance();
- $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), addslashes($myts->stripSlashesGPC($password)));
+ $user =& $member_handler->loginUser(addslashes($myts->stripSlashesGPC($username)), $myts->stripSlashesGPC($password));
if (is_object($user)) {
if (0 == $user->getVar('level')) {
redirect_header(XOOPS_URL.'/index.php', 5, _US_NOACTTPADM);
From onokazu @ users.sourceforge.jp Sun Apr 9 03:32:51 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Sun, 9 Apr 2006 03:32:51 +0900
Subject: [xoops-cvslog 2689] CVS update: xoops2jp/html/class/xml/rpc
Message-ID: <20060408183251.6228C2AC094@users.sourceforge.jp>
Index: xoops2jp/html/class/xml/rpc/xmlrpcapi.php
diff -u xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.5 xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.5.6.1
--- xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.5 Wed Aug 3 21:39:11 2005
+++ xoops2jp/html/class/xml/rpc/xmlrpcapi.php Sun Apr 9 03:32:51 2006
@@ -1,5 +1,5 @@
user =& $member_handler->loginUser(addslashes($username), addslashes($password));
+ $this->user =& $member_handler->loginUser(addslashes($username), trim($password));
if (!is_object($this->user)) {
unset($this->user);
return false;
From onokazu @ users.sourceforge.jp Sun Apr 9 03:32:51 2006
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Sun, 9 Apr 2006 03:32:51 +0900
Subject: [xoops-cvslog 2690] CVS update:
xoops2jp/html/modules/system/admin/users
Message-ID: <20060408183251.8F9D12AC090@users.sourceforge.jp>
Index: xoops2jp/html/modules/system/admin/users/main.php
diff -u xoops2jp/html/modules/system/admin/users/main.php:1.6 xoops2jp/html/modules/system/admin/users/main.php:1.6.4.1
--- xoops2jp/html/modules/system/admin/users/main.php:1.6 Mon Sep 5 05:46:11 2005
+++ xoops2jp/html/modules/system/admin/users/main.php Sun Apr 9 03:32:51 2006
@@ -1,5 +1,5 @@
setVar("pass", md5($_POST['pass']));
+ $edituser->setVar("pass", md5($myts->stripSlashesGPC(trim($_POST['pass']))));
}
if (!$member_handler->insertUser($edituser)) {
xoops_cp_header();
@@ -264,7 +264,7 @@
xoops_cp_footer();
exit();
}
- $newuser->setVar("pass", md5($_POST['pass']));
+ $newuser->setVar("pass", md5($myts->stripSlashesGPC(trim($_POST['pass']))));
}
$newuser->setVar("timezone_offset", $_POST['timezone_offset']);
$newuser->setVar("uorder", $_POST['uorder']);
From nobunobu @ users.sourceforge.jp Sun Apr 9 10:24:04 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Sun, 9 Apr 2006 10:24:04 +0900
Subject: [xoops-cvslog 2691] CVS update: xoops2jp/html/settings
Message-ID: <20060409012404.24A172AC03D@users.sourceforge.jp>
Index: xoops2jp/html/settings/site_default.ini.php
diff -u xoops2jp/html/settings/site_default.ini.php:1.1.2.8 xoops2jp/html/settings/site_default.ini.php:1.1.2.9
--- xoops2jp/html/settings/site_default.ini.php:1.1.2.8 Sun Apr 2 22:07:48 2006
+++ xoops2jp/html/settings/site_default.ini.php Sun Apr 9 10:24:04 2006
@@ -30,6 +30,8 @@
[Legacy_RenderSystem]
path=/modules/legacyRender/kernel
class=Legacy_RenderSystem
+SystemTemplate=system_comment.html, system_comments_flat.html, system_comments_thread.html, system_comments_nest.html, system_notification_select.html
+SystemTemplatePrefix=legacy
[Legacy_AdminRenderSystem]
path=/modules/base/kernel
From nobunobu @ users.sourceforge.jp Sun Apr 9 10:24:03 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Sun, 9 Apr 2006 10:24:03 +0900
Subject: [xoops-cvslog 2692] CVS update: xoops2jp/html/class/smarty/plugins
Message-ID: <20060409012403.F316C2AC010@users.sourceforge.jp>
Index: xoops2jp/html/class/smarty/plugins/resource.db.php
diff -u xoops2jp/html/class/smarty/plugins/resource.db.php:1.1 xoops2jp/html/class/smarty/plugins/resource.db.php:1.1.8.1
--- xoops2jp/html/class/smarty/plugins/resource.db.php:1.1 Thu Sep 9 14:14:50 2004
+++ xoops2jp/html/class/smarty/plugins/resource.db.php Sun Apr 9 10:24:03 2006
@@ -8,8 +8,28 @@
* Purpose: Fetches templates from a database
* -------------------------------------------------------------
*/
+
+function smarty_resource_db_systemTpl($tpl_name)
+{
+ // Replace Legacy System Template name to Legacy Module Template name
+ static $patterns = null;
+ static $replacements = null;
+ if (!$patterns) {
+ $root=&XCube_Root::getSingleton();
+ $systemTemplates = explode(',',$root->getSiteConfig('Legacy_RenderSystem','SystemTemplate',''));
+ $prefix = $root->getSiteConfig('Legacy_RenderSystem','SystemTemplatePrefix','legacy');
+ $patterns = preg_replace('/^\s*([^\s]*)\s*$/e', '"/".preg_quote("\1","/")."/"', $systemTemplates);
+ $replacements = preg_replace('/^\s*system_([^\s]*)\s*/', $prefix.'_\1', $systemTemplates);
+ }
+ if ($patterns) {
+ $tpl_name = preg_replace($patterns, $replacements,$tpl_name);
+ }
+ return $tpl_name;
+}
+
function smarty_resource_db_source($tpl_name, &$tpl_source, &$smarty)
{
+ $tpl_name = smarty_resource_db_systemTpl($tpl_name);
$tplfile_handler =& xoops_gethandler('tplfile');
$tplobj =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], null, null, null, $tpl_name, true);
if (count($tplobj) > 0) {
@@ -65,6 +85,7 @@
function smarty_resource_db_timestamp($tpl_name, &$tpl_timestamp, &$smarty)
{
+ $tpl_name = smarty_resource_db_systemTpl($tpl_name);
$tplfile_handler =& xoops_gethandler('tplfile');
$tplobj =& $tplfile_handler->find($GLOBALS['xoopsConfig']['template_set'], null, null, null, $tpl_name, false);
if (count($tplobj) > 0) {
From nobunobu @ users.sourceforge.jp Sun Apr 9 10:24:04 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Sun, 9 Apr 2006 10:24:04 +0900
Subject: [xoops-cvslog 2693] CVS update: xoops2jp/html/modules/base/templates
Message-ID: <20060409012404.503E12AC0D7@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/templates/legacy_comment.html
diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_comment.html:1.1.2.1
--- /dev/null Sun Apr 9 10:24:04 2006
+++ xoops2jp/html/modules/base/templates/legacy_comment.html Sun Apr 9 10:24:04 2006
@@ -0,0 +1,50 @@
+
+ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$comment.poster.uname}> | +<{$lang_posted}>: <{$comment.date_posted}> <{$lang_updated}>: <{$comment.date_modified}> |
+ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$comment.poster.rank_title}> <{$lang_joined}>: <{$comment.poster.regdate}> <{$lang_from}>: <{$comment.poster.from}> <{$lang_posts}>: <{$comment.poster.postnum}> <{$comment.poster.status}> |
+
+ <{else}>
+
+ + + <{/if}> + + |
+ <{$comment.image}><{$comment.title}> <{$comment.text}>
+ |
+ |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
+ + <{if $xoops_iscommentadmin == true}> + + | + + | + + <{elseif $xoops_isuser == true && $xoops_userid == $comment.poster.id}> + ++ + | + + <{elseif $xoops_isuser == true || $anon_canpost == true}> + ++ + | + + <{else}> + ++ + <{/if}> + + |
<{$lang_poster}> | +<{$lang_thread}> | +
---|
<{$lang_poster}> | +<{$lang_thread}> | +
---|
+ |
+
|
+
<{$lang_poster}> | +<{$lang_thread}> | +
---|
<{$lang_subject}> | +<{$lang_poster}> | +<{$lang_posted}> | +
---|---|---|
<{$reply.prefix}> <{$reply.title}> | +<{$reply.poster.uname}> | +<{$reply.date_posted}> | +
<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>
+<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>
+<{$smarty.const._AD_BASE_LANG_BID}> | -"><{$object->getVar('bid')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$smarty.const._AD_BASE_LANG_MID}> | -"><{$object->getVar('mid')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_FUNC_NUM}> | -"><{$object->getVar('func_num')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_OPTIONS}> | -"><{$object->getVar('options')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_NAME}> | -"><{$object->getVar('name')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_TITLE}> | -"><{$object->getVar('title')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_CONTENT}> | -"><{$object->getVar('content')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_SIDE}> | -"> - <{if $object->mColumn}><{$object->mColumn->getVar('name')}><{/if}> - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | -"><{$object->getVar('weight')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_VISIBLE}> | -"><{$object->getVar('visible')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_BLOCK_TYPE}> | -"><{$object->getVar('block_type')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_C_TYPE}> | -"><{$object->getVar('c_type')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_ISACTIVE}> | -"><{$object->getVar('isactive')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_DIRNAME}> | -"><{$object->getVar('dirname')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_FUNC_FILE}> | -"><{$object->getVar('func_file')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_SHOW_FUNC}> | -"><{$object->getVar('show_func')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_EDIT_FUNC}> | -"><{$object->getVar('edit_func')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_TEMPLATE}> | -"><{$object->getVar('template')}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | -"> - <{if $object->mCachetime}><{$object->mCachetime->getVar('label')}><{/if}> - | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<{$smarty.const._AD_BASE_LANG_LAST_MODIFIED}> | -"><{$object->getVar('last_modified')|xoops_formattimestamp:l}> | -||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- |
-
<{$smarty.const._AD_BASE_LANG_BLOCK_UNINSTALL}> | +|
---|---|
<{$smarty.const._AD_BASE_LANG_BID}> | +"><{$object->getVar('bid')}> | +
<{$smarty.const._AD_BASE_LANG_MID}> | +"><{$object->getVar('mid')}> | +
<{$smarty.const._AD_BASE_LANG_FUNC_NUM}> | +"><{$object->getVar('func_num')}> | +
<{$smarty.const._AD_BASE_LANG_OPTIONS}> | +"><{$object->getVar('options')}> | +
<{$smarty.const._AD_BASE_LANG_NAME}> | +"><{$object->getVar('name')}> | +
<{$smarty.const._AD_BASE_LANG_TITLE}> | +"><{$object->getVar('title')}> | +
<{$smarty.const._AD_BASE_LANG_CONTENT}> | +"><{$object->getVar('content')}> | +
<{$smarty.const._AD_BASE_LANG_SIDE}> | +"> + <{if $object->mColumn}><{$object->mColumn->getVar('name')}><{/if}> + | +
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | +"><{$object->getVar('weight')}> | +
<{$smarty.const._AD_BASE_LANG_VISIBLE}> | +"><{$object->getVar('visible')}> | +
<{$smarty.const._AD_BASE_LANG_BLOCK_TYPE}> | +"><{$object->getVar('block_type')}> | +
<{$smarty.const._AD_BASE_LANG_C_TYPE}> | +"><{$object->getVar('c_type')}> | +
<{$smarty.const._AD_BASE_LANG_ISACTIVE}> | +"><{$object->getVar('isactive')}> | +
<{$smarty.const._AD_BASE_LANG_DIRNAME}> | +"><{$object->getVar('dirname')}> | +
<{$smarty.const._AD_BASE_LANG_FUNC_FILE}> | +"><{$object->getVar('func_file')}> | +
<{$smarty.const._AD_BASE_LANG_SHOW_FUNC}> | +"><{$object->getVar('show_func')}> | +
<{$smarty.const._AD_BASE_LANG_EDIT_FUNC}> | +"><{$object->getVar('edit_func')}> | +
<{$smarty.const._AD_BASE_LANG_TEMPLATE}> | +"><{$object->getVar('template')}> | +
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> + | "> + <{if $object->mCachetime}><{$object->mCachetime->getVar('label')}><{/if}> + | +
<{$smarty.const._AD_BASE_LANG_LAST_MODIFIED}> + | "><{$object->getVar('last_modified')|xoops_formattimestamp:l}> | +
+ + + | +
<{$smarty.const._AD_BASE_LANG_BID}> " alt="<{$smarty.const._ASCENDING}>" /> @@ -24,21 +31,21 @@ | <{$smarty.const._AD_BASE_LANG_MID}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
+<{*
<{$smarty.const._AD_BASE_LANG_NAME}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
+*}>
<{$smarty.const._AD_BASE_LANG_TITLE}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
- <{$smarty.const._AD_BASE_LANG_SIDE}> + | <{$smarty.const._AD_BASE_LANG_SIDE}> " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" /> | + " alt="<{$smarty.const._DESCENDING}>" /><{$smarty.const._AD_BASE_LANG_WEIGHT}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
- <{$smarty.const._AD_BASE_LANG_BLOCK_TYPE}> - " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" /> |
<{$smarty.const._AD_BASE_LANG_C_TYPE}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
@@ -51,35 +58,32 @@
<{$smarty.const._AD_BASE_LANG_CONTROL}> | |||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$obj->getVar('bid')}> | -+ | <{if $obj->mModule}> <{$obj->mModule->getVar('name')}> <{else}> <{/if}> | +<{*<{$obj->getVar('name')}> | -<{$obj->getVar('title')}> | -- <{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}>- - <{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}> - <{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}> - <{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}>- - <{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}> +*}> + | <{$obj->getVar('title')}> | ++ <{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}> | <{xoops_input type=text name=weight size=4 key=$obj->get('bid') value=$obj->get('weight')}> | -<{$obj->getVar('block_type')}> | <{$obj->getVar('c_type')}> |
|
- <{$obj->getVar('last_modified')|xoops_formattimestamp:l}> | +<{$obj->getVar('last_modified')|xoops_formattimestamp:l}> | <{if $obj->get('block_type') == 'C'}> " alt="<{$smarty.const._EDIT}>" /> @@ -91,11 +95,11 @@ |
- + | + |
<{$smarty.const._AD_BASE_LANG_TITLE}> | +<{$smarty.const._AD_BASE_LANG_BLOCK_EDIT}> | +|||
---|---|---|---|---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | "> - <{xoops_input type=text name=title value=$actionForm->getVar('title') size=15 maxlength=255}> + <{xoops_input type=text name=title value=$actionForm->getVar('title') size=50 maxlength=255}> | |||
<{$smarty.const._AD_BASE_LANG_SIDE}> | +<{$smarty.const._AD_BASE_LANG_SIDE}> | ">
|
||
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | +<{$smarty.const._AD_BASE_LANG_WEIGHT}> | "> - <{xoops_input type=text name=weight value=$actionForm->getVar('weight')}> + <{xoops_input type=text name=weight value=$actionForm->getVar('weight') size=5}> | ||
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | +<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | ">
|
||
<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | +<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | ">
|
||
<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | +<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | ">
+
|
|
<{$smarty.const._AD_BASE_LANG_BID}> " alt="<{$smarty.const._ASCENDING}>" /> @@ -13,15 +21,14 @@ | <{$smarty.const._AD_BASE_LANG_MID}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
+<{*
<{$smarty.const._AD_BASE_LANG_NAME}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
+*}>
<{$smarty.const._AD_BASE_LANG_TITLE}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
- <{$smarty.const._AD_BASE_LANG_BLOCK_TYPE}> - " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" /> |
<{$smarty.const._AD_BASE_LANG_C_TYPE}> " alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> |
@@ -40,9 +47,10 @@
<{/if}>
+<{*
<{$obj->getVar('name')}> | +*}><{$obj->getVar('title')}> | -<{$obj->getVar('block_type')}> | <{$obj->getVar('c_type')}> | <{$obj->getVar('template')}> | @@ -54,5 +62,5 @@ |
---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | +<{$smarty.const._AD_BASE_LANG_BLOCK_INSTALL}> | +||
---|---|---|---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | "> - <{xoops_input type=text name=title value=$actionForm->getVar('title') size=15 maxlength=255}> + <{xoops_input type=text name=title value=$actionForm->getVar('title') size=50 maxlength=255}> | ||
<{$smarty.const._AD_BASE_LANG_SIDE}> | +<{$smarty.const._AD_BASE_LANG_SIDE}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | +<{$smarty.const._AD_BASE_LANG_WEIGHT}> | "> - <{xoops_input type=text name=weight value=$actionForm->getVar('weight')}> + <{xoops_input type=text name=weight value=$actionForm->getVar('weight') size=5}> | |
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | +<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | +<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | +<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | ">
| |
<{$smarty.const._AD_BASE_LANG_OPTIONS}> | +<{$smarty.const._AD_BASE_LANG_OPTIONS}> | "> <{$optionForm}> | |
- + | + + |
<{$smarty.const._AD_BASE_LANG_TITLE}> | ++ <{if $actionForm->getVar('content')}> + <{$smarty.const._AD_BASE_LANG_CUSTOMBLOCK_EDIT}> + <{else}> + <{$smarty.const._AD_BASE_LANG_ADD_CUSTOM_BLOCK}> + <{/if}> + | +||
---|---|---|---|
<{$smarty.const._AD_BASE_LANG_TITLE}> | "> - <{xoops_input type=text name=title value=$actionForm->getVar('title') size=15 maxlength=255}> + <{xoops_input type=text name=title value=$actionForm->getVar('title') size=50 maxlength=255}> | ||
<{$smarty.const._AD_BASE_LANG_SIDE}> | +<{$smarty.const._AD_BASE_LANG_SIDE}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_WEIGHT}> | +<{$smarty.const._AD_BASE_LANG_WEIGHT}> | "> - <{xoops_input type=text name=weight value=$actionForm->getVar('weight')}> + <{xoops_input type=text name=weight value=$actionForm->getVar('weight') size=5}> | |
<{$smarty.const._AD_BASE_LANG_CONTENT}> | +<{$smarty.const._AD_BASE_LANG_CONTENT}> | "> - <{xoops_dhtmltarea type=text name=content value=$actionForm->getVar('content')}> + <{xoops_dhtmltarea type=text name=content value=$actionForm->getVar('content') rows=20 cols=60}> | |
<{$smarty.const._AD_BASE_LANG_CTYPE}> | +<{$smarty.const._AD_BASE_LANG_C_TYPE}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | +<{$smarty.const._AD_BASE_LANG_BCACHETIME}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | +<{$smarty.const._AD_BASE_LANG_TARGET_MODULES}> | ">
|
|
<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | +<{$smarty.const._AD_BASE_LANG_TARGET_GROUPS}> | ">
|
|
+ | + |
*投稿する* | +<{$smarty.const._MD_BASE_LANG_POST}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
<{$smarty.const._MD_BASE_LANG_COMMENT_RULE}> | @@ -50,7 +50,7 @@|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
*OPTION* | +<{$smarty.const._MD_BASE_LANG_OPTION}> | "> <{if $xoops_isadmin}> <{xoops_input type=checkbox name=dohtml value=1 default=$actionForm->get('dohtml')}> From minahito @ users.sourceforge.jp Mon Apr 10 21:41:47 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Apr 2006 21:41:47 +0900 Subject: [xoops-cvslog 2703] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060410124147.19EC22AC029@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.27 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.28 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.27 Sun Apr 9 23:47:16 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Mon Apr 10 21:41:46 2006 @@ -1,7 +1,9 @@ Index: xoops2jp/html/modules/base/language/english/admin.php diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.23 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.24 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.23 Sun Apr 9 23:47:29 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Mon Apr 10 21:41:47 2006 @@ -1,7 +1,9 @@ Index: xoops2jp/html/modules/base/class/blockctype.php diff -u xoops2jp/html/modules/base/class/blockctype.php:1.1.2.1 xoops2jp/html/modules/base/class/blockctype.php:1.1.2.2 --- xoops2jp/html/modules/base/class/blockctype.php:1.1.2.1 Thu Apr 6 16:55:08 2006 +++ xoops2jp/html/modules/base/class/blockctype.php Mon Apr 10 21:42:14 2006 @@ -18,10 +18,10 @@ function BaseBlockctypeHandler(&$db) { $t_arr = array ( - 'H' => _AM_HTML, - 'P' => _AM_PHP, - 'S' => _AM_AFWSMILE, - 'T' => _AM_AFNOSMILE + 'H' => _AD_BASE_LANG_CTYPE_HTML, + 'P' => _AD_BASE_LANG_CTYPE_PHP, + 'S' => _AD_BASE_LANG_CTYPE_WITH_SMILIES, + 'T' => _AD_BASE_LANG_CTYPE_WITHOUT_SMILIES ); foreach ($t_arr as $id => $name) { From minahito @ users.sourceforge.jp Mon Apr 10 21:42:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 10 Apr 2006 21:42:32 +0900 Subject: [xoops-cvslog 2706] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060410124232.585BD2AC05B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.4 --- xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php:1.1.2.3 Thu Apr 6 16:53:52 2006 +++ xoops2jp/html/modules/base/admin/forms/BlockEditForm.class.php Mon Apr 10 21:42:32 2006 @@ -53,6 +53,22 @@ $this->mFieldProperties['bcachetime']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_BCACHETIME); } + function validateBmodule() + { + $bmodule = $this->get('bmodule'); + if (!(count($bmodule))) { + $this->addErrorMessage(_AD_BASE_ERROR_BMODULE); + } + } + + function validateGroupid() + { + $groupid = $this->get('groupid'); + if (!(count($groupid))) { + $this->addErrorMessage(_AD_BASE_ERROR_GROUPID); + } + } + function load(&$obj) { $this->set('bid', $obj->get('bid')); From nobunobu @ users.sourceforge.jp Tue Apr 11 00:10:23 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 00:10:23 +0900 Subject: [xoops-cvslog 2707] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060410151023.C3E9D2AC023@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.13 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.14 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.13 Sun Apr 2 23:42:44 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Tue Apr 11 00:10:23 2006 @@ -302,7 +302,7 @@ } } else { $root = $root=&XCube_Root::getSingleton(); - $groups = $root->mController->mXoopsUser->getGroups();var_dump($groups); + $groups = $root->mController->mXoopsUser->getGroups(); foreach ($groups as $mygroup) { $bperm->setVar('gperm_groupid', $mygroup); $bperm->setNew(); From minahito @ users.sourceforge.jp Tue Apr 11 10:49:57 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 10:49:57 +0900 Subject: [xoops-cvslog 2708] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411014957.685A62AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.4 Fri Apr 7 18:02:36 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Tue Apr 11 10:49:57 2006 @@ -16,7 +16,12 @@ { return isset($_REQUEST['bid']) ? $_REQUEST['bid'] : 0; } - + + function isEnableCreate() + { + return false; + } + function &_getHandler() { $handler =& xoops_getmodulehandler('newblocks'); @@ -36,8 +41,37 @@ $this->mActionForm->prepare(); } + /** + * Return true if the target object can be edited. This private method exists + * to control subclass actions. + * + * @return bool + */ + function _isEditable() + { + if (is_object($this->mObject)) { + return ($this->mObject->get('visible') == 1); + } + else { + return false; + } + } + + function getDefaultView(&$controller, &$xoopsUser) + { + if (!$this->_isEditable()) { + return LEGACY_FRAME_VIEW_ERROR; + } + + return parent::getDefaultView($controller, $xoopsUser); + } + function execute(&$controller, &$xoopsUser) { + if (!$this->_isEditable()) { + LEGACY_FRAME_VIEW_ERROR; + } + $ret = parent::execute($controller, $xoopsUser); if ($ret == LEGACY_FRAME_VIEW_SUCCESS) { From minahito @ users.sourceforge.jp Tue Apr 11 10:50:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 10:50:59 +0900 Subject: [xoops-cvslog 2709] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411015059.1F56E2AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php:1.1.2.1 Thu Apr 6 16:54:08 2006 +++ xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php Tue Apr 11 10:50:59 2006 @@ -14,6 +14,16 @@ $this->mActionForm->prepare(); } + function isEnableCreate() + { + return true; + } + + function _isEditable() + { + return true; + } + function executeViewInput(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("customblock_edit.html"); From minahito @ users.sourceforge.jp Tue Apr 11 10:51:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 10:51:13 +0900 Subject: [xoops-cvslog 2710] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411015113.C1B372AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php:1.1.2.2 Thu Apr 6 15:01:39 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockUninstallAction.class.php Tue Apr 11 10:51:13 2006 @@ -23,6 +23,16 @@ $this->mActionForm =& new Legacy_BlockUninstallForm(); $this->mActionForm->prepare(); } + + function _isEditable() + { + if (is_object($this->mObject)) { + return ($this->mObject->get('visible') == 1); + } + else { + return false; + } + } function executeViewInput(&$controller, &$xoopsUser, &$render) { From minahito @ users.sourceforge.jp Tue Apr 11 10:51:20 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 10:51:20 +0900 Subject: [xoops-cvslog 2711] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411015120.AF2D92AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php:1.1.2.1 Wed Apr 5 19:57:52 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockInstallEditAction.class.php Tue Apr 11 10:51:20 2006 @@ -15,6 +15,16 @@ $this->mActionForm->prepare(); } + function _isEditable() + { + if (is_object($this->mObject)) { + return ($this->mObject->get('visible') == 0); + } + else { + return false; + } + } + function executeViewInput(&$controller, &$xoopsUser, &$render) { parent::executeViewInput($controller, $xoopsUser, $render); From minahito @ users.sourceforge.jp Tue Apr 11 10:58:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 10:58:42 +0900 Subject: [xoops-cvslog 2712] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411015842.9DAEE2AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php:1.1.2.1 Fri Apr 7 13:47:10 2006 +++ xoops2jp/html/modules/base/admin/actions/CustomBlockDeleteAction.class.php Tue Apr 11 10:58:42 2006 @@ -23,6 +23,34 @@ $this->mActionForm =& new Legacy_CustomBlockDeleteForm(); $this->mActionForm->prepare(); } + + function _isDeletable() + { + if (is_object($this->mObject)) { + return ($this->mObject->get('block_type') == 'C' && $this->mObject->get('visible') == 0); + } + else { + return false; + } + } + + function getDefaultView(&$controller, &$xoopsUser) + { + if (!$this->_isDeletable()) { + return LEGACY_FRAME_VIEW_ERROR; + } + + return parent::getDefaultView($controller, $xoopsUser); + } + + function execute(&$controller, &$xoopsUser) + { + if (!$this->_isDeletable()) { + return LEGACY_FRAME_VIEW_ERROR; + } + + return parent::execute($controller, $xoopsUser); + } function executeViewInput(&$controller, &$xoopsUser, &$render) { From minahito @ users.sourceforge.jp Tue Apr 11 11:05:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 11:05:59 +0900 Subject: [xoops-cvslog 2713] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060411020559.8A8D42AC02D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/newblocks.php diff -u xoops2jp/html/modules/base/class/newblocks.php:1.1.2.4 xoops2jp/html/modules/base/class/newblocks.php:1.1.2.5 --- xoops2jp/html/modules/base/class/newblocks.php:1.1.2.4 Fri Apr 7 18:03:01 2006 +++ xoops2jp/html/modules/base/class/newblocks.php Tue Apr 11 11:05:59 2006 @@ -95,6 +95,34 @@ var $mTable = "newblocks"; var $mPrimary = "bid"; var $mClass = "BaseNewblocksObject"; + + function delete(&$obj, $force = false) + { + if (parent::delete($obj, $force)) { + // + // Delete related data from block_module_link. + // + $handler =& xoops_getmodulehandler('block_module_link', 'base'); + $handler->deleteAll(new Criteria('block_id'), $obj->get('bid')); + + // + // Delete related permissions from groupperm. + // + $handler =& xoops_gethandler('groupperm'); + + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('gperm_modid', 1)); + $criteria->add(new Criteria('gperm_itemid', $obj->get('bid'))); + $criteria->add(new Criteria('gperm_name', 'block_read')); + + $handler->deleteAll($criteria); + + return true; + } + else { + return false; + } + } } ?> From minahito @ users.sourceforge.jp Tue Apr 11 11:09:09 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 11:09:09 +0900 Subject: [xoops-cvslog 2714] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060411020909.72C012AC02D@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.28 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.29 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.28 Mon Apr 10 21:41:46 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Tue Apr 11 11:09:09 2006 @@ -21,9 +21,9 @@ define('_AD_BASE_LANG_BLOCK_TYPE', "block type"); define('_AD_BASE_LANG_BLOCK_UNINSTALL', "ブロックのアンインストール"); define('_AD_BASE_LANG_C_TYPE', "タイプ"); -define('_AD_BASE_LANG_CENTER_BLOCK_CENTER', "Center block center"); -define('_AD_BASE_LANG_CENTER_BLOCK_LEFT', "Center block left"); -define('_AD_BASE_LANG_CENTER_BLOCK_RIGHT', "Center block right"); +define('_AD_BASE_LANG_CENTER_BLOCK_CENTER', "中央ブロック - 中央"); +define('_AD_BASE_LANG_CENTER_BLOCK_LEFT', "中央ブロック - 左"); +define('_AD_BASE_LANG_CENTER_BLOCK_RIGHT', "中央ブロック - 右"); define('_AD_BASE_LANG_CODE', "コード"); define('_AD_BASE_LANG_COM_CREATED', "作成日時"); define('_AD_BASE_LANG_COM_EXPARAMS', "com exparams"); @@ -83,8 +83,8 @@ define('_AD_BASE_LANG_RES_FOR_COMMENT', "このコメントへのレスポンス"); define('_AD_BASE_LANG_SHOW_FUNC', "show func"); define('_AD_BASE_LANG_SIDE', "表示サイド"); -define('_AD_BASE_LANG_SIDE_BLOCK_LEFT', "Side block left"); -define('_AD_BASE_LANG_SIDE_BLOCK_RIGHT', "Side block right"); +define('_AD_BASE_LANG_SIDE_BLOCK_LEFT', "サイドブロック - 左"); +define('_AD_BASE_LANG_SIDE_BLOCK_RIGHT', "サイドブロック - 右"); define('_AD_BASE_LANG_SMILE_URL', "画像"); define('_AD_BASE_LANG_SMILES_DELETE', "顔アイコン削除"); define('_AD_BASE_LANG_SMILES_EDIT', "顔アイコン編集"); @@ -95,7 +95,7 @@ define('_AD_BASE_LANG_TEMPLATE', "テンプレート"); define('_AD_BASE_LANG_TITLE', "タイトル"); define('_AD_BASE_LANG_TOPPAGE', "トップページ"); -define('_AD_BASE_LANG_VISIBLE', "visible"); +define('_AD_BASE_LANG_VISIBLE', "可視"); define('_AD_BASE_LANG_WEIGHT', "並び順"); define('_AD_BASE_MESSAGE_CHILDREN_DELETED_TOGETHER', "一緒に削除されるデータ"); define('_AD_BASE_MESSAGE_CONFIRM_DELETE', "削除確認"); From minahito @ users.sourceforge.jp Tue Apr 11 12:09:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:09:23 +0900 Subject: [xoops-cvslog 2715] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411030923.B4B042AC06B@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.5 xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php:1.1.2.5 Thu Mar 30 23:56:27 2006 +++ xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php Tue Apr 11 12:09:23 2006 @@ -4,9 +4,18 @@ require_once XOOPS_MODULE_PATH . "/base/class/AbstractDeleteAction.class.php"; require_once XOOPS_MODULE_PATH . "/base/admin/forms/CommentAdminDeleteForm.class.php"; +require_once XOOPS_MODULE_PATH . "/base/admin/actions/CommentEditAction.class.php"; class Legacy_CommentDeleteAction extends Legacy_AbstractDeleteAction { + function prepare(&$controller, &$xoopsUser) + { + parent::prepare($controller, $xoopsUser); + + $root =& XCube_Root::getSingleton(); + $root->mEventManager->add("Module.Legacy.Comment.Delete.Success", new XCube_InstanceDelegate($this, "doDelete")); + } + function _getId() { return isset($_REQUEST['com_id']) ? $_REQUEST['com_id'] : 0; @@ -62,6 +71,43 @@ { redirect_header("./index.php?action=CommentList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); } + + function doDelete(&$sender, &$eventArgs) + { + // + // Adjust user's post count. + // + if ($comment->get('com_status') != 1 && $comment->get('com_uid') > 0) { + $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')); + $count = $user->get('posts'); + + if($count > 0) { + $handler->updateUserByField($user, 'posts', $count - 1); + } + } + + // + // callback + // + $comment =& $eventArgs['comment']; + $comment_config = Legacy_CommentEditAction::loadCallbackFile($comment); + + if ($comment_config == false) { + return; + } + + $function = $comment_config['callback']['update']; + + if (function_exists($function)) { + call_user_func($function, $comment); + } + } } ?> From minahito @ users.sourceforge.jp Tue Apr 11 12:09:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:09:29 +0900 Subject: [xoops-cvslog 2716] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411030929.725822AC06B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.6 xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.7 --- xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.6 Thu Mar 30 23:56:54 2006 +++ xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php Tue Apr 11 12:09:29 2006 @@ -39,9 +39,15 @@ { 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")); } else { $this->mActionForm =& new Legacy_ApprovalCommentAdminEditForm(); + + $root =& XCube_Root::getSingleton(); + $root->mEventManager->add("Module.Legacy.Comment.Update.Success", new XCube_InstanceDelegate($this, "doUpdate")); } $this->mActionForm->prepare(); } @@ -83,6 +89,85 @@ { redirect_header("./index.php?action=CommentList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); } + + /** + * @static + * @return Return array as the informations of comments. If $comment has fatal status, return false. + */ + function loadCallbackFile(&$comment) + { + $handler =& xoops_gethandler('module'); + $module =& $handler->get($comment->get('com_modid')); + + if (!is_object($module)) { + return false; + } + + $comment_config = $module->getInfo('comments'); + + // + // Load call-back file + // + $file = XOOPS_MODULE_PATH . "/" . $module->get('dirname') . "/" . $comment_config['callbackFile']; + if (!file_exists($file)) { + return false; + } + + require_once $file; + + return $comment_config; + } + + function doApprove(&$sender, &$eventArgs) + { + $comment =& $eventArgs['comment']; + $comment_config = Legacy_CommentEditAction::loadCallbackFile($comment); + + if ($comment_config == false) { + return; + } + + $function = $comment_config['callback']['approve']; + + if (function_exists($function)) { + call_user_func($function, $comment); + } + + Legacy_CommentEditAction::addUserPost($comment); + } + + function doUpdate(&$sender, &$eventArgs) + { + // + // Adjust user's post count. + // + if ($comment->get('com_uid') > 0) { + $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); + } + + // + // call back + // + $comment =& $eventArgs['comment']; + $comment_config = Legacy_CommentEditAction::loadCallbackFile($comment); + + if ($comment_config == false) { + return; + } + + $function = $comment_config['callback']['update']; + + if (function_exists($function)) { + call_user_func($function, $comment); + } + } } ?> From minahito @ users.sourceforge.jp Tue Apr 11 12:10:19 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:10:19 +0900 Subject: [xoops-cvslog 2717] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060411031019.8137F2AC06B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/comment.php diff -u xoops2jp/html/modules/base/class/comment.php:1.1.2.6 xoops2jp/html/modules/base/class/comment.php:1.1.2.7 --- xoops2jp/html/modules/base/class/comment.php:1.1.2.6 Thu Mar 30 23:55:02 2006 +++ xoops2jp/html/modules/base/class/comment.php Tue Apr 11 12:10:19 2006 @@ -63,15 +63,38 @@ var $mPrimary = "com_id"; var $mClass = "BaseCommentObject"; + 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); + + return true; + } + else { + return false; + } + } + /** * Delete $comment and childlen of $comment. */ - function delete(&$comment) + function delete(&$comment, $force = false) { $criteria =& new Criteria('com_pid', $comment->get('com_id')); $this->deleteAll($criteria); - return parent::delete($comment); + if (parent::delete($comment, $force)) { + $root =& XCube_Root::getSingleton(); + $eventArgs = array(); + $eventArgs['comment'] =& $comment; + $root->mEventManager->raiseEvent('Module.Legacy.Comment.Delete.Success', $this, $eventArgs); + } + else{ + return false; + } } /** From minahito @ users.sourceforge.jp Tue Apr 11 12:19:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:19:29 +0900 Subject: [xoops-cvslog 2718] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411031929.914F52AC0C4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.5 Tue Apr 11 10:49:57 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Tue Apr 11 12:19:29 2006 @@ -146,11 +146,11 @@ $handler =& xoops_gethandler('module'); $moduleArr[0] =& $handler->create(); $moduleArr[0]->set('mid', -1); - $moduleArr[0]->set('name', _AD_BASE_LANG_ALL_MODULES); + $moduleArr[0]->set('name', _AD_BASE_LANG_TOPPAGE); $moduleArr[1] =& $handler->create(); $moduleArr[1]->set('mid', 0); - $moduleArr[1]->set('name', _AD_BASE_LANG_TOPPAGE); + $moduleArr[1]->set('name', _AD_BASE_LANG_ALL_MODULES); $criteria =& new CriteriaCompo(); $criteria->add(new Criteria('hasmain', 1)); From minahito @ users.sourceforge.jp Tue Apr 11 12:19:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:19:46 +0900 Subject: [xoops-cvslog 2719] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060411031946.22BF82AC0C4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php:1.1.2.4 Fri Apr 7 17:44:27 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockListAction.class.php Tue Apr 11 12:19:46 2006 @@ -84,6 +84,11 @@ $render->setAttribute('actionForm', $this->mActionForm); } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward('./index.php?action=BlockList'); + } } ?> From minahito @ users.sourceforge.jp Tue Apr 11 12:20:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 11 Apr 2006 12:20:04 +0900 Subject: [xoops-cvslog 2720] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060411032006.C5C062AC0C4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/block_list.html diff -u xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.6 --- xoops2jp/html/modules/base/admin/templates/block_list.html:1.1.2.5 Sun Apr 9 23:48:01 2006 +++ xoops2jp/html/modules/base/admin/templates/block_list.html Tue Apr 11 12:20:04 2006 @@ -72,7 +72,7 @@ *}> | <{$obj->getVar('title')}> | - <{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}> + <{xoops_input type=radio name=side key=$obj->get('bid') value=0 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=3 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=5 default=$obj->get('side')}><{xoops_input type=radio name=side key=$obj->get('bid') value=4 default=$obj->get('side')}>-<{xoops_input type=radio name=side key=$obj->get('bid') value=1 default=$obj->get('side')}> |
<{xoops_input type=text name=weight size=4 key=$obj->get('bid') value=$obj->get('weight')}>
From minahito @ users.sourceforge.jp Tue Apr 11 12:50:51 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 12:50:51 +0900
Subject: [xoops-cvslog 2721] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060411035051.1076A2AC054@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.6 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.6 Tue Apr 11 12:09:23 2006
+++ xoops2jp/html/modules/base/admin/actions/CommentDeleteAction.class.php Tue Apr 11 12:50:50 2006
@@ -74,6 +74,8 @@
function doDelete(&$sender, &$eventArgs)
{
+ $comment =& $eventArgs['comment'];
+
//
// Adjust user's post count.
//
@@ -95,7 +97,6 @@
//
// callback
//
- $comment =& $eventArgs['comment'];
$comment_config = Legacy_CommentEditAction::loadCallbackFile($comment);
if ($comment_config == false) {
From minahito @ users.sourceforge.jp Tue Apr 11 12:51:10 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 12:51:10 +0900
Subject: [xoops-cvslog 2722] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060411035110.E37722AC054@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php:1.1.2.7 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.7 Tue Apr 11 12:09:29 2006
+++ xoops2jp/html/modules/base/admin/actions/CommentEditAction.class.php Tue Apr 11 12:51:10 2006
@@ -138,6 +138,8 @@
function doUpdate(&$sender, &$eventArgs)
{
+ $comment =& $eventArgs['comment'];
+
//
// Adjust user's post count.
//
@@ -155,7 +157,6 @@
//
// call back
//
- $comment =& $eventArgs['comment'];
$comment_config = Legacy_CommentEditAction::loadCallbackFile($comment);
if ($comment_config == false) {
From minahito @ users.sourceforge.jp Tue Apr 11 13:42:30 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 13:42:30 +0900
Subject: [xoops-cvslog 2723] CVS update: xoops2jp/html/kernel
Message-ID: <20060411044230.9B0832AC03F@users.sourceforge.jp>
Index: xoops2jp/html/kernel/cachetime.php
diff -u xoops2jp/html/kernel/cachetime.php:1.1.2.1 xoops2jp/html/kernel/cachetime.php:1.1.2.2
--- xoops2jp/html/kernel/cachetime.php:1.1.2.1 Thu Apr 6 15:48:39 2006
+++ xoops2jp/html/kernel/cachetime.php Tue Apr 11 13:42:30 2006
@@ -1,5 +1,7 @@
Index: xoops2jp/html/class/criteria.php
diff -u xoops2jp/html/class/criteria.php:1.2.8.4 xoops2jp/html/class/criteria.php:1.2.8.5
--- xoops2jp/html/class/criteria.php:1.2.8.4 Wed Jan 11 19:17:29 2006
+++ xoops2jp/html/class/criteria.php Tue Apr 11 14:28:48 2006
@@ -1,5 +1,5 @@
add($ele, $condition);
}
}
+
+ function hasChildElements()
+ {
+ return count($this->criteriaElements) > 0;
+ }
+
+ function getCountChildElements()
+ {
+ return count($this->criteriaElements);
+ }
+
+ function getChildElement($idx)
+ {
+ return $this->criteriaElements[$idx];
+ }
+
+ function getCondition($idx)
+ {
+ return $this->conditions[$idx];
+ }
/**
* Add an element
@@ -359,6 +424,21 @@
$this->value = $value;
}
}
+
+ function getName()
+ {
+ return $this->column;
+ }
+
+ function getValue()
+ {
+ return $this->value;
+ }
+
+ function getOperator()
+ {
+ return $this->operator;
+ }
/**
* Make a sql condition string
From minahito @ users.sourceforge.jp Tue Apr 11 14:29:23 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 14:29:23 +0900
Subject: [xoops-cvslog 2725] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060411052923.3C7E52AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/handler.php
diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.11 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.12
--- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.11 Tue Mar 28 22:30:15 2006
+++ xoops2jp/html/modules/base/kernel/handler.php Tue Apr 11 14:29:23 2006
@@ -57,7 +57,7 @@
$sql = "SELECT * FROM " . $this->mTable;
if($criteria !== null && is_a($criteria, 'CriteriaElement')) {
- $where = $criteria->render();
+ $where = $this->_makeCriteria4sql($criteria);
if (trim($where)) {
$sql .= " WHERE ".$where;
@@ -119,7 +119,7 @@
$sql="SELECT COUNT(*) c FROM " . $this->mTable;
if($criteria !== null && is_a($criteria, 'CriteriaElement')) {
- $where = $criteria->render();
+ $where = $this->_makeCriteria4sql($criteria);
if ($where) {
$sql .= " WHERE " . $where;
@@ -221,7 +221,8 @@
* @param $obj xoopsObject
* @return Array
*/
- function _makeVars4sql(&$obj) {
+ function _makeVars4sql(&$obj)
+ {
$ret = array();
foreach ($obj->gets() as $key => $value) {
switch ($obj->mVars[$key]['data_type']) {
@@ -237,6 +238,54 @@
return $ret;
}
+
+ function _makeCriteria4sql($criteria)
+ {
+ $dmmyObj =& $this->create();
+
+ return $this->_makeCriteriaElement4sql($criteria, $dmmyObj);
+ }
+
+ /**
+ * @param $criteria CriteriaElement
+ * @param $obj XoopsSimpleObject
+ */
+ function _makeCriteriaElement4sql($criteria, &$obj)
+ {
+ if (is_a($criteria, "CriteriaElement")) {
+ if ($criteria->hasChildElements()) {
+ $queryString = "";
+ $maxCount = $criteria->getCountChildElements();
+ for ($i = 0; $i < $maxCount ; $i++) {
+ $queryString .= " " . $this->_makeCriteria4sql($criteria->getChildElement($i));
+ if (($i + 1) != $maxCount) {
+ $queryString .= " " . $criteria->getCondition($i);
+ }
+ }
+
+ return "(" . $queryString . ")";
+ }
+ else {
+ //
+ // Render
+ //
+ $name = $criteria->getName();
+ $value = null;
+ switch ($obj->mVars[$name]['data_type']) {
+ case XOBJ_DTYPE_STRING:
+ case XOBJ_DTYPE_TEXT:
+ $value = $this->db->quoteString($criteria->getValue());
+ break;
+
+ default:
+ $value = $criteria->getValue();
+ }
+
+ $string = $name . " " . $criteria->getOperator() . " " . $value;
+ return $string;
+ }
+ }
+ }
/**
* @return bool
From minahito @ users.sourceforge.jp Tue Apr 11 14:41:58 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 14:41:58 +0900
Subject: [xoops-cvslog 2726] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060411054158.3CF0F2AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.2 Thu Apr 6 15:11:37 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php Tue Apr 11 14:41:58 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php";
-define('NEWBLOCKS_SORT_KEY_DEFAULT', 0);
define('NEWBLOCKS_SORT_KEY_BID', 1);
define('NEWBLOCKS_SORT_KEY_MID', 2);
define('NEWBLOCKS_SORT_KEY_FUNC_NUM', 3);
@@ -27,6 +26,8 @@
define('NEWBLOCKS_SORT_KEY_LAST_MODIFIED', 20);
define('NEWBLOCKS_SORT_KEY_MAXVALUE', 20);
+define('NEWBLOCKS_SORT_KEY_DEFAULT', NEWBLOCKS_SORT_KEY_MID);
+
class Legacy_BlockInstallFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
@@ -57,7 +58,7 @@
function fetch()
{
- $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+ $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : NEWBLOCKS_SORT_KEY_DEFAULT;
if ($this->mSort > NEWBLOCKS_SORT_KEY_MAXVALUE) {
$this->mSort = NEWBLOCKS_SORT_KEY_DEFAULT;
Index: xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.2 Thu Apr 6 15:11:32 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php Tue Apr 11 14:41:58 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php";
-define('NEWBLOCKS_SORT_KEY_DEFAULT', 0);
define('NEWBLOCKS_SORT_KEY_BID', 1);
define('NEWBLOCKS_SORT_KEY_MID', 2);
define('NEWBLOCKS_SORT_KEY_FUNC_NUM', 3);
@@ -27,11 +26,12 @@
define('NEWBLOCKS_SORT_KEY_LAST_MODIFIED', 20);
define('NEWBLOCKS_SORT_KEY_MAXVALUE', 20);
+define('NEWBLOCKS_SORT_KEY_DEFAULT', NEWBLOCKS_SORT_KEY_SIDE);
+
class Legacy_BlockFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
var $_mSortKeys = array(
- NEWBLOCKS_SORT_KEY_DEFAULT => 'bid',
NEWBLOCKS_SORT_KEY_BID => 'bid',
NEWBLOCKS_SORT_KEY_MID => 'mid',
NEWBLOCKS_SORT_KEY_FUNC_NUM => 'func_num',
@@ -57,7 +57,7 @@
function fetch()
{
- $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+ $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : NEWBLOCKS_SORT_KEY_DEFAULT;
if ($this->mSort > NEWBLOCKS_SORT_KEY_MAXVALUE) {
$this->mSort = NEWBLOCKS_SORT_KEY_DEFAULT;
From minahito @ users.sourceforge.jp Tue Apr 11 15:12:15 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 15:12:15 +0900
Subject: [xoops-cvslog 2727] CVS update: xoops2jp/html/class
Message-ID: <20060411061215.2ADFC2AC0CF@users.sourceforge.jp>
Index: xoops2jp/html/class/criteria.php
diff -u xoops2jp/html/class/criteria.php:1.2.8.5 xoops2jp/html/class/criteria.php:1.2.8.6
--- xoops2jp/html/class/criteria.php:1.2.8.5 Tue Apr 11 14:28:48 2006
+++ xoops2jp/html/class/criteria.php Tue Apr 11 15:12:15 2006
@@ -1,5 +1,5 @@
sort = $sort;
+ $this->sort[0] = $sort;
+ $this->order[0] = 'ASC';
+ if ($order != null) {
+ if (strtoupper($order) == 'ASC') {
+ $this->order[0] = 'ASC';
+ }
+ elseif (strtoupper($order) == 'DESC') {
+ $this->order[0] = 'DESC';
+ }
+ }
}
+
+ /**
+ * Add sort and order condition to this object.
+ */
+ function addSort($sort, $order = 'ASC')
+ {
+ $this->sort[] = $sort;
+ if (strtoupper($order) == 'ASC') {
+ $this->order[] = 'ASC';
+ }
+ elseif (strtoupper($order) == 'DESC') {
+ $this->order[] = 'DESC';
+ }
+ }
/**
* @return string
*/
function getSort()
{
- return $this->sort;
+ if (isset($this->sort[0])) {
+ return $this->sort[0];
+ }
+ else {
+ return '';
+ }
}
+ /**
+ * Return sort and order condition as hashmap array.
+ *
+ * @return hashmap 'sort' ... sort string/key'order' order string.
+ */
+ function getSorts()
+ {
+ $ret = array();
+ $max = count($this->sort);
+
+ for ($i = 0; $i < $max; $i++) {
+ $ret[$i]['sort'] = $this->sort[$i];
+ if (isset($this->order[$i])) {
+ $ret[$i]['order'] = $this->order[$i];
+ }
+ else {
+ $ret[$i]['order'] = 'ASC';
+ }
+ }
+
+ return $ret;
+ }
+
/**
* @param string $order
+ * @deprecated
*/
function setOrder($order)
{
if (strtoupper($order) == 'ASC') {
- $this->order = 'ASC';
+ $this->order[0] = 'ASC';
}
elseif (strtoupper($order) == 'DESC') {
- $this->order = 'DESC';
+ $this->order[0] = 'DESC';
}
}
@@ -191,7 +244,12 @@
*/
function getOrder()
{
- return $this->order;
+ if (isset($this->order[0])) {
+ return $this->order[0];
+ }
+ else {
+ return 'ASC';
+ }
}
/**
From minahito @ users.sourceforge.jp Tue Apr 11 15:12:45 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 15:12:45 +0900
Subject: [xoops-cvslog 2728] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060411061245.6CE302AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/SmilesFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/SmilesFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/forms/SmilesFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/admin/forms/SmilesFilterForm.class.php:1.1.2.2 Tue Mar 28 22:29:05 2006
+++ xoops2jp/html/modules/base/admin/forms/SmilesFilterForm.class.php Tue Apr 11 15:12:45 2006
@@ -52,6 +52,8 @@
if (isset($_REQUEST['display'])) {
$this->_mCriteria->add(new Criteria('display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('display'))));
}
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
}
Index: xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.4
--- xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.3 Tue Apr 11 14:41:58 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php Tue Apr 11 15:12:45 2006
@@ -32,7 +32,6 @@
{
var $mSort = 0;
var $_mSortKeys = array(
- NEWBLOCKS_SORT_KEY_DEFAULT => 'bid',
NEWBLOCKS_SORT_KEY_BID => 'bid',
NEWBLOCKS_SORT_KEY_MID => 'mid',
NEWBLOCKS_SORT_KEY_FUNC_NUM => 'func_num',
@@ -86,6 +85,8 @@
$this->_mCriteria->add(new Criteria('visible', array(XOBJ_DTYPE_BOOL, 0)));
$this->_mCriteria->add(new Criteria('isactive', array(XOBJ_DTYPE_BOOL, 1)));
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
}
Index: xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.5
--- xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php:1.1.2.4 Wed Mar 29 00:14:05 2006
+++ xoops2jp/html/modules/base/admin/forms/CommentFilterForm.class.php Tue Apr 11 15:12:45 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php";
-define('COMMENT_SORT_KEY_DEFAULT', 0);
define('COMMENT_SORT_KEY_COM_ID', 1);
define('COMMENT_SORT_KEY_COM_PID', 2);
define('COMMENT_SORT_KEY_COM_ROOTID', 3);
@@ -27,11 +26,12 @@
define('COMMENT_SORT_KEY_DOBR', 20);
define('COMMENT_SORT_KEY_MAXVALUE', 20);
+define('COMMENT_SORT_KEY_DEFAULT', COMMENT_SORT_KEY_COM_ID);
+
class Legacy_CommentFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
var $_mSortKeys = array(
- COMMENT_SORT_KEY_DEFAULT => 'com_id',
COMMENT_SORT_KEY_COM_ID => 'com_id',
COMMENT_SORT_KEY_COM_PID => 'com_pid',
COMMENT_SORT_KEY_COM_ROOTID => 'com_rootid',
@@ -96,6 +96,8 @@
$this->_mNavi->addExtra('com_status', xoops_getrequest('com_status'));
$this->_mCriteria->add(new Criteria('com_status', array(XOBJ_DTYPE_BOOL, xoops_getrequest('com_status'))));
}
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
}
Index: xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.4
--- xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.3 Tue Apr 11 14:41:58 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php Tue Apr 11 15:12:45 2006
@@ -110,6 +110,9 @@
$this->_mCriteria->add(new Criteria('visible', array(XOBJ_DTYPE_BOOL, 1)));
$this->_mCriteria->add(new Criteria('isactive', array(XOBJ_DTYPE_BOOL, 1)));
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
+ $this->_mCriteria->addSort('weight', $this->getOrder());
}
}
From minahito @ users.sourceforge.jp Tue Apr 11 15:12:54 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 15:12:54 +0900
Subject: [xoops-cvslog 2729] CVS update: xoops2jp/html/modules/base/forms
Message-ID: <20060411061254.7AB4A2AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/forms/SmilesFilterForm.class.php
diff -u xoops2jp/html/modules/base/forms/SmilesFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/forms/SmilesFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/forms/SmilesFilterForm.class.php:1.1.2.2 Tue Mar 28 22:30:03 2006
+++ xoops2jp/html/modules/base/forms/SmilesFilterForm.class.php Tue Apr 11 15:12:54 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php";
-define('SMILES_SORT_KEY_DEFAULT', 0);
define('SMILES_SORT_KEY_ID', 1);
define('SMILES_SORT_KEY_CODE', 2);
define('SMILES_SORT_KEY_SMILE_URL', 3);
@@ -12,11 +11,12 @@
define('SMILES_SORT_KEY_DISPLAY', 5);
define('SMILES_SORT_KEY_MAXVALUE', 5);
+define('SMILES_SORT_KEY_DEFAULT', SMILES_SORT_KEY_ID);
+
class Legacy_SmilesFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
var $mSortKeys = array(
- SMILES_SORT_KEY_DEFAULT => 'id',
SMILES_SORT_KEY_ID => 'id',
SMILES_SORT_KEY_CODE => 'code',
SMILES_SORT_KEY_SMILE_URL => 'smile_url',
@@ -52,6 +52,8 @@
if (isset($_REQUEST['display'])) {
$this->_mCriteria->add(new Criteria('display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('display'))));
}
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
}
Index: xoops2jp/html/modules/base/forms/OnlineFilterForm.class.php
diff -u xoops2jp/html/modules/base/forms/OnlineFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/base/forms/OnlineFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/base/forms/OnlineFilterForm.class.php:1.1.2.2 Tue Mar 28 22:30:03 2006
+++ xoops2jp/html/modules/base/forms/OnlineFilterForm.class.php Tue Apr 11 15:12:54 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/base/class/AbstractFilterForm.class.php";
-define('ONLINE_SORT_KEY_DEFAULT', 1);
define('ONLINE_SORT_KEY_ONLINE_UID', 1);
define('ONLINE_SORT_KEY_ONLINE_UNAME', 2);
define('ONLINE_SORT_KEY_ONLINE_UPDATED', 3);
@@ -12,6 +11,8 @@
define('ONLINE_SORT_KEY_ONLINE_IP', 5);
define('ONLINE_SORT_KEY_MAXVALUE', 5);
+define('ONLINE_SORT_KEY_DEFAULT', ONLINE_SORT_KEY_ONLINE_UID);
+
class Legacy_OnlineFilterForm extends Legacy_AbstractFilterForm
{
var $mSort = 0;
@@ -51,6 +52,8 @@
if (isset($_REQUEST['online_ip'])) {
$this->_mCriteria->add(new Criteria('online_ip', array(XOBJ_DTYPE_STRING, xoops_getrequest('online_ip'))));
}
+
+ $this->_mCriteria->addSort($this->getSort(), $this->getOrder());
}
}
From minahito @ users.sourceforge.jp Tue Apr 11 15:13:20 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 15:13:20 +0900
Subject: [xoops-cvslog 2730] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060411061320.4DF9C2AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/class/AbstractFilterForm.class.php
diff -u xoops2jp/html/modules/base/class/AbstractFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/base/class/AbstractFilterForm.class.php:1.1.2.5
--- xoops2jp/html/modules/base/class/AbstractFilterForm.class.php:1.1.2.4 Thu Mar 30 17:35:50 2006
+++ xoops2jp/html/modules/base/class/AbstractFilterForm.class.php Tue Apr 11 15:13:20 2006
@@ -37,9 +37,6 @@
$criteria->setStart($start);
$criteria->setLimit($limit);
- $criteria->setSort($this->getSort());
- $criteria->setOrder($this->getOrder());
-
return $criteria;
}
}
From minahito @ users.sourceforge.jp Tue Apr 11 15:26:19 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 15:26:19 +0900
Subject: [xoops-cvslog 2731] CVS update: xoops2jp/html/modules/base/admin/forms
Message-ID: <20060411062619.5C2972AC018@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php
diff -u xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.5
--- xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php:1.1.2.4 Tue Apr 11 15:12:45 2006
+++ xoops2jp/html/modules/base/admin/forms/BlockFilterForm.class.php Tue Apr 11 15:26:19 2006
@@ -35,20 +35,13 @@
NEWBLOCKS_SORT_KEY_BID => 'bid',
NEWBLOCKS_SORT_KEY_MID => 'mid',
NEWBLOCKS_SORT_KEY_FUNC_NUM => 'func_num',
- NEWBLOCKS_SORT_KEY_OPTIONS => 'options',
NEWBLOCKS_SORT_KEY_NAME => 'name',
NEWBLOCKS_SORT_KEY_TITLE => 'title',
- NEWBLOCKS_SORT_KEY_CONTENT => 'content',
NEWBLOCKS_SORT_KEY_SIDE => 'side',
NEWBLOCKS_SORT_KEY_WEIGHT => 'weight',
- NEWBLOCKS_SORT_KEY_VISIBLE => 'visible',
NEWBLOCKS_SORT_KEY_BLOCK_TYPE => 'block_type',
NEWBLOCKS_SORT_KEY_C_TYPE => 'c_type',
- NEWBLOCKS_SORT_KEY_ISACTIVE => 'isactive',
NEWBLOCKS_SORT_KEY_DIRNAME => 'dirname',
- NEWBLOCKS_SORT_KEY_FUNC_FILE => 'func_file',
- NEWBLOCKS_SORT_KEY_SHOW_FUNC => 'show_func',
- NEWBLOCKS_SORT_KEY_EDIT_FUNC => 'edit_func',
NEWBLOCKS_SORT_KEY_TEMPLATE => 'template',
NEWBLOCKS_SORT_KEY_BCACHETIME => 'bcachetime',
NEWBLOCKS_SORT_KEY_LAST_MODIFIED => 'last_modified'
@@ -111,8 +104,16 @@
$this->_mCriteria->add(new Criteria('visible', array(XOBJ_DTYPE_BOOL, 1)));
$this->_mCriteria->add(new Criteria('isactive', array(XOBJ_DTYPE_BOOL, 1)));
+ //
+ // Set sort conditions.
+ //
$this->_mCriteria->addSort($this->getSort(), $this->getOrder());
- $this->_mCriteria->addSort('weight', $this->getOrder());
+ if (abs($this->mSort) != NEWBLOCKS_SORT_KEY_SIDE) {
+ $this->_mCriteria->addSort('side', $this->getOrder());
+ }
+ if (abs($this->mSort) != NEWBLOCKS_SORT_KEY_WEIGHT) {
+ $this->_mCriteria->addSort('weight', $this->getOrder());
+ }
}
}
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:06 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:06 +0900
Subject: [xoops-cvslog 2732] CVS update: xoops2jp/html/class
Message-ID: <20060411083906.A31142AC018@users.sourceforge.jp>
Index: xoops2jp/html/class/XCube_Utils.class.php
diff -u xoops2jp/html/class/XCube_Utils.class.php:1.1.2.3 xoops2jp/html/class/XCube_Utils.class.php:1.1.2.4
--- xoops2jp/html/class/XCube_Utils.class.php:1.1.2.3 Sun Apr 2 22:07:47 2006
+++ xoops2jp/html/class/XCube_Utils.class.php Tue Apr 11 17:39:06 2006
@@ -1,5 +1,5 @@
getSiteConfig('Cube','SystemModules'));
+ $systemModules = array_map('trim', explode(',',$root->getSiteConfig('Cube','SystemModules')));
+ $recommendedModules = array_map('trim', explode(',',$root->getSiteConfig('Cube','RecommendedModules')));
$moduleHandler =& xoops_gethandler('module');
$uninstalledModules = array();
$disabledModules = array();
@@ -145,7 +146,7 @@
if ((count($uninstalledModules)==0)&&(count($disabledModules)==0)) {
return true;
} else {
- return array('uninstalled' =>$uninstalledModules, 'disabled'=>$disabledModules);
+ return array('uninstalled' =>$uninstalledModules, 'disabled'=>$disabledModules, 'recommended'=>$recommendedModules);
}
}
}
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:06 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:06 +0900
Subject: [xoops-cvslog 2733] CVS update: xoops2jp/html/install/include
Message-ID: <20060411083906.C7F8F2AC0CC@users.sourceforge.jp>
Index: xoops2jp/html/install/include/makedata.php
diff -u xoops2jp/html/install/include/makedata.php:1.1.2.1 xoops2jp/html/install/include/makedata.php:1.1.2.2
--- xoops2jp/html/install/include/makedata.php:1.1.2.1 Tue Mar 7 22:11:39 2006
+++ xoops2jp/html/install/include/makedata.php Tue Apr 11 17:39:06 2006
@@ -1,5 +1,5 @@
insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 1)");
- $dbm->insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 1)");
-
- // data for table 'group_permission'
-
- $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'module_admin')");
- $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1, 'module_read')");
- $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_USERS'].",1,1,'module_read')");
- $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')");
-
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",5,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",6,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",7,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",8,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",9,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",10,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",11,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",12,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",13,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",14,1,'system_admin')");
- $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",15,1,'system_admin')");
// data for table 'banner'
@@ -168,9 +139,41 @@
$dbm->insert('config', " VALUES (72, 0, 1, 'theme_set_allowed', '_MD_AM_THEMEOK', '".serialize(array('default'))."', '_MD_AM_THEMEOKDSC', 'theme_multi', 'array', 13)");
// RMV-NOTIFY... Need to specify which user is sender of notification PM
$dbm->insert('config', " VALUES (73,0,6,'fromuid','_MD_AM_MAILFROMUID','1','_MD_AM_MAILFROMUIDDESC','user','int',3)");
+ // data for table 'users'
+
+ $temp = md5($adminpass);
+ $regdate = time();
+ $dbm->insert('users', " VALUES (1,'','".addslashes($adminname)."','".addslashes($adminmail)."','".XOOPS_URL."/','blank.gif','".$regdate."','','','',1,'','','','','".$temp."',0,0,7,5,'default','".$time_diff."',".time().",'thread',0,1,0,'','','',0)");
+
+ // data for table 'groups_users_link'
+ $dbm->insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 1)");
+ $dbm->insert('groups_users_link', " VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 1)");
+
+/*
// install modules
installModule($dbm, 1, "system", _MI_SYSTEM_NAME, $language, $gruops);
+ // data for table 'group_permission'
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'module_admin')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1, 'module_read')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_USERS'].",1,1,'module_read')");
+ $dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')");
+
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",5,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",6,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",7,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",8,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",9,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",10,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",11,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",12,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",13,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",14,1,'system_admin')");
+ $dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",15,1,'system_admin')");
installModule($dbm, 2, "base", _MI_BASE_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 2, 1, 'module_admin')");
@@ -192,15 +195,6 @@
installModule($dbm, 6, "stdCache", _MI_STDCACHE_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 6, 1, 'module_admin')");
- // data for table 'users'
-
- $temp = md5($adminpass);
- $regdate = time();
- //$dbadminname= addslashes($adminname);
- // RMV-NOTIFY (updated for extra columns in user table)
- $dbm->insert('users', " VALUES (1,'','".addslashes($adminname)."','".addslashes($adminmail)."','".XOOPS_URL."/','blank.gif','".$regdate."','','','',1,'','','','','".$temp."',0,0,7,5,'default','".$time_diff."',".time().",'thread',0,1,0,'','','',0)");
-
-
// data for table 'block_module_link'
$sql = 'SELECT bid, side FROM '.$dbm->prefix('newblocks');
@@ -213,10 +207,10 @@
$dbm->insert("block_module_link", " VALUES (".$myrow['bid'].", -1)");
}
}
-
+*/
return $gruops;
}
-
+// ToDo : remove following lines
/**
*
* Install module by module's name, language and specified mid.
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:06 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:06 +0900
Subject: [xoops-cvslog 2734] CVS update: xoops2jp/html/install
Message-ID: <20060411083906.F1F792AC018@users.sourceforge.jp>
Index: xoops2jp/html/install/index.php
diff -u xoops2jp/html/install/index.php:1.2.8.4 xoops2jp/html/install/index.php:1.2.8.5
--- xoops2jp/html/install/index.php:1.2.8.4 Sat Apr 1 10:32:57 2006
+++ xoops2jp/html/install/index.php Tue Apr 11 17:39:06 2006
@@ -1,5 +1,5 @@
add('createTables',_INSTALL_L40, 'siteInit', _INSTALL_L112);
$wizardSeq->add('siteInit', _INSTALL_L112, 'insertData', _INSTALL_L116);
$wizardSeq->add('insertData', _INSTALL_L116, 'finish', _INSTALL_L117);
-$wizardSeq->add('finish', _INSTALL_L32);
+$wizardSeq->add('finish', _INSTALL_L32, 'nextStep', _INSTALL_L210);
if (file_exists('./custom/custom.inc.php')) {
include './custom/custom.inc.php';
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:07 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:07 +0900
Subject: [xoops-cvslog 2735] CVS update: xoops2jp/html/install/language/english
Message-ID: <20060411083907.2846D2AC0CC@users.sourceforge.jp>
Index: xoops2jp/html/install/language/english/finish.php
diff -u xoops2jp/html/install/language/english/finish.php:1.2.8.1 xoops2jp/html/install/language/english/finish.php:1.2.8.2
--- xoops2jp/html/install/language/english/finish.php:1.2.8.1 Sat Feb 4 02:16:36 2006
+++ xoops2jp/html/install/language/english/finish.php Tue Apr 11 17:39:07 2006
@@ -1,10 +1,15 @@
Your site
- Click HERE to see the home page of your site. +"About the 2nd Stage Installation+The 1st stage installation of XOOPS Cube complete. You should execute the 2nd stage installation for setup system modules +Click a [Next] button, and you'll see login screen. Please login with administrator's user account, that you create at the 1st stage. +After login, XOOPS Cube Module list will be displayed. Then, please click a 'Install' button. +Specified Modules are automatically installed, and then you can see XOOPS Cube Top Page + Way to use[not yet] + SupportVisit XOOPS Cube.org "; Index: xoops2jp/html/install/language/english/install.php diff -u xoops2jp/html/install/language/english/install.php:1.2.8.1 xoops2jp/html/install/language/english/install.php:1.2.8.2 --- xoops2jp/html/install/language/english/install.php:1.2.8.1 Sat Feb 4 02:16:36 2006 +++ xoops2jp/html/install/language/english/install.php Tue Apr 11 17:39:07 2006 @@ -1,5 +1,5 @@ HERE to see the home page of your site."); define("_INSTALL_L35","If you had any errors, please contact the dev team at XOOPS Cube.org"); define("_INSTALL_L36","Please choose your site admin's name and password."); @@ -175,6 +175,7 @@ define('_INSTALL_L128', 'Choose language to be used for the installation process'); define('_INSTALL_L200', 'Reload'); +define("_INSTALL_L210","The 2nd Stage Installation"); define('_INSTALL_CHARSET','ISO-8859-1'); From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:07 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 17:39:07 +0900 Subject: [xoops-cvslog 2736] CVS update: xoops2jp/html/install/language/japanese Message-ID: <20060411083907.4BF582AC018@users.sourceforge.jp> Index: xoops2jp/html/install/language/japanese/finish.php diff -u xoops2jp/html/install/language/japanese/finish.php:1.1.8.3 xoops2jp/html/install/language/japanese/finish.php:1.1.8.4 --- xoops2jp/html/install/language/japanese/finish.php:1.1.8.3 Sat Feb 4 03:30:23 2006 +++ xoops2jp/html/install/language/japanese/finish.php Tue Apr 11 17:39:07 2006 @@ -1,7 +1,13 @@ サイト -インストールされたサイトを見るには、ここをクリックしてください。 +"インストールの第2ステップについて+XOOPS Cubeのインストールの第1ステップが完了しました。 +XOOPS Cubeの必須モジュールの導入を完了するためには、第2ステップを実行する必要があります。 + +「次へ」をクリックして、表示されるログオン画面に第1ステップで設定した管理者のユーザIDでログインして下さい。 +ログインに成功すると、導入可能なモジュールの一覧が表示されます。一覧を確認し、選択導入可能なモジュールが存在する場合には、インストールするモジュールにチェックを行った後に「インストール」ボタンをクリックして下さい。 +選択されたモジュールが自動的に導入された後に、XOOPS Cubeのサイトに管理者権限でログインした状態のトップ画面が表示されます + XOOPS Cubeの使い方について[未記述] サポート Index: xoops2jp/html/install/language/japanese/install.php diff -u xoops2jp/html/install/language/japanese/install.php:1.2.8.1 xoops2jp/html/install/language/japanese/install.php:1.2.8.2 --- xoops2jp/html/install/language/japanese/install.php:1.2.8.1 Sat Feb 4 02:16:36 2006 +++ xoops2jp/html/install/language/japanese/install.php Tue Apr 11 17:39:07 2006 @@ -1,5 +1,5 @@ (例:UNIX/LINUXサーバの場合はchmod 777 mainfile.php、Windowsサーバの場合は読み取り専用プロパティがセットされていないかチェックする。)権限の設定完了後、ブラウザの「更新」ボタンを押してこのページを再度読み込んでください。"); //define("_INSTALL_L71","下記のボタンをクリックするとインストールを開始します。"); @@ -49,7 +49,7 @@ define("_INSTALL_L58"," XOOPS CubeにアクセスするURLを入力してください。 末尾には「/」を付加しないでください。"); define("_INSTALL_L31","データベースの作成に失敗しました。 設定されたユーザアカウントの権限ではデータベースの作成ができない場合は、別途作成し、インストールを続けてください。 または、はじめからやり直してください。 よくわからない場合は、サーバ管理者にお問い合わせください。"); -define("_INSTALL_L32","インストール完了"); +define("_INSTALL_L32","インストール第1ステップ完了"); define("_INSTALL_L33","インストールされたホームページを見るには ここ をクリックしてください。"); define("_INSTALL_L35","インストール中にエラーが発生した場合はXOOPS Cube日本語公式サイトのサポートフォーラムをご利用ください。"); define("_INSTALL_L36","サイト管理者のユーザ名、ユーザパスワード、およびメールアドレスを入力してください。"); @@ -176,6 +176,7 @@ define('_INSTALL_L128', 'インストール作業に使用する言語を選択してください'); define('_INSTALL_L200', '再読込'); +define('_INSTALL_L210', 'インストール第2ステップ'); define('_INSTALL_CHARSET','EUC-JP'); From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:07 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 17:39:07 +0900 Subject: [xoops-cvslog 2737] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060411083907.745D12AC0CC@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.10 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.11 --- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.10 Sun Apr 2 23:42:44 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php Tue Apr 11 17:39:07 2006 @@ -10,162 +10,182 @@ */ class Legacy_ModuleInstaller extends Legacy_AbstractModuleInstaller { - var $mAgree = false; + var $mAgree = false; - /** - * Load xoops module object that isn't installed and return it. - * @static - * @access public - * @param $dirname string - * @return XoopsModule - */ - function &loadModuleObject($dirname) - { - $ret = null; - - $moduleHandler =& xoops_gethandler('module'); - $module =& $moduleHandler->getByDirname($dirname); - - if (is_object($module)) - return $ret; - - $module =& $moduleHandler->create(); - $module->setVar('weight', 1); - $module->loadInfoAsVar($this->mDirname); - - if ($module->get('dirname') == null) { - return $ret; - } - - if (isset($module->modinfo['installer']) && isset($module->modinfo['installer']['licence']) ) { - $this->mAgree = true; - } - - return $module; - } - - function _installModule() - { - if (parent::_installModule()) { - $gpermHandler =& xoops_gethandler('groupperm'); - - // - // Add a permission which administrators can manage. - // - $adminPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN); - $adminPerm->setVar('gperm_name', 'module_admin'); - - if (!$gpermHandler->insert($adminPerm)) { - $log->addError("Could not set admin permission " . $this->mModule->getVar('mid')); - } - $read_any = $this->mModule->getInfo('read_any'); - if ($read_any) { - $memberHandler =& xoops_gethandler('member'); - $groupObjects =& $memberHandler->getGroups(); - // - // Add a permission all group members and guest can read. - // - foreach($groupObjects as $group) { - $readPerm =& $this->_createPermission($group->getVar('groupid')); - $readPerm->setVar('gperm_name', 'module_read'); - - if (!$gpermHandler->insert($readPerm)) { - $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); - } - } - } else { - // - // Add a permission which administrators can read. - // - $root = $root=&XCube_Root::getSingleton(); - $groups = $root->mController->mXoopsUser->getGroups(); - foreach($groups as $mygroup) { - $readPerm =& $this->_createPermission($mygroup); - $readPerm->setVar('gperm_name', 'module_read'); - - if (!$gpermHandler->insert($readPerm)) { - $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); - } - } - } - } - } - - /** - * Create a permission object which has been initialized for admin. - * For flexibility, creation only and not save it. - * @access private - * @param $group - */ - function &_createPermission($group) - { - $gpermHandler =& xoops_gethandler('groupperm'); - - $perm =& $gpermHandler->create(); - - $perm->setVar('gperm_groupid', $group); - $perm->setVar('gperm_itemid', $this->mModule->getVar('mid')); - $perm->setVar('gperm_modid', 1); - - return $perm; - } - - function _installTable() - { - Legacy_ModuleUtils::installTable($this->mModule, $this->mLog); - } - - function _installTemplate() - { - $templates = $this->mModule->getInfo('templates'); - if ($templates != false) { - foreach ($templates as $template) { - Legacy_ModuleUtils::installTemplate($this->mModule, $template, $this->mLog); - } - } - } - - function _installBlock() - { - $definedBlocks = $this->mModule->getInfo('blocks'); - if($definedBlocks == false) - return true; - - $blockHandler =& xoops_gethandler('block'); - - $func_num=0; - foreach ($definedBlocks as $block) { - $func_num++; - $newBlock =& Legacy_ModuleUtils::createBlockByInfo($this->mModule, $block); - $newBlock->setVar('func_num', $func_num); - - Legacy_ModuleUtils::installBlock($this->mModule, $newBlock, $block, $this->mLog); - } - } - - function _installPreference() - { - Legacy_ModuleUtils::insertAllConfigs($this->mModule, $this->mLog); - } - - function _processScript() - { - $installScript = trim($this->mModule->getInfo('onInstall')); - if ($installScript != false) { - require_once XOOPS_MODULE_PATH . "/" . $this->mModule->getVar('dirname') . "/" . $installScript; - $funcName = 'xoops_module_install_' . $this->mModule->getVar('dirname'); - if (function_exists($funcName)) { - if (!call_user_func($funcName, $this->mModule)) { - $this->mLog->addError("Failed to execute " . $funcName); - } - } - } - } - - function hasAgree() - { - return $this->mAgree; - } + /** + * Load xoops module object that isn't installed and return it. + * @static + * @access public + * @param $dirname string + * @return XoopsModule + */ + function &loadModuleObject($dirname) + { + $ret = null; + + $moduleHandler =& xoops_gethandler('module'); + $module =& $moduleHandler->getByDirname($dirname); + + if (is_object($module)) + return $ret; + + $module =& $moduleHandler->create(); + $module->setVar('weight', 1); + $module->loadInfoAsVar($this->mDirname); + + if ($module->get('dirname') == null) { + return $ret; + } + + if (isset($module->modinfo['installer']) && isset($module->modinfo['installer']['licence']) ) { + $this->mAgree = true; + } + + return $module; + } + + function _installModule() + { + if (parent::_installModule()) { + $gpermHandler =& xoops_gethandler('groupperm'); + + // + // Add a permission which administrators can manage. + // + if ($this->mModule->getInfo('hasAdmin')) { + $adminPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN); + $adminPerm->setVar('gperm_name', 'module_admin'); + + if (!$gpermHandler->insert($adminPerm)) { + $log->addError("Could not set admin permission " . $this->mModule->getVar('mid')); + } + } + + // + // Add a permission which administrators can manage. (Special for Legacy System Module) + // + if ($this->mModule->getVar('dirname') == 'system') { + for ($i=1; $i<16; $i++) { + $sysAdminPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN); + $adminPerm->setVar('gperm_itemid', $i); + $adminPerm->setVar('gperm_name', 'system_admin'); + if (!$gpermHandler->insert($adminPerm)) { + $log->addError("Could not set system admin permission " . $this->mModule->getVar('mid')); + } + unset($sysAdminPerm); + } + } + + if ($this->mModule->getInfo('hasMain')) { + $read_any = $this->mModule->getInfo('read_any'); + if ($read_any) { + $memberHandler =& xoops_gethandler('member'); + $groupObjects =& $memberHandler->getGroups(); + // + // Add a permission all group members and guest can read. + // + foreach($groupObjects as $group) { + $readPerm =& $this->_createPermission($group->getVar('groupid')); + $readPerm->setVar('gperm_name', 'module_read'); + + if (!$gpermHandler->insert($readPerm)) { + $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); + } + } + } else { + // + // Add a permission which administrators can read. + // + $root = $root=&XCube_Root::getSingleton(); + $groups = $root->mController->mXoopsUser->getGroups(); + foreach($groups as $mygroup) { + $readPerm =& $this->_createPermission($mygroup); + $readPerm->setVar('gperm_name', 'module_read'); + + if (!$gpermHandler->insert($readPerm)) { + $log->addError("Could not set read permission " . $this->mModule->getVar('mid')); + } + } + } + } + } + } + + /** + * Create a permission object which has been initialized for admin. + * For flexibility, creation only and not save it. + * @access private + * @param $group + */ + function &_createPermission($group) + { + $gpermHandler =& xoops_gethandler('groupperm'); + + $perm =& $gpermHandler->create(); + + $perm->setVar('gperm_groupid', $group); + $perm->setVar('gperm_itemid', $this->mModule->getVar('mid')); + $perm->setVar('gperm_modid', 1); + + return $perm; + } + + function _installTable() + { + Legacy_ModuleUtils::installTable($this->mModule, $this->mLog); + } + + function _installTemplate() + { + $templates = $this->mModule->getInfo('templates'); + if ($templates != false) { + foreach ($templates as $template) { + Legacy_ModuleUtils::installTemplate($this->mModule, $template, $this->mLog); + } + } + } + + function _installBlock() + { + $definedBlocks = $this->mModule->getInfo('blocks'); + if($definedBlocks == false) + return true; + + $blockHandler =& xoops_gethandler('block'); + + $func_num=0; + foreach ($definedBlocks as $block) { + $func_num++; + $newBlock =& Legacy_ModuleUtils::createBlockByInfo($this->mModule, $block); + $newBlock->setVar('func_num', $func_num); + + Legacy_ModuleUtils::installBlock($this->mModule, $newBlock, $block, $this->mLog); + } + } + + function _installPreference() + { + Legacy_ModuleUtils::insertAllConfigs($this->mModule, $this->mLog); + } + + function _processScript() + { + $installScript = trim($this->mModule->getInfo('onInstall')); + if ($installScript != false) { + require_once XOOPS_MODULE_PATH . "/" . $this->mModule->getVar('dirname') . "/" . $installScript; + $funcName = 'xoops_module_install_' . $this->mModule->getVar('dirname'); + if (function_exists($funcName)) { + if (!call_user_func($funcName, $this->mModule)) { + $this->mLog->addError("Failed to execute " . $funcName); + } + } + } + } + + function hasAgree() + { + return $this->mAgree; + } } ?> \ No newline at end of file Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.14 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.15 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.14 Tue Apr 11 00:10:23 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Tue Apr 11 17:39:07 2006 @@ -401,7 +401,9 @@ $config->setVar('conf_catid', 0); $config->setVar('conf_name', $configInfo['name']); $config->setVar('conf_title', $configInfo['title'], true); - $config->setVar('conf_desc', $configInfo['description'], true); + if (isset($configInfo['description'])) { + $config->setVar('conf_desc', $configInfo['description'], true); + } $config->setVar('conf_formtype', $configInfo['formtype'], true); $config->setVar('conf_valuetype', $configInfo['valuetype'], true); $config->setConfValueForInput($configInfo['default'], true); From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:07 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 17:39:07 +0900 Subject: [xoops-cvslog 2738] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060411083907.984102AC018@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/global.php diff -u xoops2jp/html/modules/base/language/english/global.php:1.1.2.4 xoops2jp/html/modules/base/language/english/global.php:1.1.2.5 --- xoops2jp/html/modules/base/language/english/global.php:1.1.2.4 Sun Apr 2 22:07:47 2006 +++ xoops2jp/html/modules/base/language/english/global.php Tue Apr 11 17:39:07 2006 @@ -1,13 +1,14 @@ Index: xoops2jp/html/modules/base/language/japanese/global.php diff -u xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.4 xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.5 --- xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.4 Sun Apr 2 22:07:47 2006 +++ xoops2jp/html/modules/base/language/japanese/global.php Tue Apr 11 17:39:07 2006 @@ -1,11 +1,12 @@ Index: xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php diff -u xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.6 xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.7 --- xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php:1.1.2.6 Sun Apr 2 22:07:48 2006 +++ xoops2jp/html/modules/base/preload/SiteClose/SiteClose.class.php Tue Apr 11 17:39:07 2006 @@ -14,12 +14,15 @@ function callbackSiteLogin() { + $retArray = XCube_Utils::checkSystemModules(); $accessAllowFlag = false; if(!empty($_POST['xoops_login'])) { - // Check! + if (is_array($retArray)) { + define('XOOPS_CPFUNC_LOADED',1); + } require_once XOOPS_ROOT_PATH.'/include/checklogin.php'; return; - }elseif(is_object($this->mController->mXoopsUser)) { + } elseif(is_object($this->mController->mXoopsUser)) { foreach ($this->mController->mXoopsUser->getGroups() as $group) { if (in_array($group, $this->mController->mConfig['closesite_okgrp']) || XOOPS_GROUP_ADMIN == $group) { $accessAllowFlag = true; @@ -29,7 +32,6 @@ } // @todo Devide following lines to another preload file if ($accessAllowFlag) { - $retArray = XCube_Utils::checkSystemModules(); if (is_array($retArray)) { if (in_array(XOOPS_GROUP_ADMIN, $this->mController->mXoopsUser->getGroups())) { $GLOBALS['xoopsUser'] = $this->mController->mXoopsUser; @@ -84,6 +86,7 @@ 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$this->mController->mConfig['theme_set'].'/', )); ///< @todo filebase template with absolute file path + $xoopsTpl->compile_check = true; $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_uninstall_modules.html'); exit(); } else if (!empty($_POST['cube_module_uninstallok'])) { //@todo use Ticket @@ -99,8 +102,17 @@ $objects = $handler->getObjects(); $optionModules = array(); foreach($objects as $module) { - if (!in_array($module->getVar('dirname'), $retArray['uninstalled'])) { - $optionModules[] = $module->getVar('dirname'); + $dirname = $module->getVar('dirname'); + if (!in_array($dirname, $retArray['uninstalled'])) { + $optionModule['dirname'] = $dirname; + if (in_array($dirname, $retArray['recommended'])) { + $optionModule['checked'] = 'checked="checked"'; + $optionModule['desc'] = _SYS_RECOMMENDED_MODULES; + } else { + $optionModule['checked'] = ''; + $optionModule['desc'] = _SYS_OPTION_MODULES; + } + $optionModules[] = $optionModule; } } require_once XOOPS_ROOT_PATH.'/class/template.php'; @@ -114,6 +126,7 @@ 'xoops_imageurl' => XOOPS_THEME_URL.'/'.$this->mController->mConfig['theme_set'].'/', )); ///< @todo filebase template with absolute file path + $xoopsTpl->compile_check = true; $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_install_modules.html'); exit(); } @@ -133,7 +146,7 @@ 'lang_username' => _USERNAME, 'lang_password' => _PASSWORD, 'lang_siteclosemsg' => $this->mController->mConfig['closesite_text'])); - $xoopsTpl->xoops_setCaching(1); + $xoopsTpl->compile_check = true; // @todo filebase template with absolute file path $xoopsTpl->display(XOOPS_ROOT_PATH.'/modules/base/templates/legacy_site_closed.html'); exit(); From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:08 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 17:39:08 +0900 Subject: [xoops-cvslog 2741] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060411083908.298082AC0CC@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_install_modules.html diff -u xoops2jp/html/modules/base/templates/legacy_install_modules.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_install_modules.html:1.1.2.2 --- xoops2jp/html/modules/base/templates/legacy_install_modules.html:1.1.2.1 Sun Apr 2 22:07:48 2006 +++ xoops2jp/html/modules/base/templates/legacy_install_modules.html Tue Apr 11 17:39:08 2006 @@ -48,9 +48,9 @@ <{/foreach}> <{foreach item=module from=$option}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- | <{$module}> | -<{$smarty.const._SYS_OPTION_MODULES}> | +/> | +<{$module.dirname}> | +<{$module.desc}> | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:08 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:08 +0900
Subject: [xoops-cvslog 2742] CVS update: xoops2jp/html/settings
Message-ID: <20060411083908.4E3972AC018@users.sourceforge.jp>
Index: xoops2jp/html/settings/site_default.ini.php
diff -u xoops2jp/html/settings/site_default.ini.php:1.1.2.9 xoops2jp/html/settings/site_default.ini.php:1.1.2.10
--- xoops2jp/html/settings/site_default.ini.php:1.1.2.9 Sun Apr 9 10:24:04 2006
+++ xoops2jp/html/settings/site_default.ini.php Tue Apr 11 17:39:08 2006
@@ -3,7 +3,8 @@
[Cube]
Controller=Legacy_Controller
-SystemModules=base, user,legacyRender
+SystemModules=system,base,user,legacyRender
+RecommendedModules=stdCache,pm
CacheSystem.path=/modules/stdCache/kernel
CacheSystem.class=StdRenderCache
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:39:16 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:39:16 +0900
Subject: [xoops-cvslog 2743] CVS update: xoops2jp/html/install/wizards
Message-ID: <20060411083916.455692AC018@users.sourceforge.jp>
Index: xoops2jp/html/install/wizards/install_nextStep.inc.php
diff -u /dev/null xoops2jp/html/install/wizards/install_nextStep.inc.php:1.1.2.1
--- /dev/null Tue Apr 11 17:39:16 2006
+++ xoops2jp/html/install/wizards/install_nextStep.inc.php Tue Apr 11 17:39:16 2006
@@ -0,0 +1,4 @@
+
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:41:12 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:41:12 +0900
Subject: [xoops-cvslog 2744] CVS update: xoops2jp/html/kernel
Message-ID: <20060411084112.400E02AC018@users.sourceforge.jp>
Index: xoops2jp/html/kernel/module.php
diff -u xoops2jp/html/kernel/module.php:1.2.8.6 xoops2jp/html/kernel/module.php:1.2.8.7
--- xoops2jp/html/kernel/module.php:1.2.8.6 Fri Jan 27 13:24:28 2006
+++ xoops2jp/html/kernel/module.php Tue Apr 11 17:41:12 2006
@@ -1,5 +1,5 @@
db->prefix('modules')." WHERE dirname = '".trim($dirname)."'";
+ $sql = "SELECT * FROM ".$this->db->prefix('modules')." WHERE dirname = ".$this->db->quoteString($dirname);
if (!$result = $this->db->query($sql)) {
return false;
}
Index: xoops2jp/html/kernel/online.php
diff -u xoops2jp/html/kernel/online.php:1.2 xoops2jp/html/kernel/online.php:1.2.8.1
--- xoops2jp/html/kernel/online.php:1.2 Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/kernel/online.php Tue Apr 11 17:41:12 2006
@@ -1,5 +1,5 @@
db->quoteString($ip);
if ($uid > 0) {
$sql = "SELECT COUNT(*) FROM ".$this->db->prefix('online')." WHERE online_uid=".$uid;
} else {
- $sql = "SELECT COUNT(*) FROM ".$this->db->prefix('online')." WHERE online_uid=".$uid." AND online_ip='".$ip."'";
+ $sql = "SELECT COUNT(*) FROM ".$this->db->prefix('online')." WHERE online_uid=".$uid." AND online_ip=".$ip;
}
list($count) = $this->db->fetchRow($this->db->queryF($sql));
if ( $count > 0 ) {
$sql = "UPDATE ".$this->db->prefix('online')." SET online_updated=".$time.", online_module = ".$module." WHERE online_uid = ".$uid;
if ($uid == 0) {
- $sql .= " AND online_ip='".$ip."'";
+ $sql .= " AND online_ip=".$ip;
}
} else {
- $sql = sprintf("INSERT INTO %s (online_uid, online_uname, online_updated, online_ip, online_module) VALUES (%u, %s, %u, %s, %u)", $this->db->prefix('online'), $uid, $this->db->quoteString($uname), $time, $this->db->quoteString($ip), $module);
+ $sql = sprintf("INSERT INTO %s (online_uid, online_uname, online_updated, online_ip, online_module) VALUES (%u, %s, %u, %s, %u)", $this->db->prefix('online'), $uid, $this->db->quoteString($uname), $time, $ip, $module);
}
if (!$this->db->queryF($sql)) {
return false;
Index: xoops2jp/html/kernel/tplfile.php
diff -u xoops2jp/html/kernel/tplfile.php:1.2.8.2 xoops2jp/html/kernel/tplfile.php:1.2.8.3
--- xoops2jp/html/kernel/tplfile.php:1.2.8.2 Fri Dec 16 18:05:43 2005
+++ xoops2jp/html/kernel/tplfile.php Tue Apr 11 17:41:12 2006
@@ -1,5 +1,5 @@
add(new Criteria('tpl_refid', $refid));
}
if (isset($file)) {
- $criteria->add(new Criteria('tpl_file', $file));
+ $criteria->add(new Criteria('tpl_file', addslashes(trim($file))));
}
if (isset($type)) {
if (is_array($type)) {
$criteria2 = new CriteriaCompo();
foreach ($type as $t) {
- $criteria2->add(new Criteria('tpl_type', $t), 'OR');
+ $criteria2->add(new Criteria('tpl_type', addslashes(trim($t))), 'OR');
}
$criteria->add($criteria2);
} else {
- $criteria->add(new Criteria('tpl_type', $type));
+ $criteria->add(new Criteria('tpl_type', addslashes(trim($type))));
}
}
return $this->getObjects($criteria, $getsource, false);
@@ -324,7 +324,7 @@
function templateExists($tplname, $tplset_name)
{
- $criteria = new CriteriaCompo(new Criteria('tpl_file', trim($tplname)));
+ $criteria = new CriteriaCompo(new Criteria('tpl_file', addslashes(trim($tplname))));
$criteria->add(new Criteria('tpl_tplset', addslashes(trim($tplset_name))));
if ($this->getCount($criteria) > 0) {
return true;
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:42:17 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:42:17 +0900
Subject: [xoops-cvslog 2745] CVS update: xoops2jp/html/class
Message-ID: <20060411084217.7A95E2AC0CC@users.sourceforge.jp>
Index: xoops2jp/html/class/xoopsblock.php
diff -u xoops2jp/html/class/xoopsblock.php:1.2.8.6 xoops2jp/html/class/xoopsblock.php:1.2.8.7
--- xoops2jp/html/class/xoopsblock.php:1.2.8.6 Tue Feb 28 23:36:04 2006
+++ xoops2jp/html/class/xoopsblock.php Tue Apr 11 17:42:17 2006
@@ -1,626 +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 //
-// ------------------------------------------------------------------------ //
-// Author: Kazumi Ono (AKA onokazu) //
-// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
-// Project: The XOOPS Project //
-// ------------------------------------------------------------------------- //
-
+// $Id: xoopsblock.php,v 1.2.8.7 2006/04/11 08:42:17 nobunobu Exp $
+// this file is for backward compatibility only
if (!defined('XOOPS_ROOT_PATH')) {
- exit();
-}
-
-require_once XOOPS_ROOT_PATH."/kernel/object.php";
-
-define ("SHOW_SIDEBLOCK_LEFT", 1);
-define ("SHOW_SIDEBLOCK_RIGHT", 2);
-define ("SHOW_CENTERBLOCK_LEFT", 4);
-define ("SHOW_CENTERBLOCK_RIGHT", 8);
-define ("SHOW_CENTERBLOCK_CENTER", 16);
-define ("SHOW_BLOCK_ALL", 31);
-
-class XoopsBlock extends XoopsObject
-{
- var $db;
-
- var $mBlockFlagMapping = array();
-
- function XoopsBlock($id = null)
- {
- $this->db =& Database::getInstance();
- $this->initVar('bid', XOBJ_DTYPE_INT, null, false);
- $this->initVar('mid', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('func_num', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('options', XOBJ_DTYPE_TXTBOX, null, false, 255);
- $this->initVar('name', XOBJ_DTYPE_TXTBOX, null, true, 150);
- //$this->initVar('position', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('title', XOBJ_DTYPE_TXTBOX, null, false, 150);
- $this->initVar('content', XOBJ_DTYPE_TXTAREA, null, false);
- $this->initVar('side', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('weight', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('visible', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('block_type', XOBJ_DTYPE_OTHER, null, false);
- $this->initVar('c_type', XOBJ_DTYPE_OTHER, null, false);
- $this->initVar('isactive', XOBJ_DTYPE_INT, null, false);
-
- $this->initVar('dirname', XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar('func_file', XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar('show_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
- $this->initVar('edit_func', XOBJ_DTYPE_TXTBOX, null, false, 50);
-
- $this->initVar('template', XOBJ_DTYPE_OTHER, null, false);
- $this->initVar('bcachetime', XOBJ_DTYPE_INT, 0, false);
- $this->initVar('last_modified', XOBJ_DTYPE_INT, 0, false);
-
- if ( !empty($id) ) {
- if ( is_array($id) ) {
- $this->assignVars($id);
- } else {
- $this->load(intval($id));
- }
- }
-
-
- $this->mBlockFlagMapping = array(
- 0 => false,
- SHOW_SIDEBLOCK_LEFT => 0,
- SHOW_SIDEBLOCK_RIGHT => 1,
- SHOW_CENTERBLOCK_LEFT => 3,
- SHOW_CENTERBLOCK_RIGHT => 4,
- SHOW_CENTERBLOCK_CENTER => 5
- );
- }
-
- function load($id)
- {
- $sql = 'SELECT * FROM '.$this->db->prefix('newblocks').' WHERE bid = '.$id;
- $arr = $this->db->fetchArray($this->db->query($sql));
- $this->assignVars($arr);
- }
-
- function store()
- {
- if ( !$this->cleanVars() ) {
- return false;
- }
- foreach ( $this->cleanVars as $k=>$v ) {
- ${$k} = $v;
- }
- if ( empty($bid) ) {
- $bid = $this->db->genId($this->db->prefix("newblocks")."_bid_seq");
- $sql = sprintf("INSERT INTO %s (bid, mid, func_num, options, name, title, content, side, weight, visible, block_type, c_type, isactive, dirname, func_file, show_func, edit_func, template, bcachetime, last_modified) VALUES (%u, %u, %u, %s, %s, %s, %s, %u, %u, %u, %s, %s, %u, %s, %s, %s, %s, %s, %u, %u)", $this->db->prefix('newblocks'), $bid, $mid, $func_num, $this->db->quoteString($options), $this->db->quoteString($name), $this->db->quoteString($title), $this->db->quoteString($content), $side, $weight, $visible, $this->db->quoteString($block_type), $this->db->quoteString($c_type), 1, $this->db->quoteString($dirname), $this->db->quoteString($func_file), $this->db->quoteString($show_func), $this->db->quoteString($edit_func), $this->db->quoteString($template), $bcachetime, time());
- } else {
- $sql = "UPDATE ".$this->db->prefix("newblocks")." SET options=".$this->db->quoteString($options);
- // a custom block needs its own name
- if ( $block_type == "C" ) {
- $sql .= ", name=".$this->db->quoteString($name);
- }
- $sql .= ", isactive=".$isactive.", title=".$this->db->quoteString($title).", content=".$this->db->quoteString($content).", side=".$side.", weight=".$weight.", visible=".$visible.", c_type=".$this->db->quoteString($c_type).", template=".$this->db->quoteString($template).", bcachetime=".$bcachetime.", last_modified=".time()." WHERE bid=".$bid;
- }
- if ( !$this->db->query($sql) ) {
- $this->setErrors("Could not save block data into database");
- return false;
- }
- if ( empty($bid) ) {
- $bid = $this->db->getInsertId();
- }
- return $bid;
- }
-
- function delete()
- {
- $sql = sprintf("DELETE FROM %s WHERE bid = %u", $this->db->prefix('newblocks'), $this->getVar('bid'));
- if ( !$this->db->query($sql) ) {
- return false;
- }
- $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'block_read' AND gperm_itemid = %u AND gperm_modid = 1", $this->db->prefix('group_permission'), $this->getVar('bid'));
- $this->db->query($sql);
- $sql = sprintf("DELETE FROM %s WHERE block_id = %u", $this->db->prefix('block_module_link'), $this->getVar('bid'));
- $this->db->query($sql);
- return true;
- }
-
- /**
- * do stripslashes/htmlspecialchars according to the needed output
- *
- * @param $format output use: S for Show and E for Edit
- * @param $c_type type of block content
- * @returns string
- */
- function &getContent($format = 'S', $c_type = 'T')
- {
- 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'));
- } 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);
- } elseif ( $c_type == 'S' ) {
- $myts =& MyTextSanitizer::getInstance();
- return 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));
- }
- break;
- case 'E':
- return $this->getVar('content', 'E');
- break;
- default:
- return $this->getVar('content', 'N');
- break;
- }
- }
-
- function &buildBlock()
- {
- global $xoopsConfig, $xoopsOption;
- $ret = false;
-
- $block = array();
- // M for module block, S for system block C for Custom
- if ( $this->getVar("block_type") != "C" ) {
- // get block display function
- $show_func = $this->getVar('show_func');
- if ( !$show_func ) {
- return $ret;
- }
- // must get lang files b4 execution of the function
- if ( file_exists(XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/blocks/".$this->getVar('func_file')) ) {
- $root=&XCube_Root::getSingleton();
- $languageManager=$root->getLanguageManager();
- $languageManager->loadBlockLanguage($this->getVar('dirname'));
-
- require_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/blocks/".$this->getVar('func_file');
- $options = explode("|", $this->getVar("options"));
- if ( function_exists($show_func) ) {
- // execute the function
- $block = $show_func($options);
- if ( !$block ) {
- return $ret;
- }
- } else {
- return $ret;
- }
- } else {
- return $ret;
- }
- } else {
- // it is a custom block, so just return the contents
- $block['content'] = $this->getContent("S",$this->getVar("c_type"));
- if (empty($block['content'])) {
- return $ret;
- }
- }
- return $block;
- }
-
- /*
- * Aligns the content of a block
- * If position is 0, content in DB is positioned
- * before the original content
- * If position is 1, content in DB is positioned
- * after the original content
- */
- function &buildContent($position,$content="",$contentdb="")
- {
- if ( $position == 0 ) {
- $ret = $contentdb.$content;
- } elseif ( $position == 1 ) {
- $ret = $content.$contentdb;
- }
- return $ret;
- }
-
- function &buildTitle($originaltitle, $newtitle="")
- {
- if ($newtitle != "") {
- $ret = $newtitle;
- } else {
- $ret = $originaltitle;
- }
- return $ret;
- }
-
- function isCustom()
- {
- if ( $this->getVar("block_type") == "C" ) {
- return true;
- }
- return false;
- }
-
- /**
- * gets html form for editting block options
- *
- */
- function getOptions()
- {
- global $xoopsConfig;
- if ( $this->getVar("block_type") != "C" ) {
- $edit_func = $this->getVar('edit_func');
- if ( !$edit_func ) {
- 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/".$xoopsConfig['language']."/blocks.php") ) {
- include_once XOOPS_ROOT_PATH."/modules/".$this->getVar('dirname')."/language/".$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";
- }
- include_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
- $options = explode("|", $this->getVar("options"));
- $edit_form = $edit_func($options);
- if ( !$edit_form ) {
- return false;
- }
- return $edit_form;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
-
- /**
- * get all the blocks that match the supplied parameters
- * @param $side 0: sideblock - left
- * 1: sideblock - right
- * 2: sideblock - left and right
- * 3: centerblock - left
- * 4: centerblock - right
- * 5: centerblock - center
- * 6: centerblock - left, right, center
- * @param $groupid groupid (can be an array)
- * @param $visible 0: not visible 1: visible
- * @param $orderby order of the blocks
- * @returns array of block objects
- */
- function &getAllBlocksByGroup($groupid, $asobject=true, $side=null, $visible=null, $orderby="b.weight,b.bid", $isactive=1)
- {
- $db =& Database::getInstance();
- $ret = array();
- if ( !$asobject ) {
- $sql = "SELECT b.bid ";
- } else {
- $sql = "SELECT b.* ";
- }
- $sql .= "FROM ".$db->prefix("newblocks")." b LEFT JOIN ".$db->prefix("group_permission")." l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
- if ( is_array($groupid) ) {
- $sql .= " AND (l.gperm_groupid=".$groupid[0]."";
- $size = count($groupid);
- if ( $size > 1 ) {
- for ( $i = 1; $i < $size; $i++ ) {
- $sql .= " OR l.gperm_groupid=".$groupid[$i]."";
- }
- }
- $sql .= ")";
- } else {
- $sql .= " AND l.gperm_groupid=".$groupid."";
- }
- $sql .= " AND b.isactive=".$isactive;
- if ( isset($side) ) {
- // get both sides in sidebox? (some themes need this)
- if ( $side == XOOPS_SIDEBLOCK_BOTH ) {
- $side = "(b.side=0 OR b.side=1)";
- } elseif ( $side == XOOPS_CENTERBLOCK_ALL ) {
- $side = "(b.side=3 OR b.side=4 OR b.side=5)";
- } else {
- $side = "b.side=".$side;
- }
- $sql .= " AND ".$side;
- }
- if ( isset($visible) ) {
- $sql .= " AND b.visible=$visible";
- }
- $sql .= " ORDER BY $orderby";
- $result = $db->query($sql);
- $added = array();
- while ( $myrow = $db->fetchArray($result) ) {
- if ( !in_array($myrow['bid'], $added) ) {
- if (!$asobject) {
- $ret[] = $myrow['bid'];
- } else {
- $ret[] =& new XoopsBlock($myrow);
- }
- array_push($added, $myrow['bid']);
- }
- }
- //echo $sql;
- return $ret;
- }
-
- function &getAllBlocks($rettype="object", $side=null, $visible=null, $orderby="side,weight,bid", $isactive=1)
- {
- $db =& Database::getInstance();
- $ret = array();
- $where_query = " WHERE isactive=".$isactive;
- if ( isset($side) ) {
- // get both sides in sidebox? (some themes need this)
- if ( $side == 2 ) {
- $side = "(side=0 OR side=1)";
- } elseif ( $side == 6 ) {
- $side = "(side=3 OR side=4 OR side=5)";
- } else {
- $side = "side=".$side;
- }
- $where_query .= " AND ".$side;
- }
- if ( isset($visible) ) {
- $where_query .= " AND visible=$visible";
- }
- $where_query .= " ORDER BY $orderby";
- switch ($rettype) {
- case "object":
- $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $ret[] =& new XoopsBlock($myrow);
- }
- break;
- case "list":
- $sql = "SELECT * FROM ".$db->prefix("newblocks")."".$where_query;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $block =& new XoopsBlock($myrow);
- $name = ($block->getVar("block_type") != "C") ? $block->getVar("name") : $block->getVar("title");
- $ret[$block->getVar("bid")] = $name;
- unset($block);
- }
- break;
- case "id":
- $sql = "SELECT bid FROM ".$db->prefix("newblocks")."".$where_query;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $ret[] = $myrow['bid'];
- }
- break;
- }
- //echo $sql;
- return $ret;
- }
-
- function &getByModule($moduleid, $asobject=true)
- {
- $db =& Database::getInstance();
- if ( $asobject == true ) {
- $sql = $sql = "SELECT * FROM ".$db->prefix("newblocks")." WHERE mid=".$moduleid."";
- } else {
- $sql = "SELECT bid FROM ".$db->prefix("newblocks")." WHERE mid=".$moduleid."";
- }
- $result = $db->query($sql);
- $ret = array();
- while( $myrow = $db->fetchArray($result) ) {
- if ( $asobject ) {
- $ret[] =& new XoopsBlock($myrow);
- } else {
- $ret[] = $myrow['bid'];
- }
- }
- return $ret;
- }
-
- function &getAllByGroupModule($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
- {
- $db =& Database::getInstance();
- $ret = array();
- $sql = "SELECT DISTINCT gperm_itemid FROM ".$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
- if ( is_array($groupid) ) {
- $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
- } else {
- if (intval($groupid) > 0) {
- $sql .= ' AND gperm_groupid='.$groupid;
- }
- }
- $result = $db->query($sql);
- $blockids = array();
- while ( $myrow = $db->fetchArray($result) ) {
- $blockids[] = $myrow['gperm_itemid'];
- }
- if (!empty($blockids)) {
- $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
- $sql .= ' AND b.isactive='.$isactive;
- if (isset($visible)) {
- $sql .= ' AND b.visible='.intval($visible);
- }
- if ($module_id !== false) {
- $sql .= ' AND m.module_id IN (0,'.intval($module_id);
- if ($toponlyblock) {
- $sql .= ',-1';
- }
- $sql .= ')';
- } else {
- if ($toponlyblock) {
- $sql .= ' AND m.module_id IN (0,-1)';
- } else {
- $sql .= ' AND m.module_id=0';
- }
- }
- $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
- $sql .= ' ORDER BY '.$orderby;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $block =& new XoopsBlock($myrow);
- $ret[$myrow['bid']] =& $block;
- unset($block);
- }
- }
- return $ret;
- }
-
- /**
- * Return block instance array by $groupid, $mid and $blockFlag.
- * This function is new function of Cube and used from controller.
- * @author minahito
- */
- function &getBlocks($groupid, $mid=false, $blockFlag=SHOW_BLOCK_ALL, $orderby='b.weight,b.bid')
- {
- $root =& XCube_Root::getSingleton();
- $db =& $root->mController->getDB();
-
- $ret = array();
- $sql = "SELECT DISTINCT gperm_itemid FROM ".$db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
- if ( is_array($groupid) ) {
- $sql .= ' AND gperm_groupid IN ('.implode(',', $groupid).')';
- } else {
- if (intval($groupid) > 0) {
- $sql .= ' AND gperm_groupid='.$groupid;
- }
- }
- $result = $db->query($sql);
- $blockids = array();
- while ( $myrow = $db->fetchArray($result) ) {
- $blockids[] = $myrow['gperm_itemid'];
- }
- if (!empty($blockids)) {
- $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
- $sql .= ' AND b.isactive=1 AND b.visible=1 ';
- if ($mid !== false && $mid !== 0) {
- $sql .= ' AND m.module_id IN (0,'.intval($mid).')';
- } else {
- $sql .= ' AND m.module_id=0';
- }
-
- //
- // SIDE
- //
- if ($blockFlag != SHOW_BLOCK_ALL) {
- $arr = array();
- if ($blockFlag & SHOW_SIDEBLOCK_LEFT) {
- $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_SIDEBLOCK_LEFT];
- }
- if ($blockFlag & SHOW_SIDEBLOCK_RIGHT) {
- $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_SIDEBLOCK_RIGHT];
- }
- if ($blockFlag & SHOW_CENTERBLOCK_LEFT) {
- $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_LEFT];
- }
- if ($blockFlag & SHOW_CENTERBLOCK_CENTER) {
- $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_CENTER];
- }
- if ($blockFlag & SHOW_CENTERBLOCK_RIGHT) {
- $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_RIGHT];
- }
-
- $sql .= " AND (" . implode(" OR ", $arr) . ")";
- }
-
- $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
- $sql .= ' ORDER BY '.$orderby;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $block =& new XoopsBlock($myrow);
- $ret[$myrow['bid']] =& $block;
- unset($block);
- }
- }
- return $ret;
- }
-
- function &getNonGroupedBlocks($module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
- {
- $db =& Database::getInstance();
- $ret = array();
- $bids = array();
- $sql = "SELECT DISTINCT(bid) from ".$db->prefix('newblocks');
- if ($result = $db->query($sql)) {
- while ( $myrow = $db->fetchArray($result) ) {
- $bids[] = $myrow['bid'];
- }
- }
- $sql = "SELECT DISTINCT(p.gperm_itemid) from ".$db->prefix('group_permission')." p, ".$db->prefix('groups')." g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
- $grouped = array();
- if ($result = $db->query($sql)) {
- while ( $myrow = $db->fetchArray($result) ) {
- $grouped[] = $myrow['gperm_itemid'];
- }
- }
- $non_grouped = array_diff($bids, $grouped);
- if (!empty($non_grouped)) {
- $sql = 'SELECT b.* FROM '.$db->prefix('newblocks').' b, '.$db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
- $sql .= ' AND b.isactive='.$isactive;
- if (isset($visible)) {
- $sql .= ' AND b.visible='.intval($visible);
- }
- $module_id = intval($module_id);
- if (!empty($module_id)) {
- $sql .= ' AND m.module_id IN (0,'.$module_id;
- if ($toponlyblock) {
- $sql .= ',-1';
- }
- $sql .= ')';
- } else {
- if ($toponlyblock) {
- $sql .= ' AND m.module_id IN (0,-1)';
- } else {
- $sql .= ' AND m.module_id=0';
- }
- }
- $sql .= ' AND b.bid IN ('.implode(',', $non_grouped).')';
- $sql .= ' ORDER BY '.$orderby;
- $result = $db->query($sql);
- while ( $myrow = $db->fetchArray($result) ) {
- $block =& new XoopsBlock($myrow);
- $ret[$myrow['bid']] =& $block;
- unset($block);
- }
- }
- return $ret;
- }
-
- function countSimilarBlocks($moduleId, $funcNum, $showFunc = null)
- {
- $funcNum = intval($funcNum);
- $moduleId = intval($moduleId);
- if ($funcNum < 1 || $moduleId < 1) {
- // invalid query
- return 0;
- }
- $db =& Database::getInstance();
- if (isset($showFunc)) {
- // showFunc is set for more strict comparison
- $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d AND show_func = %s", $db->prefix('newblocks'), $moduleId, $funcNum, $db->quoteString(trim($showFunc)));
- } else {
- $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d", $db->prefix('newblocks'), $moduleId, $funcNum);
- }
- if (!$result = $db->query($sql)) {
- return 0;
- }
- list($count) = $db->fetchRow($result);
- return $count;
- }
+ exit();
}
+require_once XOOPS_ROOT_PATH.'/kernel/block.php';
?>
\ No newline at end of file
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:42:17 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:42:17 +0900
Subject: [xoops-cvslog 2746] CVS update: xoops2jp/html/kernel
Message-ID: <20060411084217.A0D362AC0CF@users.sourceforge.jp>
Index: xoops2jp/html/kernel/block.php
diff -u xoops2jp/html/kernel/block.php:1.2.8.5 xoops2jp/html/kernel/block.php:1.2.8.6
--- xoops2jp/html/kernel/block.php:1.2.8.5 Thu Feb 9 18:09:32 2006
+++ xoops2jp/html/kernel/block.php Tue Apr 11 17:42:17 2006
@@ -1,5 +1,5 @@
- * @copyright copyright (c) 2000 XOOPS.org
- **/
+if (!defined('SHOW_SIDEBLOCK_LEFT')) {
+ define ('SHOW_SIDEBLOCK_LEFT', 1);
+ define ('SHOW_SIDEBLOCK_RIGHT', 2);
+ define ('SHOW_CENTERBLOCK_LEFT', 4);
+ define ('SHOW_CENTERBLOCK_RIGHT', 8);
+ define ('SHOW_CENTERBLOCK_CENTER', 16);
+ define ('SHOW_BLOCK_ALL', 31);
+}
/**
* A block
@@ -48,6 +52,7 @@
**/
class XoopsBlock extends XoopsObject
{
+ var $mBlockFlagMapping = array();
/**
* constructor
@@ -83,11 +88,17 @@
if (is_array($id)) {
$this->assignVars($id);
} else {
- $blkhandler =& xoops_gethandler('block');
- $obj =& $blkhandler->get($id);
- $this->assignVars($obj->getVars());
+ $this->load($id);
}
}
+ $this->mBlockFlagMapping = array(
+ 0 => false,
+ SHOW_SIDEBLOCK_LEFT => 0,
+ SHOW_SIDEBLOCK_RIGHT => 1,
+ SHOW_CENTERBLOCK_LEFT => 3,
+ SHOW_CENTERBLOCK_RIGHT => 4,
+ SHOW_CENTERBLOCK_CENTER => 5
+ );
}
/**
@@ -106,6 +117,11 @@
{
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'));
} elseif ( $c_type == 'P' ) {
@@ -116,10 +132,10 @@
return 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'), 0, 1));
+ return 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'), 0, 0));
+ return str_replace('{X_SITEURL}', XOOPS_URL.'/', $myts->displayTarea($this->getVar('content', 'N'), 1, 0));
}
break;
case 'E':
@@ -131,7 +147,84 @@
}
}
- /**
+ function &buildBlock()
+ {
+ $ret = false;
+
+ $block = array();
+ // M for module block, S for system block C for Custom
+ if ( $this->getVar('block_type') != 'C' ) {
+ // get block display function
+ $show_func = $this->getVar('show_func');
+ if ( !$show_func ) {
+ return $ret;
+ }
+ // must get lang files b4 execution of the function
+ if ( file_exists(XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file')) ) {
+ $root=&XCube_Root::getSingleton();
+ $languageManager=$root->getLanguageManager();
+ $languageManager->loadBlockLanguage($this->getVar('dirname'));
+
+ require_once XOOPS_ROOT_PATH.'/modules/'.$this->getVar('dirname').'/blocks/'.$this->getVar('func_file');
+ $options = explode('|', $this->getVar('options'));
+ if ( function_exists($show_func) ) {
+ // execute the function
+ $block = $show_func($options);
+ if ( !$block ) {
+ return $ret;
+ }
+ } else {
+ return $ret;
+ }
+ } else {
+ return $ret;
+ }
+ } else {
+ // it is a custom block, so just return the contents
+ $block['content'] = $this->getContent('S',$this->getVar('c_type'));
+ if (empty($block['content'])) {
+ return $ret;
+ }
+ }
+ return $block;
+ }
+
+ /*
+ * Aligns the content of a block
+ * If position is 0, content in DB is positioned
+ * before the original content
+ * If position is 1, content in DB is positioned
+ * after the original content
+ */
+ function &buildContent($position,$content="",$contentdb="")
+ {
+ if ( $position == 0 ) {
+ $ret = $contentdb.$content;
+ } elseif ( $position == 1 ) {
+ $ret = $content.$contentdb;
+ }
+ return $ret;
+ }
+
+ function &buildTitle($originaltitle, $newtitle="")
+ {
+ if ($newtitle != "") {
+ $ret = $newtitle;
+ } else {
+ $ret = $originaltitle;
+ }
+ return $ret;
+ }
+
+ function isCustom()
+ {
+ if ( $this->getVar('block_type') == 'C' ) {
+ return true;
+ }
+ return false;
+ }
+
+/**
* (HTML-) form for setting the options of the block
*
* @return string HTML for the form, FALSE if not defined for this block
@@ -163,6 +256,77 @@
return false;
}
}
+
+ // Some functions for for backward compatibility
+ // @deprecated
+
+ function load($id)
+ {
+ $handler =& xoops_gethandler('block');
+ $obj =& $handler->get($id);
+ foreach ($obj->vars as $k => $v) {
+ $this->assignVar($k, $v['value']);
+ }
+ }
+
+ function store()
+ {
+ $handler =& xoops_gethandler('block');
+ if($handler->insert($this)) {
+ return $this->getVar('bid');
+
+ } else {
+ return false;
+ }
+ }
+
+ function delete()
+ {
+ $handler =& xoops_gethandler('block');
+ return $handler->delete($this);
+ }
+ function &getAllBlocksByGroup($groupid, $asobject=true, $side=null, $visible=null, $orderby="b.weight,b.bid", $isactive=1)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getAllBlocksByGroup($groupid, $asobject, $side, $visible, $orderby, $isactive);
+ return $ret;
+ }
+ function &getAllBlocks($rettype="object", $side=null, $visible=null, $orderby="side,weight,bid", $isactive=1)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getAllBlocks($rettype, $side, $visible, $orderby, $isactive);
+ return $ret;
+ }
+ function &getByModule($moduleid, $asobject=true)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getByModule($moduleid, $asobject);
+ return $ret;
+ }
+ function &getAllByGroupModule($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getAllByGroupModule($groupid, $module_id, $toponlyblock, $visible, $orderby, $isactive);
+ return $ret;
+ }
+ function &getBlocks($groupid, $mid=false, $blockFlag=SHOW_BLOCK_ALL, $orderby='b.weight,b.bid')
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getBlocks($groupid, $mid, $blockFlag, $orderby);
+ return $ret;
+ }
+ function &getNonGroupedBlocks($module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->getNonGroupedBlocks($module_id, $toponlyblock, $visible, $orderby, $isactive);
+ return $ret;
+ }
+ function countSimilarBlocks($moduleId, $funcNum, $showFunc = null)
+ {
+ $handler =& xoops_gethandler('block');
+ $ret =& $handler->countSimilarBlocks($moduleId, $funcNum, $showFunc);
+ return $ret;
+ }
}
@@ -206,7 +370,7 @@
*/
function &createByInfo($info)
{
- $block=&$this->create();
+ $block =& $this->create();
$options=isset($info['options']) ? $info['options'] : null;
$edit_func=isset($info['edit_func']) ? $info['edit_func'] : null;
@@ -342,7 +506,7 @@
return $ret;
}
while ($myrow = $this->db->fetchArray($result)) {
- $block = new XoopsBlock();
+ $block =& $this->create(false);
$block->assignVars($myrow);
if (!$id_as_key) {
$ret[] =& $block;
@@ -370,7 +534,7 @@
}
while ($row = $this->db->fetchArray($result)) {
- $block = new XoopsBlock();
+ $block =& $this->create(false);
$block->assignVars($row);
$ret[] =& $block;
@@ -398,5 +562,339 @@
}
return $ret;
}
+
+ /**
+ * get all the blocks that match the supplied parameters
+ * @param $side 0: sideblock - left
+ * 1: sideblock - right
+ * 2: sideblock - left and right
+ * 3: centerblock - left
+ * 4: centerblock - right
+ * 5: centerblock - center
+ * 6: centerblock - left, right, center
+ * @param $groupid groupid (can be an array)
+ * @param $visible 0: not visible 1: visible
+ * @param $orderby order of the blocks
+ * @returns array of block objects
+ */
+ function &getAllBlocksByGroup($groupid, $asobject=true, $side=null, $visible=null, $orderby="b.weight,b.bid", $isactive=1)
+ {
+ $ret = array();
+ if ( !$asobject ) {
+ $sql = "SELECT b.bid ";
+ } else {
+ $sql = "SELECT b.* ";
+ }
+ $sql .= "FROM ".$this->db->prefix("newblocks")." b LEFT JOIN ".$this->db->prefix("group_permission")." l ON l.gperm_itemid=b.bid WHERE gperm_name = 'block_read' AND gperm_modid = 1";
+ if ( is_array($groupid) ) {
+ $sql .= " AND (l.gperm_groupid=".intval($groupid[0])."";
+ $size = count($groupid);
+ if ( $size > 1 ) {
+ for ( $i = 1; $i < $size; $i++ ) {
+ $sql .= " OR l.gperm_groupid=".intval($groupid[$i])."";
+ }
+ }
+ $sql .= ")";
+ } else {
+ $sql .= " AND l.gperm_groupid=".intval($groupid)."";
+ }
+ $sql .= " AND b.isactive=".intval($isactive);
+ if ( isset($side) ) {
+ $side = intval($side);
+ // get both sides in sidebox? (some themes need this)
+ if ( $side == XOOPS_SIDEBLOCK_BOTH ) {
+ $side = "(b.side=0 OR b.side=1)";
+ } elseif ( $side == XOOPS_CENTERBLOCK_ALL ) {
+ $side = "(b.side=3 OR b.side=4 OR b.side=5)";
+ } else {
+ $side = "b.side=".$side;
+ }
+ $sql .= " AND ".$side;
+ }
+ if ( isset($visible) ) {
+ $sql .= " AND b.visible=".intval($visible);
+ }
+ $sql .= " ORDER BY ".addslashes($orderby);
+ $result = $this->db->query($sql);
+ $added = array();
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ if ( !in_array($myrow['bid'], $added) ) {
+ if (!$asobject) {
+ $ret[] = $myrow['bid'];
+ } else {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[] =& $block;
+ }
+ array_push($added, $myrow['bid']);
+ }
+ }
+ return $ret;
+ }
+ function &getAllBlocks($rettype="object", $side=null, $visible=null, $orderby="side,weight,bid", $isactive=1)
+ {
+ $ret = array();
+ $where_query = " WHERE isactive=".intval($isactive);
+ if ( isset($side) ) {
+ $side = intval($side);
+ // get both sides in sidebox? (some themes need this)
+ if ( $side == 2 ) {
+ $side = "(side=0 OR side=1)";
+ } elseif ( $side == 6 ) {
+ $side = "(side=3 OR side=4 OR side=5)";
+ } else {
+ $side = "side=".$side;
+ }
+ $where_query .= " AND ".$side;
+ }
+ if ( isset($visible) ) {
+ $visible = intval($visible);
+ $where_query .= " AND visible=$visible";
+ }
+ $where_query .= " ORDER BY ".addslashes($orderby);
+ switch ($rettype) {
+ case "object":
+ $sql = "SELECT * FROM ".$this->db->prefix("newblocks")."".$where_query;
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[] =& $block;
+ }
+ break;
+ case "list":
+ $sql = "SELECT * FROM ".$this->db->prefix("newblocks")."".$where_query;
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $name = ($block->getVar("block_type") != "C") ? $block->getVar("name") : $block->getVar("title");
+ $ret[$block->getVar("bid")] = $name;
+ unset($block);
+ }
+ break;
+ case "id":
+ $sql = "SELECT bid FROM ".$this->db->prefix("newblocks")."".$where_query;
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $ret[] = $myrow['bid'];
+ }
+ break;
+ }
+ //echo $sql;
+ return $ret;
+ }
+
+ function &getByModule($moduleid, $asobject=true)
+ {
+ $moduleid = intval($moduleid);
+ if ( $asobject == true ) {
+ $sql = $sql = "SELECT * FROM ".$this->db->prefix("newblocks")." WHERE mid=".$moduleid."";
+ } else {
+ $sql = "SELECT bid FROM ".$this->db->prefix("newblocks")." WHERE mid=".$moduleid."";
+ }
+ $result = $this->db->query($sql);
+ $ret = array();
+ while( $myrow = $this->db->fetchArray($result) ) {
+ if ( $asobject ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[] =& $block;
+ } else {
+ $ret[] = $myrow['bid'];
+ }
+ }
+ return $ret;
+ }
+
+ function &getAllByGroupModule($groupid, $module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
+ {
+ $ret = array();
+ $sql = "SELECT DISTINCT gperm_itemid FROM ".$this->db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
+ if ( is_array($groupid) ) {
+ $sql .= ' AND gperm_groupid IN ('.addslashes(implode(',', $groupid)).')';
+ } else {
+ if (intval($groupid) > 0) {
+ $sql .= ' AND gperm_groupid='.intval($groupid);
+ }
+ }
+ $result = $this->db->query($sql);
+ $blockids = array();
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $blockids[] = $myrow['gperm_itemid'];
+ }
+ if (!empty($blockids)) {
+ $sql = 'SELECT b.* FROM '.$this->db->prefix('newblocks').' b, '.$this->db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
+ $sql .= ' AND b.isactive='.$isactive;
+ if (isset($visible)) {
+ $sql .= ' AND b.visible='.intval($visible);
+ }
+ if ($module_id !== false) {
+ $sql .= ' AND m.module_id IN (0,'.intval($module_id);
+ if ($toponlyblock) {
+ $sql .= ',-1';
+ }
+ $sql .= ')';
+ } else {
+ if ($toponlyblock) {
+ $sql .= ' AND m.module_id IN (0,-1)';
+ } else {
+ $sql .= ' AND m.module_id=0';
+ }
+ }
+ $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
+ $sql .= ' ORDER BY '.$orderby;
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[$myrow['bid']] =& $block;
+ unset($block);
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Return block instance array by $groupid, $mid and $blockFlag.
+ * This function is new function of Cube and used from controller.
+ * @author minahito
+ */
+ function &getBlocks($groupid, $mid=false, $blockFlag=SHOW_BLOCK_ALL, $orderby='b.weight,b.bid')
+ {
+ $root =& XCube_Root::getSingleton();
+ $this->db =& $root->mController->getDB();
+
+ $ret = array();
+ $sql = "SELECT DISTINCT gperm_itemid FROM ".$this->db->prefix('group_permission')." WHERE gperm_name = 'block_read' AND gperm_modid = 1";
+ if ( is_array($groupid) ) {
+ $sql .= ' AND gperm_groupid IN ('.addslashes(implode(',', $groupid)).')';
+ } else {
+ if (intval($groupid) > 0) {
+ $sql .= ' AND gperm_groupid='.intval($groupid);
+ }
+ }
+ $result = $this->db->query($sql);
+ $blockids = array();
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $blockids[] = $myrow['gperm_itemid'];
+ }
+ if (!empty($blockids)) {
+ $sql = 'SELECT b.* FROM '.$this->db->prefix('newblocks').' b, '.$this->db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
+ $sql .= ' AND b.isactive=1 AND b.visible=1 ';
+ if ($mid !== false && $mid !== 0) {
+ $sql .= ' AND m.module_id IN (0,'.intval($mid).')';
+ } else {
+ $sql .= ' AND m.module_id=0';
+ }
+
+ //
+ // SIDE
+ //
+ if ($blockFlag != SHOW_BLOCK_ALL) {
+ $arr = array();
+ if ($blockFlag & SHOW_SIDEBLOCK_LEFT) {
+ $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_SIDEBLOCK_LEFT];
+ }
+ if ($blockFlag & SHOW_SIDEBLOCK_RIGHT) {
+ $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_SIDEBLOCK_RIGHT];
+ }
+ if ($blockFlag & SHOW_CENTERBLOCK_LEFT) {
+ $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_LEFT];
+ }
+ if ($blockFlag & SHOW_CENTERBLOCK_CENTER) {
+ $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_CENTER];
+ }
+ if ($blockFlag & SHOW_CENTERBLOCK_RIGHT) {
+ $arr[] = "b.side=" . $this->mBlockFlagMapping[SHOW_CENTERBLOCK_RIGHT];
+ }
+
+ $sql .= " AND (" . implode(" OR ", $arr) . ")";
+ }
+
+ $sql .= ' AND b.bid IN ('.implode(',', $blockids).')';
+ $sql .= ' ORDER BY '.addslashes($orderby);
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[$myrow['bid']] =& $block;
+ unset($block);
+ }
+ }
+ return $ret;
+ }
+
+ function &getNonGroupedBlocks($module_id=0, $toponlyblock=false, $visible=null, $orderby='b.weight,b.bid', $isactive=1)
+ {
+ $ret = array();
+ $bids = array();
+ $sql = "SELECT DISTINCT(bid) from ".$this->db->prefix('newblocks');
+ if ($result = $this->db->query($sql)) {
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $bids[] = $myrow['bid'];
+ }
+ }
+ $sql = "SELECT DISTINCT(p.gperm_itemid) from ".$this->db->prefix('group_permission')." p, ".$this->db->prefix('groups')." g WHERE g.groupid=p.gperm_groupid AND p.gperm_name='block_read'";
+ $grouped = array();
+ if ($result = $this->db->query($sql)) {
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $grouped[] = $myrow['gperm_itemid'];
+ }
+ }
+ $non_grouped = array_diff($bids, $grouped);
+ if (!empty($non_grouped)) {
+ $sql = 'SELECT b.* FROM '.$this->db->prefix('newblocks').' b, '.$this->db->prefix('block_module_link').' m WHERE m.block_id=b.bid';
+ $sql .= ' AND b.isactive='.intval($isactive);
+ if (isset($visible)) {
+ $sql .= ' AND b.visible='.intval($visible);
+ }
+ $module_id = intval($module_id);
+ if (!empty($module_id)) {
+ $sql .= ' AND m.module_id IN (0,'.$module_id;
+ if ($toponlyblock) {
+ $sql .= ',-1';
+ }
+ $sql .= ')';
+ } else {
+ if ($toponlyblock) {
+ $sql .= ' AND m.module_id IN (0,-1)';
+ } else {
+ $sql .= ' AND m.module_id=0';
+ }
+ }
+ $sql .= ' AND b.bid IN ('.implode(',', $non_grouped).')';
+ $sql .= ' ORDER BY '.addslashes($orderby);
+ $result = $this->db->query($sql);
+ while ( $myrow = $this->db->fetchArray($result) ) {
+ $block =& $this->create(false);
+ $block->assignVars($myrow);
+ $ret[$myrow['bid']] =& $block;
+ unset($block);
+ }
+ }
+ return $ret;
+ }
+
+ function countSimilarBlocks($moduleId, $funcNum, $showFunc = null)
+ {
+ $funcNum = intval($funcNum);
+ $moduleId = intval($moduleId);
+ if ($funcNum < 1 || $moduleId < 1) {
+ // invalid query
+ return 0;
+ }
+ if (isset($showFunc)) {
+ // showFunc is set for more strict comparison
+ $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d AND show_func = %s", $this->db->prefix('newblocks'), $moduleId, $funcNum, $this->db->quoteString(trim($showFunc)));
+ } else {
+ $sql = sprintf("SELECT COUNT(*) FROM %s WHERE mid = %d AND func_num = %d", $this->db->prefix('newblocks'), $moduleId, $funcNum);
+ }
+ if (!$result = $this->db->query($sql)) {
+ return 0;
+ }
+ list($count) = $this->db->fetchRow($result);
+ return $count;
+ }
}
?>
\ No newline at end of file
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:42:17 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:42:17 +0900
Subject: [xoops-cvslog 2747] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060411084217.CEA382AC0CC@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.28 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.29
--- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.28 Wed Mar 29 23:12:28 2006
+++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Tue Apr 11 17:42:17 2006
@@ -754,8 +754,6 @@
function setupBlock(&$controller)
{
- require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
-
$showFlag =0;
$mid=0;
@@ -770,14 +768,13 @@
$mid = -1;
}
+ $blockHandler =& xoops_gethandler('block');
$showCenterFlag = (SHOW_CENTERBLOCK_LEFT | SHOW_CENTERBLOCK_CENTER | SHOW_CENTERBLOCK_RIGHT);
$showRightFlag = SHOW_SIDEBLOCK_RIGHT;
$showFlag = SHOW_SIDEBLOCK_LEFT | $showRightFlag | $showCenterFlag;
$groups = is_object($controller->mXoopsUser) ? $controller->mXoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
- $xoopsblock = new XoopsBlock();
- $blockObjects=&$xoopsblock->getBlocks($groups, $mid, $showFlag);
-
+ $blockObjects=&$blockHandler->getBlocks($groups, $mid, $showFlag);
foreach($blockObjects as $blockObject) {
$controller->mBlockChain[]=new XCube_LegacyAdaptBlockProcedure($blockObject);
unset($blockObject);
@@ -851,5 +848,4 @@
}
}
-
?>
\ No newline at end of file
From nobunobu @ users.sourceforge.jp Tue Apr 11 17:42:17 2006
From: nobunobu @ users.sourceforge.jp (NobuNobu)
Date: Tue, 11 Apr 2006 17:42:17 +0900
Subject: [xoops-cvslog 2748] CVS update:
xoops2jp/html/modules/user/admin/actions
Message-ID: <20060411084217.F388F2AC0CF@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.3 xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.4
--- xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.3 Tue Mar 28 22:31:14 2006
+++ xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php Tue Apr 11 17:42:17 2006
@@ -85,9 +85,7 @@
//
// Get block list
//
- require_once XOOPS_ROOT_PATH.'/class/xoopsblock.php';
-
- $blockHandler = new XoopsBlock();
+ $blockHandler = xoops_gethandler('block');
$idx = 0;
foreach (array(0, 1, 3, 4, 5) as $side) {
From minahito @ users.sourceforge.jp Tue Apr 11 18:14:59 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:14:59 +0900
Subject: [xoops-cvslog 2749] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060411091459.184B22AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/handler.php
diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.12 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.13
--- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.12 Tue Apr 11 14:29:23 2006
+++ xoops2jp/html/modules/base/kernel/handler.php Tue Apr 11 18:14:58 2006
@@ -63,8 +63,12 @@
$sql .= " WHERE ".$where;
}
+ $sorts = array();
+ foreach ($criteria->getSorts() as $sort) {
+ $sorts[] = $sort['sort'] . ' ' . $sort['order'];
+ }
if ($criteria->getSort() != '') {
- $sql .= " ORDER BY " . $criteria->getSort() . ' ' . $criteria->getOrder();
+ $sql .= " ORDER BY " . implode(',', $sorts);
}
$limit=$criteria->getLimit();
@@ -270,11 +274,23 @@
// Render
//
$name = $criteria->getName();
- $value = null;
+ $value = $criteria->getValue();
switch ($obj->mVars[$name]['data_type']) {
+ case XOBJ_DTYPE_BOOL:
+ $value = $value ? "1" : "0";
+ break;
+
+ case XOBJ_DTYPE_INT:
+ $value = intval($value);
+ break;
+
+ case XOBJ_DTYPE_FLOAT:
+ $value = floatval($value);
+ break;
+
case XOBJ_DTYPE_STRING:
case XOBJ_DTYPE_TEXT:
- $value = $this->db->quoteString($criteria->getValue());
+ $value = $this->db->quoteString($value);
break;
default:
From minahito @ users.sourceforge.jp Tue Apr 11 18:15:46 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:15:46 +0900
Subject: [xoops-cvslog 2750] CVS update: xoops2jp/html/modules/user/admin
Message-ID: <20060411091546.56F562AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/menu.php
diff -u xoops2jp/html/modules/user/admin/menu.php:1.1.2.6 xoops2jp/html/modules/user/admin/menu.php:1.1.2.7
--- xoops2jp/html/modules/user/admin/menu.php:1.1.2.6 Sat Feb 4 16:26:18 2006
+++ xoops2jp/html/modules/user/admin/menu.php Tue Apr 11 18:15:46 2006
@@ -9,30 +9,34 @@
$adminmenu[2]['keywords'] = _MI_USER_KEYWORD_USER_LIST;
$adminmenu[2]['link'] = "admin/index.php";
-$adminmenu[3]['title'] = _MI_USER_MENU_CREATE_RANK;
-$adminmenu[3]['link'] = "admin/index.php?action=RanksEdit";
-$adminmenu[3]['keywords'] = _MI_USER_KEYWORD_CREATE_RANK;
-$adminmenu[3]['show'] = false;
+$adminmenu[3]['title'] = _MI_USER_ADMENU_USER_SEARCH;
+$adminmenu[3]['keywords'] = _MI_USER_KEYWORD_USER_SEARCH;
+$adminmenu[3]['link'] = "admin/index.php?action=UserSearch";
+
+$adminmenu[4]['title'] = _MI_USER_MENU_CREATE_RANK;
+$adminmenu[4]['link'] = "admin/index.php?action=RanksEdit";
+$adminmenu[4]['keywords'] = _MI_USER_KEYWORD_CREATE_RANK;
+$adminmenu[4]['show'] = false;
-$adminmenu[4]['title'] = _MI_USER_ADMENU_RANK_LIST;
-$adminmenu[4]['link'] = "admin/index.php?action=RanksList";
-
-$adminmenu[5]['title'] = _MI_USER_MENU_CREATE_GROUP;
+$adminmenu[5]['title'] = _MI_USER_ADMENU_RANK_LIST;
$adminmenu[5]['link'] = "admin/index.php?action=RanksList";
-$adminmenu[5]['keywords'] = _MI_USER_KEYWORD_CREATE_GROUP;
-$adminmenu[5]['show'] = false;
-$adminmenu[6]['title'] = _MI_USER_ADMENU_GROUP_LIST;
-$adminmenu[6]['keywords'] = _MI_USER_KEYWORD_GROUP_LIST;
-$adminmenu[6]['link'] = "admin/index.php?action=GroupList";
-
-$adminmenu[7]['title'] = _MI_USER_MENU_CREATE_AVATAR;
-$adminmenu[7]['link'] = "admin/index.php?action=AvatarEdit";
-$adminmenu[7]['keywords'] = _MI_USER_KEYWORD_CREATE_AVATAR;
-$adminmenu[7]['show'] = false;
-
-$adminmenu[8]['title'] = _MI_USER_ADMENU_AVATAR_MANAGE;
-$adminmenu[8]['keywords'] = _MI_USER_KEYWORD_AVATAR_MANAGE;
-$adminmenu[8]['link'] = "admin/index.php?action=AvatarList";
+$adminmenu[6]['title'] = _MI_USER_MENU_CREATE_GROUP;
+$adminmenu[6]['link'] = "admin/index.php?action=RanksList";
+$adminmenu[6]['keywords'] = _MI_USER_KEYWORD_CREATE_GROUP;
+$adminmenu[6]['show'] = false;
+
+$adminmenu[7]['title'] = _MI_USER_ADMENU_GROUP_LIST;
+$adminmenu[7]['keywords'] = _MI_USER_KEYWORD_GROUP_LIST;
+$adminmenu[7]['link'] = "admin/index.php?action=GroupList";
+
+$adminmenu[8]['title'] = _MI_USER_MENU_CREATE_AVATAR;
+$adminmenu[8]['link'] = "admin/index.php?action=AvatarEdit";
+$adminmenu[8]['keywords'] = _MI_USER_KEYWORD_CREATE_AVATAR;
+$adminmenu[8]['show'] = false;
+
+$adminmenu[9]['title'] = _MI_USER_ADMENU_AVATAR_MANAGE;
+$adminmenu[9]['keywords'] = _MI_USER_KEYWORD_AVATAR_MANAGE;
+$adminmenu[9]['link'] = "admin/index.php?action=AvatarList";
?>
\ No newline at end of file
From minahito @ users.sourceforge.jp Tue Apr 11 18:16:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:16:07 +0900
Subject: [xoops-cvslog 2751] CVS update: xoops2jp/html/modules/user/admin/.xml
Message-ID: <20060411091607.61A322AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/.xml/user_search.xml
diff -u /dev/null xoops2jp/html/modules/user/admin/.xml/user_search.xml:1.1.2.1
--- /dev/null Tue Apr 11 18:16:07 2006
+++ xoops2jp/html/modules/user/admin/.xml/user_search.xml Tue Apr 11 18:16:07 2006
@@ -0,0 +1,152 @@
+
+
<{$smarty.const._AD_USER_LANG_USER_SEARCH_LIST}>+ + + +
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Tue Apr 11 18:17:07 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:17:07 +0900
Subject: [xoops-cvslog 2755] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060411091707.9A00A2AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/PageNavigator.class.php
diff -u xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.2 xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.3
--- xoops2jp/html/modules/user/class/PageNavigator.class.php:1.1.2.2 Tue Mar 28 22:32:03 2006
+++ xoops2jp/html/modules/user/class/PageNavigator.class.php Tue Apr 11 18:17:07 2006
@@ -32,6 +32,45 @@
return $ret;
}
+
+ /**
+ * Render URL with replacing base url. This method is used to user search list.
+ *
+ * @param $url string
+ * @param $mask mixed
+ */
+ function getRenderOtherUrl($url, $mask = null)
+ {
+ if ($mask == null) {
+ $mask = array();
+ }
+ if (!is_array($mask)) {
+ $mask = array($mask);
+ }
+
+ if(count($this->mExtra) > 0) {
+ $tarr=array();
+
+ foreach($this->mExtra as $key=>$value) {
+ if (is_array($mask) && !isset($mask[$key])) {
+ $tarr[]=$key."=".urlencode($value);
+ }
+ }
+
+ if (count($tarr)==0) {
+ return $url;
+ }
+
+ if(strpos($url,"?")!==false) {
+ return $url."&".implode("&",$tarr);
+ }
+ else {
+ return $url."?".implode("&",$tarr);
+ }
+ }
+
+ return $url;
+ }
}
?>
From minahito @ users.sourceforge.jp Tue Apr 11 18:17:24 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:17:24 +0900
Subject: [xoops-cvslog 2756] CVS update:
xoops2jp/html/modules/user/language/english
Message-ID: <20060411091724.077C12AC032@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.12 xoops2jp/html/modules/user/language/english/admin.php:1.1.2.13
--- xoops2jp/html/modules/user/language/english/admin.php:1.1.2.12 Wed Apr 5 17:40:57 2006
+++ xoops2jp/html/modules/user/language/english/admin.php Tue Apr 11 18:17:23 2006
@@ -7,6 +7,7 @@
define('_AD_USER_ERROR_INJURY', "The specified value {0} is wrong.");
define('_AD_USER_ERROR_INJURY_MIN_MAX', "Relationship between minimum value and maximum value is wrong.");
define('_AD_USER_ERROR_INJURY_SPECIAL', "Value of the special rank is wrong.");
+define('_AD_USER_ERROR_INTRANGE', "intRange");
define('_AD_USER_ERROR_MAXLENGTH', "Input {0} with {1} or less characters.");
define('_AD_USER_ERROR_MIN', "Input {0} with {1} or more characters.");
define('_AD_USER_ERROR_NO_UPLOAD_FILE', "Upload a image file for this rank.");
@@ -19,6 +20,9 @@
define('_AD_USER_ERROR_UNAME_NO_UNIQUE', "Username has been taken.");
define('_AD_USER_ERROR_WRONG_FORMAT', "Your format is invalid.");
define('_AD_USER_LANG_ACTIVEUSER', "Active user");
+define('_AD_USER_LANG_ACTKEY', "actkey");
+define('_AD_USER_LANG_ALL_OF_USERS', "All of users");
+define('_AD_USER_LANG_APPROVE_USERS_ONLY', "Approve users only");
define('_AD_USER_LANG_ATTACHSIG', "Always attach my signature");
define('_AD_USER_LANG_AVATAR_CREATED', "Created");
define('_AD_USER_LANG_AVATAR_DELETE', "Delete avatar");
@@ -40,6 +44,8 @@
define('_AD_USER_LANG_CREATE_NEW', "Create new");
define('_AD_USER_LANG_CUSTOM_AVATAR', "Custom avatar");
define('_AD_USER_LANG_DELETE_RANK', "Delete a rank");
+define('_AD_USER_LANG_DISPLAY_USER_LEVEL', "Display user level");
+define('_AD_USER_LANG_DISPLAY_USER_MAIL_CONDITION', "Display user mail condition");
define('_AD_USER_LANG_EDIT', "Edit");
define('_AD_USER_LANG_EMAIL', "Email address");
define('_AD_USER_LANG_GROUP', "Group");
@@ -61,9 +67,14 @@
define('_AD_USER_LANG_GROUP_TYPE', "Type");
define('_AD_USER_LANG_GROUPID', "Group ID");
define('_AD_USER_LANG_ID', "ID");
+define('_AD_USER_LANG_LAST_LOGIN', "last login");
+define('_AD_USER_LANG_LASTLOG_LESS', "Lastlog less");
+define('_AD_USER_LANG_LASTLOG_MORE', "Lastlog more");
define('_AD_USER_LANG_LASTLOGIN', "Last login");
define('_AD_USER_LANG_LASTLOGIN_FLAG', "Last Login Flag");
define('_AD_USER_LANG_LEVEL', "Level");
+define('_AD_USER_LANG_MAIL_NG_USERS_ONLY', "Mail NG users only");
+define('_AD_USER_LANG_MAIL_OK_USERS_ONLY', "Mail OK users only");
define('_AD_USER_LANG_MAILOK', "Receive occasional email notices from administrators and moderators?");
define('_AD_USER_LANG_NAME', "Real name");
define('_AD_USER_LANG_NO_SPECIAL_RANK', "--------------");
@@ -71,7 +82,9 @@
define('_AD_USER_LANG_NOTIFY_MODE', "Default Notification Mode");
define('_AD_USER_LANG_OFF', "Off");
define('_AD_USER_LANG_ON', "On");
+define('_AD_USER_LANG_OVER_POSTS', "over posts");
define('_AD_USER_LANG_PASS', "Password");
+define('_AD_USER_LANG_PENDING_USERS_ONLY', "Pending users only");
define('_AD_USER_LANG_PERM_ACCESS', "Access");
define('_AD_USER_LANG_PERM_ACCESS_ADMIN', "Privilege of access control");
define('_AD_USER_LANG_PERM_ADMIN', "Administration");
@@ -92,19 +105,25 @@
define('_AD_USER_LANG_RANK_SPECIAL', "Special rank");
define('_AD_USER_LANG_RANK_TITLE', "Title");
define('_AD_USER_LANG_REGDATE', "Registered date");
+define('_AD_USER_LANG_REGDATE_LESS', "Regdate less");
+define('_AD_USER_LANG_REGDATE_MORE', "Regdate more");
define('_AD_USER_LANG_REGISTDATE', "Registered date");
define('_AD_USER_LANG_REGISTDATE_FLAG', "Registered date flag");
+define('_AD_USER_LANG_SEARCH_AGAIN', "Search again");
define('_AD_USER_LANG_SENDER', "Sender");
define('_AD_USER_LANG_SUBJECT', "Subject");
define('_AD_USER_LANG_SUBMIT', "Submit");
define('_AD_USER_LANG_SYSTEM_AVATAR', "System avatar");
+define('_AD_USER_LANG_THEME', "theme");
define('_AD_USER_LANG_TIMEZONE_OFFSET', "TimeZone");
define('_AD_USER_LANG_UID', "UID");
define('_AD_USER_LANG_UMODE', "Comments Display Mode");
define('_AD_USER_LANG_UNAME', "User name");
+define('_AD_USER_LANG_UNDER_POSTS', "under posts");
define('_AD_USER_LANG_UORDER', "Comments Sort Order");
define('_AD_USER_LANG_URL', "Website");
define('_AD_USER_LANG_USER_AIM', "AIM");
+define('_AD_USER_LANG_USER_AVATAR', "user avatar");
define('_AD_USER_LANG_USER_DELETE', "Delete a user");
define('_AD_USER_LANG_USER_DELETE_ADVICE', "Delete ");
define('_AD_USER_LANG_USER_EDIT', "Edit a user");
@@ -116,6 +135,8 @@
define('_AD_USER_LANG_USER_MSNM', "MSNM");
define('_AD_USER_LANG_USER_NEW', "Add a new user");
define('_AD_USER_LANG_USER_OCC', "Occupation");
+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_VIEWEMAIL', "Allow other users to view my email address.");
define('_AD_USER_LANG_USER_YIM', "YIM");
Index: xoops2jp/html/modules/user/language/english/modinfo.php
diff -u xoops2jp/html/modules/user/language/english/modinfo.php:1.1.2.9 xoops2jp/html/modules/user/language/english/modinfo.php:1.1.2.10
--- xoops2jp/html/modules/user/language/english/modinfo.php:1.1.2.9 Sat Mar 25 23:26:11 2006
+++ xoops2jp/html/modules/user/language/english/modinfo.php Tue Apr 11 18:17:23 2006
@@ -7,6 +7,15 @@
define('_MI_USER_ADMENU_NEW_RANK', "Add a New Rank");
define('_MI_USER_ADMENU_RANK_LIST', "User Rank Manager");
define('_MI_USER_ADMENU_SEARCH', "Find a User");
+define('_MI_USER_ADMENU_USER_SEARCH', "User search");
+define('_MI_USER_BLOCK_LOGIN_DESC', "Shows login form");
+define('_MI_USER_BLOCK_LOGIN_NAME', "Login");
+define('_MI_USER_BLOCK_NEWUSERS_DESC', "Shows most recent users");
+define('_MI_USER_BLOCK_NEWUSERS_NAME', "New Members");
+define('_MI_USER_BLOCK_ONLINE_DESC', "Displays users/guests currently online");
+define('_MI_USER_BLOCK_ONLINE_NAME', "Who's Online");
+define('_MI_USER_BLOCK_TOPUSERS_DESC', "Top posters");
+define('_MI_USER_BLOCK_TOPUSERS_NAME', "Top Posters");
define('_MI_USER_CONF_ACTV_ADMIN', "User conf actv admin");
define('_MI_USER_CONF_ACTV_AUTO', "Activate automatically");
define('_MI_USER_CONF_ACTV_GROUP', "Select a group to which activation mail will be sent");
@@ -47,6 +56,7 @@
define('_MI_USER_KEYWORD_CREATE_USER', "Create user");
define('_MI_USER_KEYWORD_GROUP_LIST', "list edit modify delete user permission add remove member");
define('_MI_USER_KEYWORD_USER_LIST', "user list");
+define('_MI_USER_KEYWORD_USER_SEARCH', "User search");
define('_MI_USER_MENU_CREATE_AVATAR', "Create avatar");
define('_MI_USER_MENU_CREATE_GROUP', "Create group");
define('_MI_USER_MENU_CREATE_RANK', "user rank create new");
@@ -54,12 +64,4 @@
define('_MI_USER_NAME', "User module");
define('_MI_USER_NAME_DESC', "This module manages user account.");
-define('_MI_USER_BLOCK_LOGIN_NAME', "Login");
-define('_MI_USER_BLOCK_LOGIN_DESC', "Shows login form");
-define('_MI_USER_BLOCK_ONLINE_NAME', "Who's Online");
-define('_MI_USER_BLOCK_ONLINE_DESC', "Displays users/guests currently online");
-define('_MI_USER_BLOCK_NEWUSERS_NAME', "New Members");
-define('_MI_USER_BLOCK_NEWUSERS_DESC', "Shows most recent users");
-define('_MI_USER_BLOCK_TOPUSERS_NAME', "Top Posters");
-define('_MI_USER_BLOCK_TOPUSERS_DESC', "Top posters");
?>
From minahito @ users.sourceforge.jp Tue Apr 11 18:17:24 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:17:24 +0900
Subject: [xoops-cvslog 2757] CVS update:
xoops2jp/html/modules/user/language/japanese
Message-ID: <20060411091724.356442AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/language/japanese/modinfo.php
diff -u xoops2jp/html/modules/user/language/japanese/modinfo.php:1.1.2.12 xoops2jp/html/modules/user/language/japanese/modinfo.php:1.1.2.13
--- xoops2jp/html/modules/user/language/japanese/modinfo.php:1.1.2.12 Fri Mar 24 22:04:24 2006
+++ xoops2jp/html/modules/user/language/japanese/modinfo.php Tue Apr 11 18:17:24 2006
@@ -7,6 +7,15 @@
define('_MI_USER_ADMENU_NEW_RANK', "ユーザーランク新規登録");
define('_MI_USER_ADMENU_RANK_LIST', "ユーザーランク管理");
define('_MI_USER_ADMENU_SEARCH', "ユーザー検索");
+define('_MI_USER_ADMENU_USER_SEARCH', "ユーザー検索");
+define('_MI_USER_BLOCK_LOGIN_DESC', "ログインフォームを表示します");
+define('_MI_USER_BLOCK_LOGIN_NAME', "ログイン");
+define('_MI_USER_BLOCK_NEWUSERS_DESC', "新しい登録ユーザの一覧を表示します");
+define('_MI_USER_BLOCK_NEWUSERS_NAME', "新しい登録ユーザ");
+define('_MI_USER_BLOCK_ONLINE_DESC', "オンライン状況を表示します");
+define('_MI_USER_BLOCK_ONLINE_NAME', "オンライン状況");
+define('_MI_USER_BLOCK_TOPUSERS_DESC', "投稿数のランキングを表示します");
+define('_MI_USER_BLOCK_TOPUSERS_NAME', "投稿数ランキング");
define('_MI_USER_CONF_ACTV_ADMIN', "管理者が確認してアカウントを有効にする");
define('_MI_USER_CONF_ACTV_AUTO', "自動的にアカウントを有効にする");
define('_MI_USER_CONF_ACTV_GROUP', "アカウント有効化依頼のメールの送信先グループ");
@@ -47,6 +56,7 @@
define('_MI_USER_KEYWORD_CREATE_USER', "新規登録");
define('_MI_USER_KEYWORD_GROUP_LIST', "グループ 一覧 リスト 編集 変更 削除 ユーザー ユーザグループ 権限 パーミッション 追加 メンバー");
define('_MI_USER_KEYWORD_USER_LIST', "一覧 リスト 編集 変更 削除");
+define('_MI_USER_KEYWORD_USER_SEARCH', "User search");
define('_MI_USER_MENU_CREATE_AVATAR', "アバターの新規作成");
define('_MI_USER_MENU_CREATE_GROUP', "グループの新規作成");
define('_MI_USER_MENU_CREATE_RANK', "ランクの新規作成");
@@ -54,12 +64,4 @@
define('_MI_USER_NAME', "ユーザーモジュール");
define('_MI_USER_NAME_DESC', "ユーザーアカウントに関する処理を行う基盤モジュール");
-define('_MI_USER_BLOCK_LOGIN_NAME', "ログイン");
-define('_MI_USER_BLOCK_LOGIN_DESC', "ログインフォームを表示します");
-define('_MI_USER_BLOCK_ONLINE_NAME', "オンライン状況");
-define('_MI_USER_BLOCK_ONLINE_DESC', "オンライン状況を表示します");
-define('_MI_USER_BLOCK_NEWUSERS_NAME', "新しい登録ユーザ");
-define('_MI_USER_BLOCK_NEWUSERS_DESC', "新しい登録ユーザの一覧を表示します");
-define('_MI_USER_BLOCK_TOPUSERS_NAME', "投稿数ランキング");
-define('_MI_USER_BLOCK_TOPUSERS_DESC', "投稿数のランキングを表示します");
?>
Index: xoops2jp/html/modules/user/language/japanese/admin.php
diff -u xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.21 xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.22
--- xoops2jp/html/modules/user/language/japanese/admin.php:1.1.2.21 Wed Apr 5 17:40:57 2006
+++ xoops2jp/html/modules/user/language/japanese/admin.php Tue Apr 11 18:17:24 2006
@@ -7,6 +7,7 @@
define('_AD_USER_ERROR_INJURY', "{0}に指定された値が不正です");
define('_AD_USER_ERROR_INJURY_MIN_MAX', "最低値と最高値の関係が不正です");
define('_AD_USER_ERROR_INJURY_SPECIAL', "特別ランクの値が不正です");
+define('_AD_USER_ERROR_INTRANGE', "{0}の入力値が不正です");
define('_AD_USER_ERROR_MAXLENGTH', "{0}は最大半角{1}文字以内で入力して下さい");
define('_AD_USER_ERROR_MIN', "{0}は最低でも{1}以上の値を入力して下さい");
define('_AD_USER_ERROR_NO_UPLOAD_FILE', "このランクのための画像ファイルをアップロードして下さい");
@@ -19,6 +20,9 @@
define('_AD_USER_ERROR_UNAME_NO_UNIQUE', "ユーザー名が重複しています。変更して下さい。");
define('_AD_USER_ERROR_WRONG_FORMAT', "不正なフォーマットです");
define('_AD_USER_LANG_ACTIVEUSER', "アクティブユーザー");
+define('_AD_USER_LANG_ACTKEY', "actkey");
+define('_AD_USER_LANG_ALL_OF_USERS', "すべてのユーザー");
+define('_AD_USER_LANG_APPROVE_USERS_ONLY', "承認済みユーザーのみ");
define('_AD_USER_LANG_ATTACHSIG', "投稿に署名を必ず追加する");
define('_AD_USER_LANG_AVATAR_CREATED', "作成日時");
define('_AD_USER_LANG_AVATAR_DELETE', "アバター削除");
@@ -40,6 +44,8 @@
define('_AD_USER_LANG_CREATE_NEW', "新規作成");
define('_AD_USER_LANG_CUSTOM_AVATAR', "カスタムアバター");
define('_AD_USER_LANG_DELETE_RANK', "ユーザーランクの削除");
+define('_AD_USER_LANG_DISPLAY_USER_LEVEL', "表示するユーザの種類");
+define('_AD_USER_LANG_DISPLAY_USER_MAIL_CONDITION', "表示するユーザのメール設定");
define('_AD_USER_LANG_EDIT', "編集");
define('_AD_USER_LANG_EMAIL', "メールアドレス");
define('_AD_USER_LANG_GROUP', "グループ");
@@ -61,9 +67,14 @@
define('_AD_USER_LANG_GROUP_TYPE', "タイプ");
define('_AD_USER_LANG_GROUPID', "グループID");
define('_AD_USER_LANG_ID', "ID");
+define('_AD_USER_LANG_LAST_LOGIN', "last login");
+define('_AD_USER_LANG_LASTLOG_LESS', "X日以内にログインしている");
+define('_AD_USER_LANG_LASTLOG_MORE', "X日以上ログインしていない");
define('_AD_USER_LANG_LASTLOGIN', "最終ログイン");
define('_AD_USER_LANG_LASTLOGIN_FLAG', "Last Login Flag");
define('_AD_USER_LANG_LEVEL', "レベル");
+define('_AD_USER_LANG_MAIL_NG_USERS_ONLY', "メール受信NGのユーザのみ");
+define('_AD_USER_LANG_MAIL_OK_USERS_ONLY', "メール受信OKのユーザのみ");
define('_AD_USER_LANG_MAILOK', "当サイトの新着情報などをメールで受け取る");
define('_AD_USER_LANG_NAME', "本名");
define('_AD_USER_LANG_NO_SPECIAL_RANK', "--------------");
@@ -71,7 +82,9 @@
define('_AD_USER_LANG_NOTIFY_MODE', "イベント通知のタイミング");
define('_AD_USER_LANG_OFF', "オフ");
define('_AD_USER_LANG_ON', "オン");
+define('_AD_USER_LANG_OVER_POSTS', "投稿数がX件以上");
define('_AD_USER_LANG_PASS', "パスワード");
+define('_AD_USER_LANG_PENDING_USERS_ONLY', "Pending users only");
define('_AD_USER_LANG_PERM_ACCESS', "アクセス");
define('_AD_USER_LANG_PERM_ACCESS_ADMIN', "アクセス管理権限");
define('_AD_USER_LANG_PERM_ADMIN', "管理");
@@ -92,19 +105,25 @@
define('_AD_USER_LANG_RANK_SPECIAL', "特別ランク");
define('_AD_USER_LANG_RANK_TITLE', "ランク名");
define('_AD_USER_LANG_REGDATE', "登録日");
+define('_AD_USER_LANG_REGDATE_LESS', "ユーザ登録日時がX日以内");
+define('_AD_USER_LANG_REGDATE_MORE', "ユーザ登録日時がX日以上前");
define('_AD_USER_LANG_REGISTDATE', "登録日時");
define('_AD_USER_LANG_REGISTDATE_FLAG', "registdate_flag");
+define('_AD_USER_LANG_SEARCH_AGAIN', "条件を修正して再検索");
define('_AD_USER_LANG_SENDER', "送信者");
define('_AD_USER_LANG_SUBJECT', "件名");
define('_AD_USER_LANG_SUBMIT', "送信");
define('_AD_USER_LANG_SYSTEM_AVATAR', "システムアバター");
+define('_AD_USER_LANG_THEME', "theme");
define('_AD_USER_LANG_TIMEZONE_OFFSET', "タイムゾーン");
define('_AD_USER_LANG_UID', "UID");
define('_AD_USER_LANG_UMODE', "コメント表示モード");
define('_AD_USER_LANG_UNAME', "ユーザー名");
+define('_AD_USER_LANG_UNDER_POSTS', "投稿数がX件以下");
define('_AD_USER_LANG_UORDER', "コメントの並び順");
define('_AD_USER_LANG_URL', "ホームページ");
define('_AD_USER_LANG_USER_AIM', "AIM");
+define('_AD_USER_LANG_USER_AVATAR', "user avatar");
define('_AD_USER_LANG_USER_DELETE', "ユーザーの削除");
define('_AD_USER_LANG_USER_DELETE_ADVICE', "_%s_ のユーザーを削除します。よろしいですか?");
define('_AD_USER_LANG_USER_EDIT', "ユーザーの編集");
@@ -116,6 +135,8 @@
define('_AD_USER_LANG_USER_MSNM', "MSNM");
define('_AD_USER_LANG_USER_NEW', "ユーザー新規登録");
define('_AD_USER_LANG_USER_OCC', "職業");
+define('_AD_USER_LANG_USER_REGDATE', "user regdate");
+define('_AD_USER_LANG_USER_SEARCH_LIST', "ユーザー検索結果");
define('_AD_USER_LANG_USER_SIG', "署名");
define('_AD_USER_LANG_USER_VIEWEMAIL', "このメールアドレスを公開する");
define('_AD_USER_LANG_USER_YIM', "YIM");
From minahito @ users.sourceforge.jp Tue Apr 11 18:38:14 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:38:14 +0900
Subject: [xoops-cvslog 2758] CVS update: xoops2jp/html/modules/user/kernel
Message-ID: <20060411093814.F10642AC032@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/kernel/UserEventFunction.class.php
diff -u xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.9 xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.10
--- xoops2jp/html/modules/user/kernel/UserEventFunction.class.php:1.1.2.9 Tue Mar 28 22:32:19 2006
+++ xoops2jp/html/modules/user/kernel/UserEventFunction.class.php Tue Apr 11 18:38:14 2006
@@ -98,14 +98,21 @@
$controller->mRoot->mLanguageManager->loadModuleLanguage('user');
$memberHandler=&xoops_gethandler('member');
- $user =& $memberHandler->loginUser(addslashes($_POST['uname']),addslashes($_POST['pass']));
-
- if($user===false) {
+
+ $criteria =& new CriteriaCompo();
+ $criteria->add(new Criteria('uname', xoops_getrequest('uname')));
+ $criteria->add(new Criteria('pass', md5(xoops_getrequest('pass'))));
+
+ $userArr =& $memberHandler->getUsers($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);
From minahito @ users.sourceforge.jp Tue Apr 11 18:54:49 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:54:49 +0900
Subject: [xoops-cvslog 2759] CVS update: xoops2jp/html/modules/base/kernel
Message-ID: <20060411095449.D181D2AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/base/kernel/handler.php
diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.13 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.14
--- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.13 Tue Apr 11 18:14:58 2006
+++ xoops2jp/html/modules/base/kernel/handler.php Tue Apr 11 18:54:49 2006
@@ -275,29 +275,37 @@
//
$name = $criteria->getName();
$value = $criteria->getValue();
- switch ($obj->mVars[$name]['data_type']) {
- case XOBJ_DTYPE_BOOL:
- $value = $value ? "1" : "0";
- break;
-
- case XOBJ_DTYPE_INT:
- $value = intval($value);
- break;
-
- case XOBJ_DTYPE_FLOAT:
- $value = floatval($value);
- break;
-
- case XOBJ_DTYPE_STRING:
- case XOBJ_DTYPE_TEXT:
- $value = $this->db->quoteString($value);
- break;
+ if ($name != null && isset($obj->mVars[$name])) {
+ switch ($obj->mVars[$name]['data_type']) {
+ case XOBJ_DTYPE_BOOL:
+ $value = $value ? "1" : "0";
+ break;
- default:
- $value = $criteria->getValue();
+ case XOBJ_DTYPE_INT:
+ $value = intval($value);
+ break;
+
+ case XOBJ_DTYPE_FLOAT:
+ $value = floatval($value);
+ break;
+
+ case XOBJ_DTYPE_STRING:
+ case XOBJ_DTYPE_TEXT:
+ $value = $this->db->quoteString($value);
+ break;
+
+ default:
+ $value = $criteria->getValue();
+ }
+ }
+
+ if ($name != null) {
+ return $name . " " . $criteria->getOperator() . " " . $value;
+ }
+ else {
+ return null;
}
- $string = $name . " " . $criteria->getOperator() . " " . $value;
return $string;
}
}
From minahito @ users.sourceforge.jp Tue Apr 11 18:55:25 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 18:55:25 +0900
Subject: [xoops-cvslog 2760] CVS update: xoops2jp/html/modules/user/admin/forms
Message-ID: <20060411095525.6874C2AC03F@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.2 Tue Mar 28 22:32:04 2006
+++ xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php Tue Apr 11 18:55:25 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/user/class/AbstractFilterForm.class.php";
-define('USER_SORT_KEY_DEFAULT', 0);
define('USER_SORT_KEY_UID', 1);
define('USER_SORT_KEY_NAME', 2);
define('USER_SORT_KEY_UNAME', 3);
@@ -38,11 +37,12 @@
define('USER_SORT_KEY_USER_MAILOK', 31);
define('USER_SORT_KEY_MAXVALUE', 31);
+define('USER_SORT_KEY_DEFAULT', USER_SORT_KEY_UID);
+
class User_UserFilterForm extends User_AbstractFilterForm
{
var $mSort = 0;
var $_mSortKeys = array(
- USER_SORT_KEY_DEFAULT => 'uid',
USER_SORT_KEY_UID => 'uid',
USER_SORT_KEY_NAME => 'name',
USER_SORT_KEY_UNAME => 'uname',
@@ -79,7 +79,7 @@
function fetch()
{
- $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+ $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : USER_SORT_KEY_DEFAULT;
if ($this->mSort > USER_SORT_KEY_MAXVALUE) {
$this->mSort = USER_SORT_KEY_DEFAULT;
Index: xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php:1.1.2.2 Tue Mar 28 22:32:04 2006
+++ xoops2jp/html/modules/user/admin/forms/RanksFilterForm.class.php Tue Apr 11 18:55:25 2006
@@ -4,7 +4,6 @@
require_once XOOPS_MODULE_PATH . "/user/class/AbstractFilterForm.class.php";
-define('RANKS_SORT_KEY_DEFAULT', 0);
define('RANKS_SORT_KEY_RANK_ID', 1);
define('RANKS_SORT_KEY_RANK_TITLE', 2);
define('RANKS_SORT_KEY_RANK_MIN', 3);
@@ -13,11 +12,12 @@
define('RANKS_SORT_KEY_RANK_IMAGE', 6);
define('RANKS_SORT_KEY_MAXVALUE', 6);
+define('RANKS_SORT_KEY_DEFAULT', RANKS_SORT_KEY_RANK_ID);
+
class User_RanksFilterForm extends User_AbstractFilterForm
{
var $mSort = 0;
var $_mSortKeys = array(
- RANKS_SORT_KEY_DEFAULT => 'rank_id',
RANKS_SORT_KEY_RANK_ID => 'rank_id',
RANKS_SORT_KEY_RANK_TITLE => 'rank_title',
RANKS_SORT_KEY_RANK_MIN => 'rank_min',
@@ -29,7 +29,7 @@
function fetch()
{
- $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+ $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : RANKS_SORT_KEY_DEFAULT;
if ($this->mSort > RANKS_SORT_KEY_MAXVALUE) {
$this->mSort = RANKS_SORT_KEY_DEFAULT;
Index: xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.2 xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.3
--- xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php:1.1.2.2 Tue Mar 28 22:32:04 2006
+++ xoops2jp/html/modules/user/admin/forms/GroupFilterForm.class.php Tue Apr 11 18:55:25 2006
@@ -4,13 +4,14 @@
require_once XOOPS_MODULE_PATH . "/user/class/AbstractFilterForm.class.php";
-define('GROUP_SORT_KEY_DEFAULT', 0);
define('GROUP_SORT_KEY_GROUPID', 1);
define('GROUP_SORT_KEY_NAME', 2);
define('GROUP_SORT_KEY_DESCRIPTION', 3);
define('GROUP_SORT_KEY_GROUP_TYPE', 4);
define('GROUP_SORT_KEY_MAXVALUE', 4);
+define('GROUP_SORT_KEY_DEFAULT', GROUP_SORT_KEY_GROUPID);
+
class User_GroupFilterForm extends User_AbstractFilterForm
{
var $mSort = 0;
@@ -25,7 +26,7 @@
function fetch()
{
- $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0;
+ $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : GROUP_SORT_KEY_DEFAULT;
if ($this->mSort > GROUP_SORT_KEY_MAXVALUE) {
$this->mSort = GROUP_SORT_KEY_DEFAULT;
From minahito @ users.sourceforge.jp Tue Apr 11 19:00:35 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:00:35 +0900
Subject: [xoops-cvslog 2761] CVS update: xoops2jp/html/include
Message-ID: <20060411100035.82CA22AC03F@users.sourceforge.jp>
Index: xoops2jp/html/include/functions.php
diff -u xoops2jp/html/include/functions.php:1.2.8.10 xoops2jp/html/include/functions.php:1.2.8.11
--- xoops2jp/html/include/functions.php:1.2.8.10 Fri Feb 3 23:34:08 2006
+++ xoops2jp/html/include/functions.php Tue Apr 11 19:00:35 2006
@@ -1,5 +1,5 @@
$value) {
+ $ret[$key] = stripslashes($value);
+ }
+
+ return $ret;
+ }
}
/**
From minahito @ users.sourceforge.jp Tue Apr 11 19:03:31 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:03:31 +0900
Subject: [xoops-cvslog 2762] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060411100331.99AA52AC03F@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.3 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.4
--- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.3 Tue Mar 28 22:29:21 2006
+++ xoops2jp/html/modules/base/class/ActionFrame.class.php Tue Apr 11 19:03:31 2006
@@ -62,7 +62,7 @@
die();
}
- if (!$this->mAction->isPerm($controller, $controller->getXoopsUser())) {
+ if (!$this->mAction->hasPerm($controller, $controller->getXoopsUser())) {
if ($this->mAdminFlag) {
$controller->executeForward(XOOPS_URL . "/admin.php");
}
From minahito @ users.sourceforge.jp Tue Apr 11 19:03:38 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:03:38 +0900
Subject: [xoops-cvslog 2763] CVS update:
xoops2jp/html/modules/base/admin/actions
Message-ID: <20060411100338.B41992AC03F@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.4 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.5
--- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.4 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php Tue Apr 11 19:03:38 2006
@@ -1,6 +1,6 @@
_mDirname = xoops_getrequest('dirname');
Index: xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php
diff -u xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php:1.1.2.4 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.4 Tue Mar 28 22:28:35 2006
+++ xoops2jp/html/modules/base/admin/actions/ActSearchAction.class.php Tue Apr 11 19:03:38 2006
@@ -109,7 +109,7 @@
}
}
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
$permHandler =& xoops_gethandler('groupperm');
return $permHandler->checkRight('module_admin', -1, $xoopsUser->getGroups());
From minahito @ users.sourceforge.jp Tue Apr 11 19:03:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:03:53 +0900
Subject: [xoops-cvslog 2764] CVS update: xoops2jp/html/modules/user/actions
Message-ID: <20060411100353.762E42AC053@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/actions/AvatarEditAction.class.php
diff -u xoops2jp/html/modules/user/actions/AvatarEditAction.class.php:1.1.2.4 xoops2jp/html/modules/user/actions/AvatarEditAction.class.php:1.1.2.5
--- xoops2jp/html/modules/user/actions/AvatarEditAction.class.php:1.1.2.4 Tue Mar 28 22:31:02 2006
+++ xoops2jp/html/modules/user/actions/AvatarEditAction.class.php Tue Apr 11 19:03:53 2006
@@ -97,7 +97,7 @@
* 2) A current user has to equal the specified user, or a current user has
* to be a administrator.
*/
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
if (!is_object($this->mObject)) {
return false;
Index: xoops2jp/html/modules/user/actions/EditUserAction.class.php
diff -u xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.7 xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.8
--- xoops2jp/html/modules/user/actions/EditUserAction.class.php:1.1.2.7 Tue Mar 28 22:31:02 2006
+++ xoops2jp/html/modules/user/actions/EditUserAction.class.php Tue Apr 11 19:03:53 2006
@@ -34,7 +34,7 @@
return true;
}
- function isPerm(&$controller, &$xoopsUser, &$moduleConfig)
+ function hasPerm(&$controller, &$xoopsUser, &$moduleConfig)
{
if ($this->mObject != null) {
return ($this->mObject->get('uid') == $xoopsUser->get('uid') || $xoopsUser->isAdmin());
Index: xoops2jp/html/modules/user/actions/AvatarSelectAction.class.php
diff -u xoops2jp/html/modules/user/actions/AvatarSelectAction.class.php:1.1.2.4 xoops2jp/html/modules/user/actions/AvatarSelectAction.class.php:1.1.2.5
--- xoops2jp/html/modules/user/actions/AvatarSelectAction.class.php:1.1.2.4 Tue Mar 28 22:31:02 2006
+++ xoops2jp/html/modules/user/actions/AvatarSelectAction.class.php Tue Apr 11 19:03:53 2006
@@ -66,7 +66,7 @@
* 2) A current user has to equal the specified user, or a current user has
* to be a administrator.
*/
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
if (!is_object($this->mObject)) {
return false;
Index: xoops2jp/html/modules/user/actions/LostPassAction.class.php
diff -u xoops2jp/html/modules/user/actions/LostPassAction.class.php:1.1.2.2 xoops2jp/html/modules/user/actions/LostPassAction.class.php:1.1.2.3
--- xoops2jp/html/modules/user/actions/LostPassAction.class.php:1.1.2.2 Tue Mar 28 22:31:02 2006
+++ xoops2jp/html/modules/user/actions/LostPassAction.class.php Tue Apr 11 19:03:53 2006
@@ -20,7 +20,7 @@
return false;
}
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
return !is_object($xoopsUser);
}
From minahito @ users.sourceforge.jp Tue Apr 11 19:03:53 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:03:53 +0900
Subject: [xoops-cvslog 2765] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060411100353.9EC4A2AC062@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.4 xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.5
--- xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.4 Tue Mar 28 22:32:03 2006
+++ xoops2jp/html/modules/user/class/ActionFrame.class.php Tue Apr 11 19:03:53 2006
@@ -72,7 +72,7 @@
$this->mAction->prepare($controller, $controller->getXoopsUser(), $controller->mModuleController->mConfig);
- if (!$this->mAction->isPerm($controller, $controller->getXoopsUser(), $controller->mModuleController->mConfig)) {
+ if (!$this->mAction->hasPerm($controller, $controller->getXoopsUser(), $controller->mModuleController->mConfig)) {
//
// error
//
From minahito @ users.sourceforge.jp Tue Apr 11 19:21:09 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:21:09 +0900
Subject: [xoops-cvslog 2766] CVS update: xoops2jp/html/modules/base/class
Message-ID: <20060411102110.00F2F2AC02D@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.4 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.5
--- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.4 Tue Apr 11 19:03:31 2006
+++ xoops2jp/html/modules/base/class/ActionFrame.class.php Tue Apr 11 19:21:09 2006
@@ -112,7 +112,7 @@
$this->_mAdminFlag = $adminFlag;
}
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
if ($this->_mAdminFlag) {
$moduleHandler =& xoops_gethandler('module');
From minahito @ users.sourceforge.jp Tue Apr 11 19:21:18 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:21:18 +0900
Subject: [xoops-cvslog 2767] CVS update: xoops2jp/html/modules/user/class
Message-ID: <20060411102118.7F6F92AC02D@users.sourceforge.jp>
Index: xoops2jp/html/modules/user/class/ActionFrame.class.php
diff -u xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.5 xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.6
--- xoops2jp/html/modules/user/class/ActionFrame.class.php:1.1.2.5 Tue Apr 11 19:03:53 2006
+++ xoops2jp/html/modules/user/class/ActionFrame.class.php Tue Apr 11 19:21:18 2006
@@ -118,7 +118,7 @@
return false;
}
- function isPerm(&$controller, &$xoopsUser)
+ function hasPerm(&$controller, &$xoopsUser)
{
return true;
}
From minahito @ users.sourceforge.jp Tue Apr 11 19:27:27 2006
From: minahito @ users.sourceforge.jp (Minahito)
Date: Tue, 11 Apr 2006 19:27:27 +0900
Subject: [xoops-cvslog 2768] CVS update: xoops2jp/html/include
Message-ID: <20060411102727.59EC42AC02D@users.sourceforge.jp>
Index: xoops2jp/html/include/functions.php
diff -u xoops2jp/html/include/functions.php:1.2.8.11 xoops2jp/html/include/functions.php:1.2.8.12
--- xoops2jp/html/include/functions.php:1.2.8.11 Tue Apr 11 19:00:35 2006
+++ xoops2jp/html/include/functions.php Tue Apr 11 19:27:27 2006
@@ -1,5 +1,5 @@
Index: xoops2jp/html/class/errorhandler.php
diff -u xoops2jp/html/class/errorhandler.php:1.4 xoops2jp/html/class/errorhandler.php:1.4.6.1
--- xoops2jp/html/class/errorhandler.php:1.4 Wed Aug 3 21:39:11 2005
+++ xoops2jp/html/class/errorhandler.php Tue Apr 11 21:58:56 2006
@@ -1,5 +1,5 @@
_isFatal) {
$output .= 'This page cannot be displayed due to an internal error.'; - $output .= 'If you are the administrator of this site, please visit the Xoops Troubleshooting Page for assistance. '; + $output .= 'If you are the administrator of this site, please visit the XOOPS Cube official site for assistance. '; } if (!$this->_showErrors || empty($this->_errors)) { return $output; From nobunobu @ users.sourceforge.jp Tue Apr 11 22:00:16 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 11 Apr 2006 22:00:16 +0900 Subject: [xoops-cvslog 2770] CVS update: xoops2jp/html/class Message-ID: <20060411130016.A87E92AC05A@users.sourceforge.jp> Index: xoops2jp/html/class/snoopy.php diff -u xoops2jp/html/class/snoopy.php:1.1 xoops2jp/html/class/snoopy.php:1.1.16.1 --- xoops2jp/html/class/snoopy.php:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/html/class/snoopy.php Tue Apr 11 22:00:16 2006 @@ -31,7 +31,7 @@ Lincoln, NE 68510 The latest version of Snoopy can be obtained from: -http://snoopy.sourceforge.com +http://snoopy.sourceforge.net/ *************************************************/ @@ -45,7 +45,10 @@ var $port = 80; // port we are connecting to var $proxy_host = ""; // proxy host to use var $proxy_port = ""; // proxy port to use - var $agent = "Snoopy v1.01"; // agent we masquerade as + var $proxy_user = ""; // proxy user to use + var $proxy_pass = ""; // proxy password to use + + var $agent = "Snoopy v1.2.3"; // agent we masquerade as var $referer = ""; // referer info to pass var $cookies = array(); // array of cookies to pass // $cookies["username"]="joe"; @@ -58,7 +61,7 @@ var $maxframes = 0; // frame content depth maximum. 0 = disallow var $expandlinks = true; // expand links to fully qualified URLs. // this only applies to fetchlinks() - // or submitlinks() + // submitlinks(), and submittext() var $passcookies = true; // pass set cookies back through redirects // NOTE: this currently does not respect // dates, domains or paths. @@ -80,7 +83,11 @@ // set to 0 to disallow timeouts var $timed_out = false; // if a read operation timed out var $status = 0; // http request status - + + var $temp_dir = "/tmp"; // temporary directory that the webserver + // has permission to write to. + // under Windows, this should be C:\temp + var $curl_path = "/usr/local/bin/curl"; // Snoopy will use cURL for fetching // SSL content if a full system path to @@ -128,8 +135,12 @@ $this->user = $URI_PARTS["user"]; if (!empty($URI_PARTS["pass"])) $this->pass = $URI_PARTS["pass"]; + if (empty($URI_PARTS["query"])) + $URI_PARTS["query"] = ''; + if (empty($URI_PARTS["path"])) + $URI_PARTS["path"] = ''; - switch($URI_PARTS["scheme"]) + switch(strtolower($URI_PARTS["scheme"])) { case "http": $this->host = $URI_PARTS["host"]; @@ -191,8 +202,11 @@ return true; break; case "https": - if(!$this->curl_path || (!is_executable($this->curl_path))) + if(!$this->curl_path) return false; + if(function_exists("is_executable")) + if (!is_executable($this->curl_path)) + return false; $this->host = $URI_PARTS["host"]; if(!empty($URI_PARTS["port"])) $this->port = $URI_PARTS["port"]; @@ -257,6 +271,8 @@ Input: $URI the location to post the data $formvars the formvars to use. format: $formvars["var"] = "val"; + $formfiles an array of files to submit + format: $formfiles["var"] = "/dir/filename.ext"; Output: $this->results the text output from the post \*======================================================================*/ @@ -271,8 +287,12 @@ $this->user = $URI_PARTS["user"]; if (!empty($URI_PARTS["pass"])) $this->pass = $URI_PARTS["pass"]; - - switch($URI_PARTS["scheme"]) + if (empty($URI_PARTS["query"])) + $URI_PARTS["query"] = ''; + if (empty($URI_PARTS["path"])) + $URI_PARTS["path"] = ''; + + switch(strtolower($URI_PARTS["scheme"])) { case "http": $this->host = $URI_PARTS["host"]; @@ -308,7 +328,10 @@ /* follow the redirect */ $this->_redirectdepth++; $this->lastredirectaddr=$this->_redirectaddr; - $this->submit($this->_redirectaddr,$formvars, $formfiles); + if( strpos( $this->_redirectaddr, "?" ) > 0 ) + $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get + else + $this->submit($this->_redirectaddr,$formvars, $formfiles); } } } @@ -338,8 +361,11 @@ return true; break; case "https": - if(!$this->curl_path || (!is_executable($this->curl_path))) + if(!$this->curl_path) return false; + if(function_exists("is_executable")) + if (!is_executable($this->curl_path)) + return false; $this->host = $URI_PARTS["host"]; if(!empty($URI_PARTS["port"])) $this->port = $URI_PARTS["port"]; @@ -369,7 +395,10 @@ /* follow the redirect */ $this->_redirectdepth++; $this->lastredirectaddr=$this->_redirectaddr; - $this->submit($this->_redirectaddr,$formvars, $formfiles); + if( strpos( $this->_redirectaddr, "?" ) > 0 ) + $this->fetch($this->_redirectaddr); // the redirect has changed the request method from post to get + else + $this->submit($this->_redirectaddr,$formvars, $formfiles); } } } @@ -413,7 +442,8 @@ { if ($this->fetch($URI)) { - + if($this->lastredirectaddr) + $URI = $this->lastredirectaddr; if(is_array($this->results)) { for($x=0;$x
|