From onokazu @ users.sourceforge.jp Mon May 1 11:37:24 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:24 +0900 Subject: [xoops-cvslog 2931] CVS update: xoops2jp/extras Message-ID: <20060501023724.469C72AC3CD@users.sourceforge.jp> Index: xoops2jp/extras/login.php diff -u xoops2jp/extras/login.php:1.3 xoops2jp/extras/login.php:1.4 --- xoops2jp/extras/login.php:1.3 Sat Jun 11 11:32:37 2005 +++ xoops2jp/extras/login.php Mon May 1 11:37:24 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 Mon May 1 11:37:24 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:24 +0900 Subject: [xoops-cvslog 2932] CVS update: xoops2jp/html/class/database Message-ID: <20060501023724.6CD4C2AC3DA@users.sourceforge.jp> Index: xoops2jp/html/class/database/database.php diff -u xoops2jp/html/class/database/database.php:1.2 xoops2jp/html/class/database/database.php:1.3 --- xoops2jp/html/class/database/database.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/database/database.php Mon May 1 11:37:24 2006 @@ -1,5 +1,5 @@ - * @copyright copyright (c) 2000-2003 XOOPS.org + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org */ /** * make sure this is only included once! */ if ( !defined("XOOPS_C_DATABASE_INCLUDED") ) { - define("XOOPS_C_DATABASE_INCLUDED",1); + define("XOOPS_C_DATABASE_INCLUDED",1); /** * Abstract base class for Database access classes @@ -51,67 +51,67 @@ * @subpackage database */ class XoopsDatabase - { - /** - * Prefix for tables in the database - * @var string - */ - var $prefix = ''; - /** - * reference to a {@link XoopsLogger} object + { + /** + * Prefix for tables in the database + * @var string + */ + var $prefix = ''; + /** + * reference to a {@link XoopsLogger} object * @see XoopsLogger - * @var object XoopsLogger - */ - var $logger; + * @var object XoopsLogger + */ + var $logger; - /** - * constructor + /** + * constructor * * will always fail, because this is an abstract class! - */ - function XoopsDatabase() - { - // exit("Cannot instantiate this class directly"); - } - - /** - * assign a {@link XoopsLogger} object to the database - * + */ + function XoopsDatabase() + { + // exit("Cannot instantiate this class directly"); + } + + /** + * assign a {@link XoopsLogger} object to the database + * * @see XoopsLogger * @param object $logger reference to a {@link XoopsLogger} object - */ - function setLogger(&$logger) - { - $this->logger =& $logger; - } - - /** - * set the prefix for tables in the database - * + */ + function setLogger(&$logger) + { + $this->logger =& $logger; + } + + /** + * set the prefix for tables in the database + * * @param string $value table prefix - */ - function setPrefix($value) - { - $this->prefix = $value; - } - - /** - * attach the prefix.'_' to a given tablename + */ + function setPrefix($value) + { + $this->prefix = $value; + } + + /** + * attach the prefix.'_' to a given tablename * * if tablename is empty, only prefix will be returned - * + * * @param string $tablename tablename * @return string prefixed tablename, just prefix if tablename is empty - */ - function prefix($tablename='') - { - if ( $tablename != '' ) { - return $this->prefix .'_'. $tablename; - } else { - return $this->prefix; - } - } - } + */ + function prefix($tablename='') + { + if ( $tablename != '' ) { + return $this->prefix .'_'. $tablename; + } else { + return $this->prefix; + } + } + } } @@ -123,10 +123,11 @@ class Database { - function &getInstance() - { - return XoopsDatabaseFactory::getDatabaseConnection(); - } + function &getInstance() + { + $ret =& XoopsDatabaseFactory::getDatabaseConnection(); + return $ret; + } } ?> \ No newline at end of file Index: xoops2jp/html/class/database/mysqldatabase.php diff -u xoops2jp/html/class/database/mysqldatabase.php:1.2 xoops2jp/html/class/database/mysqldatabase.php:1.3 --- xoops2jp/html/class/database/mysqldatabase.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/database/mysqldatabase.php Mon May 1 11:37:24 2006 @@ -1,5 +1,5 @@ - * @copyright copyright (c) 2000-2003 XOOPS.org + * @author Kazumi Ono + * @copyright copyright (c) 2000-2003 XOOPS.org */ /** @@ -54,71 +54,71 @@ */ class XoopsMySQLDatabase extends XoopsDatabase { - /** - * Database connection - * @var resource - */ - var $conn; - - /** - * connect to the database - * + /** + * Database connection + * @var resource + */ + var $conn; + + /** + * connect to the database + * * @param bool $selectdb select the database now? * @return bool successful? - */ - function connect($selectdb = true) - { - if (XOOPS_DB_PCONNECT == 1) { - $this->conn = @mysql_pconnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); - } else { - $this->conn = @mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); - } - - if (!$this->conn) { - $this->logger->addQuery('', $this->error(), $this->errno()); - return false; - } - - if($selectdb != false){ - if (!mysql_select_db(XOOPS_DB_NAME)) { - $this->logger->addQuery('', $this->error(), $this->errno()); - return false; - } - } - return true; - } + */ + function connect($selectdb = true) + { + if (XOOPS_DB_PCONNECT == 1) { + $this->conn = @mysql_pconnect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); + } else { + $this->conn = @mysql_connect(XOOPS_DB_HOST, XOOPS_DB_USER, XOOPS_DB_PASS); + } + + if (!$this->conn) { + $this->logger->addQuery('', $this->error(), $this->errno()); + return false; + } + + if($selectdb != false){ + if (!mysql_select_db(XOOPS_DB_NAME)) { + $this->logger->addQuery('', $this->error(), $this->errno()); + return false; + } + } + return true; + } - /** - * generate an ID for a new row + /** + * generate an ID for a new row * * This is for compatibility only. Will always return 0, because MySQL supports * autoincrement for primary keys. * * @param string $sequence name of the sequence from which to get the next ID * @return int always 0, because mysql has support for autoincrement - */ - function genId($sequence) - { - return 0; // will use auto_increment - } - - /** - * Get a result row as an enumerated array - * + */ + function genId($sequence) + { + return 0; // will use auto_increment + } + + /** + * Get a result row as an enumerated array + * * @param resource $result * @return array - */ - function fetchRow($result) - { - return @mysql_fetch_row($result); - } - - /** - * Fetch a result row as an associative array - * + */ + function fetchRow($result) + { + return @mysql_fetch_row($result); + } + + /** + * Fetch a result row as an associative array + * * @return array - */ - function fetchArray($result) + */ + function fetchArray($result) { return @mysql_fetch_assoc( $result ); } @@ -133,76 +133,76 @@ return @mysql_fetch_array( $result, MYSQL_BOTH ); } - /** - * Get the ID generated from the previous INSERT operation - * + /** + * Get the ID generated from the previous INSERT operation + * * @return int - */ - function getInsertId() - { - return mysql_insert_id($this->conn); - } - - /** - * Get number of rows in result - * + */ + function getInsertId() + { + return mysql_insert_id($this->conn); + } + + /** + * Get number of rows in result + * * @param resource query result * @return int - */ - function getRowsNum($result) - { - return @mysql_num_rows($result); - } - - /** - * Get number of affected rows - * + */ + function getRowsNum($result) + { + return @mysql_num_rows($result); + } + + /** + * Get number of affected rows + * * @return int - */ - function getAffectedRows() - { - return mysql_affected_rows($this->conn); - } - - /** - * Close MySQL connection - * - */ - function close() - { - mysql_close($this->conn); - } - - /** - * will free all memory associated with the result identifier result. - * + */ + function getAffectedRows() + { + return mysql_affected_rows($this->conn); + } + + /** + * Close MySQL connection + * + */ + function close() + { + mysql_close($this->conn); + } + + /** + * will free all memory associated with the result identifier result. + * * @param resource query result * @return bool TRUE on success or FALSE on failure. - */ - function freeRecordSet($result) - { - return mysql_free_result($result); - } - - /** - * Returns the text of the error message from previous MySQL operation - * + */ + function freeRecordSet($result) + { + return mysql_free_result($result); + } + + /** + * Returns the text of the error message from previous MySQL operation + * * @return bool Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred. - */ - function error() - { - return @mysql_error(); - } - - /** - * Returns the numerical value of the error message from previous MySQL operation - * + */ + function error() + { + return @mysql_error(); + } + + /** + * Returns the numerical value of the error message from previous MySQL operation + * * @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred. - */ - function errno() - { - return @mysql_errno(); - } + */ + function errno() + { + return @mysql_errno(); + } /** * Returns escaped string text with single quotes around it to be safely stored in database @@ -226,50 +226,51 @@ * or TRUE if successful and no result */ function &queryF($sql, $limit=0, $start=0) - { - if ( !empty($limit) ) { - if (empty($start)) { - $start = 0; - } - $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit; - } - $result =& mysql_query($sql, $this->conn); - if ( $result ) { - $this->logger->addQuery($sql); - return $result; + { + if ( !empty($limit) ) { + if (empty($start)) { + $start = 0; + } + $sql = $sql. ' LIMIT '.(int)$start.', '.(int)$limit; + } + $result = mysql_query($sql, $this->conn); + if ( $result ) { + $this->logger->addQuery($sql); + return $result; } else { - $this->logger->addQuery($sql, $this->error(), $this->errno()); - return false; + $this->logger->addQuery($sql, $this->error(), $this->errno()); + $ret = false; + return $ret; } } - /** - * perform a query + /** + * perform a query * * This method is empty and does nothing! It should therefore only be * used if nothing is exactly what you want done! ;-) - * + * * @param string $sql a valid MySQL query * @param int $limit number of records to return * @param int $start offset of first record to return * * @abstract - */ - function &query($sql, $limit=0, $start=0) - { + */ + function &query($sql, $limit=0, $start=0) + { } /** - * perform queries from SQL dump file in a batch - * + * perform queries from SQL dump file in a batch + * * @param string $file file path to an SQL dump file * * @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed - */ - function queryFromFile($file){ + */ + function queryFromFile($file){ if (false !== ($fp = fopen($file, 'r'))) { - include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; + include_once XOOPS_ROOT_PATH.'/class/database/sqlutility.php'; $sql_queries = trim(fread($fp, filesize($file))); SqlUtility::splitMySqlFile($pieces, $sql_queries); foreach ($pieces as $query) { @@ -286,39 +287,39 @@ } /** - * Get field name - * + * Get field name + * * @param resource $result query result * @param int numerical field index * @return string - */ - function getFieldName($result, $offset) - { - return mysql_field_name($result, $offset); - } - - /** - * Get field type - * + */ + function getFieldName($result, $offset) + { + return mysql_field_name($result, $offset); + } + + /** + * Get field type + * * @param resource $result query result * @param int $offset numerical field index * @return string - */ + */ function getFieldType($result, $offset) - { - return mysql_field_type($result, $offset); - } - - /** - * Get number of fields in result - * + { + return mysql_field_type($result, $offset); + } + + /** + * Get number of fields in result + * * @param resource $result query result * @return int - */ - function getFieldsNum($result) - { - return mysql_num_fields($result); - } + */ + function getFieldsNum($result) + { + return mysql_num_fields($result); + } } /** @@ -343,10 +344,11 @@ * @return resource query result or FALSE if successful * or TRUE if successful and no result */ - function &query($sql, $limit=0, $start=0) - { - return $this->queryF($sql, $limit, $start); - } + function &query($sql, $limit=0, $start=0) + { + $ret =& $this->queryF($sql, $limit, $start); + return $ret; + } } /** @@ -375,15 +377,17 @@ * @param int $start offset of first record to return * @return resource query result or FALSE if unsuccessful */ - function &query($sql, $limit=0, $start=0) - { - $sql = ltrim($sql); - if (strtolower(substr($sql, 0, 6)) == 'select') { - //if (preg_match("/^SELECT.*/i", $sql)) { - return $this->queryF($sql, $limit, $start); - } - $this->logger->addQuery($sql, 'Database update not allowed during processing of a GET request', 0); - return false; - } + function &query($sql, $limit=0, $start=0) + { + $ret = false; + $sql = ltrim($sql); + if (strtolower(substr($sql, 0, 6)) == 'select') { + //if (preg_match("/^SELECT.*/i", $sql)) { + $ret =& $this->queryF($sql, $limit, $start); + } else { + $this->logger->addQuery($sql, 'Database update not allowed during processing of a GET request', 0); + } + return $ret; + } } ?> \ No newline at end of file From onokazu @ users.sourceforge.jp Mon May 1 11:37:24 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:24 +0900 Subject: [xoops-cvslog 2930] CVS update: xoops2jp/docs Message-ID: <20060501023724.131F52AC266@users.sourceforge.jp> Index: xoops2jp/docs/CHANGES.txt diff -u xoops2jp/docs/CHANGES.txt:1.11 xoops2jp/docs/CHANGES.txt:1.12 --- xoops2jp/docs/CHANGES.txt:1.11 Tue Oct 25 12:25:42 2005 +++ xoops2jp/docs/CHANGES.txt Mon May 1 11:37:23 2006 @@ -1,489 +1,511 @@ -XOOPS v2 Changelog -============================ - -2005/10/25: Version 2.0.13a JP -=============================== -- Re-applied the $HTTP_*_VARS to $_* fix to some files in newbb -- Added fix for comment XSS vulnerability that was missing in the previous release - - -2005/10/24: Version 2.0.13 JP -=============================== -- Added several fixes for XSS vulnerabilities found in the core and newbb. -- Added fix to prevent Spams via misc.php and contact module using PHPMailer -- Added fix to prevent arbitrary code execution vulnerability in uploader.php - - -2005/ 9/ 5: Version 2.0.12 JP -=============================== -- Fixed display problem in system config preferences when conf_valuetype and conf_formtype are of textarea type - - -2005/ 8/31: Version 2.0.12 JP Beta -=============================== -- Changed $HTTP_XXX_VARS to $_XXX -- Limit send to friend feature in siteinfo block to registered users only -- Fixed bug in duplicate user name checking -- Added sanitization to PHP_SELF variable -- Fixed invalid usages of HTML -- Fixed some bugs sending japanese mails -- Fixed regex bug in module.textsanitizer.php - - -2005/ 8/14: Version 2.0.11.1 JP -=============================== -- Fixed full path disclosure vulnerability in several files - - -2005/ 7/31: Version 2.0.11 JP -=============================== -- Fixed infinite refresh of page in visit.php of mydownloads/mylinks - - -2005/ 7/21: Version 2.0.11 JP RC2 -=============================== -- Added security patch to prevent SQL injection in xmlrpcapi.php -- Added security patch for XSS vulnerability in comment post -- Fixed minor display bugs in search result URLs -- Fixed incorrect Smarty tag name being assigned in header.php -- Fixed PHP notice errors in several parts - - -2005/ 6/30: Version 2.0.10.2 JP -=============================== -- Added security patch to prevent SQL injection in xmlrpcapi.php -- Added security patch for XSS vulnerability in comment post - - -2005/ 6/29: Version 2.0.11 JP RC1 -=============================== -- Merged CriteriaString with the original Cirteria class -- Fixed bug in image admin section when register_globals off. -- Code cleanup in headlinerender.php -- Added missing language constant in the news module -- Fixed bug in xoopspartners admin section when register_globals off. -- Fixed smarty variable typo in common.php -- Fixed invalid template path in template set admin section -- Fixed comment delete button bug -- Changed & to & in some files -- Added missing parameter to redirect URL of newbb/mydownload modules -- Fixed invalid cache header in footer.php -- Fixed bug not being able to send mails when over 200 registered users - - -2005/ 6/28: Version 2.0.10.1 JP -=============================== -- Added security patch to prevent login spoofing -- Added several patches to fix some important bugs present in 2.0.10 JP - - Fixed bug not being able to add user from user admin page - - Fixed fatal error in admin page of sections module - - Fixed bug not being able to delete forum posts in newbb module - - Fixed typo: $xoopsConfig -> $xoopsModuleConfig in news module - - -2005/ 6/15: Version 2.0.11 JP Beta -=============================== -- Fixed parse error in the sections module -- Fixed incorrect use of anonpost option variable in the news module -- Fixed bug not being able to add users to group when active users over 200 -- Fixed bug not being able to add user from the user admin page -- Fixed bug not being able to delete posts in the newbb module - - -2005/ 6/10: Version 2.0.10 JP -=============================== -- Added fix for better module version number handling -- Fixed possible fatal error when using the template manager -- Fixed more invalid usages of HTML -- Fixed bug not being able to change password in user admin area -- Changed <{$xoops_moduledir}> to <{$xoops_dirname}> for xoops.org 2.0.10 compatibility -- Fixed <{$show_lblock}> not being assigned when no left blocks - - -2005/ 6/2: Version 2.0.10 JP RC2 -=============================== -- Fixed Invalid usages of HTML -- More fix to popup calendar bug fix added in beta -- Fixed file/folder names starting with a . being listed as modules, themes, etc. -- Added missing post_id variable in newbb search results -- Fixed minor problem with IIS -- Fixed phpmailer inifinite loop DOS vulnerability -- Fixed module icons in admin menu and modulesadmin page to be displayed in order by weight -- Fixed ticket system for improved compatibility with xoops.org 2.0.10 - - -2005/ 5/28: Version 2.0.10 JP RC1 -=============================== -- Temporarily disabled showing XOOPS News on admin top page -- Changed the name of XoopsMediaUploader::checkFileType() to its original XoopsMediaUploader::checkFileType() to maintain compatibility -- Fixed group name not showing in group admin error message -- Fixed typo in /kernel/object.php, modules/system/admin/smiles/main.php, include/xoopscodes.php, class/xoopsform/dhtmltextarea.php -- Changed token lifetime from 900 seconds to unlimited -- Fixed invalid timestamp format in RSS news feed -- Removed invalid links to unpublished news article -- Fixed link to preference settings not being displayed in newbb admin menu -- Fixed error messages being displayed when pointing to non-existent image file in image.php -- Fixed ticket error in group admin page when users over 200 in a group -- Fixed new user being added to all groups when created from the admin page -- Fixed fatal error message being displayed when trying to browse uninstalled modules -- Fixed file not found error in zipdownloader.php -- Added support for 'NOT IN' type queries in Criteria class -- Added <{$xoops_modulename}> <{$xoops_moduledir}> template vars -- Added block weight value to each block template var - - -2005/ 5/18: Version 2.0.10 JP Beta -=============================== -- Implemented new token system for validating form origination and increased protection against CSRF -- Security fix to avoid the usage of fopen and unlink when preview/debug -- Fixed bug in header.php, assign $xoops_lblocks -- Fixed bug #1157029 - Bug in include/checklogin.php -- Fixed bug #1060061 - renderValidationJS showing htmlentities instead of intended characters -- Removed foreach ($_POST as $k => $v) {${$k} = $v;} and similar ones which can be insecure under certain circumstances -- Fixed CSRF vulnerability in block/template preview -- Fixed CSRF vulnerability in news/newbb preview -- Fixed arbitrary file deletion vulerability when custom avatar upload enabled -- Security fix to prevent uploading of executable files -- Fixed XSS vulerability in redirect_header() function -- Fixed XSS vulerability in findusers section of system module -- Fixed XSS vuleratility when displaying smiley popup window -- Removed old autologin hack codes which can be insecure -- Fixed arbitrary PHP code execution vulnerability in saxparser class -- Fixed XOOPS news not being displayed when allow_url_fopen set to off -- Fixed new user not being added to specified groups when creating new user from the admin section -- Fixed many typos -- Fixed many HTML misusages -- Added more PHP5 compatibility fixes -- Added fix for duplicated blocks created in 2.0.9 -- Added custom XoopsSecurity class for xoops.org 2.0.10 compatibility - - -2004/12/30: Version 2.0.9.2 -=============================== -- Security fix to prevent session hijacking (thanks goes to GIJOE and the JP XOOPS community) -- Fixed duplicated blocks bug on module update -- phpmailer back to the version included in 2.0.7.3, as it is more stable (onokazu) - - -2004/12/25: Version 2.0.9 -=============================== -- Security fix in the newbb module for PHP version < 4.3.10 (GIJOE & onokazu) -- Security fix in the newbb module to prevent XSS attacks (minahito) -- Fixed various problems related to XoopsUser::isAdmin() and $xoops_isadmin patch in 2.0.7.1 (bugs #1014203/#1014403) (onokazu) -- Fixed incorrect parameters being passed to CriteriaCompo in modulesadmin.php (onokazu) -- Fixed incorrect parameters being passed to XoopsXmlRpcStruct::add() in BloggerApi::getUserInfo() (onokazu) -- Fixed Bug #1023022 - XoopsFormDhtmlTextArea and array_push() error (Mithrandir) -- Fixed Bug #1013989 - Inbox title shoud be plural "Private Messages" (Mithrandir) -- Fixed Bug #1004998 - readpmsg.php typo: html tag of subject is nothing (Mithrandir) -- Fixed Bug #1035707 - Enable array type options in blocks (Mithrandir) -- Fixed a typo in include/comment_form.php, patch #1041993 (Dave_l) -- Fixed Bug #1044957 - xoopsmultimailer.php Username typo when SMTP-Auth (Mithrandir) -- Fixed RFE #900348 - Sort user list alphabetically in System -> Groups. Also changed the way it fetches the users in the group so it fetches all of them with 2 queries instead of 1 + (1 per user in the group) (Mithrandir -) -- Added patch #1048384 - mysql_field_name and others, added (Mithrandir) -- Fixed bug #1049017 - Blocks sharing a template are cached wrong (Mithrandir) -- Added patch #1048382 - Module onUpdate function (Mithrandir) -- Fixed bug #989462 - Handler object caching not working (Mithrandir) -- Added RFE #900345 - View/Edit group membership in Admin -> System -> Edit User (Mithrandir) -- Fixed Bug #1055901 - group.php(IN phrase is used ,query) (Mithrandir) -- Fixed bug #1052403 - block update in module update (Mithrandir) -- More fixes for register_globals off in the top 10 page of mylinks/mydownloads modules -- Fixed a typo in modules/xoopsheadline/admin/index.php (onokazu) -- Fixed bug where 2 headline forms were using the same form name/id, causing JS error (onokazu) -- Fixed some html problems in mylinks/mydownloads admin page (onokazu) -- Secured mainfile.dist.php from disclosing paths (Mithrandir) -- Fixed bug #1073029 (onokazu) -- Fixed bug #1073532 (onokazu) -- Fixed bug #1080791 (onokazu) -- Fixed lang phrase _NOT_ACTIVENOTIFICATIONS not being assing to template (onokazu) -- Some PHP5 fixes (Mithrandir) -- Updated Smarty to version 2.6.5 -- Updated PHPMailer to version 1.72 - - -2004/09/11: Version 2.0.7.3 -=============================== -!! SECURITY FIX !! fixed more bugs that allowed session hijacking under a certain circumstance (onokazu) - - -2004/09/10: Version 2.0.7.2 -=============================== -!! SECURITY FIX !! fixed bugs that allowed session hijacking under a certain circumstance (onokazu) - - -2004/08/21: Version 2.0.7.1 -=============================== -Fixed bug #1006511 about $xoops_isadmin misuse (skalpa/the jp.xoops.org community): -- Changed XoopsUser::isAdmin() behavior to prevent problems with modules that misuse this function -- Fixed permission checking in user profile page, to only show admin links to people who are supposed to see them -- Fixed permission checking in the comments system, to only show admin links to people who are supposed to see them -Fixed incorrect escaping of configuration values in 2.0.7 (skalpa) -Changed db proxy class error message from "Action not allowed" to "Database update not allowed during a GET request" (skalpa) -Fixed bug #964084: if comment title is long multi-byte character.last byte loss (Mithrandir/domifara) -Fixed bug #977360: Wrong icon in comment bloc (Mithrandir/zoullou) -Fixed bug #976534: modules incompatibilities in 2.0.7 (Mithrandir/gijoe_peak) -Fixed bug #975803: Typo in class/pagenav.php (Mithrandir/Dave_l) -Fixed bug #974655: slogan variable with Xoops 2.0.7 (Mithrandir/brashquido) -Fixed bug #987171: typo in edituser.php (Mithrandir) -Applied patch #928503: Search results for modules with granted permissions optimised (Mithrandir/malanciault) -Applied patch #988715: cp_header.php language (Mithrandir/phppp) -Fixed MyTextSanitizer PHP notices (Mithrandir) -Fixed XoopsForm PHP Notices about an unset _extra property (Mithrandir) - - -2004/06/14: Version 2.0.7 -=============================== -!! SECURITY FIX !! preventing code injection in media uploader (skalpa) -!! SECURITY FIX !! preventing execution of external scripts in shared environments (skalpa/ackbarr) - -Fixed bug #963937: Typo in modules/system/admin/findusers/main.php (mithrandir/tom_g3x) -Fixed typo in x2t theme css colteaser class definition (w4z004) -Set formButton class to Xoops popups buttons (w4z004) -Fixed bug #960970: Incorrect display of the graphical pagenav (w4z004) -Modified the Word Censoring fix (#962025) for MySQL 4.x compat (skalpa + quick thx 2 hervet 4 help) -Ensured page title and slogan are escaped for HTML (onokazu) -Fixed bug #961565: Search form keywords not checked by JS (mithrandir/tom_g3x) -Fixed bug #961118 in XoopsFormElementTray::getElements() (mithrandir/luckec) -Fixed bug #961311: Incorrect definition of headers var in XoopsMailer class (mithrandir/tom_g3x) -XoopsForm::assign() now indexes elements by name if possible (mithrandir/kerkness) -Fixed bug #963197: xoopsHiddenText is hardcoded in formdhtmlarea (mithrandir/tom_g3x) -Fixed bug #963301: XoopsMediaUploader checkMaxHeight() doesn't work (skalpa/onokazu) -Fixed bug #963327: XoopsImageHandler delete() keeps rows in imagebody table (skalpa/tom_g3x) -Fixed bug #962025: Word censoring can mess db config options up (skalpa/tom_g3x) -Fixed bug #961313: XoopsMailer custom headers are duplicated (skalpa/tom_g3x) -Fixed bug #960683: [code] wrong translation (skalpa/ryuji+gi_joe) -Fixed snoopy bug due to language specific characters (onokazu) -Fixed a bug preventing deletion of users from the admin user search results (onokazu) -Fixed a bug preventing deletion of admin users (onokazu) -Fixed bug #915976: module onInstall feature doesn't display module messages correctly (skalpa/feugy+dave_l) -Fixed bug #898776: Xoops module resolution for www.host.com and host.com (wulff_dk) -Fixed bug #906282: XoopsGroupPermForm::render() - throws Undefined variable (mithrandir) -Fixed bug #946621: Comments system extra_param not working with register_globals off (mithrandir/gstarrett) -Fixed bug #932200: Admin > Edit user shows wrong username :-(mithrandir) -Fixed bug #936753: $xoops_module_header not in all themes (w4z004) -Fixed bug #921930: SQL queries with leading whitespace don't work (mithrandir) -Fixed bug #920480: xoops_substr always adds three dots (skalpa) -Fixed bug #921448: Undefined variable in xoopscodes.php (skalpa/dave_l) -Applied patch #953063: js Calendar first popup date bug fix (mithrandir/venezia) -Applied patch #953060: xoopstree.php selbox - subcategories not ordered (mithrandir/venezia) -Applied patch #928503: Only show search results for modules with granted permissions (mithrandir/malanciault) -Fixed bug #922152 preventing notifications to work with some Windows configurations (skalpa/robekras) -Fixed bug #930351 preventing XoopsThemeForm::insertBreak() to work -Corrected the content of $xoopsRequestUri on IIS fixing bug #895984 (skalpa) - -2/6/2004: Version 2.0.6 -=============================== -- Removed calls to XoopsHandlerRegistry class (onokazu) -- Fixed loop problem after retrieving a lost password (onokazu) -- Changed all include() calls to include_once() for xoopscodes.php (onokazu) -- Added routines to remove users from the online member list when a user is deleted (onokazu) -- Added parameters to the Critreria class constructor to allow the use of DB functions in SQL criteria (skalpa) -- Added fetchBoth() method to the XoopsDatabase class (skalpa) -- Fixed typos in class/smarty/plugins/resource.db.php (skalpa) -- Refactoring in /class/xoopsform/form.php (skalpa) -- Added some methods to /class/xoopsform/formelement.php to allow the use of accesskey and class attributes in form element tags (skalpa) -- Fixed extra HTML tags not being displayed when using the XoopsThemeForm::insertBreak() method (Catzwolf) -- Changed the default HTTP method of the search form to GET (onokazu) -- Fixed notification constants not being included during installation (onokazu) -- Fixed session data not being properly escaped before inserting to the database (onokazu) -- Some useful changes to the group permission form (onokazu) -- Fixed the block cachetime selection being reset after preview (onokazu) -- Fixed invalid regex patterns used for username filtering, also added fix to allow the safe use of multi-byte characters in username (contributed by GIJOE) -- Fixed bug where some blocks were not being displayed in block admin page on certain occasions (onokazu) -- Fixed the problem of system admin icon disappearing on certain occasions (onokazu) -- Fixed the errorhandler class to check the current error_reporting level before handleing errors (onokazu) -- Re-activated the errorhandler class (onokazu) -- Updated class/Snoopy.php to the latest version, v1.01 (onokazu) -- Fixed a typo in kernel/online.php (onokazu) -- Added some useful functions to include/xoops.js (skalpa) -- Fix for Opera in include/xoops.js (onokazu) -- Fixed user bio and signature values causing corruption in the edit profile form on certain occasions (onokazu) -- Fixed the module name being reset to the default value after module update (onokazu) -- Fixed invalid regex patterns in xoopslists.php (onokazu) -- Fixed a few issues with register_globals setting -- Fix for the auto-login feature (not activated) -- Fixed image categories not being displayed in the order set by admin (onokazu)- Fixed a typo in kernel/config.php (onokazu) -- Fixed comments not being displayed in the order as requested (onokazu) -- Fixed the mailer class not setting some header values (onokazu) -- Fixed chmod problem in class/uploader.php -- Fixed magic_quotes related problems in class/uploader.php -- Fixed notification routines causing a fatal error while trying to notify non-existent users (onokazu) -- Added fix to convert & to & within mail messages (onokazu) -- Fixed html special characters causing problem when submitting a new module name (onokazu) -- Fixed javascript error in mailuser form (onokazu) -- Fixed javascript error in calendar date select form -- Added a new Smarty function <{xoops_link}> (skalpa) -- Added check to prevent webmaster user/group from being removed completely (contributed by Ryuji) - -newbb -- Security fix in modules/newbb/viewtopic.php (onokazu) -- Security fix in modules/newbb/viewforum.php (onokazu) -- Added register_globals related fix to topicmanager.php (onokazu) -- Fixed topic moderation icons not being displayed for moderators in templates/newbb_thread.html (onokazu) -- Fixed topic time not being displayed in recent posts block on certain occasions in blocks/newbb_new.php (onokazu) -- Added fix to correctly navigate to the requested post even when the post is not on the first page of flat view (contrib by GIJOE in class/forumpost.php, viewtopic.php, viewforum.php) - -sections -- Added missing global variable declarations to index.php (onokazu) - -mydownloads -- Added register_globals related fix to modfile.php (onokazu) - -news -- Added fix to always display published date in each article (onokazu) -- Added missing ?> at the end of file in xoops_version.php (onokazu) -- Some fixes in admin/index.php - -xoopspolls -- Fixed color bar selections not working when creating/editing a new poll (onokazu) - -xoopsmembers -- Fixed 'more than X posts' not working when set to 0 (onokazu) -- Added a new language constant to language/english/main.php (Catzwolf) -- Removed invalid HTML tags in templates/xoopsmembers_searchresults.html (Catzwolf) - - -1/5/2004: Version 2.0.5.2 -=============================== -- Security fix in modules/mylinks/myheader.php -- Security fix in modules/mylinks/visit.php -- Security fix in modules/mylinks/admin/index.php - - -11/22/2003: Version 2.0.5.1 -=============================== -- Added $option parameter to xoops_gethandler function (skalpa) -- Security fix in banners.php (onokazu) -- Security fix in modules/newss/include/forumform.inc.php (onokazu) -- Security fix in include/common.php (onokazu) -- Temporarily disabled XoopsErrorHandler class (onokazu) -- Security fix in include/functions.php (onokazu) -- Removed XoopsHandlerRegistry class (onokazu) -- Added fix for preventing users entering infinite loop when recovering a lost password (onokazu) - - -10/8/2003: Version 2.0.5 -=============================== -- Fixed template files not being updated even when the 'allow update from themes directory' option was enabled in preferences -- Fixed RSS channel title being cutoff at special characters -- Minor bug fix in pagenav.php -- Fixed blocks disappearing from the block admin page on certain occasion -- Additional fixes to work with register_globals off -- Fixed problem with XoopsCode Img button not working on certain occasion -- Added missing SQL query in kernel/avatar.php -- Fixed problem with the newbb module where users could post without a thread title on certain occasion -- Fixed problem in banner admin page where banner edit form not being displayed on certain occasion -- Fixed group selection option in the blocks admin page not being selected on certain occasion -- Fixed poll option textbox forms not displaying the correct values -- Fixed show all link in user profile page not working in 2.0.5RC -- Additional phrases in language/english/global.php(_NOTITLE), language/english/search.php(_SR_IGNOREDWORDS), install/language/english/install.php(_INSTALL_L128, _INSTALL_L200) -- Added check in install/index.php to read $HTTP_ACCEPT_LANGUAGE on initial load - - -9/30/2003: Version 2.0.5 RC -=============================== -- Fixed email checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12288&forum=2 (mvandam) -- Fixed a number of bugs in blocks admin page (onokazu) -- More usability fix in blocks admin page (onokazu) -- Fixed forum topic links to correctly use the # feature in url (onokazu) -- Fixed password checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12301&post_id=49369&order=0&viewmode=flat&pid=49203&forum=21#forumpost49369 -- Fixed database connection error when creating database during install (onokazu) -- Fixed mb_output_handler causing problems in backend.php/image.php/downloader (onokazu) -- Fixed search feature to use GET requests for prev/next/showall links (onokazu) -- Register_globals related fix in /include/comment_post.php (contrib by gstarrett) -- Added $xoopsUserIsAdmin global variable (onokazu) -- Added xoops_getLinkedUnameById function to /include/functions.php (Catzwolf) -- Fixed invalid Smarty tags in /modules/system/templates/system_siteclosed.html, /modules/system/templates/system_redirect.html, /modules/system/templates/system_imagemanager2.html (onokazu) - - -9/19/2003: Version 2.0.4 -=============================== -- XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL are now set in include/common.php (onokazu) -- Added [siteurl][/siteurl] tag to XoopsCode (mvandam) -- Fixed a typo in class/uploader.php (onokazu) -- Fixed some redirect problems after login (onokazu) -- registre_globals fix in include/comment_view.php (onokazu) -- Xoops.org news is disabled by default in the admin section (onokazu) -- Added a new error handler class (class/errorhandler.php) (mvandam) -- Fixed XoopsGroupPermHandler returning duplicate permissions (onokazu) -- Fixed block-disappearing problem in blocks admin (onokazu) -- Fixed typo in kernel/notification.php (mvandam) -- Added XoopsGuestUser class in kernel/user.php (onokazu) -- Fixed newbb module to correctly use the # feature in URL (onokazu) -- Improved usability in blocks admin section -- Reduced number of users to display in group/edituser page to max 200 users (onokazu) -- Fixed bug where admins could add users with a existing username (onokazu) -- Added files for module developers to easily add group permisson feature (modules/system/groupperm.php, class/xoopsform/groupperm.php) (onokazu) -- Fixed typo in register.php (onokazu) - - -6/17/2003: Version 2.0.3 -=============================== -- fixed CSS related bug in global search page -- register_globals bug fix in comments -- Smarty updated to 2.5.0 -- fixed typo in kernel/object.php -- fixed group permission bug -- fixed bug where image categories were deleted after group permission update -- fixed bug where user votes could not be deleted in the mylinks module -- fixed some language typos -- changed XoopsGroupPermHandler::getItemIds to accept an array fot the second parameter (gperm_groupid), which was required in certain places.. -- removed avatar image files - - -4/25/2003: Version 2.0.2 -=============================== -- security fix to prevent malicious cross site scripting attacks (onokazu) -- fixed character encoding problem for some languages when using the mailer class (onokazu) -- fixed some major bugs in the xoopsheadline module (onokazu) -- fixed some cookie related problems in the forums module (mvandam) - - -4/18/2003: Version 2.0.1 -=============================== -- fixed bug where notification feature could not be turned on -- fixed character encoding problem for some languages when using the mailer class (onokazu) -- fixed the theme selection block to work again -- fixed typo in kernel/module.php -- fixed incorrect table name in xoops_version.php of the new headline module -- changed max limit size of some columns in the configoption table -- fixed image manager bug when using db store method -- xoops.org can now be disabled by adding nonews=1 - - -4/16/2003: Version 2.0.0 -=============================== -- xoopsheadlines module replaced with xoopsheadline module to fix character encoding problems -- numerous bug fixes - - -3/19/2003: Version 2.0.0 RC3 -=============================== -- a major change in the handling of theme files, the detail of which you can read in this [url=http://www.xoops.org/modules/news/article.php?storyid=677]article[/url] (onokazu) -- a new global notification feature that can easily be incorporated into modules (that use Smarty) by only modifying xoops_version.php and template files (mvandam) -- SMTP support using phpMailer (bunny) -- group permission tables merged into one table (onokazu) -- code refactoring - - -2/9/2003: Version 2.0.0 RC2 -=============================== -A bug fix release.. -- avatar upload bug -- themeset image upload bug -- register_globals fix -- recommend us block error -- error message displayed upon submit of news article -- page navigation bug in some modules -- blank page bug on some servers -- SQL displayed in blocks admin - - -1/31/2003: Version 2.0.0 RC1 -=============================== -The first public release of 2.0 series. -For new features that have been added from 1.3.x, please refer to -the articles listed below: -http://www.xoops.org/modules/news/article.php?storyid=486 -http://www.xoops.org/modules/news/article.php?storyid=549 -http://www.xoops.org/modules/xoopsdocs/index.php?cat_id=6 \ No newline at end of file +XOOPS v2 Changelog +============================ + +2006/ 4/29: Version 2.0.14 JP +=============================== +- Fixed installation failure problem with PHP 5.1.x +- Removed xoops.org banner image files and data + + +2006/ 4/21: Version 2.0.14 JP RC1 +=============================== +- Added fix for 4.4.x variable reference PHP notice errors +- Updated 3rd party libraries + Snoopy v1.2.3 + PHPMailer Ver 1.73 + Smarty Ver 2.6.12 +- Fixed comment post URL in newbb/viewtopic.php +- Fixed additional slashes in user password being md5()'d. +- Fixed & -> & in some mail template files +- Bug Fix #7393: Fixed Smarty Template cycle plugin parameters +- Added input validity checks for system avatar selection +- Fixed many typo +- Modified xoops.org links to xoopscube.org ;-) +- Removed duplicate footer include()'s in mydownloads + + +2005/10/25: Version 2.0.13a JP +=============================== +- Re-applied the $HTTP_*_VARS to $_* fix to some files in newbb +- Added fix for comment XSS vulnerability that was missing in the previous release + + +2005/10/24: Version 2.0.13 JP +=============================== +- Added several fixes for XSS vulnerabilities found in the core and newbb. +- Added fix to prevent Spams via misc.php and contact module using PHPMailer +- Added fix to prevent arbitrary code execution vulnerability in uploader.php + + +2005/ 9/ 5: Version 2.0.12 JP +=============================== +- Fixed display problem in system config preferences when conf_valuetype and conf_formtype are of textarea type + + +2005/ 8/31: Version 2.0.12 JP Beta +=============================== +- Changed $HTTP_XXX_VARS to $_XXX +- Limit send to friend feature in siteinfo block to registered users only +- Fixed bug in duplicate user name checking +- Added sanitization to PHP_SELF variable +- Fixed invalid usages of HTML +- Fixed some bugs sending japanese mails +- Fixed regex bug in module.textsanitizer.php + + +2005/ 8/14: Version 2.0.11.1 JP +=============================== +- Fixed full path disclosure vulnerability in several files + + +2005/ 7/31: Version 2.0.11 JP +=============================== +- Fixed infinite refresh of page in visit.php of mydownloads/mylinks + + +2005/ 7/21: Version 2.0.11 JP RC2 +=============================== +- Added security patch to prevent SQL injection in xmlrpcapi.php +- Added security patch for XSS vulnerability in comment post +- Fixed minor display bugs in search result URLs +- Fixed incorrect Smarty tag name being assigned in header.php +- Fixed PHP notice errors in several parts + + +2005/ 6/30: Version 2.0.10.2 JP +=============================== +- Added security patch to prevent SQL injection in xmlrpcapi.php +- Added security patch for XSS vulnerability in comment post + + +2005/ 6/29: Version 2.0.11 JP RC1 +=============================== +- Merged CriteriaString with the original Cirteria class +- Fixed bug in image admin section when register_globals off. +- Code cleanup in headlinerender.php +- Added missing language constant in the news module +- Fixed bug in xoopspartners admin section when register_globals off. +- Fixed smarty variable typo in common.php +- Fixed invalid template path in template set admin section +- Fixed comment delete button bug +- Changed & to & in some files +- Added missing parameter to redirect URL of newbb/mydownload modules +- Fixed invalid cache header in footer.php +- Fixed bug not being able to send mails when over 200 registered users + + +2005/ 6/28: Version 2.0.10.1 JP +=============================== +- Added security patch to prevent login spoofing +- Added several patches to fix some important bugs present in 2.0.10 JP + - Fixed bug not being able to add user from user admin page + - Fixed fatal error in admin page of sections module + - Fixed bug not being able to delete forum posts in newbb module + - Fixed typo: $xoopsConfig -> $xoopsModuleConfig in news module + + +2005/ 6/15: Version 2.0.11 JP Beta +=============================== +- Fixed parse error in the sections module +- Fixed incorrect use of anonpost option variable in the news module +- Fixed bug not being able to add users to group when active users over 200 +- Fixed bug not being able to add user from the user admin page +- Fixed bug not being able to delete posts in the newbb module + + +2005/ 6/10: Version 2.0.10 JP +=============================== +- Added fix for better module version number handling +- Fixed possible fatal error when using the template manager +- Fixed more invalid usages of HTML +- Fixed bug not being able to change password in user admin area +- Changed <{$xoops_moduledir}> to <{$xoops_dirname}> for xoops.org 2.0.10 compatibility +- Fixed <{$show_lblock}> not being assigned when no left blocks + + +2005/ 6/2: Version 2.0.10 JP RC2 +=============================== +- Fixed Invalid usages of HTML +- More fix to popup calendar bug fix added in beta +- Fixed file/folder names starting with a . being listed as modules, themes, etc. +- Added missing post_id variable in newbb search results +- Fixed minor problem with IIS +- Fixed phpmailer inifinite loop DOS vulnerability +- Fixed module icons in admin menu and modulesadmin page to be displayed in order by weight +- Fixed ticket system for improved compatibility with xoops.org 2.0.10 + + +2005/ 5/28: Version 2.0.10 JP RC1 +=============================== +- Temporarily disabled showing XOOPS News on admin top page +- Changed the name of XoopsMediaUploader::checkFileType() to its original XoopsMediaUploader::checkFileType() to maintain compatibility +- Fixed group name not showing in group admin error message +- Fixed typo in /kernel/object.php, modules/system/admin/smiles/main.php, include/xoopscodes.php, class/xoopsform/dhtmltextarea.php +- Changed token lifetime from 900 seconds to unlimited +- Fixed invalid timestamp format in RSS news feed +- Removed invalid links to unpublished news article +- Fixed link to preference settings not being displayed in newbb admin menu +- Fixed error messages being displayed when pointing to non-existent image file in image.php +- Fixed ticket error in group admin page when users over 200 in a group +- Fixed new user being added to all groups when created from the admin page +- Fixed fatal error message being displayed when trying to browse uninstalled modules +- Fixed file not found error in zipdownloader.php +- Added support for 'NOT IN' type queries in Criteria class +- Added <{$xoops_modulename}> <{$xoops_moduledir}> template vars +- Added block weight value to each block template var + + +2005/ 5/18: Version 2.0.10 JP Beta +=============================== +- Implemented new token system for validating form origination and increased protection against CSRF +- Security fix to avoid the usage of fopen and unlink when preview/debug +- Fixed bug in header.php, assign $xoops_lblocks +- Fixed bug #1157029 - Bug in include/checklogin.php +- Fixed bug #1060061 - renderValidationJS showing htmlentities instead of intended characters +- Removed foreach ($_POST as $k => $v) {${$k} = $v;} and similar ones which can be insecure under certain circumstances +- Fixed CSRF vulnerability in block/template preview +- Fixed CSRF vulnerability in news/newbb preview +- Fixed arbitrary file deletion vulerability when custom avatar upload enabled +- Security fix to prevent uploading of executable files +- Fixed XSS vulerability in redirect_header() function +- Fixed XSS vulerability in findusers section of system module +- Fixed XSS vuleratility when displaying smiley popup window +- Removed old autologin hack codes which can be insecure +- Fixed arbitrary PHP code execution vulnerability in saxparser class +- Fixed XOOPS news not being displayed when allow_url_fopen set to off +- Fixed new user not being added to specified groups when creating new user from the admin section +- Fixed many typos +- Fixed many HTML misusages +- Added more PHP5 compatibility fixes +- Added fix for duplicated blocks created in 2.0.9 +- Added custom XoopsSecurity class for xoops.org 2.0.10 compatibility + + +2004/12/30: Version 2.0.9.2 +=============================== +- Security fix to prevent session hijacking (thanks goes to GIJOE and the JP XOOPS community) +- Fixed duplicated blocks bug on module update +- phpmailer back to the version included in 2.0.7.3, as it is more stable (onokazu) + + +2004/12/25: Version 2.0.9 +=============================== +- Security fix in the newbb module for PHP version < 4.3.10 (GIJOE & onokazu) +- Security fix in the newbb module to prevent XSS attacks (minahito) +- Fixed various problems related to XoopsUser::isAdmin() and $xoops_isadmin patch in 2.0.7.1 (bugs #1014203/#1014403) (onokazu) +- Fixed incorrect parameters being passed to CriteriaCompo in modulesadmin.php (onokazu) +- Fixed incorrect parameters being passed to XoopsXmlRpcStruct::add() in BloggerApi::getUserInfo() (onokazu) +- Fixed Bug #1023022 - XoopsFormDhtmlTextArea and array_push() error (Mithrandir) +- Fixed Bug #1013989 - Inbox title shoud be plural "Private Messages" (Mithrandir) +- Fixed Bug #1004998 - readpmsg.php typo: html tag of subject is nothing (Mithrandir) +- Fixed Bug #1035707 - Enable array type options in blocks (Mithrandir) +- Fixed a typo in include/comment_form.php, patch #1041993 (Dave_l) +- Fixed Bug #1044957 - xoopsmultimailer.php Username typo when SMTP-Auth (Mithrandir) +- Fixed RFE #900348 - Sort user list alphabetically in System -> Groups. Also changed the way it fetches the users in the group so it fetches all of them with 2 queries instead of 1 + (1 per user in the group) (Mithrandir +) +- Added patch #1048384 - mysql_field_name and others, added (Mithrandir) +- Fixed bug #1049017 - Blocks sharing a template are cached wrong (Mithrandir) +- Added patch #1048382 - Module onUpdate function (Mithrandir) +- Fixed bug #989462 - Handler object caching not working (Mithrandir) +- Added RFE #900345 - View/Edit group membership in Admin -> System -> Edit User (Mithrandir) +- Fixed Bug #1055901 - group.php(IN phrase is used ,query) (Mithrandir) +- Fixed bug #1052403 - block update in module update (Mithrandir) +- More fixes for register_globals off in the top 10 page of mylinks/mydownloads modules +- Fixed a typo in modules/xoopsheadline/admin/index.php (onokazu) +- Fixed bug where 2 headline forms were using the same form name/id, causing JS error (onokazu) +- Fixed some html problems in mylinks/mydownloads admin page (onokazu) +- Secured mainfile.dist.php from disclosing paths (Mithrandir) +- Fixed bug #1073029 (onokazu) +- Fixed bug #1073532 (onokazu) +- Fixed bug #1080791 (onokazu) +- Fixed lang phrase _NOT_ACTIVENOTIFICATIONS not being assing to template (onokazu) +- Some PHP5 fixes (Mithrandir) +- Updated Smarty to version 2.6.5 +- Updated PHPMailer to version 1.72 + + +2004/09/11: Version 2.0.7.3 +=============================== +!! SECURITY FIX !! fixed more bugs that allowed session hijacking under a certain circumstance (onokazu) + + +2004/09/10: Version 2.0.7.2 +=============================== +!! SECURITY FIX !! fixed bugs that allowed session hijacking under a certain circumstance (onokazu) + + +2004/08/21: Version 2.0.7.1 +=============================== +Fixed bug #1006511 about $xoops_isadmin misuse (skalpa/the jp.xoops.org community): +- Changed XoopsUser::isAdmin() behavior to prevent problems with modules that misuse this function +- Fixed permission checking in user profile page, to only show admin links to people who are supposed to see them +- Fixed permission checking in the comments system, to only show admin links to people who are supposed to see them +Fixed incorrect escaping of configuration values in 2.0.7 (skalpa) +Changed db proxy class error message from "Action not allowed" to "Database update not allowed during a GET request" (skalpa) +Fixed bug #964084: if comment title is long multi-byte character.last byte loss (Mithrandir/domifara) +Fixed bug #977360: Wrong icon in comment bloc (Mithrandir/zoullou) +Fixed bug #976534: modules incompatibilities in 2.0.7 (Mithrandir/gijoe_peak) +Fixed bug #975803: Typo in class/pagenav.php (Mithrandir/Dave_l) +Fixed bug #974655: slogan variable with Xoops 2.0.7 (Mithrandir/brashquido) +Fixed bug #987171: typo in edituser.php (Mithrandir) +Applied patch #928503: Search results for modules with granted permissions optimised (Mithrandir/malanciault) +Applied patch #988715: cp_header.php language (Mithrandir/phppp) +Fixed MyTextSanitizer PHP notices (Mithrandir) +Fixed XoopsForm PHP Notices about an unset _extra property (Mithrandir) + + +2004/06/14: Version 2.0.7 +=============================== +!! SECURITY FIX !! preventing code injection in media uploader (skalpa) +!! SECURITY FIX !! preventing execution of external scripts in shared environments (skalpa/ackbarr) + +Fixed bug #963937: Typo in modules/system/admin/findusers/main.php (mithrandir/tom_g3x) +Fixed typo in x2t theme css colteaser class definition (w4z004) +Set formButton class to Xoops popups buttons (w4z004) +Fixed bug #960970: Incorrect display of the graphical pagenav (w4z004) +Modified the Word Censoring fix (#962025) for MySQL 4.x compat (skalpa + quick thx 2 hervet 4 help) +Ensured page title and slogan are escaped for HTML (onokazu) +Fixed bug #961565: Search form keywords not checked by JS (mithrandir/tom_g3x) +Fixed bug #961118 in XoopsFormElementTray::getElements() (mithrandir/luckec) +Fixed bug #961311: Incorrect definition of headers var in XoopsMailer class (mithrandir/tom_g3x) +XoopsForm::assign() now indexes elements by name if possible (mithrandir/kerkness) +Fixed bug #963197: xoopsHiddenText is hardcoded in formdhtmlarea (mithrandir/tom_g3x) +Fixed bug #963301: XoopsMediaUploader checkMaxHeight() doesn't work (skalpa/onokazu) +Fixed bug #963327: XoopsImageHandler delete() keeps rows in imagebody table (skalpa/tom_g3x) +Fixed bug #962025: Word censoring can mess db config options up (skalpa/tom_g3x) +Fixed bug #961313: XoopsMailer custom headers are duplicated (skalpa/tom_g3x) +Fixed bug #960683: [code] wrong translation (skalpa/ryuji+gi_joe) +Fixed snoopy bug due to language specific characters (onokazu) +Fixed a bug preventing deletion of users from the admin user search results (onokazu) +Fixed a bug preventing deletion of admin users (onokazu) +Fixed bug #915976: module onInstall feature doesn't display module messages correctly (skalpa/feugy+dave_l) +Fixed bug #898776: Xoops module resolution for www.host.com and host.com (wulff_dk) +Fixed bug #906282: XoopsGroupPermForm::render() - throws Undefined variable (mithrandir) +Fixed bug #946621: Comments system extra_param not working with register_globals off (mithrandir/gstarrett) +Fixed bug #932200: Admin > Edit user shows wrong username :-(mithrandir) +Fixed bug #936753: $xoops_module_header not in all themes (w4z004) +Fixed bug #921930: SQL queries with leading whitespace don't work (mithrandir) +Fixed bug #920480: xoops_substr always adds three dots (skalpa) +Fixed bug #921448: Undefined variable in xoopscodes.php (skalpa/dave_l) +Applied patch #953063: js Calendar first popup date bug fix (mithrandir/venezia) +Applied patch #953060: xoopstree.php selbox - subcategories not ordered (mithrandir/venezia) +Applied patch #928503: Only show search results for modules with granted permissions (mithrandir/malanciault) +Fixed bug #922152 preventing notifications to work with some Windows configurations (skalpa/robekras) +Fixed bug #930351 preventing XoopsThemeForm::insertBreak() to work +Corrected the content of $xoopsRequestUri on IIS fixing bug #895984 (skalpa) + +2/6/2004: Version 2.0.6 +=============================== +- Removed calls to XoopsHandlerRegistry class (onokazu) +- Fixed loop problem after retrieving a lost password (onokazu) +- Changed all include() calls to include_once() for xoopscodes.php (onokazu) +- Added routines to remove users from the online member list when a user is deleted (onokazu) +- Added parameters to the Critreria class constructor to allow the use of DB functions in SQL criteria (skalpa) +- Added fetchBoth() method to the XoopsDatabase class (skalpa) +- Fixed typos in class/smarty/plugins/resource.db.php (skalpa) +- Refactoring in /class/xoopsform/form.php (skalpa) +- Added some methods to /class/xoopsform/formelement.php to allow the use of accesskey and class attributes in form element tags (skalpa) +- Fixed extra HTML tags not being displayed when using the XoopsThemeForm::insertBreak() method (Catzwolf) +- Changed the default HTTP method of the search form to GET (onokazu) +- Fixed notification constants not being included during installation (onokazu) +- Fixed session data not being properly escaped before inserting to the database (onokazu) +- Some useful changes to the group permission form (onokazu) +- Fixed the block cachetime selection being reset after preview (onokazu) +- Fixed invalid regex patterns used for username filtering, also added fix to allow the safe use of multi-byte characters in username (contributed by GIJOE) +- Fixed bug where some blocks were not being displayed in block admin page on certain occasions (onokazu) +- Fixed the problem of system admin icon disappearing on certain occasions (onokazu) +- Fixed the errorhandler class to check the current error_reporting level before handleing errors (onokazu) +- Re-activated the errorhandler class (onokazu) +- Updated class/Snoopy.php to the latest version, v1.01 (onokazu) +- Fixed a typo in kernel/online.php (onokazu) +- Added some useful functions to include/xoops.js (skalpa) +- Fix for Opera in include/xoops.js (onokazu) +- Fixed user bio and signature values causing corruption in the edit profile form on certain occasions (onokazu) +- Fixed the module name being reset to the default value after module update (onokazu) +- Fixed invalid regex patterns in xoopslists.php (onokazu) +- Fixed a few issues with register_globals setting +- Fix for the auto-login feature (not activated) +- Fixed image categories not being displayed in the order set by admin (onokazu)- Fixed a typo in kernel/config.php (onokazu) +- Fixed comments not being displayed in the order as requested (onokazu) +- Fixed the mailer class not setting some header values (onokazu) +- Fixed chmod problem in class/uploader.php +- Fixed magic_quotes related problems in class/uploader.php +- Fixed notification routines causing a fatal error while trying to notify non-existent users (onokazu) +- Added fix to convert & to & within mail messages (onokazu) +- Fixed html special characters causing problem when submitting a new module name (onokazu) +- Fixed javascript error in mailuser form (onokazu) +- Fixed javascript error in calendar date select form +- Added a new Smarty function <{xoops_link}> (skalpa) +- Added check to prevent webmaster user/group from being removed completely (contributed by Ryuji) + +newbb +- Security fix in modules/newbb/viewtopic.php (onokazu) +- Security fix in modules/newbb/viewforum.php (onokazu) +- Added register_globals related fix to topicmanager.php (onokazu) +- Fixed topic moderation icons not being displayed for moderators in templates/newbb_thread.html (onokazu) +- Fixed topic time not being displayed in recent posts block on certain occasions in blocks/newbb_new.php (onokazu) +- Added fix to correctly navigate to the requested post even when the post is not on the first page of flat view (contrib by GIJOE in class/forumpost.php, viewtopic.php, viewforum.php) + +sections +- Added missing global variable declarations to index.php (onokazu) + +mydownloads +- Added register_globals related fix to modfile.php (onokazu) + +news +- Added fix to always display published date in each article (onokazu) +- Added missing ?> at the end of file in xoops_version.php (onokazu) +- Some fixes in admin/index.php + +xoopspolls +- Fixed color bar selections not working when creating/editing a new poll (onokazu) + +xoopsmembers +- Fixed 'more than X posts' not working when set to 0 (onokazu) +- Added a new language constant to language/english/main.php (Catzwolf) +- Removed invalid HTML tags in templates/xoopsmembers_searchresults.html (Catzwolf) + + +1/5/2004: Version 2.0.5.2 +=============================== +- Security fix in modules/mylinks/myheader.php +- Security fix in modules/mylinks/visit.php +- Security fix in modules/mylinks/admin/index.php + + +11/22/2003: Version 2.0.5.1 +=============================== +- Added $option parameter to xoops_gethandler function (skalpa) +- Security fix in banners.php (onokazu) +- Security fix in modules/newss/include/forumform.inc.php (onokazu) +- Security fix in include/common.php (onokazu) +- Temporarily disabled XoopsErrorHandler class (onokazu) +- Security fix in include/functions.php (onokazu) +- Removed XoopsHandlerRegistry class (onokazu) +- Added fix for preventing users entering infinite loop when recovering a lost password (onokazu) + + +10/8/2003: Version 2.0.5 +=============================== +- Fixed template files not being updated even when the 'allow update from themes directory' option was enabled in preferences +- Fixed RSS channel title being cutoff at special characters +- Minor bug fix in pagenav.php +- Fixed blocks disappearing from the block admin page on certain occasion +- Additional fixes to work with register_globals off +- Fixed problem with XoopsCode Img button not working on certain occasion +- Added missing SQL query in kernel/avatar.php +- Fixed problem with the newbb module where users could post without a thread title on certain occasion +- Fixed problem in banner admin page where banner edit form not being displayed on certain occasion +- Fixed group selection option in the blocks admin page not being selected on certain occasion +- Fixed poll option textbox forms not displaying the correct values +- Fixed show all link in user profile page not working in 2.0.5RC +- Additional phrases in language/english/global.php(_NOTITLE), language/english/search.php(_SR_IGNOREDWORDS), install/language/english/install.php(_INSTALL_L128, _INSTALL_L200) +- Added check in install/index.php to read $HTTP_ACCEPT_LANGUAGE on initial load + + +9/30/2003: Version 2.0.5 RC +=============================== +- Fixed email checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12288&forum=2 (mvandam) +- Fixed a number of bugs in blocks admin page (onokazu) +- More usability fix in blocks admin page (onokazu) +- Fixed forum topic links to correctly use the # feature in url (onokazu) +- Fixed password checking bug mentioned in http://www.xoops.org/modules/newbb/viewtopic.php?topic_id=12301&post_id=49369&order=0&viewmode=flat&pid=49203&forum=21#forumpost49369 +- Fixed database connection error when creating database during install (onokazu) +- Fixed mb_output_handler causing problems in backend.php/image.php/downloader (onokazu) +- Fixed search feature to use GET requests for prev/next/showall links (onokazu) +- Register_globals related fix in /include/comment_post.php (contrib by gstarrett) +- Added $xoopsUserIsAdmin global variable (onokazu) +- Added xoops_getLinkedUnameById function to /include/functions.php (Catzwolf) +- Fixed invalid Smarty tags in /modules/system/templates/system_siteclosed.html, /modules/system/templates/system_redirect.html, /modules/system/templates/system_imagemanager2.html (onokazu) + + +9/19/2003: Version 2.0.4 +=============================== +- XOOPS_CACHE_PATH, XOOPS_UPLOAD_PATH, XOOPS_THEME_PATH", XOOPS_COMPILE_PATH, XOOPS_THEME_URL, XOOPS_UPLOAD_URL are now set in include/common.php (onokazu) +- Added [siteurl][/siteurl] tag to XoopsCode (mvandam) +- Fixed a typo in class/uploader.php (onokazu) +- Fixed some redirect problems after login (onokazu) +- registre_globals fix in include/comment_view.php (onokazu) +- Xoops.org news is disabled by default in the admin section (onokazu) +- Added a new error handler class (class/errorhandler.php) (mvandam) +- Fixed XoopsGroupPermHandler returning duplicate permissions (onokazu) +- Fixed block-disappearing problem in blocks admin (onokazu) +- Fixed typo in kernel/notification.php (mvandam) +- Added XoopsGuestUser class in kernel/user.php (onokazu) +- Fixed newbb module to correctly use the # feature in URL (onokazu) +- Improved usability in blocks admin section +- Reduced number of users to display in group/edituser page to max 200 users (onokazu) +- Fixed bug where admins could add users with a existing username (onokazu) +- Added files for module developers to easily add group permisson feature (modules/system/groupperm.php, class/xoopsform/groupperm.php) (onokazu) +- Fixed typo in register.php (onokazu) + + +6/17/2003: Version 2.0.3 +=============================== +- fixed CSS related bug in global search page +- register_globals bug fix in comments +- Smarty updated to 2.5.0 +- fixed typo in kernel/object.php +- fixed group permission bug +- fixed bug where image categories were deleted after group permission update +- fixed bug where user votes could not be deleted in the mylinks module +- fixed some language typos +- changed XoopsGroupPermHandler::getItemIds to accept an array fot the second parameter (gperm_groupid), which was required in certain places.. +- removed avatar image files + + +4/25/2003: Version 2.0.2 +=============================== +- security fix to prevent malicious cross site scripting attacks (onokazu) +- fixed character encoding problem for some languages when using the mailer class (onokazu) +- fixed some major bugs in the xoopsheadline module (onokazu) +- fixed some cookie related problems in the forums module (mvandam) + + +4/18/2003: Version 2.0.1 +=============================== +- fixed bug where notification feature could not be turned on +- fixed character encoding problem for some languages when using the mailer class (onokazu) +- fixed the theme selection block to work again +- fixed typo in kernel/module.php +- fixed incorrect table name in xoops_version.php of the new headline module +- changed max limit size of some columns in the configoption table +- fixed image manager bug when using db store method +- xoops.org can now be disabled by adding nonews=1 + + +4/16/2003: Version 2.0.0 +=============================== +- xoopsheadlines module replaced with xoopsheadline module to fix character encoding problems +- numerous bug fixes + + +3/19/2003: Version 2.0.0 RC3 +=============================== +- a major change in the handling of theme files, the detail of which you can read in this [url=http://www.xoops.org/modules/news/article.php?storyid=677]article[/url] (onokazu) +- a new global notification feature that can easily be incorporated into modules (that use Smarty) by only modifying xoops_version.php and template files (mvandam) +- SMTP support using phpMailer (bunny) +- group permission tables merged into one table (onokazu) +- code refactoring + + +2/9/2003: Version 2.0.0 RC2 +=============================== +A bug fix release.. +- avatar upload bug +- themeset image upload bug +- register_globals fix +- recommend us block error +- error message displayed upon submit of news article +- page navigation bug in some modules +- blank page bug on some servers +- SQL displayed in blocks admin + + +1/31/2003: Version 2.0.0 RC1 +=============================== +The first public release of 2.0 series. +For new features that have been added from 1.3.x, please refer to +the articles listed below: +http://www.xoops.org/modules/news/article.php?storyid=486 +http://www.xoops.org/modules/news/article.php?storyid=549 \ No newline at end of file From onokazu @ users.sourceforge.jp Mon May 1 11:37:25 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:25 +0900 Subject: [xoops-cvslog 2933] CVS update: xoops2jp/html/class/mail Message-ID: <20060501023725.1DBF62AC266@users.sourceforge.jp> Index: xoops2jp/html/class/mail/xoopsmultimailer.php diff -u xoops2jp/html/class/mail/xoopsmultimailer.php:1.2 xoops2jp/html/class/mail/xoopsmultimailer.php:1.3 --- xoops2jp/html/class/mail/xoopsmultimailer.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/mail/xoopsmultimailer.php Mon May 1 11:37:24 2006 @@ -1,5 +1,5 @@ * @copyright copyright (c) 2000-2003 The XOOPS Project (http://www.xoops.org) * - * @version $Revision: 1.2 $ - $Date: 2005/03/18 12:51:55 $ + * @version $Revision: 1.3 $ - $Date: 2006/05/01 02:37:24 $ */ /** @@ -61,9 +61,9 @@ * * @author Jochen Buennagel * @copyright (c) 2000-2003 The Xoops Project - www.xoops.org - * @version $Revision: 1.2 $ - changed by $Author: onokazu $ on $Date: 2005/03/18 12:51:55 $ + * @version $Revision: 1.3 $ - changed by $Author: onokazu $ on $Date: 2006/05/01 02:37:24 $ */ -class XoopsMultiMailer extends phpmailer { +class XoopsMultiMailer extends PHPMailer { /** * "from" address @@ -157,7 +157,7 @@ if ($this->From == '') { $this->From = $xoopsConfig['adminmail']; } - + // $this->Sender = $xoopsConfig['adminmail']; //TODO: This line is added in OTX by Marijuana. We must verify. if ($xoopsMailerConfig["mailmethod"] == "smtpauth") { $this->Mailer = "smtp"; $this->SMTPAuth = TRUE; @@ -173,11 +173,14 @@ } /** - * Formats an address correctly. This overrides the default addr_format method which does not seem to encode $FromName correctly + * Formats an address correctly. This overrides the default AddrFormat method + * which does not seem to encode $FromName correctly + * This method name is renamed from "addr_format", because method name in parent class is renamed. * @access private * @return string */ - function addr_format($addr) { + //TODO: We must verify,whether we should prepare this method even now.(phpmailer is upgraded from 1.65 to 1.73) + function AddrFormat($addr) { if(empty($addr[1])) $formatted = $addr[0]; else From onokazu @ users.sourceforge.jp Mon May 1 11:37:24 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:24 +0900 Subject: [xoops-cvslog 2934] CVS update: xoops2jp/html/class/mail/phpmailer Message-ID: <20060501023724.EA0912AC3CD@users.sourceforge.jp> Index: xoops2jp/html/class/mail/phpmailer/ChangeLog.txt diff -u xoops2jp/html/class/mail/phpmailer/ChangeLog.txt:1.1 xoops2jp/html/class/mail/phpmailer/ChangeLog.txt:1.2 --- xoops2jp/html/class/mail/phpmailer/ChangeLog.txt:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/html/class/mail/phpmailer/ChangeLog.txt Mon May 1 11:37:24 2006 @@ -1,5 +1,35 @@ ChangeLog +Version 1.73 (Sun, Jun 10 2005) +* Fixed denial of service bug: http://www.cybsec.com/vuln/PHPMailer-DOS.pdf +* Now has a total of 20 translations +* Fixed alt attachments bug: http://tinyurl.com/98u9k + +Version 1.72 (Wed, May 25 2004) +* Added Dutch, Swedish, Czech, Norwegian, and Turkish translations. +* Received: Removed this method because spam filter programs like +SpamAssassin reject this header. +* Fixed error count bug. +* SetLanguage default is now "language/". +* Fixed magic_quotes_runtime bug. + +Version 1.71 (Tue, Jul 28 2003) +* Made several speed enhancements +* Added German and Italian translation files +* Fixed HELO/AUTH bugs on keep-alive connects +* Now provides an error message if language file does not load +* Fixed attachment EOL bug +* Updated some unclear documentation +* Added additional tests and improved others + +Version 1.70 (Mon, Jun 20 2003) +* Added SMTP keep-alive support +* Added IsError method for error detection +* Added error message translation support (SetLanguage) +* Refactored many methods to increase library performance +* Hello now sends the newer EHLO message before HELO as per RFC 2821 +* Removed the boundary class and replaced it with GetBoundary +* Removed queue support methods * New $Hostname variable * New Message-ID header * Received header reformat @@ -10,6 +40,7 @@ * quoted-encoding should now encode NULs \000 * Fixed encoding of body/AltBody (#553370) * Adds "To: undisclosed-recipients:;" when all recipients are hidden (BCC) +* Multiple bug fixes Version 1.65 (Fri, Aug 09 2002) * Fixed non-visible attachment bug (#585097) for Outlook Index: xoops2jp/html/class/mail/phpmailer/README diff -u xoops2jp/html/class/mail/phpmailer/README:1.1 xoops2jp/html/class/mail/phpmailer/README:1.2 --- xoops2jp/html/class/mail/phpmailer/README:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/html/class/mail/phpmailer/README Mon May 1 11:37:24 2006 @@ -1,9 +1,11 @@ -phpmailer - PHP email class -============================== -http://phpmailer.sourceforge.net +PHPMailer +Full Featured Email Transfer Class for PHP +========================================== -Please read LICENSE for information on this softwares availability and -distribution. +http://phpmailer.sourceforge.net/ + +This software is licenced under the LGPL. Please read LICENSE for information on the +software availability and distribution. Class Features: - Send emails with multiple TOs, CCs, BCCs and REPLY-TOs @@ -12,8 +14,8 @@ - Support for 8bit, base64, binary, and quoted-printable encoding - Uses the same methods as the very popular AspEmail active server (COM) component - SMTP authentication -- Word wrap -- Many more... +- Native language support +- Word wrap, and more! Why you might need it: @@ -37,19 +39,34 @@ Copy class.phpmailer.php into your php.ini include_path. If you are using the SMTP mailer then place class.smtp.php in your path as well. +In the language directory you will find several files like +phpmailer.lang-en.php. If you look right before the .php extension +that there are two letters. These represent the language type of the +translation file. For instance "en" is the English file and "br" is +the Portuguese file. Chose the file that best fits with your language +and place it in the PHP include path. If your language is English +then you have nothing more to do. If it is a different language then +you must point PHPMailer to the correct translation. To do this, call +the PHPMailer SetLanguage method like so: + +// To load the Portuguese version +$mail->SetLanguage("br", "/optional/path/to/language/directory/"); + +That's it. You should now be ready to use PHPMailer! + -Example +A Simple Example: IsSMTP(); // set mailer to use SMTP $mail->Host = "smtp1.example.com;smtp2.example.com"; // specify main and backup server -$mail->SMTPAuth = true // turn on SMTP authentication -$mail->Username = "jswan" // SMTP username -$mail->Password = "secret" // SMTP password +$mail->SMTPAuth = true; // turn on SMTP authentication +$mail->Username = "jswan"; // SMTP username +$mail->Password = "secret"; // SMTP password $mail->From = "from @ example.com"; $mail->FromName = "Mailer"; @@ -82,4 +99,4 @@ Download: http://sourceforge.net/project/showfiles.php?group_id=26031 -Brent R. Matzelle +Brent R. Matzelle Index: xoops2jp/html/class/mail/phpmailer/class.phpmailer.php diff -u xoops2jp/html/class/mail/phpmailer/class.phpmailer.php:1.1 xoops2jp/html/class/mail/phpmailer/class.phpmailer.php:1.2 --- xoops2jp/html/class/mail/phpmailer/class.phpmailer.php:1.1 Thu Sep 9 14:14:50 2004 +++ xoops2jp/html/class/mail/phpmailer/class.phpmailer.php Mon May 1 11:37:24 2006 @@ -1,23 +1,23 @@ +// Copyright (C) 2001 - 2003 Brent R. Matzelle // // License: LGPL, see LICENSE //////////////////////////////////////////////////// /** - * phpmailer - PHP email transport class + * PHPMailer - PHP email transport class + * @package PHPMailer * @author Brent R. Matzelle + * @copyright 2001 - 2003 Brent R. Matzelle */ -class phpmailer +class PHPMailer { ///////////////////////////////////////////////// // PUBLIC VARIABLES @@ -25,21 +25,18 @@ /** * Email priority (1 = High, 3 = Normal, 5 = low). - * @access public * @var int */ var $Priority = 3; /** * Sets the CharSet of the message. - * @access public * @var string */ var $CharSet = "iso-8859-1"; /** * Sets the Content-type of the message. - * @access public * @var string */ var $ContentType = "text/plain"; @@ -47,43 +44,37 @@ /** * Sets the Encoding of the message. Options for this are "8bit", * "7bit", "binary", "base64", and "quoted-printable". - * @access public * @var string */ var $Encoding = "8bit"; /** * Holds the most recent mailer error message. - * @access public * @var string */ var $ErrorInfo = ""; /** * Sets the From email address for the message. - * @access public * @var string */ var $From = "root @ localhost"; /** * Sets the From name of the message. - * @access public * @var string */ var $FromName = "Root User"; /** - * Sets the Sender email of the message. If not empty, will be sent via -f to sendmail - * or as 'MAIL FROM' in smtp mode. - * @access public + * Sets the Sender email (Return-Path) of the message. If not empty, + * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. * @var string */ var $Sender = ""; /** * Sets the Subject of the message. - * @access public * @var string */ var $Subject = ""; @@ -91,7 +82,6 @@ /** * Sets the Body of the message. This can be either an HTML or text body. * If HTML then run IsHTML(true). - * @access public * @var string */ var $Body = ""; @@ -101,7 +91,6 @@ * email to multipart/alternative. This body can be read by mail * clients that do not have HTML email capability such as mutt. Clients * that can read HTML will view the normal Body. - * @access public * @var string */ var $AltBody = ""; @@ -109,72 +98,49 @@ /** * Sets word wrapping on the body of the message to a given number of * characters. - * @access public * @var int */ var $WordWrap = 0; /** * Method to send mail: ("mail", "sendmail", or "smtp"). - * @access public * @var string */ var $Mailer = "mail"; /** * Sets the path of the sendmail program. - * @access public * @var string */ var $Sendmail = "/usr/sbin/sendmail"; - - /** - * Turns Microsoft mail client headers on and off. Useful mostly - * for older clients. - * @access public - * @var bool - */ - var $UseMSMailHeaders = false; /** - * Path to phpmailer plugins. This is now only useful if the SMTP class + * Path to PHPMailer plugins. This is now only useful if the SMTP class * is in a different directory than the PHP include path. - * @access public * @var string */ var $PluginDir = ""; /** - * Holds phpmailer version. - * @access public + * Holds PHPMailer version. * @var string */ - var $Version = "1.65"; + var $Version = "1.73"; /** * Sets the email address that a reading confirmation will be sent. - * @access public * @var string */ var $ConfirmReadingTo = ""; /** - * Sets the line endings of the message. - * @access public - * @var string - */ - var $LE = "\n"; - - /** * Sets the hostname to use in Message-Id and Received headers * and as default HELO string. If empty, the value returned * by SERVER_NAME is used or 'localhost.localdomain'. - * @access public * @var string */ var $Hostname = ""; - ///////////////////////////////////////////////// // SMTP VARIABLES ///////////////////////////////////////////////// @@ -185,42 +151,36 @@ * for each host by using this format: [hostname:port] * (e.g. "smtp1.example.com:25;smtp2.example.com"). * Hosts will be tried in order. - * @access public * @var string */ var $Host = "localhost"; /** * Sets the default SMTP server port. - * @access public * @var int */ var $Port = 25; /** * Sets the SMTP HELO of the message (Default is $Hostname). - * @access public * @var string */ var $Helo = ""; /** * Sets SMTP authentication. Utilizes the Username and Password variables. - * @access public * @var bool */ var $SMTPAuth = false; /** * Sets SMTP username. - * @access public * @var string */ var $Username = ""; /** * Sets SMTP password. - * @access public * @var string */ var $Password = ""; @@ -228,83 +188,48 @@ /** * Sets the SMTP server timeout in seconds. This function will not * work with the win32 version. - * @access public * @var int */ var $Timeout = 10; /** * Sets SMTP class debugging on or off. - * @access public * @var bool */ var $SMTPDebug = false; - - ///////////////////////////////////////////////// - // PRIVATE VARIABLES - ///////////////////////////////////////////////// - /** - * Holds all "To" addresses. - * @access private - * @var array + * Prevents the SMTP connection from being closed after each mail + * sending. If this is set to true then to close the connection + * requires an explicit call to SmtpClose(). + * @var bool */ - var $to = array(); + var $SMTPKeepAlive = false; - /** - * Holds all "CC" addresses. - * @access private - * @var array + /**#@+ + * @access private */ + var $smtp = NULL; + var $to = array(); var $cc = array(); - - /** - * Holds all "BCC" addresses. - * @access private - * @var array - */ var $bcc = array(); - - /** - * Holds all "Reply-To" addresses. - * @var array - */ var $ReplyTo = array(); - - /** - * Holds all string and binary attachments. - * @access private - * @var array - */ var $attachment = array(); - - /** - * Holds all custom headers. - * @var array - */ var $CustomHeader = array(); - - /** - * Holds the type of the message. - * @var string - */ var $message_type = ""; - - /** - * Holds the message boundaries. - * @access private - * @var string array - */ var $boundary = array(); - + var $language = array(); + var $error_count = 0; + var $LE = "\n"; + /**#@-*/ + ///////////////////////////////////////////////// // VARIABLE METHODS ///////////////////////////////////////////////// /** - * Sets message type to HTML. Returns void. - * @access public + * Sets message type to HTML. + * @param bool $bool * @return void */ function IsHTML($bool) { @@ -316,8 +241,6 @@ /** * Sets Mailer to send message using SMTP. - * Returns void. - * @access public * @return void */ function IsSMTP() { @@ -326,8 +249,6 @@ /** * Sets Mailer to send message using PHP mail() function. - * Returns void. - * @access public * @return void */ function IsMail() { @@ -336,8 +257,6 @@ /** * Sets Mailer to send message using the $Sendmail program. - * Returns void. - * @access public * @return void */ function IsSendmail() { @@ -345,12 +264,10 @@ } /** - * Sets Mailer to send message using the qmail MTA. Returns void. - * @access public + * Sets Mailer to send message using the qmail MTA. * @return void */ function IsQmail() { - //$this->Sendmail = "/var/qmail/bin/qmail-inject"; $this->Sendmail = "/var/qmail/bin/sendmail"; $this->Mailer = "sendmail"; } @@ -361,8 +278,9 @@ ///////////////////////////////////////////////// /** - * Adds a "To" address. Returns void. - * @access public + * Adds a "To" address. + * @param string $address + * @param string $name * @return void */ function AddAddress($address, $name = "") { @@ -374,10 +292,9 @@ /** * Adds a "Cc" address. Note: this function works * with the SMTP mailer on win32, not with the "mail" - * mailer. This is a PHP bug that has been submitted - * on http://bugs.php.net. The *NIX version of PHP - * functions correctly. Returns void. - * @access public + * mailer. + * @param string $address + * @param string $name * @return void */ function AddCC($address, $name = "") { @@ -389,11 +306,9 @@ /** * Adds a "Bcc" address. Note: this function works * with the SMTP mailer on win32, not with the "mail" - * mailer. This is a PHP bug that has been submitted - * on http://bugs.php.net. The *NIX version of PHP - * functions correctly. - * Returns void. - * @access public + * mailer. + * @param string $address + * @param string $name * @return void */ function AddBCC($address, $name = "") { @@ -403,8 +318,9 @@ } /** - * Adds a "Reply-to" address. Returns void. - * @access public + * Adds a "Reply-to" address. + * @param string $address + * @param string $name * @return void */ function AddReplyTo($address, $name = "") { @@ -421,17 +337,17 @@ /** * Creates message and assigns Mailer. If the message is * not sent successfully then it returns false. Use the ErrorInfo - * variable to view description of the error. Returns bool. - * @access public + * variable to view description of the error. * @return bool */ function Send() { $header = ""; $body = ""; + $result = true; if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { - $this->error_handler("You must provide at least one recipient email address"); + $this->SetError($this->Lang("provide_address")); return false; } @@ -439,153 +355,40 @@ if(!empty($this->AltBody)) $this->ContentType = "multipart/alternative"; - // Attach sender information & date - $header = $this->received(); - $header .= sprintf("Date: %s%s", $this->rfc_date(), $this->LE); - $header .= $this->create_header(); - - if(!$body = $this->create_body()) - return false; + $this->error_count = 0; // reset errors + $this->SetMessageType(); + $header .= $this->CreateHeader(); + $body = $this->CreateBody(); - //echo "
".$header . $body . "
"; // debugging + if($body == "") { return false; } // Choose the mailer - if($this->Mailer == "sendmail") - { - if(!$this->sendmail_send($header, $body)) - return false; - } - elseif($this->Mailer == "mail") - { - if(!$this->mail_send($header, $body)) - return false; - } - elseif($this->Mailer == "smtp") + switch($this->Mailer) { - if(!$this->smtp_send($header, $body)) - return false; - } - else - { - $this->error_handler(sprintf("%s mailer is not supported", $this->Mailer)); - return false; + case "sendmail": + $result = $this->SendmailSend($header, $body); + break; + case "mail": + $result = $this->MailSend($header, $body); + break; + case "smtp": + $result = $this->SmtpSend($header, $body); + break; + default: + $this->SetError($this->Mailer . $this->Lang("mailer_not_supported")); + $result = false; + break; } - return true; + return $result; } /** - * Sends mail message to an assigned queue directory. Has an optional - * sendTime argument. This is used when the user wants the - * message to be sent from the queue at a predetermined time. - * The data must be a valid timestamp like that returned from - * the time() or strtotime() functions. Returns false on failure - * or the message file name if success. - * @access public - * @return string - */ - function SendToQueue($queue_path, $send_time = 0) { - $message = array(); - $header = ""; - $body = ""; - - // If invalid or empty just set to the current time - if($send_time == 0) - $send_time = time(); - - if(!is_dir($queue_path)) - { - $this->error_handler("The supplied queue directory does not exist"); - return false; - } - - if((count($this->to) + count($this->cc) + count($this->bcc)) < 1) - { - $this->error_handler("You must provide at least one recipient email address"); - return false; - } - - // Set whether the message is multipart/alternative - if(!empty($this->AltBody)) - $this->ContentType = "multipart/alternative"; - - $header = $this->create_header(); - if(!$body = $this->create_body()) - return false; - - // Seed randomizer - mt_srand(time()); - $msg_id = md5(uniqid(mt_rand())); - - $fp = @fopen($queue_path . $msg_id . ".pqm", "wb"); - if(!$fp) - { - $this->error_handler(sprintf("Could not write to %s directory", $queue_path)); - return false; - } - - $message[] = sprintf("----START PQM HEADER----%s", $this->LE); - $message[] = sprintf("SendTime: %s%s", $send_time, $this->LE); - $message[] = sprintf("Mailer: %s%s", $this->Mailer, $this->LE); - - // Choose the mailer - if($this->Mailer == "sendmail") - { - $message[] = sprintf("Sendmail: %s%s", $this->Sendmail, $this->LE); - $message[] = sprintf("Sender: %s%s", $this->Sender, $this->LE); - } - elseif($this->Mailer == "mail") - { - $message[] = sprintf("Sender: %s%s", $this->Sender, $this->LE); - $message[] = sprintf("Subject: %s%s", $this->Subject, $this->LE); - $message[] = sprintf("to: %s%s", $this->addr_list($this->to), $this->LE); - } - elseif($this->Mailer == "smtp") - { - $message[] = sprintf("Host: %s%s", $this->Host, $this->LE); - $message[] = sprintf("Port: %d%s", $this->Port, $this->LE); - $message[] = sprintf("Helo: %s%s", $this->Helo, $this->LE); - $message[] = sprintf("Timeout: %d%s", $this->Timeout, $this->LE); - - if($this->SMTPAuth) - $auth_no = 1; - else - $auth_no = 0; - $message[] = sprintf("SMTPAuth: %d%s", $auth_no, $this->LE); - $message[] = sprintf("Username: %s%s", $this->Username, $this->LE); - $message[] = sprintf("Password: %s%s", $this->Password, $this->LE); - $message[] = sprintf("From: %s%s", $this->From, $this->LE); - - $message[] = sprintf("to: %s%s", $this->addr_list($this->to), $this->LE); - $message[] = sprintf("cc: %s%s", $this->addr_list($this->cc), $this->LE); - $message[] = sprintf("bcc: %s%s", $this->addr_list($this->bcc), $this->LE); - } - else - { - $this->error_handler(sprintf("%s mailer is not supported", $this->Mailer)); - return false; - } - - $message[] = sprintf("----END PQM HEADER----%s", $this->LE); // end of pqm header - $message[] = $header; - $message[] = $body; - - if(fwrite($fp, join("", $message)) == -1) - { - $this->error_handler("Write to file failed"); - return false; - } - fclose($fp); - - return ($msg_id . ".pqm"); - } - - /** - * Sends mail using the $Sendmail program. Returns bool. + * Sends mail using the $Sendmail program. * @access private * @return bool */ - function sendmail_send($header, $body) { + function SendmailSend($header, $body) { if ($this->Sender != "") $sendmail = sprintf("%s -oi -f %s -t", $this->Sendmail, $this->Sender); else @@ -593,7 +396,7 @@ if(!@$mail = popen($sendmail, "w")) { - $this->error_handler(sprintf("Could not execute %s", $this->Sendmail)); + $this->SetError($this->Lang("execute") . $this->Sendmail); return false; } @@ -603,7 +406,7 @@ $result = pclose($mail) >> 8 & 0xFF; if($result != 0) { - $this->error_handler(sprintf("Could not execute %s", $this->Sendmail)); + $this->SetError($this->Lang("execute") . $this->Sendmail); return false; } @@ -611,41 +414,35 @@ } /** - * Sends mail using the PHP mail() function. Returns bool. + * Sends mail using the PHP mail() function. * @access private * @return bool */ - function mail_send($header, $body) { - //$to = substr($this->addr_append("To", $this->to), 4, -2); - - // Cannot add Bcc's to the $to - $to = $this->to[0][0]; // no extra comma - for($i = 1; $i < count($this->to); $i++) - $to .= sprintf(",%s", $this->to[$i][0]); - - if ($this->Sender != "" && PHP_VERSION >= "4.0") + function MailSend($header, $body) { + $to = ""; + for($i = 0; $i < count($this->to); $i++) { - $old_from = ini_get("sendmail_from"); - ini_set("sendmail_from", $this->Sender); + if($i != 0) { $to .= ", "; } + $to .= $this->to[$i][0]; } - if ($this->Sender != "" && PHP_VERSION >= "4.0.5") + if ($this->Sender != "" && strlen(ini_get("safe_mode"))< 1) { - // The fifth parameter to mail is only available in PHP >= 4.0.5 + $old_from = ini_get("sendmail_from"); + ini_set("sendmail_from", $this->Sender); $params = sprintf("-oi -f %s", $this->Sender); - $rt = @mail($to, $this->encode_header($this->Subject), $body, $header, $params); + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, + $header, $params); } else - { - $rt = @mail($to, $this->encode_header($this->Subject), $body, $header); - } + $rt = @mail($to, $this->EncodeHeader($this->Subject), $body, $header); if (isset($old_from)) ini_set("sendmail_from", $old_from); if(!$rt) { - $this->error_handler("Could not instantiate mail()"); + $this->SetError($this->Lang("instantiate")); return false; } @@ -659,158 +456,178 @@ * @access private * @return bool */ - function smtp_send($header, $body) { - // Include SMTP class code, but not twice + function SmtpSend($header, $body) { include_once($this->PluginDir . "class.smtp.php"); - - $smtp = new SMTP; - - $smtp->do_debug = $this->SMTPDebug; - - // Try to connect to all SMTP servers - $hosts = explode(";", $this->Host); - $index = 0; - $connection = false; - $smtp_from = ""; + $error = ""; $bad_rcpt = array(); - $e = ""; - // Retry while there is no connection - while($index < count($hosts) && $connection == false) - { - if(strstr($hosts[$index], ":")) - list($host, $port) = explode(":", $hosts[$index]); - else - { - $host = $hosts[$index]; - $port = $this->Port; - } - - if($smtp->Connect($host, $port, $this->Timeout)) - $connection = true; - //printf("%s host could not connect
", $hosts[$index]); //debug only - $index++; - } - if(!$connection) - { - $this->error_handler("SMTP Error: could not connect to SMTP host server(s)"); + if(!$this->SmtpConnect()) return false; - } - - // Must perform HELO before authentication - if ($this->Helo != '') - $smtp->Hello($this->Helo); - else - $smtp->Hello($this->get_server_hostname()); - - // If user requests SMTP authentication - if($this->SMTPAuth) - { - if(!$smtp->Authenticate($this->Username, $this->Password)) - { - $this->error_handler("SMTP Error: Could not authenticate"); - return false; - } - } - if ($this->Sender == "") - $smtp_from = $this->From; - else - $smtp_from = $this->Sender; - - if(!$smtp->Mail(sprintf("<%s>", $smtp_from))) + $smtp_from = ($this->Sender == "") ? $this->From : $this->Sender; + if(!$this->smtp->Mail($smtp_from)) { - $e = sprintf("SMTP Error: From address [%s] failed", $smtp_from); - $this->error_handler($e); + $error = $this->Lang("from_failed") . $smtp_from; + $this->SetError($error); + $this->smtp->Reset(); return false; } // Attempt to send attach all recipients for($i = 0; $i < count($this->to); $i++) { - if(!$smtp->Recipient(sprintf("<%s>", $this->to[$i][0]))) + if(!$this->smtp->Recipient($this->to[$i][0])) $bad_rcpt[] = $this->to[$i][0]; } for($i = 0; $i < count($this->cc); $i++) { - if(!$smtp->Recipient(sprintf("<%s>", $this->cc[$i][0]))) + if(!$this->smtp->Recipient($this->cc[$i][0])) $bad_rcpt[] = $this->cc[$i][0]; } for($i = 0; $i < count($this->bcc); $i++) { - if(!$smtp->Recipient(sprintf("<%s>", $this->bcc[$i][0]))) + if(!$this->smtp->Recipient($this->bcc[$i][0])) $bad_rcpt[] = $this->bcc[$i][0]; } - // Create error message - if(count($bad_rcpt) > 0) + if(count($bad_rcpt) > 0) // Create error message { for($i = 0; $i < count($bad_rcpt); $i++) { - if($i != 0) - $e .= ", "; - $e .= $bad_rcpt[$i]; + if($i != 0) { $error .= ", "; } + $error .= $bad_rcpt[$i]; } - $e = sprintf("SMTP Error: The following recipients failed [%s]", $e); - $this->error_handler($e); - + $error = $this->Lang("recipients_failed") . $error; + $this->SetError($error); + $this->smtp->Reset(); return false; } - - if(!$smtp->Data(sprintf("%s%s", $header, $body))) + if(!$this->smtp->Data($header . $body)) { - $this->error_handler("SMTP Error: Data not accepted"); + $this->SetError($this->Lang("data_not_accepted")); + $this->smtp->Reset(); return false; } - $smtp->Quit(); - $smtp->Close(); + if($this->SMTPKeepAlive == true) + $this->smtp->Reset(); + else + $this->SmtpClose(); return true; } - - ///////////////////////////////////////////////// - // MESSAGE CREATION METHODS - ///////////////////////////////////////////////// - /** - * Creates recipient headers. Returns string. + * Initiates a connection to an SMTP server. Returns false if the + * operation failed. * @access private - * @return string + * @return bool */ - function addr_append($type, $addr) { - $addr_str = $type . ": "; - $addr_str .= $this->addr_format($addr[0]); - if(count($addr) > 1) + function SmtpConnect() { + if($this->smtp == NULL) { $this->smtp = new SMTP(); } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(";", $this->Host); + $index = 0; + $connection = ($this->smtp->Connected()); + + // Retry while there is no connection + while($index < count($hosts) && $connection == false) { - for($i = 1; $i < count($addr); $i++) + if(strstr($hosts[$index], ":")) + list($host, $port) = explode(":", $hosts[$index]); + else + { + $host = $hosts[$index]; + $port = $this->Port; + } + + if($this->smtp->Connect($host, $port, $this->Timeout)) { - $addr_str .= sprintf(", %s", $this->addr_format($addr[$i])); + if ($this->Helo != '') + $this->smtp->Hello($this->Helo); + else + $this->smtp->Hello($this->ServerHostname()); + + if($this->SMTPAuth) + { + if(!$this->smtp->Authenticate($this->Username, + $this->Password)) + { + $this->SetError($this->Lang("authenticate")); + $this->smtp->Reset(); + $connection = false; + } + } + $connection = true; } - $addr_str .= $this->LE; + $index++; } - else - $addr_str .= $this->LE; + if(!$connection) + $this->SetError($this->Lang("connect_host")); - return($addr_str); + return $connection; + } + + /** + * Closes the active SMTP session if one exists. + * @return void + */ + function SmtpClose() { + if($this->smtp != NULL) + { + if($this->smtp->Connected()) + { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } } + + /** + * Sets the language for all class error messages. Returns false + * if it cannot load the language file. The default language type + * is English. + * @param string $lang_type Type of language (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + * @return bool + */ + function SetLanguage($lang_type, $lang_path = "language/") { + if(file_exists($lang_path.'phpmailer.lang-'.$lang_type.'.php')) + include($lang_path.'phpmailer.lang-'.$lang_type.'.php'); + else if(file_exists($lang_path.'phpmailer.lang-en.php')) + include($lang_path.'phpmailer.lang-en.php'); + else + { + $this->SetError("Could not load language file"); + return false; + } + $this->language = $PHPMAILER_LANG; + return true; + } + + ///////////////////////////////////////////////// + // MESSAGE CREATION METHODS + ///////////////////////////////////////////////// + /** - * Creates a semicolon delimited list for use in pqm files. + * Creates recipient headers. * @access private * @return string */ - function addr_list($list_array) { - $addr_list = ""; - for($i = 0; $i < count($list_array); $i++) - { - if($i > 0) - $addr_list .= ";"; - $addr_list .= $list_array[$i][0]; + function AddrAppend($type, $addr) { + $addr_str = $type . ": "; + $addr_str .= $this->AddrFormat($addr[0]); + if(count($addr) > 1) + { + for($i = 1; $i < count($addr); $i++) + $addr_str .= ", " . $this->AddrFormat($addr[$i]); } - - return $addr_list; + $addr_str .= $this->LE; + + return $addr_str; } /** @@ -818,11 +635,14 @@ * @access private * @return string */ - function addr_format($addr) { + function AddrFormat($addr) { if(empty($addr[1])) $formatted = $addr[0]; else - $formatted = sprintf('%s <%s>', $this->encode_header($addr[1], 'phrase'), $addr[0]); + { + $formatted = $this->EncodeHeader($addr[1], 'phrase') . " <" . + $addr[0] . ">"; + } return $formatted; } @@ -830,19 +650,16 @@ /** * Wraps message for use with mailers that do not * automatically perform wrapping and for quoted-printable. - * Original written by philippe. Returns string. + * Original written by philippe. * @access private * @return string */ - function word_wrap($message, $length, $qp_mode = false) { - if ($qp_mode) - $soft_break = sprintf(" =%s", $this->LE); - else - $soft_break = $this->LE; + function WrapText($message, $length, $qp_mode = false) { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; - $message = $this->fix_eol($message); + $message = $this->FixEOL($message); if (substr($message, -1) == $this->LE) - $message = substr($message, 0, -1); + $message = substr($message, 0, -1); $line = explode($this->LE, $message); $message = ""; @@ -895,10 +712,8 @@ else { $buf_o = $buf; - if ($e == 0) - $buf .= $word; - else - $buf .= " " . $word; + $buf .= ($e == 0) ? $word : (" " . $word); + if (strlen($buf) > $length and $buf_o != "") { $message .= $buf_o . $soft_break; @@ -909,7 +724,7 @@ $message .= $buf . $this->LE; } - return ($message); + return $message; } /** @@ -924,218 +739,245 @@ switch($this->message_type) { case "alt": - case "alt_attachment": - $this->AltBody = $this->word_wrap($this->AltBody, $this->WordWrap); + // fall through + case "alt_attachments": + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); break; default: - $this->Body = $this->word_wrap($this->Body, $this->WordWrap); + $this->Body = $this->WrapText($this->Body, $this->WordWrap); break; } } /** - * Assembles message header. Returns a string if successful - * or false if unsuccessful. + * Assembles message header. * @access private * @return string */ - function create_header() { - $header = array(); + function CreateHeader() { + $result = ""; // Set the boundaries $uniq_id = md5(uniqid(time())); $this->boundary[1] = "b1_" . $uniq_id; $this->boundary[2] = "b2_" . $uniq_id; + $result .= $this->HeaderLine("Date", $this->RFCDate()); + if($this->Sender == "") + $result .= $this->HeaderLine("Return-Path", trim($this->From)); + else + $result .= $this->HeaderLine("Return-Path", trim($this->Sender)); + // To be created automatically by mail() if($this->Mailer != "mail") { if(count($this->to) > 0) - $header[] = $this->addr_append("To", $this->to); + $result .= $this->AddrAppend("To", $this->to); else if (count($this->cc) == 0) - $header[] = "To: undisclosed-recipients:;".$this->LE; + $result .= $this->HeaderLine("To", "undisclosed-recipients:;"); + if(count($this->cc) > 0) + $result .= $this->AddrAppend("Cc", $this->cc); } $from = array(); $from[0][0] = trim($this->From); $from[0][1] = $this->FromName; - $header[] = $this->addr_append("From", $from); - - if(count($this->cc) > 0) - $header[] = $this->addr_append("Cc", $this->cc); + $result .= $this->AddrAppend("From", $from); // sendmail and mail() extract Bcc from the header before sending if((($this->Mailer == "sendmail") || ($this->Mailer == "mail")) && (count($this->bcc) > 0)) - $header[] = $this->addr_append("Bcc", $this->bcc); + $result .= $this->AddrAppend("Bcc", $this->bcc); if(count($this->ReplyTo) > 0) - $header[] = $this->addr_append("Reply-to", $this->ReplyTo); + $result .= $this->AddrAppend("Reply-to", $this->ReplyTo); // mail() sets the subject itself if($this->Mailer != "mail") - $header[] = sprintf("Subject: %s%s", $this->encode_header(trim($this->Subject)), $this->LE); + $result .= $this->HeaderLine("Subject", $this->EncodeHeader(trim($this->Subject))); - $header[] = sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->get_server_hostname(), $this->LE); - $header[] = sprintf("X-Priority: %d%s", $this->Priority, $this->LE); - $header[] = sprintf("X-Mailer: phpmailer [version %s]%s", $this->Version, $this->LE); - if($this->Sender == "") - $header[] = sprintf("Return-Path: %s%s", trim($this->From), $this->LE); - else - $header[] = sprintf("Return-Path: %s%s", trim($this->Sender), $this->LE); + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + $result .= $this->HeaderLine("X-Priority", $this->Priority); + $result .= $this->HeaderLine("X-Mailer", "PHPMailer [version " . $this->Version . "]"); if($this->ConfirmReadingTo != "") - $header[] = sprintf("Disposition-Notification-To: <%s>%s", - trim($this->ConfirmReadingTo), $this->LE); + { + $result .= $this->HeaderLine("Disposition-Notification-To", + "<" . trim($this->ConfirmReadingTo) . ">"); + } // Add custom headers for($index = 0; $index < count($this->CustomHeader); $index++) - $header[] = sprintf("%s: %s%s", trim($this->CustomHeader[$index][0]), $this->encode_header(trim($this->CustomHeader[$index][1])), $this->LE); - - if($this->UseMSMailHeaders) - $header[] = $this->AddMSMailHeaders(); - - $header[] = sprintf("MIME-Version: 1.0%s", $this->LE); - - // Determine what type of message this is - if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) - $this->message_type = "plain"; - else { - if(count($this->attachment) > 0) - $this->message_type = "attachments"; - if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) - $this->message_type = "alt"; - if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) - $this->message_type = "alt_attachments"; + $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), + $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); } - + $result .= $this->HeaderLine("MIME-Version", "1.0"); + switch($this->message_type) { case "plain": - $header[] = sprintf("Content-Transfer-Encoding: %s%s", - $this->Encoding, $this->LE); - $header[] = sprintf("Content-Type: %s; charset=\"%s\"", + $result .= $this->HeaderLine("Content-Transfer-Encoding", $this->Encoding); + $result .= sprintf("Content-Type: %s; charset=\"%s\"", $this->ContentType, $this->CharSet); break; case "attachments": + // fall through case "alt_attachments": - if($this->EmbeddedImageCount() > 0) + if($this->InlineImageExists()) { - $header[] = sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", + $result .= sprintf("Content-Type: %s;%s\ttype=\"text/html\";%s\tboundary=\"%s\"%s", "multipart/related", $this->LE, $this->LE, $this->boundary[1], $this->LE); } else { - $header[] = sprintf("Content-Type: %s;%s", - "multipart/mixed", $this->LE); - $header[] = sprintf("\tboundary=\"%s\"%s", $this->boundary[1], $this->LE); + $result .= $this->HeaderLine("Content-Type", "multipart/mixed;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); } break; case "alt": - $header[] = sprintf("Content-Type: %s;%s", - "multipart/alternative", $this->LE); - $header[] = sprintf("\tboundary=\"%s\"%s", $this->boundary[1], $this->LE); + $result .= $this->HeaderLine("Content-Type", "multipart/alternative;"); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); break; } - // No additional lines when using mail() function if($this->Mailer != "mail") - $header[] = $this->LE.$this->LE; + $result .= $this->LE.$this->LE; - return(join("", $header)); + return $result; } /** - * Assembles the message body. Returns a string if successful - * or false if unsuccessful. + * Assembles the message body. Returns an empty string on failure. * @access private * @return string */ - function create_body() { - $body = array(); + function CreateBody() { + $result = ""; $this->SetWordWrap(); switch($this->message_type) { case "alt": - // Return text of body - $bndry = new Boundary($this->boundary[1]); - $bndry->CharSet = $this->CharSet; - $bndry->Encoding = $this->Encoding; - $body[] = $bndry->GetSource(); - - $body[] = $this->encode_string($this->AltBody, $this->Encoding); - $body[] = $this->LE.$this->LE; - - $bndry = new Boundary($this->boundary[1]); - $bndry->CharSet = $this->CharSet; - $bndry->ContentType = "text/html"; - $bndry->Encoding = $this->Encoding; - $body[] = $bndry->GetSource(); + $result .= $this->GetBoundary($this->boundary[1], "", + "text/plain", ""); + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[1], "", + "text/html", ""); - $body[] = $this->encode_string($this->Body, $this->Encoding); - $body[] = $this->LE.$this->LE; + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; - // End the boundary - $body[] = sprintf("%s--%s--%s", $this->LE, - $this->boundary[1], $this->LE.$this->LE); + $result .= $this->EndBoundary($this->boundary[1]); break; case "plain": - $body[] = $this->encode_string($this->Body, $this->Encoding); + $result .= $this->EncodeString($this->Body, $this->Encoding); break; case "attachments": - $bndry = new Boundary($this->boundary[1]); - $bndry->CharSet = $this->CharSet; - $bndry->ContentType = $this->ContentType; - $bndry->Encoding = $this->Encoding; - $body[] = $bndry->GetSource(false) . $this->LE; - $body[] = $this->encode_string($this->Body, $this->Encoding); - $body[] = $this->LE; + $result .= $this->GetBoundary($this->boundary[1], "", "", ""); + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE; - if(!$body[] = $this->attach_all()) - return false; + $result .= $this->AttachAll(); break; case "alt_attachments": - $body[] = sprintf("--%s%s", $this->boundary[1], $this->LE); - $body[] = sprintf("Content-Type: %s;%s" . - "\tboundary=\"%s\"%s", + $result .= sprintf("--%s%s", $this->boundary[1], $this->LE); + $result .= sprintf("Content-Type: %s;%s" . + "\tboundary=\"%s\"%s", "multipart/alternative", $this->LE, $this->boundary[2], $this->LE.$this->LE); // Create text body - $bndry = new Boundary($this->boundary[2]); - $bndry->CharSet = $this->CharSet; - $bndry->ContentType = "text/plain"; - $bndry->Encoding = $this->Encoding; - $body[] = $bndry->GetSource() . $this->LE; - - $body[] = $this->encode_string($this->AltBody, $this->Encoding); - $body[] = $this->LE.$this->LE; + $result .= $this->GetBoundary($this->boundary[2], "", + "text/plain", "") . $this->LE; + + $result .= $this->EncodeString($this->AltBody, $this->Encoding); + $result .= $this->LE.$this->LE; // Create the HTML body - $bndry = new Boundary($this->boundary[2]); - $bndry->CharSet = $this->CharSet; - $bndry->ContentType = "text/html"; - $bndry->Encoding = $this->Encoding; - $body[] = $bndry->GetSource() . $this->LE; + $result .= $this->GetBoundary($this->boundary[2], "", + "text/html", "") . $this->LE; - $body[] = $this->encode_string($this->Body, $this->Encoding); - $body[] = $this->LE.$this->LE; + $result .= $this->EncodeString($this->Body, $this->Encoding); + $result .= $this->LE.$this->LE; - $body[] = sprintf("%s--%s--%s", $this->LE, - $this->boundary[2], $this->LE.$this->LE); + $result .= $this->EndBoundary($this->boundary[2]); - if(!$body[] = $this->attach_all()) - return false; + $result .= $this->AttachAll(); break; } - $sBody = join("", $body); + if($this->IsError()) + $result = ""; - return $sBody; + return $result; } + /** + * Returns the start of a message boundary. + * @access private + */ + function GetBoundary($boundary, $charSet, $contentType, $encoding) { + $result = ""; + if($charSet == "") { $charSet = $this->CharSet; } + if($contentType == "") { $contentType = $this->ContentType; } + if($encoding == "") { $encoding = $this->Encoding; } + + $result .= $this->TextLine("--" . $boundary); + $result .= sprintf("Content-Type: %s; charset = \"%s\"", + $contentType, $charSet); + $result .= $this->LE; + $result .= $this->HeaderLine("Content-Transfer-Encoding", $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Returns the end of a message boundary. + * @access private + */ + function EndBoundary($boundary) { + return $this->LE . "--" . $boundary . "--" . $this->LE; + } + + /** + * Sets the message type. + * @access private + * @return void + */ + function SetMessageType() { + if(count($this->attachment) < 1 && strlen($this->AltBody) < 1) + $this->message_type = "plain"; + else + { + if(count($this->attachment) > 0) + $this->message_type = "attachments"; + if(strlen($this->AltBody) > 0 && count($this->attachment) < 1) + $this->message_type = "alt"; + if(strlen($this->AltBody) > 0 && count($this->attachment) > 0) + $this->message_type = "alt_attachments"; + } + } + + /** + * Returns a formatted header line. + * @access private + * @return string + */ + function HeaderLine($name, $value) { + return $name . ": " . $value . $this->LE; + } + + /** + * Returns a formatted mail line. + * @access private + * @return string + */ + function TextLine($value) { + return $value . $this->LE; + } ///////////////////////////////////////////////// // ATTACHMENT METHODS @@ -1143,17 +985,19 @@ /** * Adds an attachment from a path on the filesystem. - * Checks if attachment is valid and then adds - * the attachment to the list. * Returns false if the file could not be found * or accessed. - * @access public + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. * @return bool */ - function AddAttachment($path, $name = "", $encoding = "base64", $type = "application/octet-stream") { + function AddAttachment($path, $name = "", $encoding = "base64", + $type = "application/octet-stream") { if(!@is_file($path)) { - $this->error_handler(sprintf("Could not access [%s] file", $path)); + $this->SetError($this->Lang("file_access") . $path); return false; } @@ -1161,7 +1005,6 @@ if($name == "") $name = $filename; - // Append to $attachment array $cur = count($this->attachment); $this->attachment[$cur][0] = $path; $this->attachment[$cur][1] = $filename; @@ -1177,11 +1020,11 @@ /** * Attaches all fs, string, and binary attachments to the message. - * Returns a string if successful or false if unsuccessful. + * Returns an empty string on failure. * @access private * @return string */ - function attach_all() { + function AttachAll() { // Return text of body $mime = array(); @@ -1191,13 +1034,10 @@ // Check for string attachment $bString = $this->attachment[$i][5]; if ($bString) - { $string = $this->attachment[$i][0]; - } else - { $path = $this->attachment[$i][0]; - } + $filename = $this->attachment[$i][1]; $name = $this->attachment[$i][2]; $encoding = $this->attachment[$i][3]; @@ -1218,93 +1058,92 @@ // Encode as string attachment if($bString) { - if(!$mime[] = $this->encode_string($string, $encoding)) - return false; + $mime[] = $this->EncodeString($string, $encoding); + if($this->IsError()) { return ""; } $mime[] = $this->LE.$this->LE; } else { - if(!$mime[] = $this->encode_file($path, $encoding)) - return false; + $mime[] = $this->EncodeFile($path, $encoding); + if($this->IsError()) { return ""; } $mime[] = $this->LE.$this->LE; } } $mime[] = sprintf("--%s--%s", $this->boundary[1], $this->LE); - return(join("", $mime)); + return join("", $mime); } /** - * Encodes attachment in requested format. Returns a - * string if successful or false if unsuccessful. + * Encodes attachment in requested format. Returns an + * empty string on failure. * @access private * @return string */ - function encode_file ($path, $encoding = "base64") { + function EncodeFile ($path, $encoding = "base64") { if(!@$fd = fopen($path, "rb")) { - $this->error_handler(sprintf("File Error: Could not open file %s", $path)); - return false; + $this->SetError($this->Lang("file_open") . $path); + return ""; } + $magic_quotes = get_magic_quotes_runtime(); + set_magic_quotes_runtime(0); $file_buffer = fread($fd, filesize($path)); - $file_buffer = $this->encode_string($file_buffer, $encoding); + $file_buffer = $this->EncodeString($file_buffer, $encoding); fclose($fd); + set_magic_quotes_runtime($magic_quotes); return $file_buffer; } /** - * Encodes string to requested format. Returns a - * string if successful or false if unsuccessful. + * Encodes string to requested format. Returns an + * empty string on failure. * @access private * @return string */ - function encode_string ($str, $encoding = "base64") { + function EncodeString ($str, $encoding = "base64") { + $encoded = ""; switch(strtolower($encoding)) { case "base64": // chunk_split is found in PHP >= 3.0.6 - $encoded = chunk_split(base64_encode($str)); + $encoded = chunk_split(base64_encode($str), 76, $this->LE); break; - case "7bit": case "8bit": - $encoded = $this->fix_eol($str); - if (substr($encoded, -2) != $this->LE) + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) $encoded .= $this->LE; break; - case "binary": $encoded = $str; break; - case "quoted-printable": - $encoded = $this->encode_qp($str); + $encoded = $this->EncodeQP($str); break; - default: - $this->error_handler(sprintf("Unknown encoding: %s", $encoding)); - return false; + $this->SetError($this->Lang("encoding") . $encoding); + break; } - return($encoded); + return $encoded; } /** - * Encode a header string to best of Q, B, quoted or none. Returns a string. + * Encode a header string to best of Q, B, quoted or none. * @access private * @return string */ - function encode_header ($str, $position = 'text') { + function EncodeHeader ($str, $position = 'text') { $x = 0; switch (strtolower($position)) { case 'phrase': - if (preg_match_all('/[\200-\377]/', $str, $matches) == 0) { + if (!preg_match('/[\200-\377]/', $str)) { // Can't use addslashes as we don't know what value has magic_quotes_sybase. - $encoded = addcslashes($str, '\000-\037\177'); - $encoded = preg_replace('/([\"])/', '\\"', $encoded); + $encoded = addcslashes($str, "\0..\37\177\\\""); - if (($str == $encoded) && (preg_match_all('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str, $matches) == 0)) + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) return ($encoded); else return ("\"$encoded\""); @@ -1325,32 +1164,32 @@ $maxlen = 75 - 7 - strlen($this->CharSet); // Try to select the encoding which should produce the shortest output -// if (strlen($str)/3 < $x) { + if (strlen($str)/3 < $x) { $encoding = 'B'; $encoded = base64_encode($str); $maxlen -= $maxlen % 4; $encoded = trim(chunk_split($encoded, $maxlen, "\n")); -// } else { -// $encoding = 'Q'; -// $encoded = $this->encode_q($str, $position); -// $encoded = $this->word_wrap($encoded, $maxlen, true); -// $encoded = str_replace("=".$this->LE, "\n", trim($encoded)); -// } + } else { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace("=".$this->LE, "\n", trim($encoded)); + } $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); $encoded = trim(str_replace("\n", $this->LE, $encoded)); - return($encoded); + return $encoded; } /** - * Encode string to quoted-printable. Returns a string. + * Encode string to quoted-printable. * @access private * @return string */ - function encode_qp ($str) { - $encoded = $this->fix_eol($str); - if (substr($encoded, -2) != $this->LE) + function EncodeQP ($str) { + $encoded = $this->FixEOL($str); + if (substr($encoded, -(strlen($this->LE))) != $this->LE) $encoded .= $this->LE; // Replace every high ascii, control and = characters @@ -1361,28 +1200,27 @@ "'='.sprintf('%02X', ord('\\1')).'".$this->LE."'", $encoded); // Maximum line length of 76 characters before CRLF (74 + space + '=') - $encoded = $this->word_wrap($encoded, 74, true); + $encoded = $this->WrapText($encoded, 74, true); return $encoded; } /** - * Encode string to q encoding. Returns a string. + * Encode string to q encoding. * @access private * @return string */ - function encode_q ($str, $position = 'text') { + function EncodeQ ($str, $position = "text") { // There should not be any EOL in the string $encoded = preg_replace("[\r\n]", "", $str); switch (strtolower($position)) { - case 'phrase': + case "phrase": $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); break; - case 'comment': + case "comment": $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); - // Fall-through - case 'text': + case "text": default: // Replace every high ascii, control =, ? and _ characters $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', @@ -1400,10 +1238,14 @@ * Adds a string or binary attachment (non-filesystem) to the list. * This method can be used to attach ascii or binary data, * such as a BLOB record from a database. - * @access public + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. * @return void */ - function AddStringAttachment($string, $filename, $encoding = "base64", $type = "application/octet-stream") { + function AddStringAttachment($string, $filename, $encoding = "base64", + $type = "application/octet-stream") { // Append to $attachment array $cur = count($this->attachment); $this->attachment[$cur][0] = $string; @@ -1418,17 +1260,23 @@ /** * Adds an embedded attachment. This can include images, sounds, and - * just about any other document. - * @param cid this is the Content Id of the attachment. Use this to identify + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify * the Id for accessing the image in an HTML form. - * @access public + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. * @return bool */ - function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", $type = "application/octet-stream") { + function AddEmbeddedImage($path, $cid, $name = "", $encoding = "base64", + $type = "application/octet-stream") { if(!@is_file($path)) { - $this->error_handler(sprintf("Could not access [%s] file", $path)); + $this->SetError($this->Lang("file_access") . $path); return false; } @@ -1451,19 +1299,22 @@ } /** - * Returns the number of embedded images in an email. + * Returns true if an inline attachment is present. * @access private - * @return int + * @return bool */ - function EmbeddedImageCount() { - $ret = 0; + function InlineImageExists() { + $result = false; for($i = 0; $i < count($this->attachment); $i++) { if($this->attachment[$i][6] == "inline") - $ret++; + { + $result = true; + break; + } } - return $ret; + return $result; } ///////////////////////////////////////////////// @@ -1472,7 +1323,6 @@ /** * Clears all recipients assigned in the TO array. Returns void. - * @access public * @return void */ function ClearAddresses() { @@ -1481,7 +1331,6 @@ /** * Clears all recipients assigned in the CC array. Returns void. - * @access public * @return void */ function ClearCCs() { @@ -1490,7 +1339,6 @@ /** * Clears all recipients assigned in the BCC array. Returns void. - * @access public * @return void */ function ClearBCCs() { @@ -1499,7 +1347,6 @@ /** * Clears all recipients assigned in the ReplyTo array. Returns void. - * @access public * @return void */ function ClearReplyTos() { @@ -1509,7 +1356,6 @@ /** * Clears all recipients assigned in the TO, CC and BCC * array. Returns void. - * @access public * @return void */ function ClearAllRecipients() { @@ -1521,7 +1367,6 @@ /** * Clears all previously set filesystem, string, and binary * attachments. Returns void. - * @access public * @return void */ function ClearAttachments() { @@ -1530,7 +1375,6 @@ /** * Clears all custom headers. Returns void. - * @access public * @return void */ function ClearCustomHeaders() { @@ -1548,60 +1392,24 @@ * @access private * @return void */ - function error_handler($msg) { + function SetError($msg) { + $this->error_count++; $this->ErrorInfo = $msg; } /** - * Returns the proper RFC 822 formatted date. Returns string. + * Returns the proper RFC 822 formatted date. * @access private * @return string */ - function rfc_date() { + function RFCDate() { $tz = date("Z"); $tzs = ($tz < 0) ? "-" : "+"; $tz = abs($tz); $tz = ($tz/3600)*100 + ($tz%3600)/60; - $date = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz); - return $date; - } - - /** - * Returns received header for message tracing. Returns string. - * @access private - * @return string - */ - function received() { - // Check for vars because they might not exist. Possibly - // write a small retrieval function (that mailer can use too!) - - if ($this->get_server_var('SERVER_NAME') != '') - { - $protocol = ($this->get_server_var('HTTPS') == 'on') ? 'HTTPS' : 'HTTP'; - $remote = $this->get_server_var('REMOTE_HOST'); - if ($remote == '') - $remote = 'phpmailer'; - $remote .= ' (['.$this->get_server_var('REMOTE_ADDR').'])'; - } - else - { - $protocol = 'local'; - $remote = $this->get_server_var('USER'); - if ($remote == '') - $remote = 'phpmailer'; - } - - $str = sprintf("Received: from %s %s\tby %s " . - "with %s (phpmailer);%s\t%s%s", - $remote, - $this->LE, - $this->get_server_hostname(), - $protocol, - $this->LE, - $this->rfc_date(), - $this->LE); + $result = sprintf("%s %s%04d", date("D, j M Y H:i:s"), $tzs, $tz); - return $str; + return $result; } /** @@ -1611,7 +1419,7 @@ * @access private * @return mixed */ - function get_server_var($varName) { + function ServerVar($varName) { global $HTTP_SERVER_VARS; global $HTTP_ENV_VARS; @@ -1633,147 +1441,59 @@ * @access private * @return string */ - function get_server_hostname() { - if ($this->Hostname != '') - return $this->Hostname; - elseif ($this->get_server_var('SERVER_NAME') != '') - return $this->get_server_var('SERVER_NAME'); - else - return 'localhost.localdomain'; + function ServerHostname() { + if ($this->Hostname != "") + $result = $this->Hostname; + elseif ($this->ServerVar('SERVER_NAME') != "") + $result = $this->ServerVar('SERVER_NAME'); + else + $result = "localhost.localdomain"; + + return $result; } /** - * Changes every end of line from CR or LF to CRLF. Returns string. + * Returns a message in the appropriate language. * @access private * @return string */ - function fix_eol($str) { - $str = str_replace("\r\n", "\n", $str); - $str = str_replace("\r", "\n", $str); - $str = str_replace("\n", $this->LE, $str); - return $str; + function Lang($key) { + if(count($this->language) < 1) + $this->SetLanguage("en"); // set the default language + + if(isset($this->language[$key])) + return $this->language[$key]; + else + return "Language string failed to load: " . $key; } - + /** - * Adds a custom header. Returns void. - * @access public - * @return void + * Returns true if an error occurred. + * @return bool */ - function AddCustomHeader($custom_header) { - // Append to $custom_header array - $this->CustomHeader[] = explode(":", $custom_header, 2); + function IsError() { + return ($this->error_count > 0); } /** - * Adds all the Microsoft message headers. Returns string. + * Changes every end of line from CR or LF to CRLF. * @access private * @return string */ - function AddMSMailHeaders() { - $MSHeader = ""; - if($this->Priority == 1) - $MSPriority = "High"; - elseif($this->Priority == 5) - $MSPriority = "Low"; - else - $MSPriority = "Medium"; - - $MSHeader .= sprintf("X-MSMail-Priority: %s%s", $MSPriority, $this->LE); - $MSHeader .= sprintf("Importance: %s%s", $MSPriority, $this->LE); - - return($MSHeader); + function FixEOL($str) { + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; } -} - - -/** - * Boundary - MIME message boundary class - * @author Brent R. Matzelle - */ -class Boundary -{ - /** - * Sets the boundary ID. - * @access private - * @var string - */ - var $ID = 0; - /** - * Sets the boundary Content Type. - * @access public - * @var string - */ - var $ContentType = "text/plain"; - - /** - * Sets the Encoding. - * @access public - * @var string - */ - var $Encoding = ""; - - /** - * Sets an attachment disposition. - * @access public - * @var string - */ - var $Disposition = ""; - - /** - * Sets an attachment file name. - * @access public - * @var string - */ - var $FileName = ""; - - /** - * Sets the Char set. - * @access public - * @var string - */ - var $CharSet = ""; - - /** - * Sets the line endings of the message. Default is "\n"; - * @access public - * @var string - */ - var $LE = "\n"; - - /** - * Main constructor. - */ - function Boundary($boundary_id) { - $this->ID = $boundary_id; - } - - /** - * Returns the source of the boundary. - * @access public - * @return string + * Adds a custom header. + * @return void */ - function GetSource($bLineEnding = true) { - $mime = array(); - $mime[] = sprintf("--%s%s", $this->ID, $this->LE); - $mime[] = sprintf("Content-Type: %s; charset = \"%s\"%s", - $this->ContentType, $this->CharSet, $this->LE); - $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $this->Encoding, - $this->LE); - - if(strlen($this->Disposition) > 0) - { - $mime[] = sprintf("Content-Disposition: %s;"); - if(strlen($this->FileName) > 0) - $mime[] = sprinf("filename=\"%s\"", $this->FileName); - } - - if($bLineEnding) - $mime[] = $this->LE; - - return join("", $mime); + function AddCustomHeader($custom_header) { + $this->CustomHeader[] = explode(":", $custom_header, 2); } } -?> +?> \ No newline at end of file Index: xoops2jp/html/class/mail/phpmailer/class.smtp.php diff -u xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.2 xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.3 --- xoops2jp/html/class/mail/phpmailer/class.smtp.php:1.2 Sat Jun 11 11:32:39 2005 +++ xoops2jp/html/class/mail/phpmailer/class.smtp.php Mon May 1 11:37:24 2006 @@ -14,22 +14,40 @@ //////////////////////////////////////////////////// /** - * STMP is rfc 821 compliant and implements all the rfc 821 SMTP + * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP * commands except TURN which will always return a not implemented * error. SMTP also provides some utility methods for sending mail * to an SMTP server. + * @package PHPMailer * @author Chris Ryan */ class SMTP { - var $SMTP_PORT = 25; # the default SMTP PORT - var $CRLF = "\r\n"; # CRLF pair + /** + * SMTP server port + * @var int + */ + var $SMTP_PORT = 25; + + /** + * SMTP reply line ending + * @var string + */ + var $CRLF = "\r\n"; + + /** + * Sets whether debugging is turned on + * @var bool + */ + var $do_debug; # the level of debug to perform + /**#@+ + * @access private + */ var $smtp_conn; # the socket to the server var $error; # error if any on the last call var $helo_rply; # the reply the server sent to us for HELO - - var $do_debug; # the level of debug to perform + /**#@-*/ /** * Initialize the class so that the data is in a known state. @@ -101,7 +119,7 @@ # so we will give it a longer timeout for the first read // Windows still does not have support for this timeout function if(substr(PHP_OS, 0, 3) != "WIN") - socket_set_timeout($this->smtp_conn, 1, 0); + socket_set_timeout($this->smtp_conn, $tval, 0); # get any announcement stuff $announce = $this->get_lines(); @@ -315,12 +333,10 @@ while(strlen($line) > $max_line_length) { $pos = strrpos(substr($line,0,$max_line_length)," "); - // fix for infinite loop bug - // added by onokazu, 2005/5/31 - if (!$pos) { + # Patch to fix DOS attack + if(!$pos) { $pos = $max_line_length - 1; } - // end fix $lines_out[] = substr($line,0,$pos); $line = substr($line,$pos + 1); @@ -454,7 +470,23 @@ $host = "localhost"; } - fputs($this->smtp_conn,"HELO " . $host . $this->CRLF); + // Send extended hello first (RFC 2821) + if(!$this->SendHello("EHLO", $host)) + { + if(!$this->SendHello("HELO", $host)) + return false; + } + + return true; + } + + /** + * Sends a HELO/EHLO command. + * @access private + * @return bool + */ + function SendHello($hello, $host) { + fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); $rply = $this->get_lines(); $code = substr($rply,0,3); @@ -465,7 +497,7 @@ if($code != 250) { $this->error = - array("error" => "HELO not accepted from server", + array("error" => $hello . " not accepted from server", "smtp_code" => $code, "smtp_msg" => substr($rply,4)); if($this->do_debug >= 1) { @@ -476,7 +508,7 @@ } $this->helo_rply = $rply; - + return true; } @@ -556,7 +588,7 @@ return false; } - fputs($this->smtp_conn,"MAIL FROM:" . $from . $this->CRLF); + fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $this->CRLF); $rply = $this->get_lines(); $code = substr($rply,0,3); @@ -695,7 +727,7 @@ return false; } - fputs($this->smtp_conn,"RCPT TO:" . $to . $this->CRLF); + fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); $rply = $this->get_lines(); $code = substr($rply,0,3); From onokazu @ users.sourceforge.jp Mon May 1 11:37:25 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:25 +0900 Subject: [xoops-cvslog 2935] CVS update: xoops2jp/html/class/smarty Message-ID: <20060501023725.59BB92AC3CD@users.sourceforge.jp> Index: xoops2jp/html/class/smarty/Config_File.class.php diff -u xoops2jp/html/class/smarty/Config_File.class.php:1.2 xoops2jp/html/class/smarty/Config_File.class.php:1.3 --- xoops2jp/html/class/smarty/Config_File.class.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/smarty/Config_File.class.php Mon May 1 11:37:25 2006 @@ -18,14 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @link http://smarty.php.net/ - * @version 2.6.5-dev - * @copyright Copyright: 2001-2004 ispi of Lincoln, Inc. + * @version 2.6.12 + * @copyright Copyright: 2001-2005 New Digital Group, Inc. * @author Andrei Zmievski * @access public * @package Smarty */ -/* $Id: Config_File.class.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $ */ +/* $Id: Config_File.class.php,v 1.3 2006/05/01 02:37:25 onokazu Exp $ */ /** * Config file reading class @@ -105,7 +105,7 @@ * @param string $var_name (optional) variable to get info for * @return string|array a value or array of values */ - function &get($file_name, $section_name = NULL, $var_name = NULL) + function get($file_name, $section_name = NULL, $var_name = NULL) { if (empty($file_name)) { $this->_trigger_error_msg('Empty config file name'); @@ -285,9 +285,9 @@ $line = $lines[$i]; if (empty($line)) continue; - if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) { + if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) { /* section found */ - if ($match[1]{0} == '.') { + if (substr($match[1], 0, 1) == '.') { /* hidden section */ if ($this->read_hidden) { $section_name = substr($match[1], 1); @@ -347,7 +347,7 @@ */ function _set_config_var(&$container, $var_name, $var_value, $booleanize) { - if ($var_name{0} == '.') { + if (substr($var_name, 0, 1) == '.') { if (!$this->read_hidden) return; else Index: xoops2jp/html/class/smarty/Smarty.class.php diff -u xoops2jp/html/class/smarty/Smarty.class.php:1.2 xoops2jp/html/class/smarty/Smarty.class.php:1.3 --- xoops2jp/html/class/smarty/Smarty.class.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/smarty/Smarty.class.php Mon May 1 11:37:25 2006 @@ -23,14 +23,14 @@ * smarty-general-subscribe @ lists.php.net * * @link http://smarty.php.net/ - * @copyright 2001-2004 ispi of Lincoln, Inc. - * @author Monte Ohrt + * @copyright 2001-2005 New Digital Group, Inc. + * @author Monte Ohrt * @author Andrei Zmievski * @package Smarty - * @version 2.6.5-dev + * @version 2.6.12 */ -/* $Id: Smarty.class.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $ */ +/* $Id: Smarty.class.php,v 1.3 2006/05/01 02:37:25 onokazu Exp $ */ /** * DIR_SEP isn't used anymore, but third party apps might @@ -49,6 +49,10 @@ define('SMARTY_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR); } +if (!defined('SMARTY_CORE_DIR')) { + define('SMARTY_CORE_DIR', SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR); +} + define('SMARTY_PHP_PASSTHRU', 0); define('SMARTY_PHP_QUOTE', 1); define('SMARTY_PHP_REMOVE', 2); @@ -228,7 +232,7 @@ 'isset', 'empty', 'count', 'sizeof', 'in_array', 'is_array', - 'true','false'), + 'true', 'false', 'null'), 'INCLUDE_ANY' => false, 'PHP_TAGS' => false, 'MODIFIER_FUNCS' => array('count'), @@ -460,7 +464,7 @@ * * @var string */ - var $_version = '2.6.5-dev'; + var $_version = '2.6.12'; /** * current template inclusion depth @@ -910,7 +914,7 @@ switch ($type) { case 'output': $_params = array('plugins' => array(array($type . 'filter', $name, null, null, false))); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php'); + require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); smarty_core_load_plugins($_params, $this); break; @@ -950,7 +954,7 @@ 'auto_source' => $tpl_file, 'auto_id' => $_auto_id, 'exp_time' => $exp_time); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rm_auto.php'); + require_once(SMARTY_CORE_DIR . 'core.rm_auto.php'); return smarty_core_rm_auto($_params, $this); } @@ -990,7 +994,7 @@ 'cache_id' => $cache_id, 'compile_id' => $compile_id ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.read_cache_file.php'); + require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php'); return smarty_core_read_cache_file($_params, $this); } @@ -1024,7 +1028,7 @@ 'auto_id' => $compile_id, 'exp_time' => $exp_time, 'extensions' => array('.inc', '.php')); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rm_auto.php'); + require_once(SMARTY_CORE_DIR . 'core.rm_auto.php'); return smarty_core_rm_auto($_params, $this); } @@ -1051,9 +1055,12 @@ { if(!isset($name)) { return $this->_tpl_vars; - } - if(isset($this->_tpl_vars[$name])) { + } elseif(isset($this->_tpl_vars[$name])) { return $this->_tpl_vars[$name]; + } else { + // var non-existant, return valid reference + $_tmp = null; + return $_tmp; } } @@ -1070,6 +1077,10 @@ return $this->_config[0]['vars']; } else if(isset($this->_config[0]['vars'][$name])) { return $this->_config[0]['vars'][$name]; + } else { + // var non-existant, return valid reference + $_tmp = null; + return $_tmp; } } @@ -1128,15 +1139,14 @@ $this->debugging = true; } } else { - $_cookie_var = $this->request_use_auto_globals ? $_COOKIE['SMARTY_DEBUG'] : $GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG']; - $this->debugging = $_cookie_var ? true : false; + $this->debugging = (bool)($this->request_use_auto_globals ? @$_COOKIE['SMARTY_DEBUG'] : @$GLOBALS['HTTP_COOKIE_VARS']['SMARTY_DEBUG']); } } if ($this->debugging) { // capture time for debugging info $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $_debug_start_time = smarty_core_get_microtime($_params, $this); $this->_smarty_debug_info[] = array('type' => 'template', 'filename' => $resource_name, @@ -1161,20 +1171,20 @@ 'compile_id' => $compile_id, 'results' => null ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.read_cache_file.php'); + require_once(SMARTY_CORE_DIR . 'core.read_cache_file.php'); if (smarty_core_read_cache_file($_params, $this)) { $_smarty_results = $_params['results']; - if (@count($this->_cache_info['insert_tags'])) { + if (!empty($this->_cache_info['insert_tags'])) { $_params = array('plugins' => $this->_cache_info['insert_tags']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php'); + require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); smarty_core_load_plugins($_params, $this); $_params = array('results' => $_smarty_results); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_cached_inserts.php'); + require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php'); $_smarty_results = smarty_core_process_cached_inserts($_params, $this); } - if (@count($this->_cache_info['cache_serials'])) { + if (!empty($this->_cache_info['cache_serials'])) { $_params = array('results' => $_smarty_results); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_compiled_include.php'); + require_once(SMARTY_CORE_DIR . 'core.process_compiled_include.php'); $_smarty_results = smarty_core_process_compiled_include($_params, $this); } @@ -1184,9 +1194,9 @@ { // capture time for debugging info $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $_debug_start_time; - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php'); + require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); $_smarty_results .= smarty_core_display_debug_console($_params, $this); } if ($this->cache_modified_check) { @@ -1267,9 +1277,9 @@ 'cache_id' => $cache_id, 'compile_id' => $compile_id, 'results' => $_smarty_results); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_cache_file.php'); + require_once(SMARTY_CORE_DIR . 'core.write_cache_file.php'); smarty_core_write_cache_file($_params, $this); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.process_cached_inserts.php'); + require_once(SMARTY_CORE_DIR . 'core.process_cached_inserts.php'); $_smarty_results = smarty_core_process_cached_inserts($_params, $this); if ($this->_cache_serials) { @@ -1288,9 +1298,9 @@ if ($this->debugging) { // capture time for debugging info $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.display_debug_console.php'); + require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); echo smarty_core_display_debug_console($_params, $this); } error_reporting($_smarty_old_error_level); @@ -1356,7 +1366,7 @@ function _get_plugin_filepath($type, $name) { $_params = array('type' => $type, 'name' => $name); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.assemble_plugin_filepath.php'); + require_once(SMARTY_CORE_DIR . 'core.assemble_plugin_filepath.php'); return smarty_core_assemble_plugin_filepath($_params, $this); } @@ -1414,12 +1424,12 @@ if ($this->_compile_source($resource_name, $_source_content, $_compiled_content, $_cache_include)) { // if a _cache_serial was set, we also have to write an include-file: if ($this->_cache_include_info) { - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_include.php'); - smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content)), $this); + require_once(SMARTY_CORE_DIR . 'core.write_compiled_include.php'); + smarty_core_write_compiled_include(array_merge($this->_cache_include_info, array('compiled_content'=>$_compiled_content, 'resource_name'=>$resource_name)), $this); } $_params = array('compile_path'=>$compile_path, 'compiled_content' => $_compiled_content); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_compiled_resource.php'); + require_once(SMARTY_CORE_DIR . 'core.write_compiled_resource.php'); smarty_core_write_compiled_resource($_params, $this); return true; @@ -1472,7 +1482,9 @@ $smarty_compiler->_config = $this->_config; $smarty_compiler->request_use_auto_globals = $this->request_use_auto_globals; - $smarty_compiler->_cache_serial = null; + if (isset($cache_include_path) && isset($this->_cache_serials[$cache_include_path])) { + $smarty_compiler->_cache_serial = $this->_cache_serials[$cache_include_path]; + } $smarty_compiler->_cache_include = $cache_include_path; @@ -1579,7 +1591,7 @@ $this->trigger_error('unable to read resource: "' . $params['resource_name'] . '"'); } } else if ($_return && $this->security) { - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_secure.php'); + require_once(SMARTY_CORE_DIR . 'core.is_secure.php'); if (!smarty_core_is_secure($_params, $this)) { if (!$params['quiet']) $this->trigger_error('(secure mode) accessing "' . $params['resource_name'] . '" is not allowed'); @@ -1635,7 +1647,7 @@ } // didn't find the file, try include_path $_params = array('file_path' => $_fullpath); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); + require_once(SMARTY_CORE_DIR . 'core.get_include_path.php'); if(smarty_core_get_include_path($_params, $this)) { $params['resource_name'] = $_params['new_file_path']; return true; @@ -1648,7 +1660,7 @@ } } elseif (empty($this->_plugins['resource'][$params['resource_type']])) { $_params = array('type' => $params['resource_type']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_resource_plugin.php'); + require_once(SMARTY_CORE_DIR . 'core.load_resource_plugin.php'); smarty_core_load_resource_plugin($_params, $this); } @@ -1686,8 +1698,8 @@ */ function _dequote($string) { - if (($string{0} == "'" || $string{0} == '"') && - $string{strlen($string)-1} == $string{0}) + if ((substr($string, 0, 1) == "'" || substr($string, 0, 1) == '"') && + substr($string, -1) == substr($string, 0, 1)) return substr($string, 1, -1); else return $string; @@ -1695,18 +1707,18 @@ /** - * read in a file from line $start for $lines. - * read the entire file if $start and $lines are null. + * read in a file * * @param string $filename - * @param integer $start - * @param integer $lines * @return string */ function _read_file($filename) { if ( file_exists($filename) && ($fd = @fopen($filename, 'rb')) ) { - $contents = ($size = filesize($filename)) ? fread($fd, $size) : ''; + $contents = ''; + while (!feof($fd)) { + $contents .= fread($fd, 8192); + } fclose($fd); return $contents; } else { @@ -1836,7 +1848,7 @@ { if ($this->debugging) { $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $debug_start_time = smarty_core_get_microtime($_params, $this); $this->_smarty_debug_info[] = array('type' => 'template', 'filename' => $params['smarty_include_tpl_file'], @@ -1867,7 +1879,7 @@ if ($this->debugging) { // capture time for debugging info $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $this->_smarty_debug_info[$included_tpls_idx]['exec_time'] = smarty_core_get_microtime($_params, $this) - $debug_start_time; } @@ -1887,7 +1899,7 @@ if ($this->_cache_including) { /* return next set of cache_attrs */ - $_return =& current($_cache_attrs); + $_return = current($_cache_attrs); next($_cache_attrs); return $_return; Index: xoops2jp/html/class/smarty/Smarty_Compiler.class.php diff -u xoops2jp/html/class/smarty/Smarty_Compiler.class.php:1.2 xoops2jp/html/class/smarty/Smarty_Compiler.class.php:1.3 --- xoops2jp/html/class/smarty/Smarty_Compiler.class.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/smarty/Smarty_Compiler.class.php Mon May 1 11:37:25 2006 @@ -19,14 +19,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @link http://smarty.php.net/ - * @author Monte Ohrt + * @author Monte Ohrt * @author Andrei Zmievski - * @version 2.6.5-dev - * @copyright 2001-2004 ispi of Lincoln, Inc. + * @version 2.6.12 + * @copyright 2001-2005 New Digital Group, Inc. * @package Smarty */ -/* $Id: Smarty_Compiler.class.php,v 1.2 2005/03/18 12:51:55 onokazu Exp $ */ +/* $Id: Smarty_Compiler.class.php,v 1.3 2006/05/01 02:37:25 onokazu Exp $ */ /** * Template compiling class @@ -49,7 +49,9 @@ var $_si_qstr_regexp = null; var $_qstr_regexp = null; var $_func_regexp = null; + var $_reg_obj_regexp = null; var $_var_bracket_regexp = null; + var $_num_const_regexp = null; var $_dvar_guts_regexp = null; var $_dvar_regexp = null; var $_cvar_regexp = null; @@ -101,7 +103,7 @@ // 30 // -12 // 13.22 - $this->_num_const_regexp = '\-?\d+(?:\.\d+)?'; + $this->_num_const_regexp = '(?:\-?\d+(?:\.\d+)?)'; // matches $ vars (not objects): // $foo @@ -137,7 +139,7 @@ // #foo# // "text" // "text" - $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_num_const_regexp . '|' . $this->_qstr_regexp . ')'; + $this->_var_regexp = '(?:' . $this->_avar_regexp . '|' . $this->_qstr_regexp . ')'; // matches valid object call (one level of object nesting allowed in parameters): // $foo->bar @@ -152,8 +154,8 @@ // $foo->bar($foo->bar($blah,$foo,44,"foo",$foo[0].bar)) $this->_obj_ext_regexp = '\->(?:\$?' . $this->_dvar_guts_regexp . ')'; $this->_obj_restricted_param_regexp = '(?:' - . $this->_var_regexp . '(?:' . $this->_obj_ext_regexp . '(?:\((?:' . $this->_var_regexp - . '(?:\s*,\s*' . $this->_var_regexp . ')*)?\))?)*)'; + . '(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')(?:' . $this->_obj_ext_regexp . '(?:\((?:(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . ')' + . '(?:\s*,\s*(?:' . $this->_var_regexp . '|' . $this->_num_const_regexp . '))*)?\))?)*)'; $this->_obj_single_param_regexp = '(?:\w+|' . $this->_obj_restricted_param_regexp . '(?:\s*,\s*(?:(?:\w+|' . $this->_var_regexp . $this->_obj_restricted_param_regexp . ')))*)'; $this->_obj_params_regexp = '\((?:' . $this->_obj_single_param_regexp @@ -169,7 +171,7 @@ // |foo:"bar":$foobar // |foo|bar // |foo:$foo->bar - $this->_mod_regexp = '(?:\|@?\w+(?::(?>-?\w+|' + $this->_mod_regexp = '(?:\|@?\w+(?::(?:\w+|' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_avar_regexp . '|' . $this->_qstr_regexp .'))*)'; // matches valid function name: @@ -191,7 +193,7 @@ // "text"|bar // $foo->bar $this->_param_regexp = '(?:\s*(?:' . $this->_obj_call_regexp . '|' - . $this->_var_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)'; + . $this->_var_regexp . '|' . $this->_num_const_regexp . '|\w+)(?>' . $this->_mod_regexp . '*)\s*)'; // matches valid parenthesised function parameters: // @@ -316,6 +318,36 @@ return; } + /* Reformat $text_blocks between 'strip' and '/strip' tags, + removing spaces, tabs and newlines. */ + $strip = false; + for ($i = 0, $for_max = count($compiled_tags); $i < $for_max; $i++) { + if ($compiled_tags[$i] == '{strip}') { + $compiled_tags[$i] = ''; + $strip = true; + /* remove leading whitespaces */ + $text_blocks[$i + 1] = ltrim($text_blocks[$i + 1]); + } + if ($strip) { + /* strip all $text_blocks before the next '/strip' */ + for ($j = $i + 1; $j < $for_max; $j++) { + /* remove leading and trailing whitespaces of each line */ + $text_blocks[$j] = preg_replace('![\t ]*[\r\n]+[\t ]*!', '', $text_blocks[$j]); + if ($compiled_tags[$j] == '{/strip}') { + /* remove trailing whitespaces from the last text_block */ + $text_blocks[$j] = rtrim($text_blocks[$j]); + } + $text_blocks[$j] = ""\'", "\\"=>"\\\\")) . "'; ?>"; + if ($compiled_tags[$j] == '{/strip}') { + $compiled_tags[$j] = "\n"; /* slurped by php, but necessary + if a newline is following the closing strip-tag */ + $strip = false; + $i = $j; + break; + } + } + } + } $compiled_content = ''; /* Interleave the compiled contents and text blocks to get the final result. */ @@ -328,19 +360,8 @@ } $compiled_content .= $text_blocks[$i]; - /* Reformat data between 'strip' and '/strip' tags, removing spaces, tabs and newlines. */ - if (preg_match_all("~{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}~s", $compiled_content, $_match)) { - $strip_tags = $_match[0]; - $strip_tags_modified = preg_replace("~{$ldq}/?strip{$rdq}|[\t ]+$|^[\t ]+~m", '', $strip_tags); - $strip_tags_modified = preg_replace('~[\r\n]+~m', '', $strip_tags_modified); - for ($i = 0, $for_max = count($strip_tags); $i < $for_max; $i++) - $compiled_content = preg_replace("~{$ldq}strip{$rdq}.*?{$ldq}/strip{$rdq}~s", - $this->_quote_replace($strip_tags_modified[$i]), - $compiled_content, 1); - } - // remove \n from the end of the file, if any - if (($_len=strlen($compiled_content)) && ($compiled_content{$_len - 1} == "\n" )) { + if (strlen($compiled_content) && (substr($compiled_content, -1) == "\n") ) { $compiled_content = substr($compiled_content, 0, -1); } @@ -375,19 +396,19 @@ $_plugins_params = "array('plugins' => array("; foreach ($this->_plugin_info as $plugin_type => $plugins) { foreach ($plugins as $plugin_name => $plugin_info) { - $_plugins_params .= "array('$plugin_type', '$plugin_name', '$plugin_info[0]', $plugin_info[1], "; + $_plugins_params .= "array('$plugin_type', '$plugin_name', '" . strtr($plugin_info[0], array("'" => "\\'", "\\" => "\\\\")) . "', $plugin_info[1], "; $_plugins_params .= $plugin_info[2] ? 'true),' : 'false),'; } } $_plugins_params .= '))'; - $plugins_code = "\n"; + $plugins_code = "\n"; $template_header .= $plugins_code; $this->_plugin_info = array(); $this->_plugins_code = $plugins_code; } if ($this->_init_smarty_vars) { - $template_header .= "\n"; + $template_header .= "\n"; $this->_init_smarty_vars = false; } @@ -404,7 +425,7 @@ function _compile_tag($template_tag) { /* Matched comment. */ - if ($template_tag{0} == '*' && $template_tag{strlen($template_tag) - 1} == '*') + if (substr($template_tag, 0, 1) == '*' && substr($template_tag, -1) == '*') return ''; /* Split tag into two three parts: command, command modifiers and the arguments. */ @@ -421,12 +442,8 @@ if (preg_match('~^' . $this->_num_const_regexp . '|' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '$~', $tag_command)) { /* tag name is a variable or object */ - $_return = $this->_parse_var_props($tag_command . $tag_modifier, $this->_parse_attrs($tag_args)); - if(isset($_tag_attrs['assign'])) { - return "assign('" . $this->_dequote($_tag_attrs['assign']) . "', $_return ); ?>\n"; - } else { - return "" . $this->_additional_newline; - } + $_return = $this->_parse_var_props($tag_command . $tag_modifier); + return "" . $this->_additional_newline; } /* If the tag name is a registered object, we process it. */ @@ -500,29 +517,29 @@ case 'foreachelse': $this->_push_tag('foreachelse'); - return ""; + return ""; case '/foreach': $_open_tag = $this->_pop_tag('foreach'); if ($_open_tag == 'foreachelse') - return ""; + return ""; else - return ""; + return ""; break; case 'strip': case '/strip': - if ($tag_command{0}=='/') { + if (substr($tag_command, 0, 1)=='/') { $this->_pop_tag('strip'); if (--$this->_strip_depth==0) { /* outermost closing {/strip} */ $this->_additional_newline = "\n"; - return $this->left_delimiter.$tag_command.$this->right_delimiter; + return '{' . $tag_command . '}'; } } else { $this->_push_tag('strip'); if ($this->_strip_depth++==0) { /* outermost opening {strip} */ $this->_additional_newline = ""; - return $this->left_delimiter.$tag_command.$this->right_delimiter; + return '{' . $tag_command . '}'; } } return ''; @@ -647,7 +664,7 @@ */ function _compile_block_tag($tag_command, $tag_args, $tag_modifier, &$output) { - if ($tag_command{0} == '/') { + if (substr($tag_command, 0, 1) == '/') { $start_tag = false; $tag_command = substr($tag_command, 1); } else @@ -709,17 +726,18 @@ if ($start_tag) { $output = '_push_cacheable_state('block', $tag_command); $attrs = $this->_parse_attrs($tag_args); - $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs=''); + $_cache_attrs=''; + $arg_list = $this->_compile_arg_list('block', $tag_command, $attrs, $_cache_attrs); $output .= "$_cache_attrs\$this->_tag_stack[] = array('$tag_command', array(".implode(',', $arg_list).')); '; - $output .= $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat=true);'; + $output .= '$_block_repeat=true;' . $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], null, $this, $_block_repeat);'; $output .= 'while ($_block_repeat) { ob_start(); ?>'; } else { - $output = '_block_content = ob_get_contents(); ob_end_clean(); '; - $_out_tag_text = $this->_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $this->_block_content, $this, $_block_repeat=false)'; + $output = '_compile_plugin_call('block', $tag_command).'($this->_tag_stack[count($this->_tag_stack)-1][1], $_block_content, $this, $_block_repeat)'; if ($tag_modifier != '') { $this->_parse_modifiers($_out_tag_text, $tag_modifier); } - $output .= 'echo '.$_out_tag_text.'; } '; + $output .= '$_block_repeat=false;echo ' . $_out_tag_text . '; } '; $output .= " array_pop(\$this->_tag_stack); " . $this->_pop_cacheable_state('block', $tag_command) . '?>'; } @@ -784,7 +802,8 @@ $_cacheable_state = $this->_push_cacheable_state('function', $tag_command); $attrs = $this->_parse_attrs($tag_args); - $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs=''); + $_cache_attrs = ''; + $arg_list = $this->_compile_arg_list('function', $tag_command, $attrs, $_cache_attrs); $output = $this->_compile_plugin_call('function', $tag_command).'(array('.implode(',', $arg_list)."), \$this)"; if($tag_modifier != '') { @@ -809,7 +828,7 @@ */ function _compile_registered_object_tag($tag_command, $attrs, $tag_modifier) { - if ($tag_command{0} == '/') { + if (substr($tag_command, 0, 1) == '/') { $start_tag = false; $tag_command = substr($tag_command, 1); } else { @@ -857,13 +876,13 @@ // block method if ($start_tag) { $prefix = "\$this->_tag_stack[] = array('$obj_comp', $args); "; - $prefix .= "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat=true); "; + $prefix .= "\$_block_repeat=true; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], null, \$this, \$_block_repeat); "; $prefix .= "while (\$_block_repeat) { ob_start();"; $return = null; $postfix = ''; } else { - $prefix = "\$this->_obj_block_content = ob_get_contents(); ob_end_clean(); "; - $return = "\$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$this->_obj_block_content, \$this, \$_block_repeat=false)"; + $prefix = "\$_obj_block_content = ob_get_contents(); ob_end_clean(); "; + $return = "\$_block_repeat=false; \$this->_reg_objects['$object'][0]->$obj_comp(\$this->_tag_stack[count(\$this->_tag_stack)-1][1], \$_obj_block_content, \$this, \$_block_repeat)"; $postfix = "} array_pop(\$this->_tag_stack);"; } } else { @@ -924,7 +943,7 @@ $_params = "array('args' => array(".implode(', ', (array)$arg_list)."))"; - return "" . $this->_additional_newline; + return "" . $this->_additional_newline; } /** @@ -1008,7 +1027,7 @@ $_params = "array('smarty_file' => " . $attrs['file'] . ", 'smarty_assign' => '$assign_var', 'smarty_once' => $once_var, 'smarty_include_vars' => array(".implode(',', $arg_list)."))"; - return "" . $this->_additional_newline; + return "" . $this->_additional_newline; } @@ -1159,19 +1178,15 @@ } $output = '_foreach[$name]"; - $output .= "if (isset(\$this->_foreach[$name])) unset(\$this->_foreach[$name]);\n"; - $output .= "{$foreach_props}['total'] = count(\$_from = (array)$from);\n"; - $output .= "{$foreach_props}['show'] = {$foreach_props}['total'] > 0;\n"; - $output .= "if ({$foreach_props}['show']):\n"; - $output .= "{$foreach_props}['iteration'] = 0;\n"; + $output .= "{$foreach_props} = array('total' => count(\$_from), 'iteration' => 0);\n"; + $output .= "if ({$foreach_props}['total'] > 0):\n"; $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n"; $output .= " {$foreach_props}['iteration']++;\n"; - $output .= " {$foreach_props}['first'] = ({$foreach_props}['iteration'] == 1);\n"; - $output .= " {$foreach_props}['last'] = ({$foreach_props}['iteration'] == {$foreach_props}['total']);\n"; } else { - $output .= "if (count(\$_from = (array)$from)):\n"; + $output .= "if (count(\$_from)):\n"; $output .= " foreach (\$_from as $key_part\$this->_tpl_vars['$item']):\n"; } $output .= '?>'; @@ -1237,6 +1252,13 @@ $tokens = $match[0]; + if(empty($tokens)) { + $_error_msg .= $elseif ? "'elseif'" : "'if'"; + $_error_msg .= ' statement requires arguments'; + $this->_syntax_error($_error_msg, E_USER_ERROR, __FILE__, __LINE__); + } + + // make sure we have balanced parenthesis $token_count = array_count_values($tokens); if(isset($token_count['(']) && $token_count['('] != $token_count[')']) { @@ -1359,6 +1381,9 @@ !in_array($token, $this->security_settings['IF_FUNCS'])) { $this->_syntax_error("(secure mode) '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); } + } elseif(preg_match('~^' . $this->_var_regexp . '$~', $token) && (strpos('+-*/^%&|', substr($token, -1)) === false) && isset($tokens[$i+1]) && $tokens[$i+1] == '(') { + // variable function call + $this->_syntax_error("variable function call '$token' not allowed in if statement", E_USER_ERROR, __FILE__, __LINE__); } elseif(preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . '*)$~', $token)) { // object or variable $token = $this->_parse_var_props($token); @@ -1528,7 +1553,7 @@ $token = 'false'; } else if ($token == 'null') { $token = 'null'; - } else if (preg_match('~^-?([0-9]+|0[xX][0-9a-fA-F]+)$~', $token)) { + } else if (preg_match('~^' . $this->_num_const_regexp . '|0[xX][0-9a-fA-F]+$~', $token)) { /* treat integer literally */ } else if (!preg_match('~^' . $this->_obj_call_regexp . '|' . $this->_var_regexp . '(?:' . $this->_mod_regexp . ')*$~', $token)) { /* treat as a string, double-quote it escaping quotes */ @@ -1627,7 +1652,7 @@ } elseif(!in_array($val, $this->_permitted_tokens) && !is_numeric($val)) { // literal string - return $this->_expand_quoted_text('"' . $val .'"'); + return $this->_expand_quoted_text('"' . strtr($val, array('\\' => '\\\\', '"' => '\\"')) .'"'); } return $val; } @@ -1641,7 +1666,7 @@ function _expand_quoted_text($var_expr) { // if contains unescaped $, expand it - if(preg_match_all('~(?:\`(?_dvar_guts_regexp . '\`)|(?:(?_dvar_guts_regexp . '(?:' . $this->_obj_ext_regexp . ')*\`)|(?:(?_smarty_vars['$_var_name']"; } - } elseif(is_numeric($_var_name) && is_numeric($var_expr{0})) { + } elseif(is_numeric($_var_name) && is_numeric(substr($var_expr, 0, 1))) { // because . is the operator for accessing arrays thru inidizes we need to put it together again for floating point numbers if(count($_indexes) > 0) { @@ -1746,11 +1771,11 @@ } foreach ($_indexes as $_index) { - if ($_index{0} == '[') { + if (substr($_index, 0, 1) == '[') { $_index = substr($_index, 1, -1); if (is_numeric($_index)) { $_output .= "[$_index]"; - } elseif ($_index{0} == '$') { + } elseif (substr($_index, 0, 1) == '$') { if (strpos($_index, '.') !== false) { $_output .= '[' . $this->_parse_var($_index) . ']'; } else { @@ -1762,8 +1787,8 @@ $_var_section_prop = isset($_var_parts[1]) ? $_var_parts[1] : 'index'; $_output .= "[\$this->_sections['$_var_section']['$_var_section_prop']]"; } - } else if ($_index{0} == '.') { - if ($_index{1} == '$') + } else if (substr($_index, 0, 1) == '.') { + if (substr($_index, 1, 1) == '$') $_output .= "[\$this->_tpl_vars['" . substr($_index, 2) . "']]"; else $_output .= "['" . substr($_index, 1) . "']"; @@ -1772,7 +1797,7 @@ $this->_syntax_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__); } elseif($this->security && substr($_index, 2, 1) == '_') { $this->_syntax_error('(secure) call to private object member is not allowed', E_USER_ERROR, __FILE__, __LINE__); - } elseif ($_index{2} == '$') { + } elseif (substr($_index, 2, 1) == '$') { if ($this->security) { $this->_syntax_error('(secure) call to dynamic object member is not allowed', E_USER_ERROR, __FILE__, __LINE__); } else { @@ -1781,7 +1806,7 @@ } else { $_output .= $_index; } - } elseif ($_index{0} == '(') { + } elseif (substr($_index, 0, 1) == '(') { $_index = $this->_parse_parenth_args($_index); $_output .= $_index; } else { @@ -1878,7 +1903,7 @@ preg_match_all('~:(' . $this->_qstr_regexp . '|[^:]+)~', $modifier_arg_strings[$_i], $_match); $_modifier_args = $_match[1]; - if ($_modifier_name{0} == '@') { + if (substr($_modifier_name, 0, 1) == '@') { $_map_array = false; $_modifier_name = substr($_modifier_name, 1); } else { @@ -1900,10 +1925,10 @@ if($_modifier_name == 'default') { // supress notifications of default modifier vars and args - if($output{0} == '$') { + if(substr($output, 0, 1) == '$') { $output = '@' . $output; } - if(isset($_modifier_args[0]) && $_modifier_args[0]{0} == '$') { + if(isset($_modifier_args[0]) && substr($_modifier_args[0], 0, 1) == '$') { $_modifier_args[0] = '@' . $_modifier_args[0]; } } @@ -1955,7 +1980,7 @@ /* Extract the reference name. */ $_ref = substr($indexes[0], 1); foreach($indexes as $_index_no=>$_index) { - if ($_index{0} != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) { + if (substr($_index, 0, 1) != '.' && $_index_no<2 || !preg_match('~^(\.|\[|->)~', $_index)) { $this->_syntax_error('$smarty' . implode('', array_slice($indexes, 0, 2)) . ' is an invalid reference', E_USER_ERROR, __FILE__, __LINE__); } } @@ -1967,13 +1992,41 @@ break; case 'foreach': + array_shift($indexes); + $_var = $this->_parse_var_props(substr($indexes[0], 1)); + $_propname = substr($indexes[1], 1); + $_max_index = 1; + switch ($_propname) { + case 'index': + array_shift($indexes); + $compiled_ref = "(\$this->_foreach[$_var]['iteration']-1)"; + break; + + case 'first': + array_shift($indexes); + $compiled_ref = "(\$this->_foreach[$_var]['iteration'] <= 1)"; + break; + + case 'last': + array_shift($indexes); + $compiled_ref = "(\$this->_foreach[$_var]['iteration'] == \$this->_foreach[$_var]['total'])"; + break; + + case 'show': + array_shift($indexes); + $compiled_ref = "(\$this->_foreach[$_var]['total'] > 0)"; + break; + + default: + unset($_max_index); + $compiled_ref = "\$this->_foreach[$_var]"; + } + break; + case 'section': array_shift($indexes); $_var = $this->_parse_var_props(substr($indexes[0], 1)); - if ($_ref == 'foreach') - $compiled_ref = "\$this->_foreach[$_var]"; - else - $compiled_ref = "\$this->_sections[$_var]"; + $compiled_ref = "\$this->_sections[$_var]"; break; case 'get': @@ -2033,8 +2086,12 @@ return; } array_shift($indexes); - $_val = $this->_parse_var_props(substr($indexes[0],1)); - $compiled_ref = '@constant(' . $_val . ')'; + if (preg_match('!^\.\w+$!', $indexes[0])) { + $compiled_ref = '@' . substr($indexes[0], 1); + } else { + $_val = $this->_parse_var_props(substr($indexes[0], 1)); + $compiled_ref = '@constant(' . $_val . ')'; + } $_max_index = 1; break; @@ -2105,7 +2162,7 @@ if ($prefilter === false) { unset($this->_plugins['prefilter'][$filter_name]); $_params = array('plugins' => array(array('prefilter', $filter_name, null, null, false))); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php'); + require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); smarty_core_load_plugins($_params, $this); } } @@ -2115,7 +2172,7 @@ if ($postfilter === false) { unset($this->_plugins['postfilter'][$filter_name]); $_params = array('plugins' => array(array('postfilter', $filter_name, null, null, false))); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.load_plugins.php'); + require_once(SMARTY_CORE_DIR . 'core.load_plugins.php'); smarty_core_load_plugins($_params, $this); } } @@ -2159,9 +2216,9 @@ if ($_cacheable || 0<$this->_cacheable_state++) return ''; if (!isset($this->_cache_serial)) $this->_cache_serial = md5(uniqid('Smarty')); - $_ret = 'if ($this->caching) { echo \'{nocache:' + $_ret = 'if ($this->caching && !$this->_cache_including) { echo \'{nocache:' . $this->_cache_serial . '#' . $this->_nocache_count - . '}\';}'; + . '}\'; };'; return $_ret; } @@ -2176,9 +2233,9 @@ $_cacheable = !isset($this->_plugins[$type][$name]) || $this->_plugins[$type][$name][4]; if ($_cacheable || --$this->_cacheable_state>0) return ''; - return 'if ($this->caching) { echo \'{/nocache:' + return 'if ($this->caching && !$this->_cache_including) { echo \'{/nocache:' . $this->_cache_serial . '#' . ($this->_nocache_count++) - . '}\';}'; + . '}\'; };'; } Index: xoops2jp/html/class/smarty/debug.tpl diff -u xoops2jp/html/class/smarty/debug.tpl:1.2 xoops2jp/html/class/smarty/debug.tpl:1.3 --- xoops2jp/html/class/smarty/debug.tpl:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/class/smarty/debug.tpl Mon May 1 11:37:25 2006 @@ -36,7 +36,7 @@ var title = 'Console_' + self.name; {rdelim} _smarty_console = window.open("",title.value,"width=680,height=600,resizable,scrollbars=yes"); - _smarty_console.document.write("Smarty Debug Console_"+self.name+""); + _smarty_console.document.write("Smarty Debug Console_"+self.name+""); _smarty_console.document.write(""); _smarty_console.document.write(""); _smarty_console.document.write(""); From onokazu @ users.sourceforge.jp Mon May 1 11:37:25 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:25 +0900 Subject: [xoops-cvslog 2936] CVS update: xoops2jp/html/class/smarty/core Message-ID: <20060501023725.A07942AC266@users.sourceforge.jp> Index: xoops2jp/html/class/smarty/core/core.assemble_plugin_filepath.php diff -u xoops2jp/html/class/smarty/core/core.assemble_plugin_filepath.php:1.1 xoops2jp/html/class/smarty/core/core.assemble_plugin_filepath.php:1.2 --- xoops2jp/html/class/smarty/core/core.assemble_plugin_filepath.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.assemble_plugin_filepath.php Mon May 1 11:37:25 2006 @@ -50,7 +50,7 @@ $_plugin_filepath = $_plugin_dir . DIRECTORY_SEPARATOR . $_plugin_filename; $_params = array('file_path' => $_plugin_filepath); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); + require_once(SMARTY_CORE_DIR . 'core.get_include_path.php'); if(smarty_core_get_include_path($_params, $smarty)) { $_return = $_params['new_file_path']; break; Index: xoops2jp/html/class/smarty/core/core.create_dir_structure.php diff -u xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.1 xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.2 --- xoops2jp/html/class/smarty/core/core.create_dir_structure.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.create_dir_structure.php Mon May 1 11:37:25 2006 @@ -22,7 +22,7 @@ /* unix-style paths */ $_dir = $params['dir']; $_dir_parts = preg_split('!/+!', $_dir, -1, PREG_SPLIT_NO_EMPTY); - $_new_dir = ($_dir{0}=='/') ? '/' : getcwd().'/'; + $_new_dir = (substr($_dir, 0, 1)=='/') ? '/' : getcwd().'/'; if($_use_open_basedir = !empty($_open_basedir_ini)) { $_open_basedirs = explode(':', $_open_basedir_ini); } Index: xoops2jp/html/class/smarty/core/core.display_debug_console.php diff -u xoops2jp/html/class/smarty/core/core.display_debug_console.php:1.1 xoops2jp/html/class/smarty/core/core.display_debug_console.php:1.2 --- xoops2jp/html/class/smarty/core/core.display_debug_console.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.display_debug_console.php Mon May 1 11:37:25 2006 @@ -23,7 +23,7 @@ // set path to debug template from SMARTY_DIR $smarty->debug_tpl = SMARTY_DIR . 'debug.tpl'; if($smarty->security && is_file($smarty->debug_tpl)) { - $smarty->secure_dir[] = dirname(realpath($smarty->debug_tpl)); + $smarty->secure_dir[] = realpath($smarty->debug_tpl); } $smarty->debug_tpl = 'file:' . SMARTY_DIR . 'debug.tpl'; } Index: xoops2jp/html/class/smarty/core/core.get_php_resource.php diff -u xoops2jp/html/class/smarty/core/core.get_php_resource.php:1.1 xoops2jp/html/class/smarty/core/core.get_php_resource.php:1.2 --- xoops2jp/html/class/smarty/core/core.get_php_resource.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.get_php_resource.php Mon May 1 11:37:25 2006 @@ -32,7 +32,7 @@ } else { // test for file in include_path $_params = array('file_path' => $params['resource_name']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_include_path.php'); + require_once(SMARTY_CORE_DIR . 'core.get_include_path.php'); if(smarty_core_get_include_path($_params, $smarty)) { $_include_path = $_params['new_file_path']; $_readable = true; @@ -56,7 +56,7 @@ if ($_readable) { if ($smarty->security) { - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.is_trusted.php'); + require_once(SMARTY_CORE_DIR . 'core.is_trusted.php'); if (!smarty_core_is_trusted($params, $smarty)) { $smarty->$_error_funcc('(secure mode) ' . $params['resource_type'] . ':' . $params['resource_name'] . ' is not trusted'); return false; Index: xoops2jp/html/class/smarty/core/core.is_secure.php diff -u xoops2jp/html/class/smarty/core/core.is_secure.php:1.1 xoops2jp/html/class/smarty/core/core.is_secure.php:1.2 --- xoops2jp/html/class/smarty/core/core.is_secure.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.is_secure.php Mon May 1 11:37:25 2006 @@ -27,18 +27,21 @@ foreach ((array)$params['resource_base_path'] as $curr_dir) { if ( ($_cd = realpath($curr_dir)) !== false && strncmp($_rp, $_cd, strlen($_cd)) == 0 && - $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { + substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { return true; } } } if (!empty($smarty->secure_dir)) { foreach ((array)$smarty->secure_dir as $curr_dir) { - if ( ($_cd = realpath($curr_dir)) !== false && - strncmp($_rp, $_cd, strlen($_cd)) == 0 && - $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { - return true; - } + if ( ($_cd = realpath($curr_dir)) !== false) { + if($_cd == $_rp) { + return true; + } elseif (strncmp($_rp, $_cd, strlen($_cd)) == 0 && + substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR) { + return true; + } + } } } } else { Index: xoops2jp/html/class/smarty/core/core.is_trusted.php diff -u xoops2jp/html/class/smarty/core/core.is_trusted.php:1.1 xoops2jp/html/class/smarty/core/core.is_trusted.php:1.2 --- xoops2jp/html/class/smarty/core/core.is_trusted.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.is_trusted.php Mon May 1 11:37:25 2006 @@ -25,7 +25,7 @@ if (!empty($curr_dir) && is_readable ($curr_dir)) { $_cd = realpath($curr_dir); if (strncmp($_rp, $_cd, strlen($_cd)) == 0 - && $_rp{strlen($_cd)} == DIRECTORY_SEPARATOR ) { + && substr($_rp, strlen($_cd), 1) == DIRECTORY_SEPARATOR ) { $_smarty_trusted = true; break; } Index: xoops2jp/html/class/smarty/core/core.process_cached_inserts.php diff -u xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.1 xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.2 --- xoops2jp/html/class/smarty/core/core.process_cached_inserts.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.process_cached_inserts.php Mon May 1 11:37:25 2006 @@ -20,7 +20,7 @@ for ($i = 0, $for_max = count($cached_inserts); $i < $for_max; $i++) { if ($smarty->debugging) { $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $debug_start_time = smarty_core_get_microtime($_params, $smarty); } @@ -29,7 +29,7 @@ if (isset($args['script'])) { $_params = array('resource_name' => $smarty->_dequote($args['script'])); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); + require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); if(!smarty_core_get_php_resource($_params, $smarty)) { return false; } @@ -52,10 +52,10 @@ $replace = ''; } - $params['results'] = str_replace($cached_inserts[$i], $replace, $params['results']); + $params['results'] = substr_replace($params['results'], $replace, strpos($params['results'], $cached_inserts[$i]), strlen($cached_inserts[$i])); if ($smarty->debugging) { $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $smarty->_smarty_debug_info[] = array('type' => 'insert', 'filename' => 'insert_'.$name, 'depth' => $smarty->_inclusion_depth, Index: xoops2jp/html/class/smarty/core/core.process_compiled_include.php diff -u xoops2jp/html/class/smarty/core/core.process_compiled_include.php:1.1 xoops2jp/html/class/smarty/core/core.process_compiled_include.php:1.2 --- xoops2jp/html/class/smarty/core/core.process_compiled_include.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.process_compiled_include.php Mon May 1 11:37:25 2006 @@ -20,6 +20,11 @@ $smarty->_cache_including = true; $_return = $params['results']; + + foreach ($smarty->_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { + $smarty->_include($_include_file_path, true); + } + foreach ($smarty->_cache_serials as $_include_file_path=>$_cache_serial) { $_return = preg_replace_callback('!(\{nocache\:('.$_cache_serial.')#(\d+)\})!s', array(&$smarty, '_process_compiled_include_callback'), Index: xoops2jp/html/class/smarty/core/core.read_cache_file.php diff -u xoops2jp/html/class/smarty/core/core.read_cache_file.php:1.1 xoops2jp/html/class/smarty/core/core.read_cache_file.php:1.2 --- xoops2jp/html/class/smarty/core/core.read_cache_file.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.read_cache_file.php Mon May 1 11:37:25 2006 @@ -48,10 +48,11 @@ return false; } - $cache_split = explode("\n", $params['results'], 2); - $cache_header = $cache_split[0]; - - $_cache_info = unserialize($cache_header); + $_contents = $params['results']; + $_info_start = strpos($_contents, "\n") + 1; + $_info_len = (int)substr($_contents, 0, $_info_start - 1); + $_cache_info = unserialize(substr($_contents, $_info_start, $_info_len)); + $params['results'] = substr($_contents, $_info_start + $_info_len); if ($smarty->caching == 2 && isset ($_cache_info['expires'])){ // caching by expiration time @@ -89,17 +90,6 @@ } } - foreach ($_cache_info['cache_serials'] as $_include_file_path=>$_cache_serial) { - if (empty($smarty->_cache_serials[$_include_file_path])) { - $smarty->_include($_include_file_path, true); - } - - if ($smarty->_cache_serials[$_include_file_path] != $_cache_serial) { - /* regenerate */ - return false; - } - } - $params['results'] = $cache_split[1]; $content_cache[$params['tpl_file'].','.$params['cache_id'].','.$params['compile_id']] = array($params['results'], $_cache_info); $smarty->_cache_info = $_cache_info; Index: xoops2jp/html/class/smarty/core/core.rm_auto.php diff -u xoops2jp/html/class/smarty/core/core.rm_auto.php:1.1 xoops2jp/html/class/smarty/core/core.rm_auto.php:1.2 --- xoops2jp/html/class/smarty/core/core.rm_auto.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.rm_auto.php Mon May 1 11:37:25 2006 @@ -28,7 +28,7 @@ 'level' => 0, 'exp_time' => $params['exp_time'] ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); + require_once(SMARTY_CORE_DIR . 'core.rmdir.php'); $_res = smarty_core_rmdir($_params, $smarty); } else { $_tname = $smarty->_get_auto_filename($params['auto_base'], $params['auto_source'], $params['auto_id']); @@ -47,7 +47,7 @@ 'level' => 1, 'exp_time' => $params['exp_time'] ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); + require_once(SMARTY_CORE_DIR . 'core.rmdir.php'); $_res = smarty_core_rmdir($_params, $smarty); } else { // remove matching file names Index: xoops2jp/html/class/smarty/core/core.rmdir.php diff -u xoops2jp/html/class/smarty/core/core.rmdir.php:1.1 xoops2jp/html/class/smarty/core/core.rmdir.php:1.2 --- xoops2jp/html/class/smarty/core/core.rmdir.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.rmdir.php Mon May 1 11:37:25 2006 @@ -32,7 +32,6 @@ 'level' => $params['level'] + 1, 'exp_time' => $params['exp_time'] ); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.rmdir.php'); smarty_core_rmdir($_params, $smarty); } else { Index: xoops2jp/html/class/smarty/core/core.run_insert_handler.php diff -u xoops2jp/html/class/smarty/core/core.run_insert_handler.php:1.1 xoops2jp/html/class/smarty/core/core.run_insert_handler.php:1.2 --- xoops2jp/html/class/smarty/core/core.run_insert_handler.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.run_insert_handler.php Mon May 1 11:37:25 2006 @@ -14,7 +14,7 @@ function smarty_core_run_insert_handler($params, &$smarty) { - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); if ($smarty->debugging) { $_params = array(); $_debug_start_time = smarty_core_get_microtime($_params, $smarty); @@ -34,7 +34,7 @@ } else { if (isset($params['args']['script'])) { $_params = array('resource_name' => $smarty->_dequote($params['args']['script'])); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); + require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); if(!smarty_core_get_php_resource($_params, $smarty)) { return false; } @@ -51,7 +51,7 @@ $_content = $_funcname($params['args'], $smarty); if ($smarty->debugging) { $_params = array(); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_microtime.php'); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); $smarty->_smarty_debug_info[] = array('type' => 'insert', 'filename' => 'insert_'.$params['args']['name'], 'depth' => $smarty->_inclusion_depth, Index: xoops2jp/html/class/smarty/core/core.smarty_include_php.php diff -u xoops2jp/html/class/smarty/core/core.smarty_include_php.php:1.1 xoops2jp/html/class/smarty/core/core.smarty_include_php.php:1.2 --- xoops2jp/html/class/smarty/core/core.smarty_include_php.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.smarty_include_php.php Mon May 1 11:37:25 2006 @@ -21,7 +21,7 @@ function smarty_core_smarty_include_php($params, &$smarty) { $_params = array('resource_name' => $params['smarty_file']); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.get_php_resource.php'); + require_once(SMARTY_CORE_DIR . 'core.get_php_resource.php'); smarty_core_get_php_resource($_params, $smarty); $_smarty_resource_type = $_params['resource_type']; $_smarty_php_resource = $_params['php_resource']; Index: xoops2jp/html/class/smarty/core/core.write_cache_file.php diff -u xoops2jp/html/class/smarty/core/core.write_cache_file.php:1.1 xoops2jp/html/class/smarty/core/core.write_cache_file.php:1.2 --- xoops2jp/html/class/smarty/core/core.write_cache_file.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.write_cache_file.php Mon May 1 11:37:25 2006 @@ -31,16 +31,39 @@ $smarty->_cache_info['expires'] = -1; } - // collapse {nocache...}-tags - $params['results'] = preg_replace('!((\{nocache\:([0-9a-f]{32})#(\d+)\})' - .'.*' - .'{/nocache\:\\3#\\4\})!Us' - ,'\\2' - ,$params['results']); + // collapse nocache.../nocache-tags + if (preg_match_all('!\{(/?)nocache\:[0-9a-f]{32}#\d+\}!', $params['results'], $match, PREG_PATTERN_ORDER)) { + // remove everything between every pair of outermost noache.../nocache-tags + // and replace it by a single nocache-tag + // this new nocache-tag will be replaced by dynamic contents in + // smarty_core_process_compiled_includes() on a cache-read + + $match_count = count($match[0]); + $results = preg_split('!(\{/?nocache\:[0-9a-f]{32}#\d+\})!', $params['results'], -1, PREG_SPLIT_DELIM_CAPTURE); + + $level = 0; + $j = 0; + for ($i=0, $results_count = count($results); $i < $results_count && $j < $match_count; $i++) { + if ($results[$i] == $match[0][$j]) { + // nocache tag + if ($match[1][$j]) { // closing tag + $level--; + unset($results[$i]); + } else { // opening tag + if ($level++ > 0) unset($results[$i]); + } + $j++; + } elseif ($level > 0) { + unset($results[$i]); + } + } + $params['results'] = implode('', $results); + } $smarty->_cache_info['cache_serials'] = $smarty->_cache_serials; // prepend the cache header info into cache file - $params['results'] = serialize($smarty->_cache_info)."\n".$params['results']; + $_cache_info = serialize($smarty->_cache_info); + $params['results'] = strlen($_cache_info) . "\n" . $_cache_info . $params['results']; if (!empty($smarty->cache_handler_func)) { // use cache_handler function @@ -62,7 +85,7 @@ $_auto_id = $smarty->_get_auto_id($params['cache_id'], $params['compile_id']); $_cache_file = $smarty->_get_auto_filename($smarty->cache_dir, $params['tpl_file'], $_auto_id); $_params = array('filename' => $_cache_file, 'contents' => $params['results'], 'create_dirs' => true); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); + require_once(SMARTY_CORE_DIR . 'core.write_file.php'); smarty_core_write_file($_params, $smarty); return true; } Index: xoops2jp/html/class/smarty/core/core.write_compiled_include.php diff -u xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.1 xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.2 --- xoops2jp/html/class/smarty/core/core.write_compiled_include.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.write_compiled_include.php Mon May 1 11:37:25 2006 @@ -15,8 +15,8 @@ function smarty_core_write_compiled_include($params, &$smarty) { - $_tag_start = 'if \(\$this->caching\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\';\}'; - $_tag_end = 'if \(\$this->caching\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\';\}'; + $_tag_start = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{nocache\:('.$params['cache_serial'].')#(\d+)\}\'; \};'; + $_tag_end = 'if \(\$this->caching && \!\$this->_cache_including\) \{ echo \'\{/nocache\:(\\2)#(\\3)\}\'; \};'; preg_match_all('!('.$_tag_start.'(.*)'.$_tag_end.')!Us', $params['compiled_content'], $_match_source, PREG_SET_ORDER); @@ -25,7 +25,8 @@ if (count($_match_source)==0) return; // convert the matched php-code to functions - $_include_compiled = "_version.", created on ".strftime("%Y-%m-%d %H:%M:%S")."\n"; + $_include_compiled .= " compiled from " . strtr(urlencode($params['resource_name']), array('%2F'=>'/', '%3A'=>':')) . " */\n\n"; $_compile_path = $params['include_file_path']; @@ -42,7 +43,19 @@ if ($this_varname == '_smarty') { /* rename $this to $_smarty in the sourcecode */ $tokens = token_get_all(' $_compile_path, 'contents' => $_include_compiled, 'create_dirs' => true); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); + require_once(SMARTY_CORE_DIR . 'core.write_file.php'); smarty_core_write_file($_params, $smarty); return true; } Index: xoops2jp/html/class/smarty/core/core.write_compiled_resource.php diff -u xoops2jp/html/class/smarty/core/core.write_compiled_resource.php:1.1 xoops2jp/html/class/smarty/core/core.write_compiled_resource.php:1.2 --- xoops2jp/html/class/smarty/core/core.write_compiled_resource.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.write_compiled_resource.php Mon May 1 11:37:25 2006 @@ -25,7 +25,7 @@ } $_params = array('filename' => $params['compile_path'], 'contents' => $params['compiled_content'], 'create_dirs' => true); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.write_file.php'); + require_once(SMARTY_CORE_DIR . 'core.write_file.php'); smarty_core_write_file($_params, $smarty); return true; } Index: xoops2jp/html/class/smarty/core/core.write_file.php diff -u xoops2jp/html/class/smarty/core/core.write_file.php:1.1 xoops2jp/html/class/smarty/core/core.write_file.php:1.2 --- xoops2jp/html/class/smarty/core/core.write_file.php:1.1 Fri Mar 18 21:56:02 2005 +++ xoops2jp/html/class/smarty/core/core.write_file.php Mon May 1 11:37:25 2006 @@ -19,7 +19,7 @@ if ($params['create_dirs']) { $_params = array('dir' => $_dirname); - require_once(SMARTY_DIR . 'core' . DIRECTORY_SEPARATOR . 'core.create_dir_structure.php'); + require_once(SMARTY_CORE_DIR . 'core.create_dir_structure.php'); smarty_core_create_dir_structure($_params, $smarty); } From onokazu @ users.sourceforge.jp Mon May 1 11:37:26 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:26 +0900 Subject: [xoops-cvslog 2937] CVS update: xoops2jp/html/class/xml/rpc Message-ID: <20060501023726.82E802AC3CD@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.6 --- xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.5 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/class/xml/rpc/xmlrpcapi.php Mon May 1 11:37:26 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 Mon May 1 11:37:26 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:26 +0900 Subject: [xoops-cvslog 2938] CVS update: xoops2jp/html/class/xoopsform Message-ID: <20060501023726.AE9912AC3DA@users.sourceforge.jp> Index: xoops2jp/html/class/xoopsform/form.php diff -u xoops2jp/html/class/xoopsform/form.php:1.4 xoops2jp/html/class/xoopsform/form.php:1.5 --- xoops2jp/html/class/xoopsform/form.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/class/xoopsform/form.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ _extra)) { - return $this->_extra; + $ret = $this->_extra; } + return $ret; } /** Index: xoops2jp/html/class/xoopsform/formdhtmltextarea.php diff -u xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.4 xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.5 --- xoops2jp/html/class/xoopsform/formdhtmltextarea.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/class/xoopsform/formdhtmltextarea.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ getSmileys(); + $smiles = $myts->getSmileys(); $ret = ''; if (empty($smiles)) { $db =& Database::getInstance(); From onokazu @ users.sourceforge.jp Mon May 1 11:37:26 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:26 +0900 Subject: [xoops-cvslog 2939] CVS update: xoops2jp/html Message-ID: <20060501023726.E7C4B2AC266@users.sourceforge.jp> Index: xoops2jp/html/edituser.php diff -u xoops2jp/html/edituser.php:1.4 xoops2jp/html/edituser.php:1.5 --- xoops2jp/html/edituser.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/edituser.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ stripSlashesGPC($_POST['user_avatar']))) { + // allow system avatar selection only + if (preg_match("/^savt/", $user_avatar_req)) { + $criteria =& new CriteriaCompo(new Criteria('avatar_file', addslashes($user_avatar_req))); + $criteria->add(new Criteria('avatar_type', 'S')); + if ($avatars = $avt_handler->getObjects($criteria)) { + if (is_object($avatars[0])) { + $user_avatar = $avatars[0]->getVar('avatar_file'); + $user_avatar_object =& $avatars[0]; + } + } + } } $user_avatarpath = str_replace("\\", "/", realpath(XOOPS_UPLOAD_PATH.'/'.$user_avatar)); if (0 === strpos($user_avatarpath, XOOPS_UPLOAD_PATH) && is_file($user_avatarpath)) { @@ -359,9 +371,10 @@ include XOOPS_ROOT_PATH.'/footer.php'; exit(); } - $avt_handler =& xoops_gethandler('avatar'); - if ($oldavatar && $oldavatar != 'blank.gif' && !preg_match("/^savt/", strtolower($oldavatar))) { - $avatars =& $avt_handler->getObjects(new Criteria('avatar_file', $oldavatar)); + if ($oldavatar && $oldavatar != 'blank.gif' && preg_match("/^cavt/", strtolower($oldavatar))) { + $criteria =& new CriteriaCompo(new Criteria('avatar_file', addslashes($oldavatar))); + $criteria->add(new Criteria('avatar_type', 'C')); + $avatars =& $avt_handler->getObjects($criteria); if (is_object($avatars[0])) { $avt_handler->delete($avatars[0]); } @@ -370,11 +383,8 @@ unlink($oldavatar_path); } } - if ($user_avatar != 'blank.gif') { - $avatars =& $avt_handler->getObjects(new Criteria('avatar_file', $user_avatar)); - if (is_object($avatars[0])) { - $avt_handler->addUser($avatars[0]->getVar('avatar_id'), $xoopsUser->getVar('uid')); - } + if (is_object($user_avatar_object)) { + $avt_handler->addUser($user_avatar_object->getVar('avatar_id'), $xoopsUser->getVar('uid')); } } redirect_header('userinfo.php?uid='.$uid, 0, _US_PROFUPDATED); Index: xoops2jp/html/footer.php diff -u xoops2jp/html/footer.php:1.5 xoops2jp/html/footer.php:1.6 --- xoops2jp/html/footer.php:1.5 Mon Sep 5 05:46:08 2005 +++ xoops2jp/html/footer.php Mon May 1 11:37:26 2006 @@ -1,91 +1,91 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------ // - -if (!defined('XOOPS_ROOT_PATH')) { - exit(); -} -if ( !defined("XOOPS_FOOTER_INCLUDED") ) { - define("XOOPS_FOOTER_INCLUDED",1); - $xoopsLogger->stopTime(); - if ($xoopsOption['theme_use_smarty'] == 0) { - // the old way - $footer = htmlspecialchars($xoopsConfigMetaFooter['footer']).'
Powered by XOOPS © 2001-2005 The XOOPS Project
'; - if (isset($xoopsOption['template_main'])) { - $xoopsTpl->xoops_setCaching(0); - $xoopsTpl->display('db:'.$xoopsOption['template_main']); - } - if (!isset($xoopsOption['show_rblock'])) { - $xoopsOption['show_rblock'] = 0; - } - themefooter($xoopsOption['show_rblock'], $footer); - xoops_footer(); - } else { - // RMV-NOTIFY - include_once XOOPS_ROOT_PATH . '/include/notification_select.php'; - if (isset($xoopsOption['template_main'])) { - if (isset($xoopsCachedTemplateId)) { - $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch('db:'.$xoopsOption['template_main'], $xoopsCachedTemplateId)); - } else { - $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch('db:'.$xoopsOption['template_main'])); - } - } else { - if (isset($xoopsCachedTemplate)) { - $xoopsTpl->assign('dummy_content', ob_get_contents()); - $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); - } else { - $xoopsTpl->assign('xoops_contents', ob_get_contents()); - } - ob_end_clean(); - } - if (!headers_sent()) { - header('Content-Type:text/html; charset='._CHARSET); - header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); - header('Cache-Control: no-store, no-cache, must-revalidate'); - header('Cache-Control: post-check=0, pre-check=0', false); - header('Pragma: no-cache'); - } - $xoopsTpl->xoops_setCaching(0); - $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); - } - if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) { - echo ''; - } -} -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------ // + +if (!defined('XOOPS_ROOT_PATH')) { + exit(); +} +if ( !defined("XOOPS_FOOTER_INCLUDED") ) { + define("XOOPS_FOOTER_INCLUDED",1); + $xoopsLogger->stopTime(); + if ($xoopsOption['theme_use_smarty'] == 0) { + // the old way + $footer = htmlspecialchars($xoopsConfigMetaFooter['footer']).'
Powered by XOOPS Cube © 2005-2006 The XOOPS Cube Project
'; + if (isset($xoopsOption['template_main'])) { + $xoopsTpl->xoops_setCaching(0); + $xoopsTpl->display('db:'.$xoopsOption['template_main']); + } + if (!isset($xoopsOption['show_rblock'])) { + $xoopsOption['show_rblock'] = 0; + } + themefooter($xoopsOption['show_rblock'], $footer); + xoops_footer(); + } else { + // RMV-NOTIFY + include_once XOOPS_ROOT_PATH . '/include/notification_select.php'; + if (isset($xoopsOption['template_main'])) { + if (isset($xoopsCachedTemplateId)) { + $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch('db:'.$xoopsOption['template_main'], $xoopsCachedTemplateId)); + } else { + $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch('db:'.$xoopsOption['template_main'])); + } + } else { + if (isset($xoopsCachedTemplate)) { + $xoopsTpl->assign('dummy_content', ob_get_contents()); + $xoopsTpl->assign('xoops_contents', $xoopsTpl->fetch($xoopsCachedTemplate, $xoopsCachedTemplateId)); + } else { + $xoopsTpl->assign('xoops_contents', ob_get_contents()); + } + ob_end_clean(); + } + if (!headers_sent()) { + header('Content-Type:text/html; charset='._CHARSET); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); + header('Cache-Control: no-store, no-cache, must-revalidate'); + header('Cache-Control: post-check=0, pre-check=0', false); + header('Pragma: no-cache'); + } + $xoopsTpl->xoops_setCaching(0); + $xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html'); + } + if ($xoopsConfig['debug_mode'] == 2 && $xoopsUserIsAdmin) { + echo ''; + } +} +?> Index: xoops2jp/html/header.php diff -u xoops2jp/html/header.php:1.5 xoops2jp/html/header.php:1.6 --- xoops2jp/html/header.php:1.5 Mon Sep 5 05:46:08 2005 +++ xoops2jp/html/header.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ assign_by_ref('block', $bresult); - $bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); + $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); $xoopsTpl->clear_assign('block'); } else { $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); - $bcontent =& $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); + $bcontent = $xoopsTpl->fetch('db:'.$btpl, 'blk_'.$block_arr[$i]->getVar('bid')); } } else { $bid = $block_arr[$i]->getVar('bid'); @@ -159,11 +159,11 @@ continue; } $xoopsTpl->assign_by_ref('dummy_content', $bresult['content']); - $bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid); + $bcontent = $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid); $xoopsTpl->clear_assign('block'); } else { $xoopsLogger->addBlock($block_arr[$i]->getVar('name'), true, $bcachetime); - $bcontent =& $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid); + $bcontent = $xoopsTpl->fetch('db:system_dummy.html', 'blk_'.$bid); } } switch ($block_arr[$i]->getVar('side')) { Index: xoops2jp/html/lostpass.php diff -u xoops2jp/html/lostpass.php:1.3 xoops2jp/html/lostpass.php:1.4 --- xoops2jp/html/lostpass.php:1.3 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/lostpass.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ getUsers(new Criteria('email', $myts->addSlashes($email))); +$getuser = $member_handler->getUsers(new Criteria('email', $myts->addSlashes($email))); if (empty($getuser)) { - redirect_header("user.php",2,_US_SORRYNOTFOUND); - exit(); + redirect_header("user.php",2,_US_SORRYNOTFOUND); + exit(); } else { - $code = isset($_GET['code']) ? trim($_GET['code']) : ''; - $areyou = substr($getuser[0]->getVar("pass"), 0, 5); - if ($code != '' && $areyou == $code) { - $newpass = xoops_makepass(); - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setTemplate("lostpass2.tpl"); - $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); - $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); - $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); - $xoopsMailer->assign("NEWPWD", $newpass); - $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL)); - if ( !$xoopsMailer->send() ) { - echo $xoopsMailer->getErrors(); - } + $code = isset($_GET['code']) ? trim($_GET['code']) : ''; + $areyou = substr($getuser[0]->getVar("pass"), 0, 5); + if ($code != '' && $areyou == $code) { + $newpass = xoops_makepass(); + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate("lostpass2.tpl"); + $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); + $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); + $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); + $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); + $xoopsMailer->assign("NEWPWD", $newpass); + $xoopsMailer->setToUsers($getuser[0]); + $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,XOOPS_URL)); + if ( !$xoopsMailer->send() ) { + echo $xoopsMailer->getErrors(); + } - // Next step: add the new password to the database - $sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid')); - if ( !$xoopsDB->queryF($sql) ) { - include "header.php"; - echo _US_MAILPWDNG; - include "footer.php"; - exit(); - } - redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false); - exit(); - // If no Code, send it - } else { - $xoopsMailer =& getMailer(); - $xoopsMailer->useMail(); - $xoopsMailer->setTemplate("lostpass1.tpl"); - $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); - $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); - $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); - $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); - $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou); - $xoopsMailer->setToUsers($getuser[0]); - $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); - $xoopsMailer->setFromName($xoopsConfig['sitename']); - $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename'])); - include "header.php"; - if ( !$xoopsMailer->send() ) { - echo $xoopsMailer->getErrors(); - } - echo "

"; - printf(_US_CONFMAIL,$getuser[0]->getVar("uname")); - echo "

"; - include "footer.php"; - } + // Next step: add the new password to the database + $sql = sprintf("UPDATE %s SET pass = '%s' WHERE uid = %u", $xoopsDB->prefix("users"), md5($newpass), $getuser[0]->getVar('uid')); + if ( !$xoopsDB->queryF($sql) ) { + include "header.php"; + echo _US_MAILPWDNG; + include "footer.php"; + exit(); + } + redirect_header("user.php", 3, sprintf(_US_PWDMAILED,$getuser[0]->getVar("uname")), false); + exit(); + // If no Code, send it + } else { + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + $xoopsMailer->setTemplate("lostpass1.tpl"); + $xoopsMailer->assign("SITENAME", $xoopsConfig['sitename']); + $xoopsMailer->assign("ADMINMAIL", $xoopsConfig['adminmail']); + $xoopsMailer->assign("SITEURL", XOOPS_URL."/"); + $xoopsMailer->assign("IP", $_SERVER['REMOTE_ADDR']); + $xoopsMailer->assign("NEWPWD_LINK", XOOPS_URL."/lostpass.php?email=".$email."&code=".$areyou); + $xoopsMailer->setToUsers($getuser[0]); + $xoopsMailer->setFromEmail($xoopsConfig['adminmail']); + $xoopsMailer->setFromName($xoopsConfig['sitename']); + $xoopsMailer->setSubject(sprintf(_US_NEWPWDREQ,$xoopsConfig['sitename'])); + include "header.php"; + if ( !$xoopsMailer->send() ) { + echo $xoopsMailer->getErrors(); + } + echo "

"; + printf(_US_CONFMAIL,$getuser[0]->getVar("uname")); + echo "

"; + include "footer.php"; + } } ?> \ No newline at end of file Index: xoops2jp/html/mainfile.dist.php diff -u xoops2jp/html/mainfile.dist.php:1.2 xoops2jp/html/mainfile.dist.php:1.3 --- xoops2jp/html/mainfile.dist.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/mainfile.dist.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ \ No newline at end of file Index: xoops2jp/html/userinfo.php diff -u xoops2jp/html/userinfo.php:1.2 xoops2jp/html/userinfo.php:1.3 --- xoops2jp/html/userinfo.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/userinfo.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ getGroups() : XOOPS_GROUP_ANONYMOUS; -$isAdmin = $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_USER, $groups); // isadmin is true if user has 'edit users' admin rights +$isAdmin = $gperm_handler->checkRight( 'system_admin', XOOPS_SYSTEM_USER, $groups); // isadmin is true if user has 'edit users' admin rights if (is_object($xoopsUser)) { - if ($uid == $xoopsUser->getVar('uid')) { - $config_handler =& xoops_gethandler('config'); - $xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER); - $xoopsOption['template_main'] = 'system_userinfo.html'; - include XOOPS_ROOT_PATH.'/header.php'; - $xoopsTpl->assign('user_ownpage', true); - $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE); - $xoopsTpl->assign('lang_avatar', _US_AVATAR); - $xoopsTpl->assign('lang_inbox', _US_INBOX); - $xoopsTpl->assign('lang_logout', _US_LOGOUT); - if ($xoopsConfigUser['self_delete'] == 1) { - $xoopsTpl->assign('user_candelete', true); - $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT); - } else { - $xoopsTpl->assign('user_candelete', false); - } - $thisUser =& $xoopsUser; - } else { - $member_handler =& xoops_gethandler('member'); - $thisUser =& $member_handler->getUser($uid); - if (!is_object($thisUser) || !$thisUser->isActive() ) { - redirect_header("index.php",3,_US_SELECTNG); - exit(); - } - $xoopsOption['template_main'] = 'system_userinfo.html'; - include XOOPS_ROOT_PATH.'/header.php'; - $xoopsTpl->assign('user_ownpage', false); - } + if ($uid == $xoopsUser->getVar('uid')) { + $config_handler =& xoops_gethandler('config'); + $xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER); + $xoopsOption['template_main'] = 'system_userinfo.html'; + include XOOPS_ROOT_PATH.'/header.php'; + $xoopsTpl->assign('user_ownpage', true); + $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE); + $xoopsTpl->assign('lang_avatar', _US_AVATAR); + $xoopsTpl->assign('lang_inbox', _US_INBOX); + $xoopsTpl->assign('lang_logout', _US_LOGOUT); + if ($xoopsConfigUser['self_delete'] == 1) { + $xoopsTpl->assign('user_candelete', true); + $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT); + } else { + $xoopsTpl->assign('user_candelete', false); + } + $thisUser =& $xoopsUser; + } else { + $member_handler =& xoops_gethandler('member'); + $thisUser =& $member_handler->getUser($uid); + if (!is_object($thisUser) || !$thisUser->isActive() ) { + redirect_header("index.php",3,_US_SELECTNG); + exit(); + } + $xoopsOption['template_main'] = 'system_userinfo.html'; + include XOOPS_ROOT_PATH.'/header.php'; + $xoopsTpl->assign('user_ownpage', false); + } } else { - $member_handler =& xoops_gethandler('member'); - $thisUser =& $member_handler->getUser($uid); - if (!is_object($thisUser) || !$thisUser->isActive()) { - redirect_header("index.php",3,_US_SELECTNG); - exit(); - } - $xoopsOption['template_main'] = 'system_userinfo.html'; - include(XOOPS_ROOT_PATH.'/header.php'); - $xoopsTpl->assign('user_ownpage', false); + $member_handler =& xoops_gethandler('member'); + $thisUser =& $member_handler->getUser($uid); + if (!is_object($thisUser) || !$thisUser->isActive()) { + redirect_header("index.php",3,_US_SELECTNG); + exit(); + } + $xoopsOption['template_main'] = 'system_userinfo.html'; + include(XOOPS_ROOT_PATH.'/header.php'); + $xoopsTpl->assign('user_ownpage', false); } $myts =& MyTextSanitizer::getInstance(); if ( is_object($xoopsUser) && $isAdmin ) { - $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE); - $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT); - $xoopsTpl->assign('user_uid', $thisUser->getVar('uid')); + $xoopsTpl->assign('lang_editprofile', _US_EDITPROFILE); + $xoopsTpl->assign('lang_deleteaccount', _US_DELACCOUNT); + $xoopsTpl->assign('user_uid', $thisUser->getVar('uid')); } $xoopsTpl->assign('lang_allaboutuser', sprintf(_US_ALLABOUT,$thisUser->getVar('uname'))); $xoopsTpl->assign('lang_avatar', _US_AVATAR); @@ -129,63 +129,63 @@ $xoopsTpl->assign('user_signature', $myts->makeTareaData4Show($thisUser->getVar('user_sig', 'N'),0,1,1)); if ($thisUser->getVar('user_viewemail') == 1) { - $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E')); + $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E')); } else { - if (is_object($xoopsUser)) { - // All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this) - if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) { - $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E')); - } else { - $xoopsTpl->assign('user_email', ' '); - } - } + if (is_object($xoopsUser)) { + // All admins will be allowed to see emails, even those that are not allowed to edit users (I think it's ok like this) + if ($xoopsUserIsAdmin || ($xoopsUser->getVar("uid") == $thisUser->getVar("uid"))) { + $xoopsTpl->assign('user_email', $thisUser->getVar('email', 'E')); + } else { + $xoopsTpl->assign('user_email', ' '); + } + } } if (is_object($xoopsUser)) { - $xoopsTpl->assign('user_pmlink', "getVar('uid')."', 'pmlite', 450, 380);\">\"".sprintf(_SENDPMTO,$thisUser-getVar('uname'))."\" />"); + $xoopsTpl->assign('user_pmlink', "getVar('uid')."', 'pmlite', 450, 380);\">\"".sprintf(_SENDPMTO,$thisUser-getVar('uname'))."\" />"); } else { - $xoopsTpl->assign('user_pmlink', ''); + $xoopsTpl->assign('user_pmlink', ''); } -$userrank =& $thisUser->rank(); +$userrank = $thisUser->rank(); if ($userrank['image']) { - $xoopsTpl->assign('user_rankimage', ''); + $xoopsTpl->assign('user_rankimage', ''); } $xoopsTpl->assign('user_ranktitle', $userrank['title']); $date = $thisUser->getVar("last_login"); if (!empty($date)) { - $xoopsTpl->assign('user_lastlogin', formatTimestamp($date,"m")); + $xoopsTpl->assign('user_lastlogin', formatTimestamp($date,"m")); } $module_handler =& xoops_gethandler('module'); $criteria = new CriteriaCompo(new Criteria('hassearch', 1)); $criteria->add(new Criteria('isactive', 1)); -$mids =& array_keys($module_handler->getList($criteria)); +$mids = array_keys($module_handler->getList($criteria)); foreach ($mids as $mid) { // Hack by marcan : only return results of modules for which user has access permission if ( $gperm_handler->checkRight('module_read', $mid, $groups)) { - $module =& $module_handler->get($mid); - $results =& $module->search('', '', 5, 0, $thisUser->getVar('uid')); - $count = count($results); - if (is_array($results) && $count > 0) { - for ($i = 0; $i < $count; $i++) { - if (isset($results[$i]['image']) && $results[$i]['image'] != '') { - $results[$i]['image'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['image']; - } else { - $results[$i]['image'] = 'images/icons/posticon2.gif'; - } - $results[$i]['link'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['link']; - $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']); - $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; - } - if ($count == 5) { - $showall_link = ''._US_SHOWALL.''; - } else { - $showall_link = ''; - } - $xoopsTpl->append('modules', array('name' => $module->getVar('name'), 'results' => $results, 'showall_link' => $showall_link)); - } - unset($module); + $module =& $module_handler->get($mid); + $results =& $module->search('', '', 5, 0, $thisUser->getVar('uid')); + $count = count($results); + if (is_array($results) && $count > 0) { + for ($i = 0; $i < $count; $i++) { + if (isset($results[$i]['image']) && $results[$i]['image'] != '') { + $results[$i]['image'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['image']; + } else { + $results[$i]['image'] = 'images/icons/posticon2.gif'; + } + $results[$i]['link'] = 'modules/'.$module->getVar('dirname').'/'.$results[$i]['link']; + $results[$i]['title'] = $myts->makeTboxData4Show($results[$i]['title']); + $results[$i]['time'] = $results[$i]['time'] ? formatTimestamp($results[$i]['time']) : ''; + } + if ($count == 5) { + $showall_link = ''._US_SHOWALL.''; + } else { + $showall_link = ''; + } + $xoopsTpl->append('modules', array('name' => $module->getVar('name'), 'results' => $results, 'showall_link' => $showall_link)); + } + unset($module); } } include XOOPS_ROOT_PATH.'/footer.php'; From onokazu @ users.sourceforge.jp Mon May 1 11:37:27 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:27 +0900 Subject: [xoops-cvslog 2940] CVS update: xoops2jp/html/include Message-ID: <20060501023727.2712A2AC3CD@users.sourceforge.jp> Index: xoops2jp/html/include/checklogin.php diff -u xoops2jp/html/include/checklogin.php:1.4 xoops2jp/html/include/checklogin.php:1.5 --- xoops2jp/html/include/checklogin.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/include/checklogin.php Mon May 1 11:37:26 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(); +?> Index: xoops2jp/html/include/comment_reply.php diff -u xoops2jp/html/include/comment_reply.php:1.2 xoops2jp/html/include/comment_reply.php:1.3 --- xoops2jp/html/include/comment_reply.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/include/comment_reply.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ get($com_id); $r_name = XoopsUser::getUnameFromId($comment->getVar('com_uid')); -$r_text = _CM_POSTER.': '.$r_name.'  '._CM_POSTED.': '.formatTimestamp($comment->getVar('com_created')).'

'.$comment->getVar('com_text');$com_title = $comment->getVar('com_title', 'E'); +$r_text = _CM_POSTER.': '.$r_name.'  '._CM_POSTED.': '.formatTimestamp($comment->getVar('com_created')).'

'.$comment->getVar('com_text'); +$com_title = $comment->getVar('com_title', 'E'); if (!preg_match("/^re:/i", $com_title)) { $com_title = "Re: ".xoops_substr($com_title, 0, 56); } Index: xoops2jp/html/include/cp_functions.php diff -u xoops2jp/html/include/cp_functions.php:1.4 xoops2jp/html/include/cp_functions.php:1.5 --- xoops2jp/html/include/cp_functions.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/include/cp_functions.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ '; include_once XOOPS_CACHE_PATH.'/adminmenu.php'; $moduleperm_handler =& xoops_gethandler('groupperm'); - $admin_mids =& $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups()); + $admin_mids = $moduleperm_handler->getItemIds('module_admin', $xoopsUser->getGroups()); $module_handler =& xoops_gethandler('module'); $modules =& $module_handler->getObjects(new @@ -109,7 +109,7 @@
Smarty Debug Console
included templates & config files (load time in seconds):
- + @@ -156,7 +156,7 @@
".htmlspecialchars($xoopsConfig[".htmlspecialchars($xoopsConfig[
- +
Powered by ".XOOPS_VERSION." © 2001-2005 The XOOPS Project
Powered by ".XOOPS_VERSION." © 2001-2005 The XOOPS Cube Project
Index: xoops2jp/html/include/functions.php diff -u xoops2jp/html/include/functions.php:1.6 xoops2jp/html/include/functions.php:1.7 --- xoops2jp/html/include/functions.php:1.6 Mon Oct 24 20:44:16 2005 +++ xoops2jp/html/include/functions.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ '.$class.' does not exist
Handler Name: '.$name, E_USER_ERROR); } - return isset($handlers[$name]) ? $handlers[$name] : false; + $ret = false; + if (isset($handlers[$name])) { + $ret =& $handlers[$name]; + } + return $ret; } function &xoops_getmodulehandler($name = null, $module_dir = null, $optional = false) @@ -574,7 +580,11 @@ if (!isset($handlers[$module_dir][$name]) && !$optional) { trigger_error('Handler does not exist
Module: '.$module_dir.'
Name: '.$name, E_USER_ERROR); } - return isset($handlers[$module_dir][$name]) ? $handlers[$module_dir][$name] : false; + $ret = false; + if (isset($handlers[$module_dir][$name])) { + $ret =& $handlers[$module_dir][$name]; + } + return $ret; } function xoops_getrank($rank_id =0, $posts = 0) Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.12 xoops2jp/html/include/version.php:1.13 --- xoops2jp/html/include/version.php:1.12 Tue Oct 25 11:57:28 2005 +++ xoops2jp/html/include/version.php Mon May 1 11:37:26 2006 @@ -1,4 +1,4 @@ \ No newline at end of file Index: xoops2jp/html/include/xoopscodes.php diff -u xoops2jp/html/include/xoopscodes.php:1.4 xoops2jp/html/include/xoopscodes.php:1.5 --- xoops2jp/html/include/xoopscodes.php:1.4 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/include/xoopscodes.php Mon May 1 11:37:26 2006 @@ -1,5 +1,5 @@ getSmileys(); + $smiles = $myts->getSmileys(); if (empty($smileys)) { $db =& Database::getInstance(); if ($result = $db->query('SELECT * FROM '.$db->prefix('smiles').' WHERE display=1')) { From onokazu @ users.sourceforge.jp Mon May 1 11:37:27 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:27 +0900 Subject: [xoops-cvslog 2941] CVS update: xoops2jp/html/install/class Message-ID: <20060501023727.4C1282AC266@users.sourceforge.jp> Index: xoops2jp/html/install/class/mainfilemanager.php diff -u xoops2jp/html/install/class/mainfilemanager.php:1.2 xoops2jp/html/install/class/mainfilemanager.php:1.3 --- xoops2jp/html/install/class/mainfilemanager.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/class/mainfilemanager.php Mon May 1 11:37:27 2006 @@ -28,7 +28,7 @@ * mainfile manager for XOOPS installer * * @author Haruki Setoyama -* @version $Id: mainfilemanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $ +* @version $Id: mainfilemanager.php,v 1.3 2006/05/01 02:37:27 onokazu Exp $ * @access public **/ class mainfile_manager { @@ -63,6 +63,7 @@ $this->error = true; return false; } + clearstatcache(); $content = fread($file, filesize($this->path) ); fclose($file); From onokazu @ users.sourceforge.jp Mon May 1 11:37:27 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:27 +0900 Subject: [xoops-cvslog 2942] CVS update: xoops2jp/html/install Message-ID: <20060501023727.8D0662AC3CD@users.sourceforge.jp> Index: xoops2jp/html/install/index.php diff -u xoops2jp/html/install/index.php:1.4 xoops2jp/html/install/index.php:1.5 --- xoops2jp/html/install/index.php:1.4 Mon Oct 24 20:44:16 2005 +++ xoops2jp/html/install/index.php Mon May 1 11:37:27 2006 @@ -1,5 +1,5 @@ insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', '".addslashes($xoopsConfig['com_mode'])."', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '".intval($xoopsConfig['com_order'])."', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '".addslashes(serialize(array('webmaster', '^xoops', '^admin')))."', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); - $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '".addslashes(serialize(array('xoops.org$')))."', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); + $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '".addslashes(serialize(array('xoopscube.org$')))."', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '".addslashes(serialize(array('127.0.0.1')))."', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'news, technology, headlines, xoops, xoop, nuke, myphpnuke, myphp-nuke, phpnuke, SE, geek, geeks, hacker, hackers, linux, software, download, downloads, free, community, mp3, forum, forums, bulletin, board, boards, bbs, php, survey, poll, polls, kernel, comment, comments, portal, odp, open, source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, weblog, guru, module, modules, theme, themes, cms, content management', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); - $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS 2.0 © 2001-2003 The XOOPS Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); + $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS Cube 2.0 © 2005-2006 The XOOPS Cube Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '".addslashes(serialize(array('fuck', 'shit')))."', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); @@ -1173,7 +1173,8 @@ case "insertData": $adminname = $myts->stripSlashesGPC(trim($_POST['adminname'])); - $adminpass = $myts->stripSlashesGPC($_POST['adminpass']); + $adminpass = $myts->stripSlashesGPC(trim($_POST['adminpass'])); + $adminpass2 = $myts->stripSlashesGPC(trim($_POST['adminpass2'])); $adminmail = $myts->stripSlashesGPC(trim($_POST['adminmail'])); if (!preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+([\.][a-z0-9-]+)+$/i",$adminmail)) { Index: xoops2jp/html/install/makedata.php diff -u xoops2jp/html/install/makedata.php:1.5 xoops2jp/html/install/makedata.php:1.6 --- xoops2jp/html/install/makedata.php:1.5 Mon Oct 24 20:44:16 2005 +++ xoops2jp/html/install/makedata.php Mon May 1 11:37:27 2006 @@ -1,5 +1,5 @@ insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://jp.xoops.org/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://jp.xoops.org/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://jp.xoops.org/', 1008813250)"); + //$dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://xoopscube.org/', 1008813250)"); + //$dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://xoopscube.org/', 1008813250)"); + //$dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://xoopscube.org/', 1008813250)"); // default theme @@ -196,11 +196,11 @@ $dbm->insert('config', " VALUES (32, 0, 1, 'com_mode', '_MD_AM_COMMODE', 'nest', '_MD_AM_COMMODEDSC', 'select', 'text', 34)"); $dbm->insert('config', " VALUES (33, 0, 1, 'com_order', '_MD_AM_COMORDER', '0', '_MD_AM_COMORDERDSC', 'select', 'int', 36)"); $dbm->insert('config', " VALUES (34, 0, 2, 'bad_unames', '_MD_AM_BADUNAMES', '".addslashes(serialize(array('webmaster', '^xoops', '^admin')))."', '_MD_AM_BADUNAMESDSC', 'textarea', 'array', 24)"); - $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '".addslashes(serialize(array('xoops.org$')))."', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); + $dbm->insert('config', " VALUES (35, 0, 2, 'bad_emails', '_MD_AM_BADEMAILS', '".addslashes(serialize(array('xoopscube.org$')))."', '_MD_AM_BADEMAILSDSC', 'textarea', 'array', 26)"); $dbm->insert('config', " VALUES (36, 0, 2, 'maxuname', '_MD_AM_MAXUNAME', '10', '_MD_AM_MAXUNAMEDSC', 'textbox', 'int', 3)"); $dbm->insert('config', " VALUES (37, 0, 1, 'bad_ips', '_MD_AM_BADIPS', '".addslashes(serialize(array('127.0.0.1')))."', '_MD_AM_BADIPSDSC', 'textarea', 'array', 42)"); $dbm->insert('config', " VALUES (38, 0, 3, 'meta_keywords', '_MD_AM_METAKEY', 'news, technology, headlines, xoops, xoop, nuke, myphpnuke, myphp-nuke, phpnuke, SE, geek, geeks, hacker, hackers, linux, software, download, downloads, free, community, mp3, forum, forums, bulletin, board, boards, bbs, php, survey, poll, polls, kernel, comment, comments, portal, odp, open, source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, weblog, guru, module, modules, theme, themes, cms, content management', '_MD_AM_METAKEYDSC', 'textarea', 'text', 0)"); - $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS 2.0 © 2001-2003 The XOOPS Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); + $dbm->insert('config', " VALUES (39, 0, 3, 'footer', '_MD_AM_FOOTER', 'Powered by XOOPS Cube 2.0 © 2005-2006 The XOOPS Project', '_MD_AM_FOOTERDSC', 'textarea', 'text', 20)"); $dbm->insert('config', " VALUES (40, 0, 4, 'censor_enable', '_MD_AM_DOCENSOR', '0', '_MD_AM_DOCENSORDSC', 'yesno', 'int', 0)"); $dbm->insert('config', " VALUES (41, 0, 4, 'censor_words', '_MD_AM_CENSORWRD', '".addslashes(serialize(array('fuck', 'shit')))."', '_MD_AM_CENSORWRDDSC', 'textarea', 'array', 1)"); $dbm->insert('config', " VALUES (42, 0, 4, 'censor_replace', '_MD_AM_CENSORRPLC', '#OOPS#', '_MD_AM_CENSORRPLCDSC', 'textbox', 'text', 2)"); From onokazu @ users.sourceforge.jp Mon May 1 11:37:27 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:27 +0900 Subject: [xoops-cvslog 2943] CVS update: xoops2jp/html/install/language/english Message-ID: <20060501023727.B46C82AC266@users.sourceforge.jp> Index: xoops2jp/html/install/language/english/finish.php diff -u xoops2jp/html/install/language/english/finish.php:1.2 xoops2jp/html/install/language/english/finish.php:1.3 --- xoops2jp/html/install/language/english/finish.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/language/english/finish.php Mon May 1 11:37:27 2006 @@ -1,11 +1,11 @@ Your site

Click HERE to see the home page of your site.

Way to use

[not yet]

Support -

Visit XOOPS.org

+

Visit XOOPSCube.org

"; ?> \ No newline at end of file Index: xoops2jp/html/install/language/english/install.php diff -u xoops2jp/html/install/language/english/install.php:1.2 xoops2jp/html/install/language/english/install.php:1.3 --- xoops2jp/html/install/language/english/install.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/language/english/install.php Mon May 1 11:37:27 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.org"); +define("_INSTALL_L35","If you had any errors, please contact the dev team at XOOPSCube.org"); define("_INSTALL_L36","Please choose your site admin's name and password."); define("_INSTALL_L37","Admin Name"); define("_INSTALL_L38","Admin Email"); From onokazu @ users.sourceforge.jp Mon May 1 11:37:27 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:27 +0900 Subject: [xoops-cvslog 2944] CVS update: xoops2jp/html/install/language/japanese Message-ID: <20060501023727.E0B382AC3CD@users.sourceforge.jp> Index: xoops2jp/html/install/language/japanese/finish.php diff -u xoops2jp/html/install/language/japanese/finish.php:1.1 xoops2jp/html/install/language/japanese/finish.php:1.2 --- xoops2jp/html/install/language/japanese/finish.php:1.1 Thu Sep 9 14:15:04 2004 +++ xoops2jp/html/install/language/japanese/finish.php Mon May 1 11:37:27 2006 @@ -5,7 +5,7 @@ XOOPSの使い方について

[未記述]

サポート -

XOOPS.orgサイト(英語)か、XOOPS日本語公式サイトに訪問ください。 +

XOOPSCube.orgXOOPS Cube公式サイト(英語)か、XOOPS Cube日本語公式サイトへとご訪問ください。

"; ?> \ No newline at end of file Index: xoops2jp/html/install/language/japanese/install.php diff -u xoops2jp/html/install/language/japanese/install.php:1.2 xoops2jp/html/install/language/japanese/install.php:1.3 --- xoops2jp/html/install/language/japanese/install.php:1.2 Fri Mar 18 22:00:58 2005 +++ xoops2jp/html/install/language/japanese/install.php Mon May 1 11:37:27 2006 @@ -1,5 +1,5 @@ (例:UNIX/LINUXサーバの場合はchmod 777 mainfile.php、Windowsサーバの場合は読み取り専用プロパティがセットされていないかチェックする。)
権限の設定完了後、ブラウザの「更新」ボタンを押してこのページを再度読み込んでください。"); //define("_INSTALL_L71","下記のボタンをクリックするとインストールを開始します。"); @@ -51,7 +51,7 @@ define("_INSTALL_L31","データベースの作成に失敗しました。

設定されたユーザアカウントの権限ではデータベースの作成ができない場合は、別途作成し、インストールを続けてください。
または、はじめからやり直してください。
よくわからない場合は、サーバ管理者にお問い合わせください。"); define("_INSTALL_L32","インストール完了"); define("_INSTALL_L33","インストールされたホームページを見るには ここ をクリックしてください。"); -define("_INSTALL_L35","インストール中にエラーが発生した場合はXOOPS日本語公式サイトのサポートフォーラムをご利用ください。"); +define("_INSTALL_L35","インストール中にエラーが発生した場合はXOOPS Cube日本語公式サイトのサポートフォーラムをご利用ください。"); define("_INSTALL_L36","サイト管理者のユーザ名、ユーザパスワード、およびメールアドレスを入力してください。"); define("_INSTALL_L37","管理者ユーザ名"); define("_INSTALL_L38","管理者メールアドレス"); From onokazu @ users.sourceforge.jp Mon May 1 11:37:28 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:28 +0900 Subject: [xoops-cvslog 2945] CVS update: xoops2jp/html/install/sql Message-ID: <20060501023728.101F32AC266@users.sourceforge.jp> Index: xoops2jp/html/install/sql/mysql.data.sql diff -u xoops2jp/html/install/sql/mysql.data.sql:1.1 xoops2jp/html/install/sql/mysql.data.sql:1.2 --- xoops2jp/html/install/sql/mysql.data.sql:1.1 Thu Sep 9 14:15:04 2004 +++ xoops2jp/html/install/sql/mysql.data.sql Mon May 1 11:37:27 2006 @@ -13,7 +13,7 @@ # Dumping data for table `bannerclient` # -INSERT INTO bannerclient VALUES (0, 'XOOPS', 'XOOPS Dev Team', 'webmaster @ xoops.org', '', '', ''); +#INSERT INTO bannerclient VALUES (0, 'XOOPS Cube', 'XOOPS Cube Dev Team', 'webmaster @ xoopscube.org', '', '', ''); # # Dumping data for table `bannerfinish` From onokazu @ users.sourceforge.jp Mon May 1 11:37:28 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:28 +0900 Subject: [xoops-cvslog 2946] CVS update: xoops2jp/html/modules/mydownloads Message-ID: <20060501023728.8614D2AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/index.php diff -u xoops2jp/html/modules/mydownloads/index.php:1.4 xoops2jp/html/modules/mydownloads/index.php:1.5 --- xoops2jp/html/modules/mydownloads/index.php:1.4 Wed Aug 3 21:39:13 2005 +++ xoops2jp/html/modules/mydownloads/index.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ append('file', array('id' => $lid,'cid'=>$cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); + $xoopsTpl->append('file', array('id' => $lid,'cid'=>$cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); } include XOOPS_ROOT_PATH."/modules/mydownloads/footer.php"; Index: xoops2jp/html/modules/mydownloads/ratefile.php diff -u xoops2jp/html/modules/mydownloads/ratefile.php:1.5 xoops2jp/html/modules/mydownloads/ratefile.php:1.6 --- xoops2jp/html/modules/mydownloads/ratefile.php:1.5 Mon Sep 5 05:46:09 2005 +++ xoops2jp/html/modules/mydownloads/ratefile.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ query("SELECT title FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE lid=$lid"); list($title) = $xoopsDB->fetchRow($result); $title = $myts->makeTboxData4Show($title); @@ -111,5 +112,4 @@ include XOOPS_ROOT_PATH.'/footer.php'; } -include "footer.php"; -?> +?> \ No newline at end of file Index: xoops2jp/html/modules/mydownloads/singlefile.php diff -u xoops2jp/html/modules/mydownloads/singlefile.php:1.5 xoops2jp/html/modules/mydownloads/singlefile.php:1.6 --- xoops2jp/html/modules/mydownloads/singlefile.php:1.5 Mon Sep 5 05:46:09 2005 +++ xoops2jp/html/modules/mydownloads/singlefile.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ assign('show_screenshot', true); $xoopsTpl->assign('lang_noscreenshot', _MD_NOSHOTS); } -$xoopsTpl->assign('file', array('id' => $lid, 'cid' => $cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'platform' => $platform, 'comments' => $comments, 'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); +$xoopsTpl->assign('file', array('id' => $lid, 'cid' => $cid,'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'platform' => $platform, 'comments' => $comments, 'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); $xoopsTpl->assign('lang_description', _MD_DESCRIPTIONC); $xoopsTpl->assign('lang_lastupdate', _MD_LASTUPDATEC); $xoopsTpl->assign('lang_hits', _MD_HITSC); Index: xoops2jp/html/modules/mydownloads/topten.php diff -u xoops2jp/html/modules/mydownloads/topten.php:1.2 xoops2jp/html/modules/mydownloads/topten.php:1.3 --- xoops2jp/html/modules/mydownloads/topten.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/modules/mydownloads/topten.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ assign('lang_sortby' ,$sort); $xoopsTpl->assign('lang_rank' , _MD_RANK); @@ -52,30 +52,27 @@ $e = 0; $rankings = array(); while(list($cid,$ctitle)=$xoopsDB->fetchRow($result)){ - $rankings[$e]['title'] = sprintf(_MD_TOP10, $myts->htmlSpecialChars($ctitle)); - $query = "SELECT lid, cid, title, hits, rating, votes FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status>0 AND (cid=$cid"; + $rankings[$e]['title'] = sprintf(_MD_TOP10, $myts->htmlSpecialChars($ctitle)); + $query = "SELECT lid, cid, title, hits, rating, votes FROM ".$xoopsDB->prefix("mydownloads_downloads")." WHERE status>0 AND (cid=$cid"; // get all child cat ids for a given cat id - $arr=$mytree->getAllChildId($cid); - $size = count($arr); - for($i=0;$i<$size;$i++){ - $query .= " or cid=".$arr[$i].""; - } - $query .= ") order by ".$sortDB." DESC"; - $result2 = $xoopsDB->query($query,10,0); - $rank = 1; - while(list($did,$dcid,$dtitle,$hits,$rating,$votes)=$xoopsDB->fetchRow($result2)){ - $catpath = $mytree->getPathFromId($dcid, "title"); - $catpath= substr($catpath, 1); - $catpath = str_replace("/"," »» ",$catpath); - $dtitle = $myts->makeTboxData4Show($dtitle); - $rankings[$e]['file'][] = array('id' => $did, 'cid' => $dcid, 'rank' => $rank, 'title' => $dtitle, 'category' => $catpath, 'hits' => $hits, 'rating' => number_format($rating, 2), 'votes' => $votes); - $rank++; - } - $e++; + $arr=$mytree->getAllChildId($cid); + $size = count($arr); + for($i=0;$i<$size;$i++){ + $query .= " or cid=".$arr[$i].""; + } + $query .= ") order by ".$sortDB." DESC"; + $result2 = $xoopsDB->query($query,10,0); + $rank = 1; + while(list($did,$dcid,$dtitle,$hits,$rating,$votes)=$xoopsDB->fetchRow($result2)){ + $catpath = $mytree->getPathFromId($dcid, "title"); + $catpath= substr($catpath, 1); + $catpath = str_replace("/"," »» ",$catpath); + $dtitle = $myts->makeTboxData4Show($dtitle); + $rankings[$e]['file'][] = array('id' => $did, 'cid' => $dcid, 'rank' => $rank, 'title' => $dtitle, 'category' => $catpath, 'hits' => $hits, 'rating' => number_format($rating, 2), 'votes' => $votes); + $rank++; + } + $e++; } $xoopsTpl->assign('rankings', $rankings); include XOOPS_ROOT_PATH.'/footer.php'; - -include "footer.php"; - -?> +?> \ No newline at end of file Index: xoops2jp/html/modules/mydownloads/viewcat.php diff -u xoops2jp/html/modules/mydownloads/viewcat.php:1.5 xoops2jp/html/modules/mydownloads/viewcat.php:1.6 --- xoops2jp/html/modules/mydownloads/viewcat.php:1.5 Mon Sep 5 05:46:09 2005 +++ xoops2jp/html/modules/mydownloads/viewcat.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ append('file', array('id' => $lid, 'cid' => $cid, 'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); + $xoopsTpl->append('file', array('id' => $lid, 'cid' => $cid, 'rating' => $rating,'title' => $dtitle.$new.$pop,'logourl' => $logourl,'updated' => $datetime,'description' => $description,'adminlink' => $adminlink,'hits' => $hits,'votes' => $votestring, 'comments' => $comments, 'platform' => $platform,'size' => $size,'homepage' => $homepage,'version' => $version,'category' => $path,'lang_dltimes' => sprintf(_MD_DLTIMES,$hits),'mail_subject' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename'])),'mail_body' => rawurlencode(sprintf(_MD_INTFILEFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mydownloads/singlefile.php?cid='.$cid.'&lid='.$lid))); } $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... From onokazu @ users.sourceforge.jp Mon May 1 11:37:28 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:28 +0900 Subject: [xoops-cvslog 2947] CVS update: xoops2jp/html/modules/mydownloads/templates Message-ID: <20060501023728.B2E482AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html diff -u xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.2 xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.3 --- xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html:1.2 Sat Jun 11 11:32:43 2005 +++ xoops2jp/html/modules/mydownloads/templates/mydownloads_modfile.html Mon May 1 11:37:28 2006 @@ -45,7 +45,7 @@ <{$lang_description}> - +
  From onokazu @ users.sourceforge.jp Mon May 1 11:37:28 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:28 +0900 Subject: [xoops-cvslog 2948] CVS update: xoops2jp/html/modules/mylinks Message-ID: <20060501023728.DC50C2AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/mylinks/index.php diff -u xoops2jp/html/modules/mylinks/index.php:1.4 xoops2jp/html/modules/mylinks/index.php:1.5 --- xoops2jp/html/modules/mylinks/index.php:1.4 Wed Aug 3 21:39:13 2005 +++ xoops2jp/html/modules/mylinks/index.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ ",$path); $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); - $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); + $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'votes' => $votestring, 'comments' => $comments, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); } include XOOPS_ROOT_PATH.'/footer.php'; ?> Index: xoops2jp/html/modules/mylinks/myheader.php diff -u xoops2jp/html/modules/mylinks/myheader.php:1.5 xoops2jp/html/modules/mylinks/myheader.php:1.6 --- xoops2jp/html/modules/mylinks/myheader.php:1.5 Mon Sep 5 05:46:10 2005 +++ xoops2jp/html/modules/mylinks/myheader.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ "; $mail_subject = rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])); -$mail_body = rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid); +$mail_body = rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid); ?> Index: xoops2jp/html/modules/mylinks/viewcat.php diff -u xoops2jp/html/modules/mylinks/viewcat.php:1.5 xoops2jp/html/modules/mylinks/viewcat.php:1.6 --- xoops2jp/html/modules/mylinks/viewcat.php:1.5 Mon Sep 5 05:46:10 2005 +++ xoops2jp/html/modules/mylinks/viewcat.php Mon May 1 11:37:28 2006 @@ -1,5 +1,5 @@ ",$path); $new = newlinkgraphic($time, $status); $pop = popgraphic($hits); - $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); + $xoopsTpl->append('links', array('id' => $lid, 'cid' => $cid, 'rating' => number_format($rating, 2), 'title' => $myts->makeTboxData4Show($ltitle).$new.$pop, 'category' => $path, 'logourl' => $myts->makeTboxData4Show($logourl), 'updated' => formatTimestamp($time,"m"), 'description' => $myts->makeTareaData4Show($description,0), 'adminlink' => $adminlink, 'hits' => $hits, 'comments' => $comments, 'votes' => $votestring, 'mail_subject' => rawurlencode(sprintf(_MD_INTRESTLINK,$xoopsConfig['sitename'])), 'mail_body' => rawurlencode(sprintf(_MD_INTLINKFOUND,$xoopsConfig['sitename']).': '.XOOPS_URL.'/modules/mylinks/singlelink.php?cid='.$cid.'&lid='.$lid))); } $orderby = convertorderbyout($orderby); //Calculates how many pages exist. Which page one should be on, etc... From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2949] CVS update: xoops2jp/html/modules/newbb Message-ID: <20060501023729.1617D2AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/index.php diff -u xoops2jp/html/modules/newbb/index.php:1.7 xoops2jp/html/modules/newbb/index.php:1.8 --- xoops2jp/html/modules/newbb/index.php:1.7 Tue Oct 25 12:07:38 2005 +++ xoops2jp/html/modules/newbb/index.php Mon May 1 11:37:28 2006 @@ -1,143 +1,143 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // - -include "header.php"; -// this page uses smarty template -// this must be set before including main header.php -$xoopsOption['template_main']= 'newbb_index.html'; -include XOOPS_ROOT_PATH."/header.php"; - -$myts =& MyTextSanitizer::getInstance(); - -$sql = 'SELECT c.* FROM '.$xoopsDB->prefix('bb_categories').' c, '.$xoopsDB->prefix("bb_forums").' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order'; -if ( !$result = $xoopsDB->query($sql) ) { - redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); - exit(); -} - -$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); - -$viewcat = (!empty($_GET['cat'])) ? intval($_GET['cat']) : 0; -$categories = array(); -while ( $cat_row = $xoopsDB->fetchArray($result) ) { - $categories[] = $cat_row; -} - -$sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM '.$xoopsDB->prefix('bb_forums').' f LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = f.forum_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = p.uid'; -if ( $viewcat != 0 ) { - $sql .= ' WHERE f.cat_id = '.$viewcat; - $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); -} else { - $xoopsTpl->assign('forum_index_title', ''); -} -$sql .= ' ORDER BY f.cat_id, f.forum_id'; -if ( !$result = $xoopsDB->query($sql) ) { - exit("Error"); -} -$forums = array(); // RMV-FIX -while ( $forum_data = $xoopsDB->fetchArray($result) ) { - $forums[] = $forum_data; -} -$cat_count = count($categories); -if ($cat_count > 0) { - for ( $i = 0; $i < $cat_count; $i++ ) { - $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); - if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { - $xoopsTpl->append("categories", $categories[$i]); - continue; - } - $topic_lastread = newbb_get_topics_viewed(); - foreach ( $forums as $forum_row ) { - unset($last_post); - if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { - if ($forum_row['post_time']) { - //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); - $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); - $last_post_icon = ''; - if ( $forum_row['icon'] ) { - $last_post_icon .= ''; - } else { - $last_post_icon .= ''; - } - $last_post_icon .= ''; - $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; - if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ - $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; - } else { - $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; - } - $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } else { - // no forums, so put empty values - $categories[$i]['forums']['forum_lastpost_time'][] = ""; - $categories[$i]['forums']['forum_lastpost_icon'][] = ""; - $categories[$i]['forums']['forum_lastpost_user'][] = ""; - if ( $forum_row['forum_type'] == 1 ) { - $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; - } else { - $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; - } - } - $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; - $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); - $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); - $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; - $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; - $all_moderators = get_moderators($forum_row['forum_id']); - $count = 0; - $forum_moderators = ''; - foreach ( $all_moderators as $mods) { - foreach ( $mods as $mod_id => $mod_name) { - if ( $count > 0 ) { - $forum_moderators .= ', '; - } - $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; - $count = 1; - } - } - $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; - } - } - $xoopsTpl->append("categories", $categories[$i]); - } -} else { - $xoopsTpl->append("categories", array()); -} -$xoopsTpl->assign(array("img_hotfolder" => $bbImage['newposts_forum'], "img_folder" => $bbImage['folder_forum'], "img_locked" => $bbImage['locked_forum'], "lang_newposts" => _MD_NEWPOSTS, "lang_private" => _MD_PRIVATEFORUM, "lang_nonewposts" => _MD_NONEWPOSTS, "lang_search" => _MD_SEARCH, "lang_advsearch" => _MD_ADVSEARCH)); -include_once XOOPS_ROOT_PATH.'/footer.php'; -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +include "header.php"; +// this page uses smarty template +// this must be set before including main header.php +$xoopsOption['template_main']= 'newbb_index.html'; +include XOOPS_ROOT_PATH."/header.php"; + +$myts =& MyTextSanitizer::getInstance(); + +$sql = 'SELECT c.* FROM '.$xoopsDB->prefix('bb_categories').' c, '.$xoopsDB->prefix("bb_forums").' f WHERE f.cat_id=c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order'; +if ( !$result = $xoopsDB->query($sql) ) { + redirect_header(XOOPS_URL.'/',1,_MD_ERROROCCURED); + exit(); +} + +$xoopsTpl->assign(array("lang_welcomemsg" => sprintf(_MD_WELCOME,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)), "lang_tostart" => _MD_TOSTART, "lang_totaltopics" => _MD_TOTALTOPICSC, "lang_totalposts" => _MD_TOTALPOSTSC, "total_topics" => get_total_topics(), "total_posts" => get_total_posts(0, 'all'), "lang_lastvisit" => sprintf(_MD_LASTVISIT,formatTimestamp($last_visit)), "lang_currenttime" => sprintf(_MD_TIMENOW,formatTimestamp(time(),"m")), "lang_forum" => _MD_FORUM, "lang_topics" => _MD_TOPICS, "lang_posts" => _MD_POSTS, "lang_lastpost" => _MD_LASTPOST, "lang_moderators" => _MD_MODERATOR)); + +$viewcat = (!empty($_GET['cat'])) ? intval($_GET['cat']) : 0; +$categories = array(); +while ( $cat_row = $xoopsDB->fetchArray($result) ) { + $categories[] = $cat_row; +} + +$sql = 'SELECT f.*, u.uname, u.uid, p.topic_id, p.post_time, p.subject, p.icon FROM '.$xoopsDB->prefix('bb_forums').' f LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = f.forum_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = p.uid'; +if ( $viewcat != 0 ) { + $sql .= ' WHERE f.cat_id = '.$viewcat; + $xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); +} else { + $xoopsTpl->assign('forum_index_title', ''); +} +$sql .= ' ORDER BY f.cat_id, f.forum_id'; +if ( !$result = $xoopsDB->query($sql) ) { + exit("Error"); +} +$forums = array(); // RMV-FIX +while ( $forum_data = $xoopsDB->fetchArray($result) ) { + $forums[] = $forum_data; +} +$cat_count = count($categories); +if ($cat_count > 0) { + for ( $i = 0; $i < $cat_count; $i++ ) { + $categories[$i]['cat_title'] = $myts->makeTboxData4Show($categories[$i]['cat_title']); + if ( $viewcat != 0 && $categories[$i]['cat_id'] != $viewcat ) { + $xoopsTpl->append("categories", $categories[$i]); + continue; + } + $topic_lastread = newbb_get_topics_viewed(); + foreach ( $forums as $forum_row ) { + unset($last_post); + if ( $forum_row['cat_id'] == $categories[$i]['cat_id'] ) { + if ($forum_row['post_time']) { + //$forum_row['subject'] = $myts->makeTboxData4Show($forum_row['subject']); + $categories[$i]['forums']['forum_lastpost_time'][] = formatTimestamp($forum_row['post_time']); + $last_post_icon = ''; + if ( $forum_row['icon'] ) { + $last_post_icon .= ''; + } else { + $last_post_icon .= ''; + } + $last_post_icon .= ''; + $categories[$i]['forums']['forum_lastpost_icon'][] = $last_post_icon; + if ( $forum_row['uid'] != 0 && $forum_row['uname'] ){ + $categories[$i]['forums']['forum_lastpost_user'][] = '' . $myts->makeTboxData4Show($forum_row['uname']).''; + } else { + $categories[$i]['forums']['forum_lastpost_user'][] = $xoopsConfig['anonymous']; + } + $forum_lastread = !empty($topic_lastread[$forum_row['topic_id']]) ? $topic_lastread[$forum_row['topic_id']] : false; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } elseif ( $forum_row['post_time'] > $forum_lastread && !empty($forum_row['topic_id'])) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['newposts_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } else { + // no forums, so put empty values + $categories[$i]['forums']['forum_lastpost_time'][] = ""; + $categories[$i]['forums']['forum_lastpost_icon'][] = ""; + $categories[$i]['forums']['forum_lastpost_user'][] = ""; + if ( $forum_row['forum_type'] == 1 ) { + $categories[$i]['forums']['forum_folder'][] = $bbImage['locked_forum']; + } else { + $categories[$i]['forums']['forum_folder'][] = $bbImage['folder_forum']; + } + } + $categories[$i]['forums']['forum_id'][] = $forum_row['forum_id']; + $categories[$i]['forums']['forum_name'][] = $myts->makeTboxData4Show($forum_row['forum_name']); + $categories[$i]['forums']['forum_desc'][] = $myts->makeTareaData4Show($forum_row['forum_desc']); + $categories[$i]['forums']['forum_topics'][] = $forum_row['forum_topics']; + $categories[$i]['forums']['forum_posts'][] = $forum_row['forum_posts']; + $all_moderators = get_moderators($forum_row['forum_id']); + $count = 0; + $forum_moderators = ''; + foreach ( $all_moderators as $mods) { + foreach ( $mods as $mod_id => $mod_name) { + if ( $count > 0 ) { + $forum_moderators .= ', '; + } + $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; + $count = 1; + } + } + $categories[$i]['forums']['forum_moderators'][] = $forum_moderators; + } + } + $xoopsTpl->append("categories", $categories[$i]); + } +} else { + $xoopsTpl->append("categories", array()); +} +$xoopsTpl->assign(array("img_hotfolder" => $bbImage['newposts_forum'], "img_folder" => $bbImage['folder_forum'], "img_locked" => $bbImage['locked_forum'], "lang_newposts" => _MD_NEWPOSTS, "lang_private" => _MD_PRIVATEFORUM, "lang_nonewposts" => _MD_NONEWPOSTS, "lang_search" => _MD_SEARCH, "lang_advsearch" => _MD_ADVSEARCH)); +include_once XOOPS_ROOT_PATH.'/footer.php'; +?> Index: xoops2jp/html/modules/newbb/viewforum.php diff -u xoops2jp/html/modules/newbb/viewforum.php:1.6 xoops2jp/html/modules/newbb/viewforum.php:1.7 --- xoops2jp/html/modules/newbb/viewforum.php:1.6 Tue Oct 25 12:07:38 2005 +++ xoops2jp/html/modules/newbb/viewforum.php Mon May 1 11:37:28 2006 @@ -1,282 +1,282 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // - -include "header.php"; - -$forum = intval($_GET['forum']); -if ( $forum < 1 ) { - redirect_header("index.php", 2, _MD_ERRORFORUM); - exit(); -} -$sql = 'SELECT forum_type, forum_name, forum_access, allow_html, allow_sig, posts_per_page, hot_threshold, topics_per_page FROM '.$xoopsDB->prefix('bb_forums').' WHERE forum_id = '.$forum; -if ( !$result = $xoopsDB->query($sql) ) { - redirect_header("index.php", 2, _MD_ERRORCONNECT); - exit(); -} -if ( !$forumdata = $xoopsDB->fetchArray($result) ) { - redirect_header("index.php", 2, _MD_ERROREXIST); - exit(); -} -// this page uses smarty template -// this must be set before including main header.php -$xoopsOption['template_main'] = 'newbb_viewforum.html'; -include XOOPS_ROOT_PATH."/header.php"; -$can_post = 0; -$show_reg = 0; -if ( $forumdata['forum_type'] == 1 ) { - // this is a private forum. - $xoopsTpl->assign('is_private_forum', true); - $accesserror = 0; - if ( $xoopsUser ) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ( !check_priv_forum_auth($xoopsUser->getVar("uid"), $forum, false) ) { - $accesserror = 1; - } - } - } else { - $accesserror = 1; - } - if ( $accesserror == 1 ) { - redirect_header("index.php",2,_MD_NORIGHTTOACCESS); - exit(); - } - $can_post = 1; - $show_reg = 1; -} else { - // this is not a priv forum - $xoopsTpl->assign('is_private_forum', false); - if ( $forumdata['forum_access'] == 1 ) { - // this is a reg user only forum - if ( $xoopsUser ) { - $can_post = 1; - } else { - $show_reg = 1; - } - } elseif ( $forumdata['forum_access'] == 2 ) { - // this is an open forum - $can_post = 1; - } else { - // this is an admin/moderator only forum - if ( $xoopsUser ) { - if ( $xoopsUserIsAdmin || is_moderator($forum, $xoopsUser->uid()) ) { - $can_post = 1; - } - } - } -} - -$xoopsTpl->assign("forum_id", $forum); -if ( $can_post == 1 ) { - $xoopsTpl->assign('viewer_can_post', true); - $xoopsTpl->assign('forum_post_or_register', "\""._MD_POSTNEW."\""); -} else { - $xoopsTpl->assign('viewer_can_post', false); - if ( $show_reg == 1 ) { - $xoopsTpl->assign('forum_post_or_register', ''._MD_REGTOPOST.''); - } else { - $xoopsTpl->assign('forum_post_or_register', ""); - } -} -$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); -$xoopsTpl->assign('forum_image_folder', $bbImage['folder_topic']); -$myts =& MyTextSanitizer::getInstance(); -$xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name'])); -$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY); - -$forum_moderators = ""; -$count = 0; -$moderators = get_moderators($forum); -foreach ( $moderators as $mods ) { - foreach ( $mods as $mod_id => $mod_name ) { - if ( $count > 0 ) { - $forum_moderators .= ", "; - } - $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; - $count = 1; - } -} -$xoopsTpl->assign('forum_moderators', $forum_moderators); - - -$sel_sort_array = array("t.topic_title"=>_MD_TOPICTITLE, "t.topic_replies"=>_MD_NUMBERREPLIES, "u.uname"=>_MD_TOPICPOSTER, "t.topic_views"=>_MD_VIEWS, "p.post_time"=>_MD_LASTPOSTTIME); -if ( !isset($_GET['sortname']) || !in_array($_GET['sortname'], array_keys($sel_sort_array)) ) { - $sortname = "p.post_time"; -} else { - $sortname = $_GET['sortname']; -} - -$xoopsTpl->assign('lang_sortby', _MD_SORTEDBY); - -$forum_selection_sort = ''; - -// assign to template -$xoopsTpl->assign('forum_selection_sort', $forum_selection_sort); - -$sortorder = (!isset($_GET['sortorder']) || $_GET['sortorder'] != "ASC") ? "DESC" : "ASC"; -$forum_selection_order = ''; - -// assign to template -$xoopsTpl->assign('forum_selection_order', $forum_selection_order); - -$sortsince = !empty($_GET['sortsince']) ? intval($_GET['sortsince']) : 100; -$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 75, 100); -$forum_selection_since = ''; - -// assign to template -$xoopsTpl->assign('forum_selection_since', $forum_selection_since); -$xoopsTpl->assign('lang_go', _MD_GO); - -$xoopsTpl->assign('h_topic_link', "viewforum.php?forum=$forum&sortname=t.topic_title&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_title" && $sortorder == "DESC") ? "ASC" : "DESC")); -$xoopsTpl->assign('lang_topic', _MD_TOPIC); - -$xoopsTpl->assign('h_reply_link', "viewforum.php?forum=$forum&sortname=t.topic_replies&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_replies" && $sortorder == "DESC") ? "ASC" : "DESC")); -$xoopsTpl->assign('lang_replies', _MD_REPLIES); - -$xoopsTpl->assign('h_poster_link', "viewforum.php?forum=$forum&sortname=u.uname&sortsince=$sortsince&sortorder=". (($sortname == "u.uname" && $sortorder == "DESC") ? "ASC" : "DESC")); -$xoopsTpl->assign('lang_poster', _MD_POSTER); - -$xoopsTpl->assign('h_views_link', "viewforum.php?forum=$forum&sortname=t.topic_views&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_views" && $sortorder == "DESC") ? "ASC" : "DESC")); -$xoopsTpl->assign('lang_views', _MD_VIEWS); - -$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC")); -$xoopsTpl->assign('lang_date', _MD_DATE); - -$startdate = time() - (86400* $sortsince); -$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; - -$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p.post_time as last_post_time, p.icon FROM '.$xoopsDB->prefix("bb_topics").' t LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = t.topic_poster LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = t.topic_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u2 ON u2.uid = p.uid WHERE t.forum_id = '.$forum.' AND (p.post_time > '.$startdate.' OR t.topic_sticky=1) ORDER BY topic_sticky DESC, '.$sortname.' '.$sortorder; -if ( !$result = $xoopsDB->query($sql,$forumdata['topics_per_page'],$start) ) { - redirect_header('index.php',2,_MD_ERROROCCURED); - exit(); -} - -// Read topic 'lastread' times from cookie, if exists -$topic_lastread = newbb_get_topics_viewed(); -while ( $myrow = $xoopsDB->fetchArray($result) ) { - - if ( empty($myrow['last_poster']) ) { - $myrow['last_poster'] = $xoopsConfig['anonymous']; - } - if ( $myrow['topic_sticky'] == 1 ) { - $image = $bbImage['folder_sticky']; - } elseif ( $myrow['topic_status'] == 1 ) { - $image = $bbImage['locked_topic']; - } else { - if ( $myrow['topic_replies'] >= $forumdata['hot_threshold'] ) { - if ( empty($topic_lastread[$myrow['topic_id']]) || ($topic_lastread[$myrow['topic_id']] < $myrow['last_post_time'] )) { - $image = $bbImage['hot_newposts_topic']; - } else { - $image = $bbImage['hot_folder_topic']; - } - } else { - if ( empty($topic_lastread[$myrow['topic_id']]) || ($topic_lastread[$myrow['topic_id']] < $myrow['last_post_time'] )) { - $image = $bbImage['newposts_topic']; - } else { - $image = $bbImage['folder_topic']; - } - } - } - $pagination = ''; - $addlink = ''; - $topiclink = 'viewtopic.php?topic_id='.$myrow['topic_id'].'&forum='.$forum; - $totalpages = ceil(($myrow['topic_replies'] + 1) / $forumdata['posts_per_page']); - if ( $totalpages > 1 ) { - $pagination .= '    '; - for ( $i = 1; $i <= $totalpages; $i++ ) { - - if ( $i > 3 && $i < $totalpages ) { - $pagination .= "..."; - } else { - $addlink = '&start='.(($i - 1) * $forumdata['posts_per_page']); - $pagination .= '['.$i.']'; - } - } - } - if ( $myrow['icon'] ) { - $topic_icon = ''; - } else { - $topic_icon = ''; - } - if ( $myrow['topic_poster'] != 0 && $myrow['uname'] ) { - $topic_poster = ''.$myrow['uname'].''; - } else { - $topic_poster = $xoopsConfig['anonymous']; - } - $xoopsTpl->append('topics', array('topic_icon'=>$topic_icon, 'topic_folder'=>$image, 'topic_title'=>$myts->makeTboxData4Show($myrow['topic_title']), 'topic_link'=>$topiclink, 'topic_page_jump'=>$pagination, 'topic_replies'=>$myrow['topic_replies'], 'topic_poster'=>$topic_poster, 'topic_views'=>$myrow['topic_views'], 'topic_last_posttime'=>formatTimestamp($myrow['last_post_time']), 'topic_last_poster'=>$myts->makeTboxData4Show($myrow['last_poster']))); -} - -$xoopsTpl->assign('lang_by', _MD_BY); - -$xoopsTpl->assign('img_newposts', $bbImage['newposts_topic']); -$xoopsTpl->assign('img_hotnewposts', $bbImage['hot_newposts_topic']); -$xoopsTpl->assign('img_folder', $bbImage['folder_topic']); -$xoopsTpl->assign('img_hotfolder', $bbImage['hot_folder_topic']); -$xoopsTpl->assign('img_locked', $bbImage['locked_topic']); -$xoopsTpl->assign('img_sticky', $bbImage['folder_sticky']); -$xoopsTpl->assign('lang_newposts', _MD_NEWPOSTS); -$xoopsTpl->assign('lang_hotnewposts', _MD_MORETHAN); -$xoopsTpl->assign('lang_hotnonewposts', _MD_MORETHAN2); -$xoopsTpl->assign('lang_nonewposts', _MD_NONEWPOSTS); -$xoopsTpl->assign('lang_legend', _MD_LEGEND); -$xoopsTpl->assign('lang_topiclocked', _MD_TOPICLOCKED); -$xoopsTpl->assign('lang_topicsticky', _MD_TOPICSTICKY); -$xoopsTpl->assign("lang_search", _MD_SEARCH); -$xoopsTpl->assign("lang_advsearch", _MD_ADVSEARCH); - -$sql = 'SELECT COUNT(*) FROM '.$xoopsDB->prefix('bb_topics').' WHERE forum_id = '.$forum.' AND (topic_time > '.$startdate.' OR topic_sticky = 1)'; -if ( !$r = $xoopsDB->query($sql) ) { - //redirect_header('index.php',2,_MD_ERROROCCURED); - //exit(); -} -list($all_topics) = $xoopsDB->fetchRow($r); -if ( $all_topics > $forumdata['topics_per_page'] ) { - include XOOPS_ROOT_PATH.'/class/pagenav.php'; - $nav = new XoopsPageNav($all_topics, $forumdata['topics_per_page'], $start, "start", 'forum='.$forum.'&sortname='.$sortname.'&sortorder='.$sortorder.'&sortsince='.$sortsince); - $xoopsTpl->assign('forum_pagenav', $nav->renderNav(4)); -} else { - $xoopsTpl->assign('forum_pagenav', ''); -} -$xoopsTpl->assign('forum_jumpbox', make_jumpbox($forum)); -include XOOPS_ROOT_PATH."/footer.php"; -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +include "header.php"; + +$forum = intval($_GET['forum']); +if ( $forum < 1 ) { + redirect_header("index.php", 2, _MD_ERRORFORUM); + exit(); +} +$sql = 'SELECT forum_type, forum_name, forum_access, allow_html, allow_sig, posts_per_page, hot_threshold, topics_per_page FROM '.$xoopsDB->prefix('bb_forums').' WHERE forum_id = '.$forum; +if ( !$result = $xoopsDB->query($sql) ) { + redirect_header("index.php", 2, _MD_ERRORCONNECT); + exit(); +} +if ( !$forumdata = $xoopsDB->fetchArray($result) ) { + redirect_header("index.php", 2, _MD_ERROREXIST); + exit(); +} +// this page uses smarty template +// this must be set before including main header.php +$xoopsOption['template_main'] = 'newbb_viewforum.html'; +include XOOPS_ROOT_PATH."/header.php"; +$can_post = 0; +$show_reg = 0; +if ( $forumdata['forum_type'] == 1 ) { + // this is a private forum. + $xoopsTpl->assign('is_private_forum', true); + $accesserror = 0; + if ( $xoopsUser ) { + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ( !check_priv_forum_auth($xoopsUser->getVar("uid"), $forum, false) ) { + $accesserror = 1; + } + } + } else { + $accesserror = 1; + } + if ( $accesserror == 1 ) { + redirect_header("index.php",2,_MD_NORIGHTTOACCESS); + exit(); + } + $can_post = 1; + $show_reg = 1; +} else { + // this is not a priv forum + $xoopsTpl->assign('is_private_forum', false); + if ( $forumdata['forum_access'] == 1 ) { + // this is a reg user only forum + if ( $xoopsUser ) { + $can_post = 1; + } else { + $show_reg = 1; + } + } elseif ( $forumdata['forum_access'] == 2 ) { + // this is an open forum + $can_post = 1; + } else { + // this is an admin/moderator only forum + if ( $xoopsUser ) { + if ( $xoopsUserIsAdmin || is_moderator($forum, $xoopsUser->uid()) ) { + $can_post = 1; + } + } + } +} + +$xoopsTpl->assign("forum_id", $forum); +if ( $can_post == 1 ) { + $xoopsTpl->assign('viewer_can_post', true); + $xoopsTpl->assign('forum_post_or_register', "\""._MD_POSTNEW."\""); +} else { + $xoopsTpl->assign('viewer_can_post', false); + if ( $show_reg == 1 ) { + $xoopsTpl->assign('forum_post_or_register', ''._MD_REGTOPOST.''); + } else { + $xoopsTpl->assign('forum_post_or_register', ""); + } +} +$xoopsTpl->assign('forum_index_title', sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename'])); +$xoopsTpl->assign('forum_image_folder', $bbImage['folder_topic']); +$myts =& MyTextSanitizer::getInstance(); +$xoopsTpl->assign('forum_name', $myts->makeTboxData4Show($forumdata['forum_name'])); +$xoopsTpl->assign('lang_moderatedby', _MD_MODERATEDBY); + +$forum_moderators = ""; +$count = 0; +$moderators = get_moderators($forum); +foreach ( $moderators as $mods ) { + foreach ( $mods as $mod_id => $mod_name ) { + if ( $count > 0 ) { + $forum_moderators .= ", "; + } + $forum_moderators .= ''.$myts->makeTboxData4Show($mod_name).''; + $count = 1; + } +} +$xoopsTpl->assign('forum_moderators', $forum_moderators); + + +$sel_sort_array = array("t.topic_title"=>_MD_TOPICTITLE, "t.topic_replies"=>_MD_NUMBERREPLIES, "u.uname"=>_MD_TOPICPOSTER, "t.topic_views"=>_MD_VIEWS, "p.post_time"=>_MD_LASTPOSTTIME); +if ( !isset($_GET['sortname']) || !in_array($_GET['sortname'], array_keys($sel_sort_array)) ) { + $sortname = "p.post_time"; +} else { + $sortname = $_GET['sortname']; +} + +$xoopsTpl->assign('lang_sortby', _MD_SORTEDBY); + +$forum_selection_sort = ''; + +// assign to template +$xoopsTpl->assign('forum_selection_sort', $forum_selection_sort); + +$sortorder = (!isset($_GET['sortorder']) || $_GET['sortorder'] != "ASC") ? "DESC" : "ASC"; +$forum_selection_order = ''; + +// assign to template +$xoopsTpl->assign('forum_selection_order', $forum_selection_order); + +$sortsince = !empty($_GET['sortsince']) ? intval($_GET['sortsince']) : 100; +$sel_since_array = array(1, 2, 5, 10, 20, 30, 40, 60, 75, 100); +$forum_selection_since = ''; + +// assign to template +$xoopsTpl->assign('forum_selection_since', $forum_selection_since); +$xoopsTpl->assign('lang_go', _MD_GO); + +$xoopsTpl->assign('h_topic_link', "viewforum.php?forum=$forum&sortname=t.topic_title&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_title" && $sortorder == "DESC") ? "ASC" : "DESC")); +$xoopsTpl->assign('lang_topic', _MD_TOPIC); + +$xoopsTpl->assign('h_reply_link', "viewforum.php?forum=$forum&sortname=t.topic_replies&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_replies" && $sortorder == "DESC") ? "ASC" : "DESC")); +$xoopsTpl->assign('lang_replies', _MD_REPLIES); + +$xoopsTpl->assign('h_poster_link', "viewforum.php?forum=$forum&sortname=u.uname&sortsince=$sortsince&sortorder=". (($sortname == "u.uname" && $sortorder == "DESC") ? "ASC" : "DESC")); +$xoopsTpl->assign('lang_poster', _MD_POSTER); + +$xoopsTpl->assign('h_views_link', "viewforum.php?forum=$forum&sortname=t.topic_views&sortsince=$sortsince&sortorder=". (($sortname == "t.topic_views" && $sortorder == "DESC") ? "ASC" : "DESC")); +$xoopsTpl->assign('lang_views', _MD_VIEWS); + +$xoopsTpl->assign('h_date_link', "viewforum.php?forum=$forum&sortname=p.post_time&sortsince=$sortsince&sortorder=". (($sortname == "p.post_time" && $sortorder == "DESC") ? "ASC" : "DESC")); +$xoopsTpl->assign('lang_date', _MD_DATE); + +$startdate = time() - (86400* $sortsince); +$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; + +$sql = 'SELECT t.*, u.uname, u2.uname as last_poster, p.post_time as last_post_time, p.icon FROM '.$xoopsDB->prefix("bb_topics").' t LEFT JOIN '.$xoopsDB->prefix('users').' u ON u.uid = t.topic_poster LEFT JOIN '.$xoopsDB->prefix('bb_posts').' p ON p.post_id = t.topic_last_post_id LEFT JOIN '.$xoopsDB->prefix('users').' u2 ON u2.uid = p.uid WHERE t.forum_id = '.$forum.' AND (p.post_time > '.$startdate.' OR t.topic_sticky=1) ORDER BY topic_sticky DESC, '.$sortname.' '.$sortorder; +if ( !$result = $xoopsDB->query($sql,$forumdata['topics_per_page'],$start) ) { + redirect_header('index.php',2,_MD_ERROROCCURED); + exit(); +} + +// Read topic 'lastread' times from cookie, if exists +$topic_lastread = newbb_get_topics_viewed(); +while ( $myrow = $xoopsDB->fetchArray($result) ) { + + if ( empty($myrow['last_poster']) ) { + $myrow['last_poster'] = $xoopsConfig['anonymous']; + } + if ( $myrow['topic_sticky'] == 1 ) { + $image = $bbImage['folder_sticky']; + } elseif ( $myrow['topic_status'] == 1 ) { + $image = $bbImage['locked_topic']; + } else { + if ( $myrow['topic_replies'] >= $forumdata['hot_threshold'] ) { + if ( empty($topic_lastread[$myrow['topic_id']]) || ($topic_lastread[$myrow['topic_id']] < $myrow['last_post_time'] )) { + $image = $bbImage['hot_newposts_topic']; + } else { + $image = $bbImage['hot_folder_topic']; + } + } else { + if ( empty($topic_lastread[$myrow['topic_id']]) || ($topic_lastread[$myrow['topic_id']] < $myrow['last_post_time'] )) { + $image = $bbImage['newposts_topic']; + } else { + $image = $bbImage['folder_topic']; + } + } + } + $pagination = ''; + $addlink = ''; + $topiclink = 'viewtopic.php?topic_id='.$myrow['topic_id'].'&forum='.$forum; + $totalpages = ceil(($myrow['topic_replies'] + 1) / $forumdata['posts_per_page']); + if ( $totalpages > 1 ) { + $pagination .= '    '; + for ( $i = 1; $i <= $totalpages; $i++ ) { + + if ( $i > 3 && $i < $totalpages ) { + $pagination .= "..."; + } else { + $addlink = '&start='.(($i - 1) * $forumdata['posts_per_page']); + $pagination .= '['.$i.']'; + } + } + } + if ( $myrow['icon'] ) { + $topic_icon = ''; + } else { + $topic_icon = ''; + } + if ( $myrow['topic_poster'] != 0 && $myrow['uname'] ) { + $topic_poster = ''.$myrow['uname'].''; + } else { + $topic_poster = $xoopsConfig['anonymous']; + } + $xoopsTpl->append('topics', array('topic_icon'=>$topic_icon, 'topic_folder'=>$image, 'topic_title'=>$myts->makeTboxData4Show($myrow['topic_title']), 'topic_link'=>$topiclink, 'topic_page_jump'=>$pagination, 'topic_replies'=>$myrow['topic_replies'], 'topic_poster'=>$topic_poster, 'topic_views'=>$myrow['topic_views'], 'topic_last_posttime'=>formatTimestamp($myrow['last_post_time']), 'topic_last_poster'=>$myts->makeTboxData4Show($myrow['last_poster']))); +} + +$xoopsTpl->assign('lang_by', _MD_BY); + +$xoopsTpl->assign('img_newposts', $bbImage['newposts_topic']); +$xoopsTpl->assign('img_hotnewposts', $bbImage['hot_newposts_topic']); +$xoopsTpl->assign('img_folder', $bbImage['folder_topic']); +$xoopsTpl->assign('img_hotfolder', $bbImage['hot_folder_topic']); +$xoopsTpl->assign('img_locked', $bbImage['locked_topic']); +$xoopsTpl->assign('img_sticky', $bbImage['folder_sticky']); +$xoopsTpl->assign('lang_newposts', _MD_NEWPOSTS); +$xoopsTpl->assign('lang_hotnewposts', _MD_MORETHAN); +$xoopsTpl->assign('lang_hotnonewposts', _MD_MORETHAN2); +$xoopsTpl->assign('lang_nonewposts', _MD_NONEWPOSTS); +$xoopsTpl->assign('lang_legend', _MD_LEGEND); +$xoopsTpl->assign('lang_topiclocked', _MD_TOPICLOCKED); +$xoopsTpl->assign('lang_topicsticky', _MD_TOPICSTICKY); +$xoopsTpl->assign("lang_search", _MD_SEARCH); +$xoopsTpl->assign("lang_advsearch", _MD_ADVSEARCH); + +$sql = 'SELECT COUNT(*) FROM '.$xoopsDB->prefix('bb_topics').' WHERE forum_id = '.$forum.' AND (topic_time > '.$startdate.' OR topic_sticky = 1)'; +if ( !$r = $xoopsDB->query($sql) ) { + //redirect_header('index.php',2,_MD_ERROROCCURED); + //exit(); +} +list($all_topics) = $xoopsDB->fetchRow($r); +if ( $all_topics > $forumdata['topics_per_page'] ) { + include XOOPS_ROOT_PATH.'/class/pagenav.php'; + $nav = new XoopsPageNav($all_topics, $forumdata['topics_per_page'], $start, "start", 'forum='.$forum.'&sortname='.$sortname.'&sortorder='.$sortorder.'&sortsince='.$sortsince); + $xoopsTpl->assign('forum_pagenav', $nav->renderNav(4)); +} else { + $xoopsTpl->assign('forum_pagenav', ''); +} +$xoopsTpl->assign('forum_jumpbox', make_jumpbox($forum)); +include XOOPS_ROOT_PATH."/footer.php"; +?> Index: xoops2jp/html/modules/newbb/viewtopic.php diff -u xoops2jp/html/modules/newbb/viewtopic.php:1.5 xoops2jp/html/modules/newbb/viewtopic.php:1.6 --- xoops2jp/html/modules/newbb/viewtopic.php:1.5 Tue Oct 25 12:07:38 2005 +++ xoops2jp/html/modules/newbb/viewtopic.php Mon May 1 11:37:28 2006 @@ -1,360 +1,360 @@ - // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------- // - -include 'header.php'; -$forum = isset($_GET['forum']) ? intval($_GET['forum']) : 0; -$topic_id = isset($_GET['topic_id']) ? intval($_GET['topic_id']) : 0; -if ( empty($forum) ) { - redirect_header(XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/index.php",2,_MD_ERRORFORUM); - exit(); -} elseif ( empty($topic_id) ) { - redirect_header('viewforum.php?forum='.$forum,2,_MD_ERRORTOPIC); - exit(); -} -$topic_time = (isset($_GET['topic_time'])) ? intval($_GET['topic_time']) : 0; -$post_id = !empty($_GET['post_id']) ? intval($_GET['post_id']) : 0; - -//use users preferences -if (is_object($xoopsUser)) { - $viewmode = $xoopsUser->getVar('umode'); - $order = ($xoopsUser->getVar('uorder') == 1) ? 'DESC' : 'ASC'; -} else { - $viewmode = 'flat'; - $order = 'ASC'; -} - -// newbb does not have nested mode -if ($viewmode == 'nest') { - $viewmode = 'thread'; -} - -// override mode/order if any requested -if (isset($_GET['viewmode']) && ($_GET['viewmode'] == 'flat' || $_GET['viewmode'] == 'thread')) { - $viewmode = $_GET['viewmode']; -} -if (isset($_GET['order']) && ($_GET['order'] == 'ASC' || $_GET['order'] == 'DESC')) { - $order = $_GET['order']; -} - -if ($viewmode != 'flat') { - $xoopsOption['template_main'] = 'newbb_viewtopic_thread.html'; -} else { - $xoopsOption['template_main'] = 'newbb_viewtopic_flat.html'; -} - -include XOOPS_ROOT_PATH.'/header.php'; -include_once 'class/class.forumposts.php'; - -if ( isset($_GET['move']) && 'next' == $_GET['move'] ) { - $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time > '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time ASC LIMIT 1'; -} elseif ( isset($_GET['move']) && 'prev' == $_GET['move']) { - $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time < '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time DESC LIMIT 1'; -} else { - $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_id = '.$topic_id.' AND t.forum_id = '.$forum; -} - -if ( !$result = $xoopsDB->query($sql) ) { - redirect_header('viewforum.php?forum='.$forum,2,_MD_ERROROCCURED); - exit(); -} - -if ( !$forumdata = $xoopsDB->fetchArray($result) ) { - redirect_header('viewforum.php?forum='.$forum,2,_MD_FORUMNOEXIST); - exit(); -} -$xoopsTpl->assign('topic_id', $forumdata['topic_id']); -$topic_id = $forumdata['topic_id']; -$xoopsTpl->assign('forum_id', $forumdata['forum_id']); -$forum = $forumdata['forum_id']; -$can_post = 0; -$show_reg = 0; -if ( $forumdata['forum_type'] == 1 ) { - // this is a private forum. - $accesserror = 0; - if ( $xoopsUser ) { - if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { - if ( !check_priv_forum_auth($xoopsUser->getVar('uid'), $forum, false) ) { - $accesserror = 1; - } - } else { - $isadminormod = 1; - } - } else { - $accesserror = 1; - } - if ( $accesserror == 1 ) { - redirect_header(XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/index.php",2,_MD_NORIGHTTOACCESS); - exit(); - } - $can_post = 1; - $show_reg = 1; -} else { - // this is not a priv forum - if ( $forumdata['forum_access'] == 1 ) { - // this is a reg user only forum - if ( $xoopsUser ) { - $can_post = 1; - } else { - $show_reg = 1; - } - } elseif ( $forumdata['forum_access'] == 2 ) { - // this is an open forum - $can_post = 1; - } else { - // this is an admin/moderator only forum - if ( $xoopsUser ) { - if ( $xoopsUser->isAdmin($xoopsModule->mid()) || is_moderator($forum, $xoopsUser->getVar('uid')) ) { - $can_post = 1; - $isadminormod = 1; - } - } - } -} -$myts =& MyTextSanitizer::getInstance(); -$forumdata['topic_title'] = $myts->makeTboxData4Show($forumdata['topic_title']);$forumdata['forum_name'] = $myts->makeTboxData4Show($forumdata['forum_name']); -$xoopsTpl->assign(array('topic_title' => ''.$forumdata['topic_title'].'', 'forum_name' => $forumdata['forum_name'], 'topic_time' => $forumdata['topic_time'], 'lang_nexttopic' => _MD_NEXTTOPIC, 'lang_prevtopic' => _MD_PREVTOPIC)); - -// add image links to admin page if the user viewing this page is a forum admin -if ( $xoopsUser ) { - $xoopsTpl->assign('viewer_userid', $xoopsUser->getVar('uid')); - if ( !empty($isadminormod) || $xoopsUser->isAdmin($xoopsModule->mid()) || is_moderator( $forum, $xoopsUser->getVar('uid')) ) { - // yup, the user is admin - // the forum is locked? - if ( $forumdata['topic_status'] != 1 ) { - // nope - $xoopsTpl->assign('topic_lock_image', ''._MD_LOCKTOPIC.''); - } else { - // yup, it is.. - $xoopsTpl->assign('topic_lock_image', ''._MD_UNLOCKTOPIC.''); - } - $xoopsTpl->assign('topic_move_image', ''._MD_MOVETOPIC.''); - $xoopsTpl->assign('topic_delete_image', ''._MD_DELETETOPIC.''); - // is the topic sticky? - if ( $forumdata['topic_sticky'] != 1 ) { - // nope, not yet.. - $xoopsTpl->assign('topic_sticky_image', ''._MD_STICKYTOPIC.''); - } else { - // yup it is sticking.. - $xoopsTpl->assign('topic_sticky_image', ''._MD_UNSTICKYTOPIC.''); - } - // need to set this also - $xoopsTpl->assign('viewer_is_admin', true); - } else { - // nope, the user is not a forum admin.. - $xoopsTpl->assign('viewer_is_admin', false); - } -} else { - // nope, the user is not a forum admin, not even registered - $xoopsTpl->assign(array('viewer_is_admin' => false, 'viewer_userid' => 0)); -} - -function showTree(&$arr, $current=0, $key=0, $prefix='', $foundusers=array()){ - global $xoopsConfig; - if ($key != 0) { - if ( 0 != $arr[$key]['obj']->uid() ) { - if (!isset($foundusers[$arr[$key]['obj']->uid()])) { - $eachposter = new XoopsUser($arr[$key]['obj']->uid()); - $foundusers[$arr[$key]['obj']->uid()] =& $eachposter; - } else { - $eachposter =& $foundusers[$arr[$key]['obj']->uid()]; - } - $poster_rank = $eachposter->rank(); - if ( $poster_rank['image'] != '' ) { - $poster_rank['image'] = ''; - } - if ( $eachposter->isActive() ) { - $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').''); - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous']); - } - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous']); - } - $posticon = $arr[$key]['obj']->icon(); - if ( isset($posticon) && $posticon != '' ) { - $post_image = ''; - } else { - $post_image = ''; - } - if ($current != $key) { - $subject = ''.$arr[$key]['obj']->subject().''; - $GLOBALS['xoopsTpl']->append("topic_trees", array_merge($posterarr, array("post_id" => $arr[$key]['obj']->postid(), "post_parent_id" => $arr[$key]['obj']->parent(), "post_date" => formatTimestamp($arr[$key]['obj']->posttime(), "m"), "post_image" => $post_image, "post_title" => $subject, "post_prefix" => $prefix))); - } else { - $subject = ''.$arr[$key]['obj']->subject().''; - $thisprefix = substr($prefix, 0, -6)."»"; - $GLOBALS['xoopsTpl']->append("topic_trees", array_merge($posterarr, array("post_id" => $arr[$key]['obj']->postid(), "post_parent_id" => $arr[$key]['obj']->parent(), "post_date" => formatTimestamp($arr[$key]['obj']->posttime(), "m"), "post_image" => $post_image, "post_title" => $subject, "post_prefix" => $thisprefix))); - } - } - if ( isset($arr[$key]['replies']) && !empty($arr[$key]['replies']) ){ - $prefix .= "  "; - foreach($arr[$key]['replies'] as $replykey) { - $current = ( $current == 0 ) ? $replykey : $current; - showTree($arr, $current, $replykey, $prefix, $foundusers); - } - } -} - -if ($order == 'DESC') { - $xoopsTpl->assign(array('order_current' => 'DESC', 'order_other' => 'ASC', 'lang_order_other' => _OLDESTFIRST)); -} else { - $xoopsTpl->assign(array('order_current' => 'ASC', 'order_other' => 'DESC', 'lang_order_other' => _NEWESTFIRST)); -} - -// initialize the start number of select query -$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; - -$total_posts = get_total_posts($topic_id, 'topic'); -if ($total_posts > 50) { - $viewmode ="flat"; - // hide link to theaded view - $xoopsTpl->assign('lang_threaded', "" ); - $xoopsTpl->assign('lang_flat', _FLAT ); -} else { - $xoopsTpl->assign(array('lang_threaded' => _THREADED, 'lang_flat' => _FLAT)); -} - -if ( $can_post == 1 ) { - $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "\""._MD_POSTNEW."\"")); -} else { - $xoopsTpl->assign('viewer_can_post', false); - if ( $show_reg == 1 ) { - $xoopsTpl->assign('forum_post_or_register', ''._MD_REGTOPOST.''); - } else { - $xoopsTpl->assign('forum_post_or_register', ''); - } -} - -if ( $viewmode == "thread" ) { - $start = 0; - $postsArray = ForumPosts::getAllPosts($topic_id, "ASC", $total_posts, $start); - $xoopsTpl->assign('topic_viewmode', 'thread'); - - $newObjArr = array(); - foreach ( $postsArray as $eachpost ) { - $key1 = $eachpost->postid(); - if ( (!empty($post_id) && $post_id == $key1) || ( empty($post_id) && $eachpost->parent() == 0 ) ) { - $post_text = $eachpost->text(); - if ( 0 != $eachpost->uid() ) { - $eachposter = new XoopsUser($eachpost->uid()); - $poster_rank = $eachposter->rank(); - if ( $poster_rank['image'] != "" ) { - $poster_rank['image'] = ""; - } - if ( $eachposter->isActive() ) { - $poster_status = $eachposter->isOnline() ? _MD_ONLINE : ''; - $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status); - if ( 1 == $forumdata['allow_sig'] && $eachpost->attachsig() == 1 && $eachposter->attachsig() == 1 ) { - $myts =& MytextSanitizer::getInstance(); - $post_text .= "


----------------
". $myts->makeTareaData4Show($eachposter->getVar("user_sig", "N"), 0, 1, 1)."

"; - } - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); - } - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); - } - $posticon = $eachpost->icon(); - if ( isset($posticon) && $posticon != '' ) { - $post_image = ''; - } else { - $post_image = ''; - } - $xoopsTpl->append('topic_posts', array_merge($posterarr, array('post_id' => $eachpost->postid(), 'post_parent_id' => $eachpost->parent(), 'post_date' => formatTimestamp($eachpost->posttime(), 'm'), 'post_poster_ip'=> $eachpost->posterip(), 'post_image' => $post_image, 'post_title' => $eachpost->subject(), 'post_text' => $post_text))); - } - $newObjArr[$key1]['obj'] = $eachpost; - $key2 = $eachpost->parent(); - $newObjArr[$key2]['replies'][] = $key1; - $newObjArr[$key2]['leaf'] = $key1; - } - showTree($newObjArr, $post_id); - $xoopsTpl->assign(array('lang_subject' => _MD_SUBJECT, 'lang_date' => _MD_DATE)); -} else { - $xoopsTpl->assign(array('topic_viewmode' => 'flat', 'lang_top' => _MD_TOP, 'lang_subject' => _MD_SUBJECT, 'lang_bottom' => _MD_BOTTOM)); - $postsArray = ForumPosts::getAllPosts($topic_id, $order, $forumdata['posts_per_page'], $start, $post_id); - $foundusers = array(); - foreach ( $postsArray as $eachpost ) { - $post_text = $eachpost->text(); - if ( 0 != $eachpost->uid() ) { - if (!isset($foundusers['user'.$eachpost->uid()])) { - $eachposter = new XoopsUser($eachpost->uid()); - $foundusers['user'.$eachpost->uid()] =& $eachposter; - } else { - $eachposter =& $foundusers['user'.$eachpost->uid()]; - } - $poster_rank = $eachposter->rank(); - if ( $poster_rank['image'] != '' ) { - $poster_rank['image'] = ''; - } - if ( $eachposter->isActive() ) { - $poster_status = $eachposter->isOnline() ? _MD_ONLINE : ''; - $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status); - if ( 1 == $forumdata['allow_sig'] && $eachpost->attachsig() == 1 && $eachposter->attachsig() == 1 ) { - $myts =& MytextSanitizer::getInstance(); - $post_text .= '


----------------
'. $myts->makeTareaData4Show($eachposter->getVar('user_sig', 'N'), 0, 1, 1).'

'; - } - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); - } - } else { - $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); - } - $posticon = $eachpost->icon(); - if ( isset($posticon) && $posticon != '' ) { - $post_image = ''; - } else { - $post_image = ''; - } - $xoopsTpl->append('topic_posts', array_merge($posterarr, array('post_id' => $eachpost->postid(), 'post_parent_id' => $eachpost->parent(), 'post_date' => formatTimestamp($eachpost->posttime(), 'm'), 'post_poster_ip'=> $eachpost->posterip(), 'post_image' => $post_image, 'post_title' => $eachpost->subject(), 'post_text' => $post_text))); - unset($eachposter); - } - if ( $total_posts > $forumdata['posts_per_page'] ) { - include XOOPS_ROOT_PATH.'/class/pagenav.php'; - $nav = new XoopsPageNav($total_posts, $forumdata['posts_per_page'], $start, "start", 'topic_id='.$topic_id.'&forum='.$forum.'&viewmode='.$viewmode.'&order='.$order); - $xoopsTpl->assign('forum_page_nav', $nav->renderNav(4)); - } else { - $xoopsTpl->assign('forum_page_nav', ''); - } -} - -// create jump box -$xoopsTpl->assign(array('forum_jumpbox' => make_jumpbox($forum), 'lang_forum_index' => sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename']), 'lang_from' => _MD_FROM, 'lang_joined' => _MD_JOINED, 'lang_posts' => _MD_POSTS, 'lang_poster' => _MD_POSTER, 'lang_thread' => _MD_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_postedon' => _MD_POSTEDON)); - -// Read in cookie of 'lastread' times -$topic_lastread = newbb_get_topics_viewed(); -// if cookie is not set for this topic, update view count and set cookie -if ( empty($topic_lastread[$topic_id]) ) { - $sql = 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='. $topic_id; - $xoopsDB->queryF($sql); -} -// Update cookie -newbb_add_topics_viewed($topic_lastread, $topic_id, time(), $bbCookie['path'], $bbCookie['domain'], $bbCookie['secure']); -include XOOPS_ROOT_PATH.'/footer.php'; -?> + // +// ------------------------------------------------------------------------ // +// 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 // +// ------------------------------------------------------------------------- // + +include 'header.php'; +$forum = isset($_GET['forum']) ? intval($_GET['forum']) : 0; +$topic_id = isset($_GET['topic_id']) ? intval($_GET['topic_id']) : 0; +if ( empty($forum) ) { + redirect_header(XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/index.php",2,_MD_ERRORFORUM); + exit(); +} elseif ( empty($topic_id) ) { + redirect_header('viewforum.php?forum='.$forum,2,_MD_ERRORTOPIC); + exit(); +} +$topic_time = (isset($_GET['topic_time'])) ? intval($_GET['topic_time']) : 0; +$post_id = !empty($_GET['post_id']) ? intval($_GET['post_id']) : 0; + +//use users preferences +if (is_object($xoopsUser)) { + $viewmode = $xoopsUser->getVar('umode'); + $order = ($xoopsUser->getVar('uorder') == 1) ? 'DESC' : 'ASC'; +} else { + $viewmode = 'flat'; + $order = 'ASC'; +} + +// newbb does not have nested mode +if ($viewmode == 'nest') { + $viewmode = 'thread'; +} + +// override mode/order if any requested +if (isset($_GET['viewmode']) && ($_GET['viewmode'] == 'flat' || $_GET['viewmode'] == 'thread')) { + $viewmode = $_GET['viewmode']; +} +if (isset($_GET['order']) && ($_GET['order'] == 'ASC' || $_GET['order'] == 'DESC')) { + $order = $_GET['order']; +} + +if ($viewmode != 'flat') { + $xoopsOption['template_main'] = 'newbb_viewtopic_thread.html'; +} else { + $xoopsOption['template_main'] = 'newbb_viewtopic_flat.html'; +} + +include XOOPS_ROOT_PATH.'/header.php'; +include_once 'class/class.forumposts.php'; + +if ( isset($_GET['move']) && 'next' == $_GET['move'] ) { + $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time > '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time ASC LIMIT 1'; +} elseif ( isset($_GET['move']) && 'prev' == $_GET['move']) { + $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_time < '.$topic_time.' AND t.forum_id = '.$forum.' ORDER BY t.topic_time DESC LIMIT 1'; +} else { + $sql = 'SELECT t.topic_id, t.topic_title, t.topic_time, t.topic_status, t.topic_sticky, t.topic_last_post_id, f.forum_id, f.forum_name, f.forum_access, f.forum_type, f.allow_html, f.allow_sig, f.posts_per_page, f.hot_threshold, f.topics_per_page FROM '.$xoopsDB->prefix('bb_topics').' t LEFT JOIN '.$xoopsDB->prefix('bb_forums').' f ON f.forum_id = t.forum_id WHERE t.topic_id = '.$topic_id.' AND t.forum_id = '.$forum; +} + +if ( !$result = $xoopsDB->query($sql) ) { + redirect_header('viewforum.php?forum='.$forum,2,_MD_ERROROCCURED); + exit(); +} + +if ( !$forumdata = $xoopsDB->fetchArray($result) ) { + redirect_header('viewforum.php?forum='.$forum,2,_MD_FORUMNOEXIST); + exit(); +} +$xoopsTpl->assign('topic_id', $forumdata['topic_id']); +$topic_id = $forumdata['topic_id']; +$xoopsTpl->assign('forum_id', $forumdata['forum_id']); +$forum = $forumdata['forum_id']; +$can_post = 0; +$show_reg = 0; +if ( $forumdata['forum_type'] == 1 ) { + // this is a private forum. + $accesserror = 0; + if ( $xoopsUser ) { + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + if ( !check_priv_forum_auth($xoopsUser->getVar('uid'), $forum, false) ) { + $accesserror = 1; + } + } else { + $isadminormod = 1; + } + } else { + $accesserror = 1; + } + if ( $accesserror == 1 ) { + redirect_header(XOOPS_URL."/modules/".$xoopsModule->getVar('dirname')."/index.php",2,_MD_NORIGHTTOACCESS); + exit(); + } + $can_post = 1; + $show_reg = 1; +} else { + // this is not a priv forum + if ( $forumdata['forum_access'] == 1 ) { + // this is a reg user only forum + if ( $xoopsUser ) { + $can_post = 1; + } else { + $show_reg = 1; + } + } elseif ( $forumdata['forum_access'] == 2 ) { + // this is an open forum + $can_post = 1; + } else { + // this is an admin/moderator only forum + if ( $xoopsUser ) { + if ( $xoopsUser->isAdmin($xoopsModule->mid()) || is_moderator($forum, $xoopsUser->getVar('uid')) ) { + $can_post = 1; + $isadminormod = 1; + } + } + } +} +$myts =& MyTextSanitizer::getInstance(); +$forumdata['topic_title'] = $myts->makeTboxData4Show($forumdata['topic_title']);$forumdata['forum_name'] = $myts->makeTboxData4Show($forumdata['forum_name']); +$xoopsTpl->assign(array('topic_title' => ''.$forumdata['topic_title'].'', 'forum_name' => $forumdata['forum_name'], 'topic_time' => $forumdata['topic_time'], 'lang_nexttopic' => _MD_NEXTTOPIC, 'lang_prevtopic' => _MD_PREVTOPIC)); + +// add image links to admin page if the user viewing this page is a forum admin +if ( $xoopsUser ) { + $xoopsTpl->assign('viewer_userid', $xoopsUser->getVar('uid')); + if ( !empty($isadminormod) || $xoopsUser->isAdmin($xoopsModule->mid()) || is_moderator( $forum, $xoopsUser->getVar('uid')) ) { + // yup, the user is admin + // the forum is locked? + if ( $forumdata['topic_status'] != 1 ) { + // nope + $xoopsTpl->assign('topic_lock_image', ''._MD_LOCKTOPIC.''); + } else { + // yup, it is.. + $xoopsTpl->assign('topic_lock_image', ''._MD_UNLOCKTOPIC.''); + } + $xoopsTpl->assign('topic_move_image', ''._MD_MOVETOPIC.''); + $xoopsTpl->assign('topic_delete_image', ''._MD_DELETETOPIC.''); + // is the topic sticky? + if ( $forumdata['topic_sticky'] != 1 ) { + // nope, not yet.. + $xoopsTpl->assign('topic_sticky_image', ''._MD_STICKYTOPIC.''); + } else { + // yup it is sticking.. + $xoopsTpl->assign('topic_sticky_image', ''._MD_UNSTICKYTOPIC.''); + } + // need to set this also + $xoopsTpl->assign('viewer_is_admin', true); + } else { + // nope, the user is not a forum admin.. + $xoopsTpl->assign('viewer_is_admin', false); + } +} else { + // nope, the user is not a forum admin, not even registered + $xoopsTpl->assign(array('viewer_is_admin' => false, 'viewer_userid' => 0)); +} + +function showTree(&$arr, $current=0, $key=0, $prefix='', $foundusers=array()){ + global $xoopsConfig; + if ($key != 0) { + if ( 0 != $arr[$key]['obj']->uid() ) { + if (!isset($foundusers[$arr[$key]['obj']->uid()])) { + $eachposter = new XoopsUser($arr[$key]['obj']->uid()); + $foundusers[$arr[$key]['obj']->uid()] =& $eachposter; + } else { + $eachposter =& $foundusers[$arr[$key]['obj']->uid()]; + } + $poster_rank = $eachposter->rank(); + if ( $poster_rank['image'] != '' ) { + $poster_rank['image'] = ''; + } + if ( $eachposter->isActive() ) { + $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').''); + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous']); + } + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous']); + } + $posticon = $arr[$key]['obj']->icon(); + if ( isset($posticon) && $posticon != '' ) { + $post_image = ''; + } else { + $post_image = ''; + } + if ($current != $key) { + $subject = ''.$arr[$key]['obj']->subject().''; + $GLOBALS['xoopsTpl']->append("topic_trees", array_merge($posterarr, array("post_id" => $arr[$key]['obj']->postid(), "post_parent_id" => $arr[$key]['obj']->parent(), "post_date" => formatTimestamp($arr[$key]['obj']->posttime(), "m"), "post_image" => $post_image, "post_title" => $subject, "post_prefix" => $prefix))); + } else { + $subject = ''.$arr[$key]['obj']->subject().''; + $thisprefix = substr($prefix, 0, -6)."»"; + $GLOBALS['xoopsTpl']->append("topic_trees", array_merge($posterarr, array("post_id" => $arr[$key]['obj']->postid(), "post_parent_id" => $arr[$key]['obj']->parent(), "post_date" => formatTimestamp($arr[$key]['obj']->posttime(), "m"), "post_image" => $post_image, "post_title" => $subject, "post_prefix" => $thisprefix))); + } + } + if ( isset($arr[$key]['replies']) && !empty($arr[$key]['replies']) ){ + $prefix .= "  "; + foreach($arr[$key]['replies'] as $replykey) { + $current = ( $current == 0 ) ? $replykey : $current; + showTree($arr, $current, $replykey, $prefix, $foundusers); + } + } +} + +if ($order == 'DESC') { + $xoopsTpl->assign(array('order_current' => 'DESC', 'order_other' => 'ASC', 'lang_order_other' => _OLDESTFIRST)); +} else { + $xoopsTpl->assign(array('order_current' => 'ASC', 'order_other' => 'DESC', 'lang_order_other' => _NEWESTFIRST)); +} + +// initialize the start number of select query +$start = !empty($_GET['start']) ? intval($_GET['start']) : 0; + +$total_posts = get_total_posts($topic_id, 'topic'); +if ($total_posts > 50) { + $viewmode ="flat"; + // hide link to theaded view + $xoopsTpl->assign('lang_threaded', "" ); + $xoopsTpl->assign('lang_flat', _FLAT ); +} else { + $xoopsTpl->assign(array('lang_threaded' => _THREADED, 'lang_flat' => _FLAT)); +} + +if ( $can_post == 1 ) { + $xoopsTpl->assign(array('viewer_can_post' => true, 'forum_post_or_register' => "\""._MD_POSTNEW."\"")); +} else { + $xoopsTpl->assign('viewer_can_post', false); + if ( $show_reg == 1 ) { + $xoopsTpl->assign('forum_post_or_register', ''._MD_REGTOPOST.''); + } else { + $xoopsTpl->assign('forum_post_or_register', ''); + } +} + +if ( $viewmode == "thread" ) { + $start = 0; + $postsArray = ForumPosts::getAllPosts($topic_id, "ASC", $total_posts, $start); + $xoopsTpl->assign('topic_viewmode', 'thread'); + + $newObjArr = array(); + foreach ( $postsArray as $eachpost ) { + $key1 = $eachpost->postid(); + if ( (!empty($post_id) && $post_id == $key1) || ( empty($post_id) && $eachpost->parent() == 0 ) ) { + $post_text = $eachpost->text(); + if ( 0 != $eachpost->uid() ) { + $eachposter = new XoopsUser($eachpost->uid()); + $poster_rank = $eachposter->rank(); + if ( $poster_rank['image'] != "" ) { + $poster_rank['image'] = ""; + } + if ( $eachposter->isActive() ) { + $poster_status = $eachposter->isOnline() ? _MD_ONLINE : ''; + $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status); + if ( 1 == $forumdata['allow_sig'] && $eachpost->attachsig() == 1 && $eachposter->attachsig() == 1 ) { + $myts =& MytextSanitizer::getInstance(); + $post_text .= "


----------------
". $myts->makeTareaData4Show($eachposter->getVar("user_sig", "N"), 0, 1, 1)."

"; + } + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); + } + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); + } + $posticon = $eachpost->icon(); + if ( isset($posticon) && $posticon != '' ) { + $post_image = ''; + } else { + $post_image = ''; + } + $xoopsTpl->append('topic_posts', array_merge($posterarr, array('post_id' => $eachpost->postid(), 'post_parent_id' => $eachpost->parent(), 'post_date' => formatTimestamp($eachpost->posttime(), 'm'), 'post_poster_ip'=> $eachpost->posterip(), 'post_image' => $post_image, 'post_title' => $eachpost->subject(), 'post_text' => $post_text))); + } + $newObjArr[$key1]['obj'] = $eachpost; + $key2 = $eachpost->parent(); + $newObjArr[$key2]['replies'][] = $key1; + $newObjArr[$key2]['leaf'] = $key1; + } + showTree($newObjArr, $post_id); + $xoopsTpl->assign(array('lang_subject' => _MD_SUBJECT, 'lang_date' => _MD_DATE)); +} else { + $xoopsTpl->assign(array('topic_viewmode' => 'flat', 'lang_top' => _MD_TOP, 'lang_subject' => _MD_SUBJECT, 'lang_bottom' => _MD_BOTTOM)); + $postsArray = ForumPosts::getAllPosts($topic_id, $order, $forumdata['posts_per_page'], $start, $post_id); + $foundusers = array(); + foreach ( $postsArray as $eachpost ) { + $post_text = $eachpost->text(); + if ( 0 != $eachpost->uid() ) { + if (!isset($foundusers['user'.$eachpost->uid()])) { + $eachposter = new XoopsUser($eachpost->uid()); + $foundusers['user'.$eachpost->uid()] =& $eachposter; + } else { + $eachposter =& $foundusers['user'.$eachpost->uid()]; + } + $poster_rank = $eachposter->rank(); + if ( $poster_rank['image'] != '' ) { + $poster_rank['image'] = ''; + } + if ( $eachposter->isActive() ) { + $poster_status = $eachposter->isOnline() ? _MD_ONLINE : ''; + $posterarr = array('poster_uid' => $eachposter->getVar('uid'), 'poster_uname' => ''.$eachposter->getVar('uname').'', 'poster_avatar' => $eachposter->getVar('user_avatar'), 'poster_from' => $eachposter->getVar('user_from'), 'poster_regdate' => formatTimestamp($eachposter->getVar('user_regdate'), 's'), 'poster_postnum' => $eachposter->getVar('posts'), 'poster_sendpmtext' => sprintf(_SENDPMTO,$eachposter->getVar('uname')), 'poster_rank_title' => $poster_rank['title'], 'poster_rank_image' => $poster_rank['image'], 'poster_status' => $poster_status); + if ( 1 == $forumdata['allow_sig'] && $eachpost->attachsig() == 1 && $eachposter->attachsig() == 1 ) { + $myts =& MytextSanitizer::getInstance(); + $post_text .= '


----------------
'. $myts->makeTareaData4Show($eachposter->getVar('user_sig', 'N'), 0, 1, 1).'

'; + } + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); + } + } else { + $posterarr = array('poster_uid' =>0, 'poster_uname' => $xoopsConfig['anonymous'], 'poster_avatar' => '', 'poster_from' => '', 'poster_regdate' => '', 'poster_postnum' => '', 'poster_sendpmtext' => '', 'poster_rank_title' => '', 'poster_rank_image' => ''); + } + $posticon = $eachpost->icon(); + if ( isset($posticon) && $posticon != '' ) { + $post_image = ''; + } else { + $post_image = ''; + } + $xoopsTpl->append('topic_posts', array_merge($posterarr, array('post_id' => $eachpost->postid(), 'post_parent_id' => $eachpost->parent(), 'post_date' => formatTimestamp($eachpost->posttime(), 'm'), 'post_poster_ip'=> $eachpost->posterip(), 'post_image' => $post_image, 'post_title' => $eachpost->subject(), 'post_text' => $post_text))); + unset($eachposter); + } + if ( $total_posts > $forumdata['posts_per_page'] ) { + include XOOPS_ROOT_PATH.'/class/pagenav.php'; + $nav = new XoopsPageNav($total_posts, $forumdata['posts_per_page'], $start, "start", 'topic_id='.$topic_id.'&forum='.$forum.'&viewmode='.$viewmode.'&order='.$order); + $xoopsTpl->assign('forum_page_nav', $nav->renderNav(4)); + } else { + $xoopsTpl->assign('forum_page_nav', ''); + } +} + +// create jump box +$xoopsTpl->assign(array('forum_jumpbox' => make_jumpbox($forum), 'lang_forum_index' => sprintf(_MD_FORUMINDEX,$xoopsConfig['sitename']), 'lang_from' => _MD_FROM, 'lang_joined' => _MD_JOINED, 'lang_posts' => _MD_POSTS, 'lang_poster' => _MD_POSTER, 'lang_thread' => _MD_THREAD, 'lang_edit' => _EDIT, 'lang_delete' => _DELETE, 'lang_reply' => _REPLY, 'lang_postedon' => _MD_POSTEDON)); + +// Read in cookie of 'lastread' times +$topic_lastread = newbb_get_topics_viewed(); +// if cookie is not set for this topic, update view count and set cookie +if ( empty($topic_lastread[$topic_id]) ) { + $sql = 'UPDATE '.$xoopsDB->prefix('bb_topics').' SET topic_views = topic_views + 1 WHERE topic_id ='. $topic_id; + $xoopsDB->queryF($sql); +} +// Update cookie +newbb_add_topics_viewed($topic_lastread, $topic_id, time(), $bbCookie['path'], $bbCookie['domain'], $bbCookie['secure']); +include XOOPS_ROOT_PATH.'/footer.php'; +?> From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2950] CVS update: xoops2jp/html/modules/news/templates Message-ID: <20060501023729.700162AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/news/templates/news_archive.html diff -u xoops2jp/html/modules/news/templates/news_archive.html:1.1 xoops2jp/html/modules/news/templates/news_archive.html:1.2 --- xoops2jp/html/modules/news/templates/news_archive.html:1.1 Thu Sep 9 19:03:23 2004 +++ xoops2jp/html/modules/news/templates/news_archive.html Mon May 1 11:37:29 2006 @@ -24,7 +24,7 @@ <{foreach item=story from=$stories}> - "> + "> <{$story.title}><{$lang_printer}> <{$lang_sendstory}><{$story.counter}><{$story.date}> From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2951] CVS update: xoops2jp/html/modules/newbb/templates Message-ID: <20060501023729.4BBE52AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/newbb/templates/newbb_viewforum.html diff -u xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.2 xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.3 --- xoops2jp/html/modules/newbb/templates/newbb_viewforum.html:1.2 Sat Jun 11 11:32:47 2005 +++ xoops2jp/html/modules/newbb/templates/newbb_viewforum.html Mon May 1 11:37:29 2006 @@ -29,7 +29,7 @@ <{foreach item=topic from=$topics}> - "> + "> / <{$topic.topic_icon}>  <{$topic.topic_title}><{$topic.topic_page_jump}> From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2952] CVS update: xoops2jp/html/modules/system Message-ID: <20060501023729.9390A2AC3DA@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin.php diff -u xoops2jp/html/modules/system/admin.php:1.2 xoops2jp/html/modules/system/admin.php:1.3 --- xoops2jp/html/modules/system/admin.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin.php Mon May 1 11:37:29 2006 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - redirect_header(XOOPS_URL."/",3,_NOPERM); - exit(); - } - $admintest=1; + $xoopsModule =& XoopsModule::getByDirname("system"); + if ( !$xoopsUser->isAdmin($xoopsModule->mid()) ) { + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); + } + $admintest=1; } else { - redirect_header(XOOPS_URL."/",3,_NOPERM); - exit(); + redirect_header(XOOPS_URL."/",3,_NOPERM); + exit(); } // include system category definitions include_once XOOPS_ROOT_PATH."/modules/system/constants.php"; $error = false; if ($admintest != 0) { - if (isset($fct) && $fct != '') { - if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { - - if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { - include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; - } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { - include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; - } - include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; - $sysperm_handler =& xoops_gethandler('groupperm'); - $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; - unset($modversion); - if ($category > 0) { - $groups =& $xoopsUser->getGroups(); - if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ - if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) { - include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; - } else { - $error = true; - } - } else { - $error = true; - } - } elseif ($fct == 'version') { - if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { - include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; - } else { - $error = true; - } - } else { - $error = true; - } - } else { - $error = true; - } - } else { - $error = true; - } + if (isset($fct) && $fct != '') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php")) { + + if (file_exists(XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/".$xoopsConfig['language']."/admin/".$fct.".php"; + } elseif (file_exists(XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php")) { + include XOOPS_ROOT_PATH."/modules/system/language/english/admin/".$fct.".php"; + } + include XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/xoops_version.php"; + $sysperm_handler =& xoops_gethandler('groupperm'); + $category = !empty($modversion['category']) ? intval($modversion['category']) : 0; + unset($modversion); + if ($category > 0) { + $groups = $xoopsUser->getGroups(); + if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; + } else { + $error = true; + } + } else { + $error = true; + } + } elseif ($fct == 'version') { + if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/version/main.php")) { + include_once XOOPS_ROOT_PATH."/modules/system/admin/version/main.php"; + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } + } else { + $error = true; + } } if (false != $error) { - xoops_cp_header(); - echo "

System Configuration

"; - echo ''; - echo ''; - $groups = $xoopsUser->getGroups(); - $all_ok = false; - if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { - $sysperm_handler =& xoops_gethandler('groupperm'); - $ok_syscats =& $sysperm_handler->getItemIds('system_admin', $groups); - } else { - $all_ok = true; - } - $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; - $handle = opendir($admin_dir); - $counter = 0; - $class = 'even'; - while ($file = readdir($handle)) { - if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { - include $admin_dir.'/'.$file.'/xoops_version.php'; - if ($modversion['hasAdmin']) { - $category = isset($modversion['category']) ? intval($modversion['category']) : 0; - if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { - echo ""; - $counter++; - $class = ($class == 'even') ? 'odd' : 'even'; - } - if ( $counter > 4 ) { - $counter = 0; - echo ""; - echo ""; - } - } - unset($modversion); - } - } - while ($counter < 5) { - echo ''; - $class = ($class == 'even') ? 'odd' : 'even'; - $counter++; - } - echo '
"; - echo "" .trim($modversion['name'])."\n"; - echo "
 
'; + xoops_cp_header(); + echo "

System Configuration

"; + echo ''; + echo ''; + $groups = $xoopsUser->getGroups(); + $all_ok = false; + if (!in_array(XOOPS_GROUP_ADMIN, $groups)) { + $sysperm_handler =& xoops_gethandler('groupperm'); + $ok_syscats = $sysperm_handler->getItemIds('system_admin', $groups); + } else { + $all_ok = true; + } + $admin_dir = XOOPS_ROOT_PATH."/modules/system/admin"; + $handle = opendir($admin_dir); + $counter = 0; + $class = 'even'; + while ($file = readdir($handle)) { + if (strtolower($file) != 'cvs' && !preg_match("/[.]/", $file) && is_dir($admin_dir.'/'.$file)) { + include $admin_dir.'/'.$file.'/xoops_version.php'; + if ($modversion['hasAdmin']) { + $category = isset($modversion['category']) ? intval($modversion['category']) : 0; + if (false != $all_ok || in_array($modversion['category'], $ok_syscats)) { + echo ""; + $counter++; + $class = ($class == 'even') ? 'odd' : 'even'; + } + if ( $counter > 4 ) { + $counter = 0; + echo ""; + echo ""; + } + } + unset($modversion); + } + } + while ($counter < 5) { + echo ''; + $class = ($class == 'even') ? 'odd' : 'even'; + $counter++; + } + echo '
"; + echo "" .trim($modversion['name'])."\n"; + echo "
 
'; xoops_cp_footer(); } From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2953] CVS update: xoops2jp/html/modules/system/admin/blocksadmin Message-ID: <20060501023729.C68A32AC3DB@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/blocksadmin/main.php diff -u xoops2jp/html/modules/system/admin/blocksadmin/main.php:1.4 xoops2jp/html/modules/system/admin/blocksadmin/main.php:1.5 --- xoops2jp/html/modules/system/admin/blocksadmin/main.php:1.4 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/blocksadmin/main.php Mon May 1 11:37:29 2006 @@ -1,5 +1,5 @@ prefix('block_module_link').' (block_id, module_id) VALUES ('.$newid.', '.intval($bmid).')'; $db->query($sql); } - $groups =& $xoopsUser->getGroups(); + $groups = $xoopsUser->getGroups(); $count = count($groups); for ($i = 0; $i < $count; $i++) { $sql = "INSERT INTO ".$db->prefix('group_permission')." (gperm_groupid, gperm_itemid, gperm_name, gperm_modid) VALUES (".$groups[$i].", ".$newid.", 'block_read', 1)"; From onokazu @ users.sourceforge.jp Mon May 1 11:37:29 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:29 +0900 Subject: [xoops-cvslog 2954] CVS update: xoops2jp/html/modules/system/admin/findusers Message-ID: <20060501023729.ED1C02AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/findusers/main.php diff -u xoops2jp/html/modules/system/admin/findusers/main.php:1.5 xoops2jp/html/modules/system/admin/findusers/main.php:1.6 --- xoops2jp/html/modules/system/admin/findusers/main.php:1.5 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/findusers/main.php Mon May 1 11:37:29 2006 @@ -1,5 +1,5 @@ setOrder($order); $criteria->setLimit($limit); $criteria->setStart($start); - $foundusers =& $member_handler->getUsers($criteria, true); + $foundusers = $member_handler->getUsers($criteria, true); $ucount = 0; foreach (array_keys($foundusers) as $j) { if ($ucount % 2 == 0) { From onokazu @ users.sourceforge.jp Mon May 1 11:37:30 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:30 +0900 Subject: [xoops-cvslog 2955] CVS update: xoops2jp/html/modules/system/admin/groups Message-ID: <20060501023730.209812AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/groups/groups.php diff -u xoops2jp/html/modules/system/admin/groups/groups.php:1.4 xoops2jp/html/modules/system/admin/groups/groups.php:1.5 --- xoops2jp/html/modules/system/admin/groups/groups.php:1.4 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/groups/groups.php Mon May 1 11:37:29 2006 @@ -1,5 +1,5 @@ "._AM_EDITADG.""; $member_handler =& xoops_gethandler('member'); - $groups =& $member_handler->getGroups(); + $groups = $member_handler->getGroups(); echo ""; $count = count($groups); for ($i = 0; $i < $count; $i++) { @@ -104,8 +104,8 @@ $name_value = $thisgroup->getVar("name", "E"); $desc_value = $thisgroup->getVar("description", "E"); $moduleperm_handler =& xoops_gethandler('groupperm'); - $a_mod_value =& $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); - $r_mod_value =& $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); + $a_mod_value = $moduleperm_handler->getItemIds('module_admin', $thisgroup->getVar('groupid')); + $r_mod_value = $moduleperm_handler->getItemIds('module_read', $thisgroup->getVar('groupid')); $r_block_value =& XoopsBlock::getAllBlocksByGroup($thisgroup->getVar("groupid"), false); $op_value = "update"; $submit_value = _AM_UPDATEADG; @@ -117,7 +117,7 @@ } $sysperm_handler =& xoops_gethandler('groupperm'); - $s_cat_value =& $sysperm_handler->getItemIds('system_admin', $g_id); + $s_cat_value = $sysperm_handler->getItemIds('system_admin', $g_id); include XOOPS_ROOT_PATH."/modules/system/admin/groups/groupform.php"; echo "

"._AM_EDITMEMBER."

"; @@ -128,7 +128,7 @@ if ($usercount < 200 && $membercount < 200) { // do the old way only when counts are small $mlist = array(); - $members =& $member_handler->getUsersByGroup($g_id, false); + $members = $member_handler->getUsersByGroup($g_id, false); if (count($members) > 0) { $member_criteria = new Criteria('uid', "(".implode(',', $members).")", "IN"); $member_criteria->setSort('uname'); @@ -136,8 +136,8 @@ } $criteria = new Criteria('level', 0, '>'); $criteria->setSort('uname'); - $userslist =& $member_handler->getUserList($criteria); - $users =& array_diff($userslist, $mlist); + $userslist = $member_handler->getUserList($criteria); + $users = array_diff($userslist, $mlist); echo '
"._AM_EDITADG."
- <{cycle values=odd,even assign=class}> + <{cycle values="odd,even" assign="class"}> From onokazu @ users.sourceforge.jp Mon May 1 11:37:31 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:31 +0900 Subject: [xoops-cvslog 2962] CVS update: xoops2jp/html/themes/default Message-ID: <20060501023731.6BC802AC3DA@users.sourceforge.jp> Index: xoops2jp/html/themes/default/theme.html diff -u xoops2jp/html/themes/default/theme.html:1.4 xoops2jp/html/themes/default/theme.html:1.5 --- xoops2jp/html/themes/default/theme.html:1.4 Sat Jun 11 11:32:58 2005 +++ xoops2jp/html/themes/default/theme.html Mon May 1 11:37:31 2006 @@ -107,7 +107,7 @@
'._AM_NONMEMBERS.'
'; echo '
'._AM_MEMBERS.'
'; Index: xoops2jp/html/modules/system/admin/groups/main.php diff -u xoops2jp/html/modules/system/admin/groups/main.php:1.4 xoops2jp/html/modules/system/admin/groups/main.php:1.5 --- xoops2jp/html/modules/system/admin/groups/main.php:1.4 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/groups/main.php Mon May 1 11:37:29 2006 @@ -1,5 +1,5 @@ 0 && !in_array($g_id, array(XOOPS_GROUP_ADMIN, XOOPS_GROUP_USERS, XOOPS_GROUP_ANONYMOUS))) { @@ -224,13 +224,13 @@ redirect_header("admin.php?fct=groups&op=adminMain",1,_AM_DBUPDATED); break; case "addUser": - if(!XoopsMultiTokenHandler::quickValidate('groups_User')) - system_groups_error("Ticket Error"); + if(!XoopsMultiTokenHandler::quickValidate('groups_User')) + system_groups_error("Ticket Error"); $member_handler =& xoops_gethandler('member'); $groupid = intval($_POST['groupid']); if ($groupid > 0) { - $size = count($_POST['uids']); + $size = isset($_POST['uids']) ? count($_POST['uids']) : 0; for ( $i = 0; $i < $size; $i++ ) { $member_handler->addUserToGroup($_POST['groupid'], $_POST['uids'][$i]); } @@ -238,8 +238,8 @@ redirect_header("admin.php?fct=groups&op=modify&g_id=".$groupid, 0, _AM_DBUPDATED); break; case "delUser": - if(!XoopsMultiTokenHandler::quickValidate('groups_User')) - system_groups_error("Ticket Error"); + if(!XoopsMultiTokenHandler::quickValidate('groups_User')) + system_groups_error("Ticket Error"); $groupid = !empty($_POST['groupid']) ? intval($_POST['groupid']) : 0; if ($groupid > 0) { From onokazu @ users.sourceforge.jp Mon May 1 11:37:30 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:30 +0900 Subject: [xoops-cvslog 2956] CVS update: xoops2jp/html/modules/system/admin/modulesadmin Message-ID: <20060501023730.6BDFB2AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/modulesadmin/modulesadmin.php diff -u xoops2jp/html/modules/system/admin/modulesadmin/modulesadmin.php:1.4 xoops2jp/html/modules/system/admin/modulesadmin/modulesadmin.php:1.5 --- xoops2jp/html/modules/system/admin/modulesadmin/modulesadmin.php:1.4 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/modulesadmin/modulesadmin.php Mon May 1 11:37:30 2006 @@ -1,5 +1,5 @@ getGroups(); + $groups = $xoopsUser->getGroups(); // retrieve all block ids for this module $blocks =& XoopsBlock::getByModule($newmid, false); $msgs[] = 'Setting group rights...'; From onokazu @ users.sourceforge.jp Mon May 1 11:37:30 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:30 +0900 Subject: [xoops-cvslog 2957] CVS update: xoops2jp/html/modules/system/admin/mailusers Message-ID: <20060501023730.462672AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.4 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.5 --- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.4 Wed Aug 3 21:39:16 2005 +++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php Mon May 1 11:37:30 2006 @@ -1,5 +1,5 @@ isAdmin($xoopsModule->mid()) ) { - exit("Access Denied"); + exit("Access Denied"); } else { - include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; - $op = "form"; + include_once XOOPS_ROOT_PATH."/class/xoopsformloader.php"; + $op = "form"; - if (!empty($_POST['op']) && $_POST['op'] == "send") { - $op = $_POST['op']; - } - - if ( $op == "form" ) { - xoops_cp_header(); - //OpenTable(); - $display_criteria = 1; - include XOOPS_ROOT_PATH."/modules/system/admin/mailusers/mailform.php"; - $form->display(); - //CloseTable(); - xoops_cp_footer(); - } - - if ( $op == "send" && !empty($_POST['mail_send_to']) ) { - if(!XoopsSingleTokenHandler::quickValidate('mailusers_send')) { - xoops_cp_header(); - xoops_error("Ticket Error"); - xoops_cp_footer(); - exit(); - } - - $added = array(); - $added_id = array(); - $criteria = array(); - if ( !empty($_POST['mail_inactive']) ) { - $criteria[] = "level = 0"; - } else { - if (!empty($_POST['mail_mailok'])) { - $criteria[] = 'user_mailok = 1'; - } - if (!empty($_POST['mail_to_group'])) { - $member_handler =& xoops_gethandler('member'); - $user_list = array(); - foreach ($_POST['mail_to_group'] as $groupid ) { - $members =& $member_handler->getUsersByGroup($groupid, false); - // Mith: Changed this to not fetch user objects with getUsersByGroup - // as it is resource-intensive and all we want is the userIDs - $user_list = array_merge($members, $user_list); - - // RMV: changed this because makes more sense to me - // if options all grouped by 'AND', not 'OR' - /* - foreach ($members as $member) { - if (!in_array($member->getVar('uid'), $user_list)) { - $user_list[] = $member->getVar('uid'); - } - } - */ - // if (!in_array($member->getVar('uid'), $added_id) ) { - // $added_id[] = $member->getVar('uid'); - // $added[] =& $member; - // unset($member); - // } - //} - } - if (!empty($user_list)) { - $criteria[] = 'uid IN (' . join(',', $user_list) . ')'; - } - } - if ( !empty($_POST['mail_lastlog_min']) ) { - $f_mail_lastlog_min = trim($_POST['mail_lastlog_min']); - $time = mktime(0,0,0,substr($f_mail_lastlog_min,5,2),substr($f_mail_lastlog_min,8,2),substr($f_mail_lastlog_min,0,4)); - if ( $time > 0 ) { - $criteria[] = "last_login > $time"; - } - } - if ( !empty($_POST['mail_lastlog_max']) ) { - $f_mail_lastlog_max = trim($_POST['mail_lastlog_max']); - $time = mktime(0,0,0,substr($f_mail_lastlog_max,5,2),substr($f_mail_lastlog_max,8,2),substr($f_mail_lastlog_max,0,4)); - if ( $time > 0 ) { - $criteria[] = "last_login < $time"; - } - } - if ( !empty($_POST['mail_idle_more']) && is_numeric($_POST['mail_idle_more']) ) { - $f_mail_idle_more = intval(trim($_POST['mail_idle_more'])); - $time = 60 * 60 * 24 * $f_mail_idle_more; - $time = time() - $time; - if ( $time > 0 ) { - $criteria[] = "last_login < $time"; - } - } - if ( !empty($_POST['mail_idle_less']) && is_numeric($_POST['mail_idle_less']) ) { - $f_mail_idle_less = intval(trim($_POST['mail_idle_less'])); - $time = 60 * 60 * 24 * $f_mail_idle_less; - $time = time() - $time; - if ( $time > 0 ) { - $criteria[] = "last_login > $time"; - } - } - } - if ( !empty($_POST['mail_regd_min']) ) { - $f_mail_regd_min = trim($_POST['mail_regd_min']); - $time = mktime(0,0,0,substr($f_mail_regd_min,5,2),substr($f_mail_regd_min,8,2),substr($f_mail_regd_min,0,4)); - if ( $time > 0 ) { - $criteria[] = "user_regdate > $time"; - } - } - if ( !empty($_POST['mail_regd_max']) ) { - $f_mail_regd_max = trim($_POST['mail_regd_max']); - $time = mktime(0,0,0,substr($f_mail_regd_max,5,2),substr($f_mail_regd_max,8,2),substr($f_mail_regd_max,0,4)); - if ( $time > 0 ) { - $criteria[] = "user_regdate < $time"; - } - } - if ( !empty($criteria) ) { - if ( empty($_POST['mail_inactive']) ) { - $criteria[] = "level > 0"; - } - $criteria_object = new CriteriaCompo(); - foreach ($criteria as $c) { - list ($field, $op, $value) = split(' ', $c); - $criteria_object->add(new Criteria($field,$value,$op), 'AND'); - } - $member_handler =& xoops_gethandler('member'); - $getusers =& $member_handler->getUsers($criteria_object); - foreach ($getusers as $getuser) { - if ( !in_array($getuser->getVar("uid"), $added_id) ) { - $added[] = $getuser; - $added_id[] = $getuser->getVar("uid"); - } - } - } - if ( !empty($_POST['mail_to_user']) ) { - foreach ($_POST['mail_to_user'] as $to_user) { - if ( !in_array($to_user, $added_id) ) { - $added[] = new XoopsUser($to_user); - $added_id[] = $to_user; - } - } - } - $added_count = count($added); - xoops_cp_header(); - //OpenTable(); - if ( $added_count > 0 ) { - $mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0; - $mail_end = ($added_count > ($mail_start + SEND_SIM_PROCESS_AMMO)) ? ($mail_start + SEND_SIM_PROCESS_AMMO) : $added_count; - $myts =& MyTextSanitizer::getInstance(); - $xoopsMailer =& getMailer(); - for ( $i = $mail_start; $i < $mail_end; $i++) { - $xoopsMailer->setToUsers($added[$i]); - } - $xoopsMailer->setFromName($myts->oopsStripSlashesGPC($_POST['mail_fromname'])); - $xoopsMailer->setFromEmail($myts->oopsStripSlashesGPC($_POST['mail_fromemail'])); - $xoopsMailer->setSubject($myts->oopsStripSlashesGPC($_POST['mail_subject'])); - $xoopsMailer->setBody($myts->oopsStripSlashesGPC($_POST['mail_body'])); - if ( in_array("mail", $_POST['mail_send_to']) ) { - $xoopsMailer->useMail(); - } - if ( in_array("pm", $_POST['mail_send_to']) && empty($_POST['mail_inactive']) ) { - $xoopsMailer->usePM(); - } - $xoopsMailer->send(true); - echo $xoopsMailer->getSuccess(); - echo $xoopsMailer->getErrors(); - - - if ( $added_count > $mail_end ) { - $form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers"); - $form->addElement(new XoopsFormToken(XoopsSingleTokenHandler::quickCreate('mailusers_send'))); - if ( !empty($_POST['mail_to_group']) ) { - foreach ( $_POST['mail_to_group'] as $mailgroup) { - $group_hidden = new XoopsFormHidden("mail_to_group[]", $mailgroup); - $form->addElement($group_hidden); - } - } - if(isset($_POST['mail_inactive'])) - $form->addElement(new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive']))); - if(isset($_POST['mail_mailok'])) - $form->addElement(new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok']))); - $lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min'])); - $lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max'])); - $regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); - $regd_max_hidden = new XoopsFormHidden("mail_regd_max", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); - $idle_more_hidden = new XoopsFormHidden("mail_idle_more", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_more'])); - $idle_less_hidden = new XoopsFormHidden("mail_idle_less", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_less'])); - $fname_hidden = new XoopsFormHidden("mail_fromname", $myts->makeTboxData4PreviewInForm($_POST['mail_fromname'])); - $femail_hidden = new XoopsFormHidden("mail_fromemail", $myts->makeTboxData4PreviewInForm($_POST['mail_fromemail'])); - $subject_hidden = new XoopsFormHidden("mail_subject", $myts->makeTboxData4PreviewInForm($_POST['mail_subject'])); - $body_hidden = new XoopsFormHidden("mail_body", $myts->makeTareaData4PreviewInForm($_POST['mail_body'])); - $start_hidden = new XoopsFormHidden("mail_start", $mail_end); - $to_hidden = new XoopsFormHidden("mail_send_to[]", "mail"); - $op_hidden = new XoopsFormHidden("op", "send"); - $submit_button = new XoopsFormButton("", "mail_submit", _AM_SENDNEXT, "submit"); - $sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count)); - $form->addElement($sent_label); - $form->addElement($lastlog_min_hidden); - $form->addElement($lastlog_max_hidden); - $form->addElement($regd_min_hidden); - $form->addElement($regd_max_hidden); - $form->addElement($idle_more_hidden); - $form->addElement($idle_less_hidden); - $form->addElement($fname_hidden); - $form->addElement($femail_hidden); - $form->addElement($subject_hidden); - $form->addElement($body_hidden); - $form->addElement($to_hidden); - $form->addElement($op_hidden); - $form->addElement($start_hidden); - $form->addElement($submit_button); - $form->display(); - } else { - echo "

"._AM_SENDCOMP."

"; - } - } else { - echo "

"._AM_NOUSERMATCH."

"; - } - //CloseTable(); - xoops_cp_footer(); - } + if (!empty($_POST['op']) && $_POST['op'] == "send") { + $op = $_POST['op']; + } + + if ( $op == "form" ) { + xoops_cp_header(); + //OpenTable(); + $display_criteria = 1; + include XOOPS_ROOT_PATH."/modules/system/admin/mailusers/mailform.php"; + $form->display(); + //CloseTable(); + xoops_cp_footer(); + } + + if ( $op == "send" && !empty($_POST['mail_send_to']) ) { + if(!XoopsSingleTokenHandler::quickValidate('mailusers_send')) { + xoops_cp_header(); + xoops_error("Ticket Error"); + xoops_cp_footer(); + exit(); + } + + $added = array(); + $added_id = array(); + $criteria = array(); + if ( !empty($_POST['mail_inactive']) ) { + $criteria[] = "level = 0"; + } else { + if (!empty($_POST['mail_mailok'])) { + $criteria[] = 'user_mailok = 1'; + } + if (!empty($_POST['mail_to_group'])) { + $member_handler =& xoops_gethandler('member'); + $user_list = array(); + foreach ($_POST['mail_to_group'] as $groupid ) { + $members = $member_handler->getUsersByGroup($groupid, false); + // Mith: Changed this to not fetch user objects with getUsersByGroup + // as it is resource-intensive and all we want is the userIDs + $user_list = array_merge($members, $user_list); + + // RMV: changed this because makes more sense to me + // if options all grouped by 'AND', not 'OR' + /* + foreach ($members as $member) { + if (!in_array($member->getVar('uid'), $user_list)) { + $user_list[] = $member->getVar('uid'); + } + } + */ + // if (!in_array($member->getVar('uid'), $added_id) ) { + // $added_id[] = $member->getVar('uid'); + // $added[] =& $member; + // unset($member); + // } + //} + } + if (!empty($user_list)) { + $criteria[] = 'uid IN (' . join(',', $user_list) . ')'; + } + } + if ( !empty($_POST['mail_lastlog_min']) ) { + $f_mail_lastlog_min = trim($_POST['mail_lastlog_min']); + $time = mktime(0,0,0,substr($f_mail_lastlog_min,5,2),substr($f_mail_lastlog_min,8,2),substr($f_mail_lastlog_min,0,4)); + if ( $time > 0 ) { + $criteria[] = "last_login > $time"; + } + } + if ( !empty($_POST['mail_lastlog_max']) ) { + $f_mail_lastlog_max = trim($_POST['mail_lastlog_max']); + $time = mktime(0,0,0,substr($f_mail_lastlog_max,5,2),substr($f_mail_lastlog_max,8,2),substr($f_mail_lastlog_max,0,4)); + if ( $time > 0 ) { + $criteria[] = "last_login < $time"; + } + } + if ( !empty($_POST['mail_idle_more']) && is_numeric($_POST['mail_idle_more']) ) { + $f_mail_idle_more = intval(trim($_POST['mail_idle_more'])); + $time = 60 * 60 * 24 * $f_mail_idle_more; + $time = time() - $time; + if ( $time > 0 ) { + $criteria[] = "last_login < $time"; + } + } + if ( !empty($_POST['mail_idle_less']) && is_numeric($_POST['mail_idle_less']) ) { + $f_mail_idle_less = intval(trim($_POST['mail_idle_less'])); + $time = 60 * 60 * 24 * $f_mail_idle_less; + $time = time() - $time; + if ( $time > 0 ) { + $criteria[] = "last_login > $time"; + } + } + } + if ( !empty($_POST['mail_regd_min']) ) { + $f_mail_regd_min = trim($_POST['mail_regd_min']); + $time = mktime(0,0,0,substr($f_mail_regd_min,5,2),substr($f_mail_regd_min,8,2),substr($f_mail_regd_min,0,4)); + if ( $time > 0 ) { + $criteria[] = "user_regdate > $time"; + } + } + if ( !empty($_POST['mail_regd_max']) ) { + $f_mail_regd_max = trim($_POST['mail_regd_max']); + $time = mktime(0,0,0,substr($f_mail_regd_max,5,2),substr($f_mail_regd_max,8,2),substr($f_mail_regd_max,0,4)); + if ( $time > 0 ) { + $criteria[] = "user_regdate < $time"; + } + } + if ( !empty($criteria) ) { + if ( empty($_POST['mail_inactive']) ) { + $criteria[] = "level > 0"; + } + $criteria_object = new CriteriaCompo(); + foreach ($criteria as $c) { + list ($field, $op, $value) = split(' ', $c); + $criteria_object->add(new Criteria($field,$value,$op), 'AND'); + } + $member_handler =& xoops_gethandler('member'); + $getusers = $member_handler->getUsers($criteria_object); + foreach (array_keys($getusers) as $i) { + if ( !in_array($getusers[$i]->getVar("uid"), $added_id) ) { + $added[] =& $getusers[$i]; + $added_id[] = $getusers[$i]->getVar("uid"); + } + } + } + if ( !empty($_POST['mail_to_user']) ) { + foreach ($_POST['mail_to_user'] as $to_user) { + if ( !in_array($to_user, $added_id) ) { + $added[] =& new XoopsUser($to_user); + $added_id[] = $to_user; + } + } + } + $added_count = count($added); + xoops_cp_header(); + //OpenTable(); + if ( $added_count > 0 ) { + $mail_start = !empty($_POST['mail_start']) ? $_POST['mail_start'] : 0; + $mail_end = ($added_count > ($mail_start + SEND_SIM_PROCESS_AMMO)) ? ($mail_start + SEND_SIM_PROCESS_AMMO) : $added_count; + $myts =& MyTextSanitizer::getInstance(); + $xoopsMailer =& getMailer(); + for ( $i = $mail_start; $i < $mail_end; $i++) { + $xoopsMailer->setToUsers($added[$i]); + } + $xoopsMailer->setFromName($myts->oopsStripSlashesGPC($_POST['mail_fromname'])); + $xoopsMailer->setFromEmail($myts->oopsStripSlashesGPC($_POST['mail_fromemail'])); + $xoopsMailer->setSubject($myts->oopsStripSlashesGPC($_POST['mail_subject'])); + $xoopsMailer->setBody($myts->oopsStripSlashesGPC($_POST['mail_body'])); + if ( in_array("mail", $_POST['mail_send_to']) ) { + $xoopsMailer->useMail(); + } + if ( in_array("pm", $_POST['mail_send_to']) && empty($_POST['mail_inactive']) ) { + $xoopsMailer->usePM(); + } + $xoopsMailer->send(true); + echo $xoopsMailer->getSuccess(); + echo $xoopsMailer->getErrors(); + + + if ( $added_count > $mail_end ) { + $form = new XoopsThemeForm(_AM_SENDMTOUSERS, "mailusers", "admin.php?fct=mailusers"); + $form->addElement(new XoopsFormToken(XoopsSingleTokenHandler::quickCreate('mailusers_send'))); + if ( !empty($_POST['mail_to_group']) ) { + foreach ( $_POST['mail_to_group'] as $mailgroup) { + $group_hidden = new XoopsFormHidden("mail_to_group[]", $mailgroup); + $form->addElement($group_hidden); + } + } + if(isset($_POST['mail_inactive'])) + $form->addElement(new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive']))); + if(isset($_POST['mail_mailok'])) + $form->addElement(new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok']))); + $lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min'])); + $lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max'])); + $regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); + $regd_max_hidden = new XoopsFormHidden("mail_regd_max", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max'])); + $idle_more_hidden = new XoopsFormHidden("mail_idle_more", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_more'])); + $idle_less_hidden = new XoopsFormHidden("mail_idle_less", $myts->makeTboxData4PreviewInForm($_POST['mail_idle_less'])); + $fname_hidden = new XoopsFormHidden("mail_fromname", $myts->makeTboxData4PreviewInForm($_POST['mail_fromname'])); + $femail_hidden = new XoopsFormHidden("mail_fromemail", $myts->makeTboxData4PreviewInForm($_POST['mail_fromemail'])); + $subject_hidden = new XoopsFormHidden("mail_subject", $myts->makeTboxData4PreviewInForm($_POST['mail_subject'])); + $body_hidden = new XoopsFormHidden("mail_body", $myts->makeTareaData4PreviewInForm($_POST['mail_body'])); + $start_hidden = new XoopsFormHidden("mail_start", $mail_end); + $to_hidden = new XoopsFormHidden("mail_send_to[]", "mail"); + $op_hidden = new XoopsFormHidden("op", "send"); + $submit_button = new XoopsFormButton("", "mail_submit", _AM_SENDNEXT, "submit"); + $sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count)); + $form->addElement($sent_label); + $form->addElement($lastlog_min_hidden); + $form->addElement($lastlog_max_hidden); + $form->addElement($regd_min_hidden); + $form->addElement($regd_max_hidden); + $form->addElement($idle_more_hidden); + $form->addElement($idle_less_hidden); + $form->addElement($fname_hidden); + $form->addElement($femail_hidden); + $form->addElement($subject_hidden); + $form->addElement($body_hidden); + $form->addElement($to_hidden); + $form->addElement($op_hidden); + $form->addElement($start_hidden); + $form->addElement($submit_button); + $form->display(); + } else { + echo "

"._AM_SENDCOMP."

"; + } + } else { + echo "

"._AM_NOUSERMATCH."

"; + } + //CloseTable(); + xoops_cp_footer(); + } } ?> From onokazu @ users.sourceforge.jp Mon May 1 11:37:30 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:30 +0900 Subject: [xoops-cvslog 2958] CVS update: xoops2jp/html/modules/system/admin/preferences Message-ID: <20060501023730.97EA62AC3DA@users.sourceforge.jp> Index: xoops2jp/html/modules/system/admin/preferences/main.php diff -u xoops2jp/html/modules/system/admin/preferences/main.php:1.5 xoops2jp/html/modules/system/admin/preferences/main.php:1.6 --- xoops2jp/html/modules/system/admin/preferences/main.php:1.5 Mon Sep 5 05:46:11 2005 +++ xoops2jp/html/modules/system/admin/preferences/main.php Mon May 1 11:37:30 2006 @@ -1,5 +1,5 @@ 0) { for ($i = 0; $i < $count; $i++) { + $config_handler=&xoops_gethandler('config'); $config =& $config_handler->getConfig($conf_ids[$i]); $new_value =& $_POST[$config->getVar('conf_name')]; if (is_array($new_value) || $new_value != $config->getVar('conf_value')) { From onokazu @ users.sourceforge.jp Mon May 1 11:37:30 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:30 +0900 Subject: [xoops-cvslog 2959] CVS update: xoops2jp/html/modules/system/admin/users Message-ID: <20060501023730.CCEAC2AC266@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.7 --- 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 Mon May 1 11:37:30 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 onokazu @ users.sourceforge.jp Mon May 1 11:37:31 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:31 +0900 Subject: [xoops-cvslog 2960] CVS update: xoops2jp/html/modules/system/blocks Message-ID: <20060501023731.291D82AC266@users.sourceforge.jp> Index: xoops2jp/html/modules/system/blocks/system_blocks.php diff -u xoops2jp/html/modules/system/blocks/system_blocks.php:1.7 xoops2jp/html/modules/system/blocks/system_blocks.php:1.8 --- xoops2jp/html/modules/system/blocks/system_blocks.php:1.7 Tue Oct 25 11:57:28 2005 +++ xoops2jp/html/modules/system/blocks/system_blocks.php Mon May 1 11:37:30 2006 @@ -1,5 +1,5 @@ getObjects($criteria, true); $moduleperm_handler =& xoops_gethandler('groupperm'); $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; - $read_allowed =& $moduleperm_handler->getItemIds('module_read', $groups); + $read_allowed = $moduleperm_handler->getItemIds('module_read', $groups); foreach (array_keys($modules) as $i) { if (in_array($i, $read_allowed)) { $block['modules'][$i]['name'] = $modules[$i]->getVar('name'); From onokazu @ users.sourceforge.jp Mon May 1 11:37:31 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:31 +0900 Subject: [xoops-cvslog 2961] CVS update: xoops2jp/html/modules/system/templates Message-ID: <20060501023731.4A9C02AC3CD@users.sourceforge.jp> Index: xoops2jp/html/modules/system/templates/system_notification_list.html diff -u xoops2jp/html/modules/system/templates/system_notification_list.html:1.2 xoops2jp/html/modules/system/templates/system_notification_list.html:1.3 --- xoops2jp/html/modules/system/templates/system_notification_list.html:1.2 Mon Sep 5 05:46:12 2005 +++ xoops2jp/html/modules/system/templates/system_notification_list.html Mon May 1 11:37:31 2006 @@ -17,7 +17,7 @@ <{foreach item=item from=$category.items}> <{foreach item=notification from=$item.notifications}>
<{$notification.event_title}> <{$notification.category_title}>
- +
From onokazu @ users.sourceforge.jp Mon May 1 11:37:31 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:31 +0900 Subject: [xoops-cvslog 2963] CVS update: xoops2jp/html/themes/x2t Message-ID: <20060501023731.8D1862AC266@users.sourceforge.jp> Index: xoops2jp/html/themes/x2t/theme.html diff -u xoops2jp/html/themes/x2t/theme.html:1.1 xoops2jp/html/themes/x2t/theme.html:1.2 --- xoops2jp/html/themes/x2t/theme.html:1.1 Thu Sep 9 21:08:13 2004 +++ xoops2jp/html/themes/x2t/theme.html Mon May 1 11:37:31 2006 @@ -35,8 +35,8 @@ - - + +
HomeXOOPS SupportXOOPS FAQXOOPS Cube ForumsXOOPS Cube Support
From onokazu @ users.sourceforge.jp Mon May 1 11:37:31 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Mon, 1 May 2006 11:37:31 +0900 Subject: [xoops-cvslog 2964] CVS update: xoops2jp/html/images/banners Message-ID: <20060501023731.B208E2AC3CD@users.sourceforge.jp> Index: xoops2jp/html/images/banners/banner.swf Index: xoops2jp/html/images/banners/xoops_banner.gif Index: xoops2jp/html/images/banners/xoops_banner_2.gif From minahito @ users.sourceforge.jp Tue May 9 19:19:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:19:23 +0900 Subject: [xoops-cvslog 2965] CVS update: xoops2jp/html/modules/base/.xml/data Message-ID: <20060509101923.987BA2AC03C@users.sourceforge.jp> From minahito @ users.sourceforge.jp Tue May 9 19:19:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:19:25 +0900 Subject: [xoops-cvslog 2966] CVS update: xoops2jp/html/modules/base/.xml/data Message-ID: <20060509101925.B1AA42AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/data/imagecategory.cbs.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/data/imagecategory.cbs.xml:1.1.2.1 --- /dev/null Tue May 9 19:19:25 2006 +++ xoops2jp/html/modules/base/.xml/data/imagecategory.cbs.xml Tue May 9 19:19:25 2006 @@ -0,0 +1,22 @@ +鏤??xml version="1.0" encoding="utf-8"?> + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file Index: xoops2jp/html/modules/base/.xml/data/image.cbs.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/data/image.cbs.xml:1.1.2.1 --- /dev/null Tue May 9 19:19:25 2006 +++ xoops2jp/html/modules/base/.xml/data/image.cbs.xml Tue May 9 19:19:25 2006 @@ -0,0 +1,16 @@ +鏤??xml version="1.0" encoding="utf-8"?> + + + + + + + + + + + + + + + \ No newline at end of file From minahito @ users.sourceforge.jp Tue May 9 19:19:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:19:58 +0900 Subject: [xoops-cvslog 2967] CVS update: xoops2jp/html/modules/base/admin Message-ID: <20060509101958.390FE2AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/menu.php diff -u xoops2jp/html/modules/base/admin/menu.php:1.1.2.9 xoops2jp/html/modules/base/admin/menu.php:1.1.2.10 --- xoops2jp/html/modules/base/admin/menu.php:1.1.2.9 Wed Apr 5 19:57:11 2006 +++ xoops2jp/html/modules/base/admin/menu.php Tue May 9 19:19:58 2006 @@ -1,6 +1,6 @@ From minahito @ users.sourceforge.jp Tue May 9 19:20:23 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:20:23 +0900 Subject: [xoops-cvslog 2968] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060509102023.9F6B32AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImagecategoryEditAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImagecategoryEditAction.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:23 2006 +++ xoops2jp/html/modules/base/admin/actions/ImagecategoryEditAction.class.php Tue May 9 19:20:23 2006 @@ -0,0 +1,59 @@ +mObject->loadReadGroups(); + $this->mObject->loadUploadGroups(); + } + + function _setupActionForm() + { + $this->mActionForm = $this->mObject->isNew() ? new Legacy_ImagecategoryAdminNewForm() + : new Legacy_ImagecategoryAdminEditForm(); + + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("imagecategory_edit.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + + $handler =& xoops_gethandler('group'); + $groupArr =& $handler->getObjects(); + $render->setAttribute('groupArr', $groupArr); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=ImagecategoryList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=ImagecategoryList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/base/admin/actions/ImagecategoryDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImagecategoryDeleteAction.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:23 2006 +++ xoops2jp/html/modules/base/admin/actions/ImagecategoryDeleteAction.class.php Tue May 9 19:20:23 2006 @@ -0,0 +1,46 @@ +mActionForm =& new Legacy_ImagecategoryAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("imagecategory_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + #cubson::lazy_load('imagecategory', $this->mObject); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=ImagecategoryList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=ImagecategoryList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> Index: xoops2jp/html/modules/base/admin/actions/ImagecategoryListAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImagecategoryListAction.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:23 2006 +++ xoops2jp/html/modules/base/admin/actions/ImagecategoryListAction.class.php Tue May 9 19:20:23 2006 @@ -0,0 +1,38 @@ +setTemplateName("imagecategory_list.html"); + #cubson::lazy_load_array('imagecategory', $this->mObjects); + $render->setAttribute("objects", $this->mObjects); + $render->setAttribute("pageNavi", $this->mNavi); + + } +} + +?> From minahito @ users.sourceforge.jp Tue May 9 19:20:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:20:45 +0900 Subject: [xoops-cvslog 2969] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060509102045.1B3892AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminEditForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminEditForm.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:45 2006 +++ xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminEditForm.class.php Tue May 9 19:20:44 2006 @@ -0,0 +1,131 @@ +get('imgcat_id'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); + $this->mFormProperties['imgcat_name'] =& new XCube_StringProperty('imgcat_name'); + $this->mFormProperties['imgcat_maxsize'] =& new XCube_IntProperty('imgcat_maxsize'); + $this->mFormProperties['imgcat_maxwidth'] =& new XCube_IntProperty('imgcat_maxwidth'); + $this->mFormProperties['imgcat_maxheight'] =& new XCube_IntProperty('imgcat_maxheight'); + $this->mFormProperties['imgcat_display'] =& new XCube_BoolProperty('imgcat_display'); + $this->mFormProperties['imgcat_weight'] =& new XCube_IntProperty('imgcat_weight'); + $this->mFormProperties['readgroups'] =& new XCube_IntArrayProperty('readgroups'); + $this->mFormProperties['uploadgroups'] =& new XCube_IntArrayProperty('uploadgroups'); + + // + // Set field properties + // + $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); + + $this->mFieldProperties['imgcat_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_name']->setDependsByArray(array('required','maxlength')); + $this->mFieldProperties['imgcat_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_NAME, '100'); + $this->mFieldProperties['imgcat_name']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMGCAT_NAME, '100'); + $this->mFieldProperties['imgcat_name']->addVar('maxlength', '100'); + + $this->mFieldProperties['imgcat_maxsize'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_maxsize']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_maxsize']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_MAXSIZE); + + $this->mFieldProperties['imgcat_maxwidth'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_maxwidth']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_maxwidth']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_MAXWIDTH); + + $this->mFieldProperties['imgcat_maxheight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_maxheight']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_maxheight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_MAXHEIGHT); + + $this->mFieldProperties['imgcat_weight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_weight']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_WEIGHT); + + $this->mFieldProperties['readgroups'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['readgroups']->setDependsByArray(array('objectExist')); + $this->mFieldProperties['readgroups']->addMessage('objectExist', _AD_BASE_ERROR_IMGCAT_READ_GROUPS, _AD_BASE_LANG_IMGCAT_READ_GROUPS); + $this->mFieldProperties['readgroups']->addVar('handler', 'group'); + + $this->mFieldProperties['uploadgroups'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['uploadgroups']->setDependsByArray(array('objectExist')); + $this->mFieldProperties['uploadgroups']->addMessage('objectExist', _AD_BASE_ERROR_IMGCAT_READ_GROUPS, _AD_BASE_LANG_IMGCAT_READ_GROUPS); + $this->mFieldProperties['uploadgroups']->addVar('handler', 'group'); + } + + function validateReadgroups() + { + $readgroups = $this->get('readgroups'); + if (count($readgroups) == 0) { + $this->addErrorMessage(_AD_BASE_ERROR_READGROUPS); + } + } + + function validateUploadgroups() + { + $uploadgroups = $this->get('uploadgroups'); + if (count($uploadgroups) == 0) { + $this->addErrorMessage(_AD_BASE_ERROR_UPLOADGROUPS); + } + } + + function load(&$obj) + { + $this->set('imgcat_id', $obj->get('imgcat_id')); + $this->set('imgcat_name', $obj->get('imgcat_name')); + $this->set('imgcat_maxsize', $obj->get('imgcat_maxsize')); + $this->set('imgcat_maxwidth', $obj->get('imgcat_maxwidth')); + $this->set('imgcat_maxheight', $obj->get('imgcat_maxheight')); + $this->set('imgcat_display', $obj->get('imgcat_display')); + $this->set('imgcat_weight', $obj->get('imgcat_weight')); + + $i = 0; + foreach ($obj->mReadGroups as $group) { + $this->set('readgroups', $i++, $group->get('groupid')); + } + + $i = 0; + foreach ($obj->mUploadGroups as $group) { + $this->set('uploadgroups', $i++, $group->get('groupid')); + } + } + + function update(&$obj) + { + $obj->set('imgcat_id', $this->get('imgcat_id')); + $obj->set('imgcat_name', $this->get('imgcat_name')); + $obj->set('imgcat_maxsize', $this->get('imgcat_maxsize')); + $obj->set('imgcat_maxwidth', $this->get('imgcat_maxwidth')); + $obj->set('imgcat_maxheight', $this->get('imgcat_maxheight')); + $obj->set('imgcat_display', $this->get('imgcat_display')); + $obj->set('imgcat_weight', $this->get('imgcat_weight')); + + $handler =& xoops_gethandler('group'); + + unset($obj->mReadGroups); + foreach ($this->get('readgroups') as $groupid) { + $obj->mReadGroups[] =& $handler->get($groupid); + } + + unset($obj->mUploadGroups); + foreach ($this->get('uploadgroups') as $groupid) { + $obj->mUploadGroups[] =& $handler->get($groupid); + } + } +} + +?> Index: xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:45 2006 +++ xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php Tue May 9 19:20:44 2006 @@ -0,0 +1,48 @@ +mFormProperties['imgcat_storetype'] =& new XCube_StringProperty('imgcat_storetype'); + + // + // Set field properties + // + $this->mFieldProperties['imgcat_storetype'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_storetype']->setDependsByArray(array('required','mask')); + $this->mFieldProperties['imgcat_storetype']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_STORETYPE); + $this->mFieldProperties['imgcat_storetype']->addMessage('mask', _AD_BASE_ERROR_MASK, _AD_BASE_LANG_IMGCAT_STORETYPE); + $this->mFieldProperties['imgcat_storetype']->addVar('mask', '(file|db)'); + } + + function load(&$obj) + { + parent::load($obj); + $this->set('imgcat_storetype', $obj->get('imgcat_storetype')); + } + + function update(&$obj) + { + parent::update($obj); + $this->set('imgcat_storetype', $obj->get('imgcat_storetype')); + } +} + +?> Index: xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminDeleteForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminDeleteForm.class.php:1.1.2.1 --- /dev/null Tue May 9 19:20:45 2006 +++ xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminDeleteForm.class.php Tue May 9 19:20:44 2006 @@ -0,0 +1,42 @@ +get('imgcat_id'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); + + // + // Set field properties + // + + $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); + } + + function load(&$obj) + { + $this->set('imgcat_id', $obj->get('imgcat_id')); + } + + function update(&$obj) + { + $obj->set('imgcat_id', $this->get('imgcat_id')); + } +} + +?> From minahito @ users.sourceforge.jp Tue May 9 19:21:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:21:00 +0900 Subject: [xoops-cvslog 2970] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060509102100.553872AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.1 --- /dev/null Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html Tue May 9 19:21:00 2006 @@ -0,0 +1,100 @@ +
+ <{$smarty.const._MI_BASE_NAME}> + »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}> + <{if $actionForm->get('imgcat_id')}> + »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_EDIT}> + <{else}> + »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_NEW}> + <{/if}> +
+ +<{if $actionForm->get('imgcat_id')}> +

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_EDIT}>

+<{else}> +

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_NEW}>

+
<{$smarty.const._AD_BASE_TIPS_IMGCAT_STORETYPE}>
+<{/if}> + + + + +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> +
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <{if $actionForm->get('imgcat_id') == 0}> + + + + + <{/if}> + + + +
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}>"> + <{xoops_input type=text name=imgcat_name value=$actionForm->get('imgcat_name') size=15 maxlength=100}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_READ_GROUPS}>"> + +
<{$smarty.const._AD_BASE_LANG_IMGCAT_UPLOAD_GROUPS}>"> + +
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}>"> + <{xoops_input type=text name=imgcat_maxsize value=$actionForm->get('imgcat_maxsize')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}>"> + <{xoops_input type=text name=imgcat_maxwidth value=$actionForm->get('imgcat_maxwidth')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}>"> + <{xoops_input type=text name=imgcat_maxheight value=$actionForm->get('imgcat_maxheight')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}>"> + <{xoops_input type=checkbox name=imgcat_display value=1 default=$actionForm->get('imgcat_display')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}>"> + <{xoops_input type=text name=imgcat_weight value=$actionForm->get('imgcat_weight')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}>"> + <{xoops_input type=radio name=imgcat_storetype value="file" default=$actionForm->get('imgcat_storetype')}>FILE
+ <{xoops_input type=radio name=imgcat_storetype value="db" default=$actionForm->get('imgcat_storetype')}>DB +
+ + +
+
Index: xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.1 --- /dev/null Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html Tue May 9 19:21:00 2006 @@ -0,0 +1,58 @@ +
+ <{$smarty.const._MI_BASE_NAME}> + »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}> + »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}> +
+ +

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}>

+ +

<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>"><{$object->getVar('imgcat_id')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}>"><{$object->getVar('imgcat_name')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}>"><{$object->getVar('imgcat_maxsize')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}>"><{$object->getVar('imgcat_maxwidth')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}>"><{$object->getVar('imgcat_maxheight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}>"><{$object->getVar('imgcat_display')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}>"><{$object->getVar('imgcat_weight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_TYPE}>"><{$object->getVar('imgcat_type')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}>"><{$object->getVar('imgcat_storetype')}>

+
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> + + +
+
Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.1 --- /dev/null Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Tue May 9 19:21:00 2006 @@ -0,0 +1,61 @@ + + +

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

+ + +
+ + + + + + + + + + + + + + + <{foreach item=obj from=$objects}> + + + + + + + + + + + + + <{/foreach}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_TYPE}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('imgcat_id')}><{$obj->getVar('imgcat_name')}><{$obj->getVar('imgcat_maxsize')}><{$obj->getVar('imgcat_maxwidth')}><{$obj->getVar('imgcat_maxheight')}><{$obj->getVar('imgcat_display')}><{$obj->getVar('imgcat_weight')}><{$obj->getVar('imgcat_type')}><{$obj->getVar('imgcat_storetype')}> + " alt="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" /> +
+
+
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Tue May 9 19:21:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:21:10 +0900 Subject: [xoops-cvslog 2971] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060509102110.7BB322AC03C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/image.php diff -u /dev/null xoops2jp/html/modules/base/class/image.php:1.1.2.1 --- /dev/null Tue May 9 19:21:10 2006 +++ xoops2jp/html/modules/base/class/image.php Tue May 9 19:21:10 2006 @@ -0,0 +1,39 @@ +initVar('image_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('image_name', XOBJ_DTYPE_STRING, '', true, 30); + $this->initVar('image_nicename', XOBJ_DTYPE_STRING, '', true, 255); + $this->initVar('image_mimetype', XOBJ_DTYPE_STRING, '', true, 30); + $this->initVar('image_created', XOBJ_DTYPE_INT, time(), true); + $this->initVar('image_display', XOBJ_DTYPE_BOOL, '1', true); + $this->initVar('image_weight', XOBJ_DTYPE_INT, '0', true); + $this->initVar('imgcat_id', XOBJ_DTYPE_INT, '0', true); + } + + function loadImagecategory() + { + if ($this->_mImageCategoryLoadedFlag == false) { + $handler =& xoops_getmodulehandler('imagecategory'); + $this->mImageCategory =& $handler->get($this->get('imgcat_id')); + $this->_mImageCategoryLoadedFlag = true; + } + } +} + +class BaseImageHandler extends XoopsObjectGenericHandler +{ + var $mTable = "image"; + var $mPrimary = "image_id"; + var $mClass = "BaseImageObject"; +} + +?> Index: xoops2jp/html/modules/base/class/imagecategory.php diff -u /dev/null xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.1 --- /dev/null Tue May 9 19:21:10 2006 +++ xoops2jp/html/modules/base/class/imagecategory.php Tue May 9 19:21:10 2006 @@ -0,0 +1,190 @@ +initVar('imgcat_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('imgcat_name', XOBJ_DTYPE_STRING, '', true, 100); + $this->initVar('imgcat_maxsize', XOBJ_DTYPE_INT, '50000', true); + $this->initVar('imgcat_maxwidth', XOBJ_DTYPE_INT, '120', true); + $this->initVar('imgcat_maxheight', XOBJ_DTYPE_INT, '120', true); + $this->initVar('imgcat_display', XOBJ_DTYPE_BOOL, '1', true); + $this->initVar('imgcat_weight', XOBJ_DTYPE_INT, '0', true); + $this->initVar('imgcat_type', XOBJ_DTYPE_STRING, 'C', true, 1); + $this->initVar('imgcat_storetype', XOBJ_DTYPE_STRING, 'file', true, 5); + } + + function loadImage() + { + if ($this->_mImageLoadedFlag == false) { + $handler =& xoops_getmodulehandler('image'); + $this->mImage =& $handler->getObjects(new Criteria('imagecat_id', $this->get('imagecat_id'))); + $this->_mImageLoadedFlag = true; + } + } + + function &createImage() + { + $handler =& xoops_getmodulehandler('image'); + $obj =& $handler->create(); + $obj->set('imagecat_id', $this->get('imagecat_id')); + return $obj; + } + + function loadReadGroups() + { + if ($this->_mReadGroupsLoadedFlag) { + return; + } + + $handler =& xoops_gethandler('groupperm'); + $gidArr = $handler->getGroupIds('imgcat_read', $this->get('imgcat_id')); + + $handler =& xoops_gethandler('group'); + foreach ($gidArr as $gid) { + $object =& $handler->get($gid); + + if (is_object($object)) { + $this->mReadGroups[] =& $object; + } + + unset($object); + } + + $this->_mReadGroupsLoadedFlag = true; + } + + function isLoadedReadGroups() + { + return $this->_mReadGroupsLoadedFlag; + } + + function loadUploadGroups() + { + if ($this->_mUploadGroupsLoadedFlag) { + return; + } + + $handler =& xoops_gethandler('groupperm'); + $gidArr = $handler->getGroupIds('imgcat_write', $this->get('imgcat_id')); + + $handler =& xoops_gethandler('group'); + foreach ($gidArr as $gid) { + $object =& $handler->get($gid); + + if (is_object($object)) { + $this->mUploadGroups[] =& $object; + } + + unset($object); + } + + $this->_mUploadGroupsLoadedFlag = true; + } + + function isLoadedUploadGroups() + { + return $this->_mUploadGroupsLoadedFlag; + } +} + +class BaseImagecategoryHandler extends XoopsObjectGenericHandler +{ + var $mTable = "imagecategory"; + var $mPrimary = "imgcat_id"; + var $mClass = "BaseImagecategoryObject"; + + function insert(&$obj, $force = false) + { + $returnFlag = parent::insert($obj, $force); + + $handler =& xoops_gethandler('groupperm'); + + // + // If the object has groups which are allowed to read. + // + if ($obj->isLoadedReadGroups()) { + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('gperm_itemid', $obj->get('imgcat_id'))); + $criteria->add(new Criteria('gperm_modid', 1)); + $criteria->add(new Criteria('gperm_name', 'imgcat_read')); + $handler->deleteAll($criteria); + + foreach ($obj->mReadGroups as $group) { + $perm =& $handler->create(); + $perm->set('gperm_groupid', $group->get('groupid')); + $perm->set('gperm_itemid', $obj->get('imgcat_id')); + $perm->set('gperm_modid', 1); + $perm->set('gperm_name', 'imgcat_read'); + + $returnFlag &= $handler->insert($perm, $force); + } + } + + // + // If the object has groups which are allowed to upload. + // + if ($obj->isLoadedUploadGroups()) { + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('gperm_itemid', $obj->get('imgcat_id'))); + $criteria->add(new Criteria('gperm_modid', 1)); + $criteria->add(new Criteria('gperm_name', 'imgcat_write')); + $handler->deleteAll($criteria); + + foreach ($obj->mUploadGroups as $group) { + $perm =& $handler->create(); + $perm->set('gperm_groupid', $group->get('groupid')); + $perm->set('gperm_itemid', $obj->get('imgcat_id')); + $perm->set('gperm_modid', 1); + $perm->set('gperm_name', 'imgcat_write'); + + $returnFlag &= $handler->insert($perm, $force); + } + } + + return $returnFlag; + } + + function delete(&$obj, $force = false) + { + $handler =& xoops_getmodulehandler('image'); + $handler->deleteAll(new Criteria('imagecat_id', $obj->get('imagecat_id'))); + unset($handler); + + $handler =& xoops_gethandler('groupperm'); + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('gperm_itemid', $obj->get('imgcat_id'))); + $criteria->add(new Criteria('gperm_modid', 1)); + + $nameCriteria =& new CriteriaCompo(); + $nameCriteria->add(new Criteria('gperm_name', 'imgcat_read')); + $nameCriteria->add(new Criteria('gperm_name', 'imgcat_write'), 'OR'); + + $criteria->add($nameCriteria); + + $handler->deleteAll($criteria); + + return parent::delete($obj, $force); + } +} + +?> From minahito @ users.sourceforge.jp Tue May 9 19:21:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:21:27 +0900 Subject: [xoops-cvslog 2972] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060509102127.CE2E42AC03C@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.13 xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.14 --- xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.13 Thu Apr 6 15:24:11 2006 +++ xoops2jp/html/modules/base/language/japanese/modinfo.php Tue May 9 19:21:27 2006 @@ -1,38 +1,47 @@ - + Index: xoops2jp/html/modules/base/language/japanese/main.php diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.12 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.13 --- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.12 Mon Apr 10 20:40:58 2006 +++ xoops2jp/html/modules/base/language/japanese/main.php Tue May 9 19:21:27 2006 @@ -40,6 +40,8 @@ define('_MD_BASE_LANG_FUNC_NUM', "func num"); define('_MD_BASE_LANG_ID', "ID"); define('_MD_BASE_LANG_IMAGE', "image"); +define('_MD_BASE_LANG_IMAGE_ID', "image id"); +define('_MD_BASE_LANG_IMGCAT_ID', "imgcat id"); define('_MD_BASE_LANG_ISACTIVE', "isactive"); define('_MD_BASE_LANG_LAST_MODIFIED', "last modified"); define('_MD_BASE_LANG_MID', "mid"); Index: xoops2jp/html/modules/base/language/japanese/admin.php diff -u xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.31 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.32 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.31 Fri Apr 14 15:39:01 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Tue May 9 19:21:27 2006 @@ -69,6 +69,32 @@ define('_AD_BASE_LANG_FUNC_FILE', "コールバック関数定義ファイル"); define('_AD_BASE_LANG_FUNC_NUM', "関数ナンバ"); define('_AD_BASE_LANG_ID', "ID"); +define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); +define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); +define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); +define('_AD_BASE_LANG_IMAGE_EDIT', "Image edit"); +define('_AD_BASE_LANG_IMAGE_ID', "image id"); +define('_AD_BASE_LANG_IMAGE_LIST', "Image list"); +define('_AD_BASE_LANG_IMAGE_MIMETYPE', "image mimetype"); +define('_AD_BASE_LANG_IMAGE_NAME', "image name"); +define('_AD_BASE_LANG_IMAGE_NEW', "Image new"); +define('_AD_BASE_LANG_IMAGE_NICENAME', "image nicename"); +define('_AD_BASE_LANG_IMAGE_WEIGHT', "image weight"); +define('_AD_BASE_LANG_IMAGECATEGORY_DELETE', "Imagecategory delete"); +define('_AD_BASE_LANG_IMAGECATEGORY_EDIT', "Imagecategory edit"); +define('_AD_BASE_LANG_IMAGECATEGORY_LIST', "Imagecategory list"); +define('_AD_BASE_LANG_IMAGECATEGORY_NEW', "Imagecategory new"); +define('_AD_BASE_LANG_IMGCAT_DISPLAY', "表示"); +define('_AD_BASE_LANG_IMGCAT_ID', "ID"); +define('_AD_BASE_LANG_IMGCAT_MAXHEIGHT', "高さ"); +define('_AD_BASE_LANG_IMGCAT_MAXSIZE', "容量"); +define('_AD_BASE_LANG_IMGCAT_MAXWIDTH', "横幅"); +define('_AD_BASE_LANG_IMGCAT_NAME', "カテゴリ名"); +define('_AD_BASE_LANG_IMGCAT_READ_GROUPS', "イメージ・マネジャーの使用を許可するグループ"); +define('_AD_BASE_LANG_IMGCAT_STORETYPE', "保存先"); +define('_AD_BASE_LANG_IMGCAT_TYPE', "imgcat type"); +define('_AD_BASE_LANG_IMGCAT_UPLOAD_GROUPS', "イメージのアップロードを許可するグループ"); +define('_AD_BASE_LANG_IMGCAT_WEIGHT', "優先度"); define('_AD_BASE_LANG_ISACTIVE', "アクティブ"); define('_AD_BASE_LANG_LAST_MODIFIED', "最終更新日時"); define('_AD_BASE_LANG_LCR', "右-中央-左"); @@ -102,6 +128,7 @@ define('_AD_BASE_TIPS_ADD_CUSTOM_BLOCK', "新しいブロックをインストールして、サイトをカスタマイズしましょう。
モジュール付属のブロック以外にも、カスタムブロックを追加して、自由なメッセージをブロックカラムに追加できます。"); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "Q:ブロックをアンインストールすると?
A:すべての設定を記録したまま、表示やリストから消えます。設定を記録してますので、簡単に再インストールすることができます。"); define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Q:カスタムブロックをアンインストールすると?
A:削除されずに、すべての設定を記録したまま、未インストールブロックリストへ移動します。未インストールリストから削除できるほか、再インストール操作で簡単に復活させることができます。"); +define('_AD_BASE_TIPS_IMGCAT_STORETYPE', "イメージ・ファイルの保存先に、ファイルシステムもしくはデータベースを選択できます。この設定は後から変更できません。
データベースへの保存はBLOBというバックアップやリストアに不向きなフォーマットが用いられることに注意しましょう。"); define('_AD_BASE_TIPS_INSTALL_BLOCK', "ブロックをインストールしてサイトをカスタマイズしましょう。インストール時に表示オプションなどを調整できます。
ウェルカムメッセージなど、文章を表示したい場合は、カスタムブロックを追加しましょう。"); define('_MB_A_BASE_LANG_ACTIONSEARCH', "アクションサーチ"); define('_MB_A_BASE_LANG_ACTIONSEARCH_INFO', "管理メニューやヘルプから入力されたキーワードを検索します。
管理メニューの位置を忘れたときに使いましょう (例)利用許諾文"); From minahito @ users.sourceforge.jp Tue May 9 19:21:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:21:27 +0900 Subject: [xoops-cvslog 2973] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060509102127.F38ED2AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/modinfo.php diff -u xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.13 xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.14 --- xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.13 Sat Apr 15 11:15:29 2006 +++ xoops2jp/html/modules/base/language/english/modinfo.php Tue May 9 19:21:27 2006 @@ -1,40 +1,49 @@ -Pre-road mechanism of this module is very flexible, but it is low speed.
"); -define('_MI_PROFILE_BASE_LEGACY_RENDER_SYSTEM', "This system depends on Smarty engine for rendering and cache.
This system can use themes of Xoops2.0.x rightly."); - -?> +Pre-road mechanism of this module is very flexible, but it is low speed.
"); +define('_MI_PROFILE_BASE_LEGACY_RENDER_SYSTEM', "This system depends on Smarty engine for rendering and cache.
This system can use themes of Xoops2.0.x rightly."); + +?> Index: xoops2jp/html/modules/base/language/english/admin.php diff -u xoops2jp/html/modules/base/language/english/admin.php:1.1.2.26 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.27 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.26 Sat Apr 15 11:15:29 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Tue May 9 19:21:27 2006 @@ -69,6 +69,32 @@ define('_AD_BASE_LANG_FUNC_FILE', "Callback file name"); define('_AD_BASE_LANG_FUNC_NUM', "Function number"); define('_AD_BASE_LANG_ID', "ID"); +define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); +define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); +define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); +define('_AD_BASE_LANG_IMAGE_EDIT', "Image edit"); +define('_AD_BASE_LANG_IMAGE_ID', "image id"); +define('_AD_BASE_LANG_IMAGE_LIST', "Image list"); +define('_AD_BASE_LANG_IMAGE_MIMETYPE', "image mimetype"); +define('_AD_BASE_LANG_IMAGE_NAME', "image name"); +define('_AD_BASE_LANG_IMAGE_NEW', "Image new"); +define('_AD_BASE_LANG_IMAGE_NICENAME', "image nicename"); +define('_AD_BASE_LANG_IMAGE_WEIGHT', "image weight"); +define('_AD_BASE_LANG_IMAGECATEGORY_DELETE', "Imagecategory delete"); +define('_AD_BASE_LANG_IMAGECATEGORY_EDIT', "Imagecategory edit"); +define('_AD_BASE_LANG_IMAGECATEGORY_LIST', "Imagecategory list"); +define('_AD_BASE_LANG_IMAGECATEGORY_NEW', "Imagecategory new"); +define('_AD_BASE_LANG_IMGCAT_DISPLAY', "imgcat display"); +define('_AD_BASE_LANG_IMGCAT_ID', "imgcat id"); +define('_AD_BASE_LANG_IMGCAT_MAXHEIGHT', "imgcat maxheight"); +define('_AD_BASE_LANG_IMGCAT_MAXSIZE', "imgcat maxsize"); +define('_AD_BASE_LANG_IMGCAT_MAXWIDTH', "imgcat maxwidth"); +define('_AD_BASE_LANG_IMGCAT_NAME', "imgcat name"); +define('_AD_BASE_LANG_IMGCAT_READ_GROUPS', "Imgcat read groups"); +define('_AD_BASE_LANG_IMGCAT_STORETYPE', "imgcat storetype"); +define('_AD_BASE_LANG_IMGCAT_TYPE', "imgcat type"); +define('_AD_BASE_LANG_IMGCAT_UPLOAD_GROUPS', "Imgcat upload groups"); +define('_AD_BASE_LANG_IMGCAT_WEIGHT', "imgcat weight"); define('_AD_BASE_LANG_ISACTIVE', "Active"); define('_AD_BASE_LANG_LAST_MODIFIED', "Last modified"); define('_AD_BASE_LANG_LCR', "L-CTR-R"); @@ -102,6 +128,7 @@ define('_AD_BASE_TIPS_ADD_CUSTOM_BLOCK', "Install new blocks, and set your site!
If you want to get a free block except modules' blocks, create cutom block and write your message to it."); define('_AD_BASE_TIPS_BLOCK_UNINSTALL', "Even if you uninstall the block, the configuration of the block isn't deleted. The block is removed only from display of your site. Therefore you can re-install the block easily because the installer recovers last configure."); define('_AD_BASE_TIPS_CUSTOM_BLOCK_UNINSTALL', "Even if you uninstall the custom block, the configuration of the block isn't deleted. The block is removed only from display of your site. You can re-install or delete it from database at 'install block' page."); +define('_AD_BASE_TIPS_IMGCAT_STORETYPE', "imgcat storetype"); 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 Tue May 9 19:31:18 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:31:18 +0900 Subject: [xoops-cvslog 2974] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060509103118.F212F2AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/AbstractEditAction.class.php diff -u xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.2 xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.2 Tue Mar 28 22:29:21 2006 +++ xoops2jp/html/modules/base/class/AbstractEditAction.class.php Tue May 9 19:31:18 2006 @@ -40,8 +40,8 @@ function prepare(&$controller, &$xoopsUser) { - $this->_setupActionForm(); $this->_setupObject(); + $this->_setupActionForm(); } function getDefaultView(&$controller, &$xoopsUser) From minahito @ users.sourceforge.jp Tue May 9 19:31:59 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 9 May 2006 19:31:59 +0900 Subject: [xoops-cvslog 2975] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060509103159.3D94C2AC073@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImagecategoryFilterForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImagecategoryFilterForm.class.php:1.1.2.1 --- /dev/null Tue May 9 19:31:59 2006 +++ xoops2jp/html/modules/base/admin/forms/ImagecategoryFilterForm.class.php Tue May 9 19:31:59 2006 @@ -0,0 +1,74 @@ + 'imgcat_id', + IMAGECATEGORY_SORT_KEY_IMGCAT_NAME => 'imgcat_name', + IMAGECATEGORY_SORT_KEY_IMGCAT_MAXSIZE => 'imgcat_maxsize', + IMAGECATEGORY_SORT_KEY_IMGCAT_MAXWIDTH => 'imgcat_maxwidth', + IMAGECATEGORY_SORT_KEY_IMGCAT_MAXHEIGHT => 'imgcat_maxheight', + IMAGECATEGORY_SORT_KEY_IMGCAT_DISPLAY => 'imgcat_display', + IMAGECATEGORY_SORT_KEY_IMGCAT_WEIGHT => 'imgcat_weight', + IMAGECATEGORY_SORT_KEY_IMGCAT_TYPE => 'imgcat_type', + IMAGECATEGORY_SORT_KEY_IMGCAT_STORETYPE => 'imgcat_storetype' + ); + var $_mCriteria = null; + + function fetch() + { + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : IMAGECATEGORY_SORT_KEY_DEFAULT; + + if ($this->mSort > IMAGECATEGORY_SORT_KEY_MAXVALUE) { + $this->mSort = IMAGECATEGORY_SORT_KEY_DEFAULT; + } + + if (isset($_REQUEST['imgcat_name'])) { + $this->_mNavi->addExtra('imgcat_name', xoops_getrequest('imgcat_name')); + $this->_mCriteria->add(new Criteria('imgcat_name', array(XOBJ_DTYPE_STRING, xoops_getrequest('imgcat_name')))); + } + + if (isset($_REQUEST['imgcat_display'])) { + $this->_mNavi->addExtra('imgcat_display', xoops_getrequest('imgcat_display')); + $this->_mCriteria->add(new Criteria('imgcat_display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('imgcat_display')))); + } + + if (isset($_REQUEST['imgcat_type'])) { + $this->_mNavi->addExtra('imgcat_type', xoops_getrequest('imgcat_type')); + $this->_mCriteria->add(new Criteria('imgcat_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('imgcat_type')))); + } + + if (isset($_REQUEST['imgcat_storetype'])) { + $this->_mNavi->addExtra('imgcat_storetype', xoops_getrequest('imgcat_storetype')); + $this->_mCriteria->add(new Criteria('imgcat_storetype', array(XOBJ_DTYPE_STRING, xoops_getrequest('imgcat_storetype')))); + } + + // + // Set sort conditions. + // + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + if (abs($this->mSort) != IMAGECATEGORY_SORT_KEY_IMGCAT_WEIGHT) { + $this->_mCriteria->addSort(IMAGECATEGORY_SORT_KEY_IMGCAT_WEIGHT, $this->getOrder()); + } + } +} + +?> From minahito @ users.sourceforge.jp Wed May 10 12:34:12 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 12:34:12 +0900 Subject: [xoops-cvslog 2976] CVS update: xoops2jp/html/class Message-ID: <20060510033413.03EA22AC02C@users.sourceforge.jp> Index: xoops2jp/html/class/template.php diff -u xoops2jp/html/class/template.php:1.2.8.5 xoops2jp/html/class/template.php:1.2.8.6 --- xoops2jp/html/class/template.php:1.2.8.5 Wed Apr 19 14:01:13 2006 +++ xoops2jp/html/class/template.php Wed May 10 12:34:12 2006 @@ -1,5 +1,5 @@ debugging) { + // capture time for debugging info + $_params = array(); + require_once(SMARTY_CORE_DIR . 'core.get_microtime.php'); + $this->_smarty_debug_info[$_included_tpls_idx]['exec_time'] = (smarty_core_get_microtime($_params, $this) - $_debug_start_time); + require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php'); + return smarty_core_display_debug_console($_params, $this); + } + } } From minahito @ users.sourceforge.jp Wed May 10 12:37:14 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 12:37:14 +0900 Subject: [xoops-cvslog 2977] CVS update: xoops2jp/html/modules/legacyRender/kernel Message-ID: <20060510033714.411172AC026@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.14 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.15 --- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.14 Fri Apr 28 15:47:46 2006 +++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php Wed May 10 12:37:14 2006 @@ -1,6 +1,6 @@ mController->mDebugger->isDebugRenderSystem()) { + if($controller->mDebugger->isDebugRenderSystem()) { $this->mXoopsTpl->xoops_setDebugging(true); } @@ -274,11 +274,13 @@ // $result=null; if($target->getAttribute("isFileTheme")) { - $result=$this->mXoopsTpl->fetch($target->getTemplateName()."/theme.html", null, null, true); + $result=$this->mXoopsTpl->fetch($target->getTemplateName()."/theme.html"); } else { - $result=$this->mXoopsTpl->fetch("db:".$target->getTemplateName(), null, null, true); + $result=$this->mXoopsTpl->fetch("db:".$target->getTemplateName()); } + + $result .= $this->mXoopsTpl->fetchDebugConsole(); $target->setResult($result); } From minahito @ users.sourceforge.jp Wed May 10 19:23:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:23:50 +0900 Subject: [xoops-cvslog 2978] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060510102350.9CC942AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/image.php diff -u xoops2jp/html/modules/base/class/image.php:1.1.2.1 xoops2jp/html/modules/base/class/image.php:1.1.2.2 --- xoops2jp/html/modules/base/class/image.php:1.1.2.1 Tue May 9 19:21:10 2006 +++ xoops2jp/html/modules/base/class/image.php Wed May 10 19:23:50 2006 @@ -34,6 +34,28 @@ var $mTable = "image"; var $mPrimary = "image_id"; var $mClass = "BaseImageObject"; + + /** + * + * Delete object and image file. + * + * @param $obj BaseImageObject + * @param $force boolean + * @return boolean + */ + function delete(&$obj, $force = false) + { + if (parent::delete($obj, $force)) { + $filepath = XOOPS_UPLOAD_PATH . "/" . $obj->get('image_name'); + if (file_exists($filepath)) { + @unlink($filepath); + } + + return true; + } + + return false; + } } ?> From minahito @ users.sourceforge.jp Wed May 10 19:24:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:24:17 +0900 Subject: [xoops-cvslog 2979] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060510102417.A5E632AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/imagecategory.php diff -u xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.1 xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.2 --- xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.1 Tue May 9 19:21:10 2006 +++ xoops2jp/html/modules/base/class/imagecategory.php Wed May 10 19:24:17 2006 @@ -50,6 +50,12 @@ return $obj; } + function getImageCount() + { + $handler =& xoops_getmodulehandler('image'); + return $handler->getCount(new Criteria('imgcat_id', $this->get('imgcat_id'))); + } + function loadReadGroups() { if ($this->_mReadGroupsLoadedFlag) { From minahito @ users.sourceforge.jp Wed May 10 19:24:38 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:24:38 +0900 Subject: [xoops-cvslog 2980] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060510102438.A12EE2AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.1 Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Wed May 10 19:24:38 2006 @@ -37,6 +37,7 @@ <{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}>
" alt="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" /> + <{$smarty.const._AD_BASE_LANG_IMAGE_COUNT}> <{$smarty.const._AD_BASE_LANG_CONTROL}> <{foreach item=obj from=$objects}> @@ -50,9 +51,11 @@ <{$obj->getVar('imgcat_weight')}> <{$obj->getVar('imgcat_type')}> <{$obj->getVar('imgcat_storetype')}> + <{$obj->getImageCount()|escape}> - " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + <{$smarty.const._AD_BASE_LANG_LIST}> + " alt="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" /> <{/foreach}> From minahito @ users.sourceforge.jp Wed May 10 19:24:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:24:49 +0900 Subject: [xoops-cvslog 2981] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060510102449.578E12AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.1 --- /dev/null Wed May 10 19:24:49 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Wed May 10 19:24:49 2006 @@ -0,0 +1,57 @@ + + +

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}>

+ + +
+ + + + + + + + + + + + + + <{foreach item=obj from=$objects}> + + + + + + + + + + + + <{/foreach}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_ID}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>
+ " alt="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('image_id')}><{$obj->getVar('image_name')}><{$obj->getVar('image_nicename')}><{$obj->getVar('image_mimetype')}><{$obj->getVar('image_created')}><{$obj->getVar('image_display')}><{$obj->getVar('image_weight')}><{$obj->getVar('imgcat_id')}> + " alt="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" /> +
+
+
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Wed May 10 19:25:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:25:11 +0900 Subject: [xoops-cvslog 2982] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060510102511.035632AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.1 --- /dev/null Wed May 10 19:25:10 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php Wed May 10 19:25:10 2006 @@ -0,0 +1,36 @@ +setTemplateName("image_list.html"); + $render->setAttribute("objects", $this->mObjects); + $render->setAttribute("pageNavi", $this->mNavi); + } +} + +?> Index: xoops2jp/html/modules/base/admin/actions/ImageDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImageDeleteAction.class.php:1.1.2.1 --- /dev/null Wed May 10 19:25:10 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageDeleteAction.class.php Wed May 10 19:25:10 2006 @@ -0,0 +1,46 @@ +mActionForm =& new Legacy_ImageAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("image_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + #cubson::lazy_load('image', $this->mObject); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=ImageList&imgcat_id=" . $this->mObject->get('imgcat_id')); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=ImageList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 10 19:25:33 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:25:33 +0900 Subject: [xoops-cvslog 2983] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060510102533.6F0132AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminDeleteForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImageAdminDeleteForm.class.php:1.1.2.1 --- /dev/null Wed May 10 19:25:33 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminDeleteForm.class.php Wed May 10 19:25:33 2006 @@ -0,0 +1,41 @@ +get('image_id'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['image_id'] =& new XCube_IntProperty('image_id'); + + // + // Set field properties + // + $this->mFieldProperties['image_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_id']->setDependsByArray(array('required')); + $this->mFieldProperties['image_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_ID); + } + + function load(&$obj) + { + $this->set('image_id', $obj->get('image_id')); + } + + function update(&$obj) + { + $obj->set('image_id', $this->get('image_id')); + } +} + +?> Index: xoops2jp/html/modules/base/admin/forms/ImageFilterForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImageFilterForm.class.php:1.1.2.1 --- /dev/null Wed May 10 19:25:33 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageFilterForm.class.php Wed May 10 19:25:33 2006 @@ -0,0 +1,69 @@ + 'image_id', + IMAGE_SORT_KEY_IMAGE_NAME => 'image_name', + IMAGE_SORT_KEY_IMAGE_NICENAME => 'image_nicename', + IMAGE_SORT_KEY_IMAGE_MIMETYPE => 'image_mimetype', + IMAGE_SORT_KEY_IMAGE_CREATED => 'image_created', + IMAGE_SORT_KEY_IMAGE_DISPLAY => 'image_display', + IMAGE_SORT_KEY_IMAGE_WEIGHT => 'image_weight', + IMAGE_SORT_KEY_IMGCAT_ID => 'imgcat_id' + ); + var $_mCriteria = null; + + function fetch() + { + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : IMAGE_SORT_KEY_DEFAULT; + + if ($this->mSort > IMAGE_SORT_KEY_MAXVALUE) { + $this->mSort = IMAGE_SORT_KEY_DEFAULT; + } + +// if (isset($_REQUEST['image_name'])) { +// $this->_mNavi->addExtra('image_name', xoops_getrequest('image_name')); +// $this->_mCriteria->add(new Criteria('image_name', array(XOBJ_DTYPE_STRING, xoops_getrequest('image_name')))); +// } + +// if (isset($_REQUEST['image_nicename'])) { +// $this->_mNavi->addExtra('image_nicename', xoops_getrequest('image_nicename')); +// $this->_mCriteria->add(new Criteria('image_nicename', array(XOBJ_DTYPE_STRING, xoops_getrequest('image_nicename')))); +// } + + if (isset($_REQUEST['image_display'])) { + $this->_mNavi->addExtra('image_display', xoops_getrequest('image_display')); + $this->_mCriteria->add(new Criteria('image_display', array(XOBJ_DTYPE_BOOL, xoops_getrequest('image_display')))); + } + + if (isset($_REQUEST['imgcat_id'])) { + $this->_mNavi->addExtra('imgcat_id', xoops_getrequest('imgcat_id')); + $this->_mCriteria->add(new Criteria('imgcat_id', array(XOBJ_DTYPE_INT, xoops_getrequest('imgcat_id')))); + } + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + if (abs($this->mSort) != IMAGE_SORT_KEY_IMAGE_WEIGHT) { + $this->_mCriteria->addSort(IMAGE_SORT_KEY_IMAGE_WEIGHT, $this->getOrder()); + } + } +} + +?> From minahito @ users.sourceforge.jp Wed May 10 19:25:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 10 May 2006 19:25:52 +0900 Subject: [xoops-cvslog 2984] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060510102552.9E6812AC02C@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_delete.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.1 --- /dev/null Wed May 10 19:25:52 2006 +++ xoops2jp/html/modules/base/admin/templates/image_delete.html Wed May 10 19:25:52 2006 @@ -0,0 +1,54 @@ +
+ <{$smarty.const._MI_BASE_NAME}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}> +
+ +

<{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}>

+ +

<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AD_BASE_LANG_IMAGE_ID}>"><{$object->getVar('image_id')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}>"><{$object->getVar('image_name')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}>"><{$object->getVar('image_nicename')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}>"><{$object->getVar('image_mimetype')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>"><{$object->getVar('image_created')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}>"><{$object->getVar('image_display')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}>"><{$object->getVar('image_weight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>"><{$object->getVar('imgcat_id')}>

+
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> + + +
+
From minahito @ users.sourceforge.jp Thu May 11 18:01:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 11 May 2006 18:01:11 +0900 Subject: [xoops-cvslog 2985] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060511090111.478032AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php Thu May 11 18:01:11 2006 @@ -33,6 +33,19 @@ } $render->setAttribute("objects", $this->mObjects); $render->setAttribute("pageNavi", $this->mNavi); + + // + // If cid is specified, load client object and assign it. + // + $cid = xoops_getrequest('cid'); + if ($cid > 0) { + $handler =& xoops_getmodulehandler('bannerclient'); + $client =& $handler->get($cid); + if (is_object($client)) { + $render->setAttribute("currentClient", $client); + } + } + } } From minahito @ users.sourceforge.jp Thu May 11 18:08:30 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 11 May 2006 18:08:30 +0900 Subject: [xoops-cvslog 2986] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060511090830.D5D952AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.2 Tue Apr 25 12:56:00 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html Thu May 11 18:08:30 2006 @@ -29,13 +29,7 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_CID}> "> From minahito @ users.sourceforge.jp Thu May 11 18:09:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 11 May 2006 18:09:55 +0900 Subject: [xoops-cvslog 2987] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060511090955.D73712AC03A@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerEditAction.class.php Thu May 11 18:09:55 2006 @@ -18,6 +18,14 @@ return $handler; } + function _setupObject() + { + parent::_setupObject(); + if (is_object($this->mObject) && $this->mObject->isNew()) { + $this->mObject->set('cid', xoops_getrequest('cid')); + } + } + function _setupActionForm() { $this->mActionForm =& new LegacyRender_BannerAdminEditForm(); From minahito @ users.sourceforge.jp Thu May 11 18:58:07 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 11 May 2006 18:58:07 +0900 Subject: [xoops-cvslog 2988] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060511095807.6EB0B2AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishListAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishListAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishListAction.class.php:1.1.2.1 Mon Apr 24 16:30:10 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerfinishListAction.class.php Thu May 11 18:58:07 2006 @@ -33,6 +33,18 @@ } $render->setAttribute("objects", $this->mObjects); $render->setAttribute("pageNavi", $this->mNavi); + + // + // If cid is specified, load client object and assign it. + // + $cid = xoops_getrequest('cid'); + if ($cid > 0) { + $handler =& xoops_getmodulehandler('bannerclient'); + $client =& $handler->get($cid); + if (is_object($client)) { + $render->setAttribute("currentClient", $client); + } + } } } From minahito @ users.sourceforge.jp Thu May 11 18:58:20 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 11 May 2006 18:58:20 +0900 Subject: [xoops-cvslog 2989] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060511095820.ED9F32AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php:1.1.2.2 Thu May 11 18:01:11 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/BannerListAction.class.php Thu May 11 18:58:20 2006 @@ -45,7 +45,6 @@ $render->setAttribute("currentClient", $client); } } - } } From tom_g3x @ users.sourceforge.jp Thu May 11 23:56:10 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Thu, 11 May 2006 23:56:10 +0900 Subject: [xoops-cvslog 2990] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060511145610.2461F2AC02F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html:1.1.2.3 Tue Apr 25 12:56:00 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_list.html Thu May 11 23:56:09 2006 @@ -1,44 +1,47 @@ -

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}>

+

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}> +<{if $currentClient}> + ( <{$currentClient->getVar('name')}> ) +<{/if}> +

-
+ -
- +
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> - + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> <{foreach item=obj from=$objects}> - + - - + <{/foreach}>
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CLIENT_NAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPMADE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER}> <{$smarty.const._AD_LEGACYRENDER_LANG_DATE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
<{$obj->getVar('bid')}> <{$obj->mClient->getVar('name')}> @@ -50,21 +53,14 @@ <{$obj->getVar('impmade')}> <{$obj->getVar('clicks')}> - <{if $obj->get('htmlbanner')}> - <{$obj->get('htmlcode')}> - <{else}> - Banner - <{/if}> - <{$obj->get('date')|xoops_formattimestamp}><{$obj->getVar('htmlbanner')}><{if $obj->getVar('htmlbanner') == 1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}> - " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html:1.1.2.2 Tue Apr 25 14:17:39 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_delete.html Thu May 11 23:56:09 2006 @@ -1,46 +1,50 @@ -

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_DELETE}>

+

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_DELETE}>

<{$smarty.const._AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE}>

- + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}> +
- + + + + - + - + - + - + - + - -
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}><{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_DELETE}>
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}> "><{$object->getVar('bid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}><{$smarty.const._AD_LEGACYRENDER_LANG_CID}> "><{$object->mClient->getVar('name')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPRESSIONS}><{$smarty.const._AD_LEGACYRENDER_LANG_IMPRESSIONS}> "><{$object->getVar('impressions')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}><{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}> "><{$object->getVar('clicks')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_DATESTART}><{$smarty.const._AD_LEGACYRENDER_LANG_DATESTART}> "><{$object->get('datestart')|xoops_formattimestamp}>
<{$smarty.const._AD_LEGACYRENDER_LANG_DATEEND}><{$smarty.const._AD_LEGACYRENDER_LANG_DATEEND}> "><{$object->get('dateend')|xoops_formattimestamp}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}> - - - +
+ +
+ + Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html:1.1.2.2 Tue Apr 25 14:17:27 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_delete.html Thu May 11 23:56:09 2006 @@ -1,46 +1,50 @@ -

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_DELETE}>

+

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_DELETE}>

<{$smarty.const._AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE}>

- + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=cid value=$actionForm->get('cid')}> +
- + + + + - + - + - + - + - + - -
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}><{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_DELETE}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}> "><{$object->getVar('cid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}><{$smarty.const._AD_LEGACYRENDER_LANG_NAME}> "><{$object->getVar('name')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}><{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}> "><{$object->getVar('contact')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}><{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}> "><{$object->getVar('email')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}><{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}> "><{$object->getVar('login')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}><{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}> "><{$object->getVar('extrainfo')}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=cid value=$actionForm->get('cid')}> - - - +
+ +
+ + Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html:1.1.2.3 Tue Apr 25 14:25:56 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerfinish_list.html Thu May 11 23:56:09 2006 @@ -1,39 +1,44 @@ -

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}>

+

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}> +<{if $currentClient}> + ( <{$currentClient->getVar('name')}> ) +<{/if}> +

-
+ -
- +
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> <{foreach item=obj from=$objects}> - + @@ -41,10 +46,10 @@ <{/foreach}>
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CLIENT_NAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPRESSIONS}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_DATESTART}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_DATEEND}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
<{$obj->getVar('bid')}> <{$obj->mClient->getVar('name')}> <{$obj->getVar('impressions')}><{$obj->get('datestart')|xoops_formattimestamp}> <{$obj->get('dateend')|xoops_formattimestamp}> - " alt="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html:1.1.2.3 Thu May 11 18:08:30 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_edit.html Thu May 11 23:56:09 2006 @@ -1,6 +1,6 @@
<{$smarty.const._MI_LEGACYRENDER_NAME}> - »» <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}> + »» <{$smarty.const._MI_LEGACYRENDER_ADMENU_BANNER_MANAGE}> <{if $actionForm->get('bid')}> »» <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_EDIT}> <{else}> @@ -21,50 +21,67 @@ <{/foreach}> <{/if}> +
<{xoops_token form=$actionForm}> <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}> - +
+ + + + <{if $actionForm->get('bid')}> + + + + <{/if}> - + - + - + - + - + - - - - - Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html:1.1.2.2 Mon Apr 24 19:58:44 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_list.html Thu May 11 23:56:09 2006 @@ -1,41 +1,41 @@

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_LIST}>

-
+ <{if $actionForm->get('bid')}> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_EDIT}> + <{else}> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_NEW}> + <{/if}> +
+ <{if $actionForm->get('htmlbanner')}> + <{$actionForm->get('htmlcode')}> + <{else}> + Banner + <{/if}> +
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}><{$smarty.const._AD_LEGACYRENDER_LANG_CID}> ">
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}><{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}> "> <{xoops_input type=text name=imptotal value=$actionForm->get('imptotal')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}><{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}> "> - <{xoops_input type=text name=imageurl value=$actionForm->get('imageurl') size=64 maxlength=255}> + <{xoops_input type=text name=imageurl value=$actionForm->get('imageurl') size=70 maxlength=255}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}><{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}> "> - <{xoops_input type=text name=clickurl value=$actionForm->get('clickurl') size=64 maxlength=255}> + <{xoops_input type=text name=clickurl value=$actionForm->get('clickurl') size=70 maxlength=255}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}><{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}> "> + <{xoops_textarea name=htmlcode cols=50 rows=10 value=$actionForm->get('htmlcode')}>
<{xoops_input type=checkbox name=htmlbanner value=1 default=$actionForm->get('htmlbanner')}> -
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}>"> - <{xoops_textarea name=htmlcode cols=50 rows=5 value=$actionForm->get('htmlcode')}> + <{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>
+
+
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> <{foreach item=obj from=$objects}> - + @@ -44,13 +44,13 @@ <{/foreach}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
<{$obj->getVar('cid')}> <{$obj->getVar('name')}> <{$obj->getVar('contact')}><{$obj->getVar('extrainfo')}> <{assign var=count value=count($obj->mBanners)}> - <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}>(<{$obj->mBannerCount|escape}>) - <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}>(<{$obj->mFinishBannerCount|escape}>) - " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_LIST}>(<{$obj->mBannerCount|escape}>)
+ <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERFINISH_LIST}>(<{$obj->mFinishBannerCount|escape}>)
+ " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + Index: xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html:1.1.2.1 Mon Apr 24 16:30:35 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/bannerclient_edit.html Thu May 11 23:56:09 2006 @@ -1,5 +1,6 @@
<{$smarty.const._MI_LEGACYRENDER_NAME}> + »» <{$smarty.const._MI_LEGACYRENDER_ADMENU_BANNER_MANAGE}> »» <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_LIST}> <{if $actionForm->get('cid')}> »» <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_EDIT}> @@ -24,45 +25,54 @@ <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=cid value=$actionForm->getVar('cid')}> - +
- + + + + - + - + - + - + - + - Index: xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html:1.1.2.2 Tue Apr 25 12:56:00 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/banner_delete.html Thu May 11 23:56:09 2006 @@ -1,24 +1,39 @@ -

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_DELETE}>

+

<{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_DELETE}>

<{$smarty.const._AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE}>

-
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}> + <{if $actionForm->get('cid')}> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_EDIT}> + <{else}> + <{$smarty.const._AD_LEGACYRENDER_LANG_BANNERCLIENT_NEW}> + <{/if}> +
<{$smarty.const._AD_LEGACYRENDER_LANG_NAME}> "> - <{xoops_input type=text name=name value=$actionForm->getVar('name') size=15 maxlength=60}> + <{xoops_input type=text name=name value=$actionForm->getVar('name') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}><{$smarty.const._AD_LEGACYRENDER_LANG_CONTACT}> "> - <{xoops_input type=text name=contact value=$actionForm->getVar('contact') size=15 maxlength=60}> + <{xoops_input type=text name=contact value=$actionForm->getVar('contact') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}><{$smarty.const._AD_LEGACYRENDER_LANG_EMAIL}> "> - <{xoops_input type=text name=email value=$actionForm->getVar('email') size=15 maxlength=60}> + <{xoops_input type=text name=email value=$actionForm->getVar('email') size=50 maxlength=60}>
<{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}><{$smarty.const._AD_LEGACYRENDER_LANG_LOGIN}> "> <{xoops_input type=text name=login value=$actionForm->getVar('login') size=15 maxlength=10}>
<{$smarty.const._AD_LEGACYRENDER_LANG_PASSWD}><{$smarty.const._AD_LEGACYRENDER_LANG_PASSWD}> "> <{xoops_input type=text name=passwd value=$actionForm->getVar('passwd') size=15 maxlength=10}>
<{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}><{$smarty.const._AD_LEGACYRENDER_LANG_EXTRAINFO}> "> <{xoops_dhtmltarea type=text name=extrainfo value=$actionForm->getVar('extrainfo')}>
+
+ + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}> +
- + + + + + + + - + - + - + - + - + - + - + - - - + + - + - -
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}><{$smarty.const._AD_LEGACYRENDER_LANG_BANNER_DELETE}>
+ <{if $object->get('htmlbanner')}> + <{$object->get('htmlcode')}> + <{else}> + Banner + <{/if}> +
<{$smarty.const._AD_LEGACYRENDER_LANG_BID}> "><{$object->getVar('bid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLIENT_NAME}><{$smarty.const._AD_LEGACYRENDER_LANG_CLIENT_NAME}> "><{$object->mClient->getVar('name')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}><{$smarty.const._AD_LEGACYRENDER_LANG_IMPTOTAL}> "> <{if $object->get('imptotal') > 0}> <{$object->getVar('imptotal')}> @@ -28,41 +43,37 @@
<{$smarty.const._AD_LEGACYRENDER_LANG_IMPMADE}><{$smarty.const._AD_LEGACYRENDER_LANG_IMPMADE}> "><{$object->getVar('impmade')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}><{$smarty.const._AD_LEGACYRENDER_LANG_CLICKS}> "><{$object->getVar('clicks')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}><{$smarty.const._AD_LEGACYRENDER_LANG_IMAGEURL}> "><{$object->getVar('imageurl')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}><{$smarty.const._AD_LEGACYRENDER_LANG_CLICKURL}> "><{$object->getVar('clickurl')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_DATE}><{$smarty.const._AD_LEGACYRENDER_LANG_DATE}> "><{$object->get('date')|xoops_formattimestamp}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>"><{$object->getVar('htmlbanner')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLBANNER}>"><{if $object->getVar('htmlbanner') ==1}><{$smarty.const._YES}><{else}><{$smarty.const._NO}><{/if}>
<{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}><{$smarty.const._AD_LEGACYRENDER_LANG_HTMLCODE}> "><{$object->getVar('htmlcode')}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=bid value=$actionForm->get('bid')}> - - - +
+ +
+ + From tom_g3x @ users.sourceforge.jp Fri May 12 00:26:03 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Fri, 12 May 2006 00:26:03 +0900 Subject: [xoops-cvslog 2991] CVS update: xoops2jp/html/modules/user/admin/templates Message-ID: <20060511152603.D0E5A2AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/templates/mailjob_list.html diff -u xoops2jp/html/modules/user/admin/templates/mailjob_list.html:1.1.2.3 xoops2jp/html/modules/user/admin/templates/mailjob_list.html:1.1.2.4 --- xoops2jp/html/modules/user/admin/templates/mailjob_list.html:1.1.2.3 Thu Apr 27 19:24:27 2006 +++ xoops2jp/html/modules/user/admin/templates/mailjob_list.html Fri May 12 00:26:03 2006 @@ -5,26 +5,25 @@

<{$smarty.const._AD_USER_LANG_MAILJOB_LIST}>

- -
+ - +
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> @@ -43,11 +42,11 @@ <{/if}> <{/foreach}>
<{$smarty.const._AD_USER_LANG_MAILJOB_ID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_USER_LANG_TITLE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_USER_LANG_IS_PM}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_USER_LANG_IS_MAIL}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_USER_LANG_CREATE_UNIXTIME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_USER_LANG_LEFT_TARGET_USER}> <{$smarty.const._AD_USER_LANG_CONTROL}>
- " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + Index: xoops2jp/html/modules/user/admin/templates/mailjob_send.html diff -u xoops2jp/html/modules/user/admin/templates/mailjob_send.html:1.1.2.1 xoops2jp/html/modules/user/admin/templates/mailjob_send.html:1.1.2.2 --- xoops2jp/html/modules/user/admin/templates/mailjob_send.html:1.1.2.1 Thu Apr 27 19:24:27 2006 +++ xoops2jp/html/modules/user/admin/templates/mailjob_send.html Fri May 12 00:26:03 2006 @@ -10,48 +10,51 @@ <{$smarty.const._AD_USER_TIPS_MAILJOB_SEND}>
- + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=mailjob_id value=$actionForm->get('mailjob_id')}> +
- + + + + - + - + - + - + - + - + - + - -
<{$smarty.const._AD_USER_LANG_MAILJOB_ID}><{$smarty.const._AD_USER_LANG_MAILJOB_SEND}>
<{$smarty.const._AD_USER_LANG_MAILJOB_ID}> "><{$object->getVar('mailjob_id')}>
<{$smarty.const._AD_USER_LANG_TITLE}><{$smarty.const._AD_USER_LANG_TITLE}> "><{$object->getVar('title')}>
<{$smarty.const._AD_USER_LANG_BODY}><{$smarty.const._AD_USER_LANG_BODY}> "><{$object->getVar('body')}>
<{$smarty.const._AD_USER_LANG_FROM_NAME}><{$smarty.const._AD_USER_LANG_FROM_NAME}> "><{$object->getVar('from_name')}>
<{$smarty.const._AD_USER_LANG_FROM_EMAIL}><{$smarty.const._AD_USER_LANG_FROM_EMAIL}> "><{$object->getVar('from_email')}>
<{$smarty.const._AD_USER_LANG_IS_PM}><{$smarty.const._AD_USER_LANG_IS_PM}> "><{$object->getVar('is_pm')}>
<{$smarty.const._AD_USER_LANG_IS_MAIL}><{$smarty.const._AD_USER_LANG_IS_MAIL}> "><{$object->getVar('is_mail')}>
<{$smarty.const._AD_USER_LANG_CREATE_UNIXTIME}><{$smarty.const._AD_USER_LANG_CREATE_UNIXTIME}> "><{$object->get('create_unixtime')|xoops_formattimestamp:l}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=mailjob_id value=$actionForm->get('mailjob_id')}> - - - +
+ +
+ + Index: xoops2jp/html/modules/user/admin/templates/mailjob_edit.html diff -u xoops2jp/html/modules/user/admin/templates/mailjob_edit.html:1.1.2.4 xoops2jp/html/modules/user/admin/templates/mailjob_edit.html:1.1.2.5 --- xoops2jp/html/modules/user/admin/templates/mailjob_edit.html:1.1.2.4 Thu Apr 27 19:24:27 2006 +++ xoops2jp/html/modules/user/admin/templates/mailjob_edit.html Fri May 12 00:26:03 2006 @@ -21,49 +21,60 @@ <{/foreach}> <{/if}> +
<{xoops_token form=$actionForm}> <{xoops_input type=hidden name=mailjob_id value=$actionForm->get('mailjob_id')}> <{$pageNavi->renderHidden()}> - +
- + + + + - + - + - + - + - + - Index: xoops2jp/html/modules/user/admin/templates/mailjob_delete.html diff -u xoops2jp/html/modules/user/admin/templates/mailjob_delete.html:1.1.2.1 xoops2jp/html/modules/user/admin/templates/mailjob_delete.html:1.1.2.2 --- xoops2jp/html/modules/user/admin/templates/mailjob_delete.html:1.1.2.1 Thu Apr 27 19:24:27 2006 +++ xoops2jp/html/modules/user/admin/templates/mailjob_delete.html Fri May 12 00:26:03 2006 @@ -4,51 +4,54 @@ »» <{$smarty.const._AD_USER_LANG_MAILJOB_DELETE}> -

<{$smarty.const._AD_USER_LANG_MAILJOB_DELETE}>

+

<{$smarty.const._AD_USER_LANG_MAILJOB_DELETE}>

<{$smarty.const._AD_USER_MESSAGE_CONFIRM_DELETE}>

-
<{$smarty.const._AD_USER_LANG_TITLE}> + <{if $actionForm->get('mailjob_id')}> + <{$smarty.const._AD_USER_LANG_MAILJOB_EDIT}> + <{else}> + <{$smarty.const._AD_USER_LANG_MAILJOB_NEW}> + <{/if}> +
<{$smarty.const._AD_USER_LANG_TITLE}> "> <{xoops_input type=text name=title value=$actionForm->get('title') size=32 maxlength=255}>
<{$smarty.const._AD_USER_LANG_BODY}><{$smarty.const._AD_USER_LANG_BODY}> "> <{xoops_dhtmltarea type=text name=body value=$actionForm->get('body') rows=10}> +<{* <{xoops_textarea type=text name=body value=$actionForm->get('body') cols=50 rows=10}> *}>
<{$smarty.const._AD_USER_LANG_FROM_NAME}><{$smarty.const._AD_USER_LANG_FROM_NAME}> "> <{xoops_input type=text name=from_name value=$actionForm->get('from_name') size=32 maxlength=255}>
<{$smarty.const._AD_USER_LANG_FROM_EMAIL}><{$smarty.const._AD_USER_LANG_FROM_EMAIL}> "> <{xoops_input type=text name=from_email value=$actionForm->get('from_email') size=32 maxlength=255}>
<{$smarty.const._AD_USER_LANG_IS_PM}><{$smarty.const._AD_USER_LANG_IS_PM}> "> <{xoops_input type=checkbox name=is_pm value=1 default=$actionForm->get('is_pm')}>
<{$smarty.const._AD_USER_LANG_IS_MAIL}><{$smarty.const._AD_USER_LANG_IS_MAIL}> "> <{xoops_input type=checkbox name=is_mail value=1 default=$actionForm->get('is_mail')}>
+
+ + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=mailjob_id value=$actionForm->get('mailjob_id')}> +
- + + + + - + - + - + - + - + - + - + - -
<{$smarty.const._AD_USER_LANG_MAILJOB_ID}><{$smarty.const._AD_USER_LANG_MAILJOB_DELETE}>
<{$smarty.const._AD_USER_LANG_MAILJOB_ID}> "><{$object->getVar('mailjob_id')}>
<{$smarty.const._AD_USER_LANG_TITLE}><{$smarty.const._AD_USER_LANG_TITLE}> "><{$object->getVar('title')}>
<{$smarty.const._AD_USER_LANG_BODY}><{$smarty.const._AD_USER_LANG_BODY}> "><{$object->getVar('body')}>
<{$smarty.const._AD_USER_LANG_FROM_NAME}><{$smarty.const._AD_USER_LANG_FROM_NAME}> "><{$object->getVar('from_name')}>
<{$smarty.const._AD_USER_LANG_FROM_EMAIL}><{$smarty.const._AD_USER_LANG_FROM_EMAIL}> "><{$object->getVar('from_email')}>
<{$smarty.const._AD_USER_LANG_IS_PM}><{$smarty.const._AD_USER_LANG_IS_PM}> "><{$object->getVar('is_pm')}>
<{$smarty.const._AD_USER_LANG_IS_MAIL}><{$smarty.const._AD_USER_LANG_IS_MAIL}> "><{$object->getVar('is_mail')}>
<{$smarty.const._AD_USER_LANG_CREATE_UNIXTIME}><{$smarty.const._AD_USER_LANG_CREATE_UNIXTIME}> "><{$object->get('create_unixtime')|xoops_formattimestamp:l}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=mailjob_id value=$actionForm->get('mailjob_id')}> - - - +
+ +
+ + From tom_g3x @ users.sourceforge.jp Fri May 12 00:46:05 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Fri, 12 May 2006 00:46:05 +0900 Subject: [xoops-cvslog 2992] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060511154605.B64EB2AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.1 Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html Fri May 12 00:46:05 2006 @@ -14,9 +14,6 @@

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_NEW}>

<{$smarty.const._AD_BASE_TIPS_IMGCAT_STORETYPE}>
<{/if}> - - - <{if $actionForm->hasError()}>
    @@ -25,18 +22,27 @@ <{/foreach}>
<{/if}> +
<{xoops_token form=$actionForm}> <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> - +
+ + - + - + - + - + - + - + - + - + <{if $actionForm->get('imgcat_id') == 0}> - + <{/if}> - Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.1 Wed May 10 19:24:49 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Fri May 12 00:46:05 2006 @@ -5,35 +5,34 @@

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}>

- -
+ -
+ <{if $actionForm->get('imgcat_id')}> + <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_EDIT}> + <{else}> + <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_NEW}> + <{/if}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}><{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}> "> - <{xoops_input type=text name=imgcat_name value=$actionForm->get('imgcat_name') size=15 maxlength=100}> + <{xoops_input type=text name=imgcat_name value=$actionForm->get('imgcat_name') size=40 maxlength=100}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_READ_GROUPS}><{$smarty.const._AD_BASE_LANG_IMGCAT_READ_GROUPS}> ">
<{$smarty.const._AD_BASE_LANG_IMGCAT_UPLOAD_GROUPS}><{$smarty.const._AD_BASE_LANG_IMGCAT_UPLOAD_GROUPS}> ">
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}> "> <{xoops_input type=text name=imgcat_maxsize value=$actionForm->get('imgcat_maxsize')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}> "> <{xoops_input type=text name=imgcat_maxwidth value=$actionForm->get('imgcat_maxwidth')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}> "> <{xoops_input type=text name=imgcat_maxheight value=$actionForm->get('imgcat_maxheight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}><{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}> "> <{xoops_input type=checkbox name=imgcat_display value=1 default=$actionForm->get('imgcat_display')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}><{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}> "> <{xoops_input type=text name=imgcat_weight value=$actionForm->get('imgcat_weight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}><{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}> "> <{xoops_input type=radio name=imgcat_storetype value="file" default=$actionForm->get('imgcat_storetype')}>FILE
<{xoops_input type=radio name=imgcat_storetype value="db" default=$actionForm->get('imgcat_storetype')}>DB @@ -91,7 +97,7 @@
+
+
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> <{foreach item=obj from=$objects}> @@ -47,11 +46,11 @@ <{/foreach}>
<{$smarty.const._AD_BASE_LANG_IMAGE_ID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('image_weight')}> <{$obj->getVar('imgcat_id')}> - " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + Index: xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.1 Tue May 9 19:21:00 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html Fri May 12 00:46:05 2006 @@ -4,55 +4,59 @@ »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}>
-

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}>

+

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}>

<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>

- + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> +
- + + + + - + - + - + - + - + - + - + - + - -
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}><{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_DELETE}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}> "><{$object->getVar('imgcat_id')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}><{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}> "><{$object->getVar('imgcat_name')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}> "><{$object->getVar('imgcat_maxsize')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}> "><{$object->getVar('imgcat_maxwidth')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}><{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}> "><{$object->getVar('imgcat_maxheight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}><{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}> "><{$object->getVar('imgcat_display')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}><{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}> "><{$object->getVar('imgcat_weight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_TYPE}><{$smarty.const._AD_BASE_LANG_IMGCAT_TYPE}> "><{$object->getVar('imgcat_type')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}><{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}> "><{$object->getVar('imgcat_storetype')}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> - - - +
+ +
+ + + \ No newline at end of file Index: xoops2jp/html/modules/base/admin/templates/image_delete.html diff -u xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.1 Wed May 10 19:25:52 2006 +++ xoops2jp/html/modules/base/admin/templates/image_delete.html Fri May 12 00:46:05 2006 @@ -4,51 +4,51 @@ »» <{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}>
-

<{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}>

+

<{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}>

<{$smarty.const._AD_BASE_MESSAGE_CONFIRM_DELETE}>

- + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> +
- + - + - + - + - + - + - + - + - -
<{$smarty.const._AD_BASE_LANG_IMAGE_ID}><{$smarty.const._AD_BASE_LANG_IMAGE_ID}> "><{$object->getVar('image_id')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}><{$smarty.const._AD_BASE_LANG_IMAGE_NAME}> "><{$object->getVar('image_name')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}><{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}> "><{$object->getVar('image_nicename')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}><{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}> "><{$object->getVar('image_mimetype')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}><{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}> "><{$object->getVar('image_created')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}><{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}> "><{$object->getVar('image_display')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}><{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}> "><{$object->getVar('image_weight')}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}><{$smarty.const._AD_BASE_LANG_IMGCAT_ID}> "><{$object->getVar('imgcat_id')}>

- - <{xoops_token form=$actionForm}> - <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> - - - +
+ +
+ + Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.2 Wed May 10 19:24:38 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Fri May 12 00:46:05 2006 @@ -5,38 +5,38 @@

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

- -
+ - + +
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> @@ -54,11 +54,11 @@ <{/foreach}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_NAME}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_WEIGHT}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_TYPE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMGCAT_STORETYPE}>
- " alt="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_BASE_LANG_IMAGE_COUNT}> <{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getImageCount()|escape}> <{$smarty.const._AD_BASE_LANG_LIST}> - " alt="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
+ + From tom_g3x @ users.sourceforge.jp Fri May 12 00:50:57 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Fri, 12 May 2006 00:50:57 +0900 Subject: [xoops-cvslog 2993] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060511155057.8C5212AC010@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.32 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.33 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.32 Tue May 9 19:21:27 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Fri May 12 00:50:57 2006 @@ -69,6 +69,7 @@ define('_AD_BASE_LANG_FUNC_FILE', "コールバック関数定義ファイル"); define('_AD_BASE_LANG_FUNC_NUM', "関数ナンバ"); define('_AD_BASE_LANG_ID', "ID"); +define('_AD_BASE_LANG_IMAGE_COUNT', "画像数"); define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); From tom_g3x @ users.sourceforge.jp Fri May 12 00:50:57 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Fri, 12 May 2006 00:50:57 +0900 Subject: [xoops-cvslog 2994] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060511155057.B04C92AC02F@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.27 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.28 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.27 Tue May 9 19:21:27 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Fri May 12 00:50:57 2006 @@ -69,6 +69,7 @@ define('_AD_BASE_LANG_FUNC_FILE', "Callback file name"); define('_AD_BASE_LANG_FUNC_NUM', "Function number"); define('_AD_BASE_LANG_ID', "ID"); +define('_AD_BASE_LANG_IMAGE_COUNT', "image count"); define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); From minahito @ users.sourceforge.jp Fri May 12 19:11:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:11:58 +0900 Subject: [xoops-cvslog 2995] CVS update: xoops2jp/html/kernel Message-ID: <20060512101158.E6F612AC074@users.sourceforge.jp> Index: xoops2jp/html/kernel/configitem.php diff -u xoops2jp/html/kernel/configitem.php:1.2.8.3 xoops2jp/html/kernel/configitem.php:1.2.8.4 --- xoops2jp/html/kernel/configitem.php:1.2.8.3 Mon Feb 6 14:21:07 2006 +++ xoops2jp/html/kernel/configitem.php Fri May 12 19:11:58 2006 @@ -1,5 +1,5 @@ initVar('conf_valuetype', XOBJ_DTYPE_OTHER); $this->initVar('conf_order', XOBJ_DTYPE_INT); } + + /** + * Get a constract of title + */ + function getTitle() + { + return defined($this->get('conf_title')) ? constant($this->get('conf_title')) : $this->get('conf_title'); + } + + /** + * Get a constract of description + */ + function getDesc() + { + return defined($this->get('conf_desc')) ? constant($this->get('conf_desc')) : $this->get('conf_desc'); + } + + /** + * @return array() + */ + function getOptionItems() + { + $optionArr = array(); + + $handler =& xoops_gethandler('config'); + $optionArr =& $handler->getConfigOptions(new Criteria('conf_id', $this->get('conf_id'))); + + return $optionArr; + } /** * Get a config value in a format ready for output From minahito @ users.sourceforge.jp Fri May 12 19:12:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:12:10 +0900 Subject: [xoops-cvslog 2996] CVS update: xoops2jp/html/kernel Message-ID: <20060512101210.20A1A2AC074@users.sourceforge.jp> Index: xoops2jp/html/kernel/configoption.php diff -u xoops2jp/html/kernel/configoption.php:1.2 xoops2jp/html/kernel/configoption.php:1.2.8.1 --- xoops2jp/html/kernel/configoption.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/kernel/configoption.php Fri May 12 19:12:10 2006 @@ -1,5 +1,5 @@ initVar('confop_value', XOBJ_DTYPE_TXTBOX, null, true, 255); $this->initVar('conf_id', XOBJ_DTYPE_INT, 0); } + + /** + * Get a constract of confop_value + */ + function getOptionKey() + { + return defined($this->get('confop_value')) ? constant($this->get('confop_value')) : $this->get('confop_value'); + } + + /** + * Get a constract of confop_name + */ + function getOptionLabel() + { + return defined($this->get('confop_name')) ? constant($this->get('confop_name')) : $this->get('confop_name'); + } } /** From minahito @ users.sourceforge.jp Fri May 12 19:12:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:12:24 +0900 Subject: [xoops-cvslog 2997] CVS update: xoops2jp/html/modules/base/admin Message-ID: <20060512101224.BD5842AC05E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/menu.php diff -u xoops2jp/html/modules/base/admin/menu.php:1.1.2.10 xoops2jp/html/modules/base/admin/menu.php:1.1.2.11 --- xoops2jp/html/modules/base/admin/menu.php:1.1.2.10 Tue May 9 19:19:58 2006 +++ xoops2jp/html/modules/base/admin/menu.php Fri May 12 19:12:24 2006 @@ -1,40 +1,43 @@ From minahito @ users.sourceforge.jp Fri May 12 19:12:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:12:50 +0900 Subject: [xoops-cvslog 2998] CVS update: xoops2jp/html/modules/base/admin/.xml Message-ID: <20060512101250.077912AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/.xml/image_delete.xml diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/image_delete.xml:1.1.2.1 --- /dev/null Fri May 12 19:12:49 2006 +++ xoops2jp/html/modules/base/admin/.xml/image_delete.xml Fri May 12 19:12:49 2006 @@ -0,0 +1,12 @@ + + + + + + + + + + + + From minahito @ users.sourceforge.jp Fri May 12 19:13:07 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:13:07 +0900 Subject: [xoops-cvslog 2999] CVS update: xoops2jp/html/modules/base/admin/.xml Message-ID: <20060512101307.EAB222AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/.xml/imagecategory_delete.xml diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/imagecategory_delete.xml:1.1.2.1 --- /dev/null Fri May 12 19:13:07 2006 +++ xoops2jp/html/modules/base/admin/.xml/imagecategory_delete.xml Fri May 12 19:13:07 2006 @@ -0,0 +1,12 @@ + + + + + + + + + + + + Index: xoops2jp/html/modules/base/admin/.xml/imagecategory_edit.xml diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/imagecategory_edit.xml:1.1.2.1 --- /dev/null Fri May 12 19:13:07 2006 +++ xoops2jp/html/modules/base/admin/.xml/imagecategory_edit.xml Fri May 12 19:13:07 2006 @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Index: xoops2jp/html/modules/base/admin/.xml/imagecategory_new.xml diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/imagecategory_new.xml:1.1.2.1 --- /dev/null Fri May 12 19:13:07 2006 +++ xoops2jp/html/modules/base/admin/.xml/imagecategory_new.xml Fri May 12 19:13:07 2006 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + From minahito @ users.sourceforge.jp Fri May 12 19:13:16 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:13:16 +0900 Subject: [xoops-cvslog 3000] CVS update: xoops2jp/html/modules/base/admin/.xml Message-ID: <20060512101316.9913E2AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/.xml/image_edit.xml diff -u /dev/null xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.1 --- /dev/null Fri May 12 19:13:16 2006 +++ xoops2jp/html/modules/base/admin/.xml/image_edit.xml Fri May 12 19:13:16 2006 @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From minahito @ users.sourceforge.jp Fri May 12 19:13:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:13:28 +0900 Subject: [xoops-cvslog 3001] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060512101328.B4B702AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.1 --- /dev/null Fri May 12 19:13:28 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Fri May 12 19:13:28 2006 @@ -0,0 +1,46 @@ +mActionForm =& new Base_ImageAdminEditForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("image_edit.html"); + $render->setAttribute('actionForm', $this->mActionForm); + #cubson::lazy_load('image', $this->mObject) + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=ImageList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=ImageList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Fri May 12 19:13:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:13:36 +0900 Subject: [xoops-cvslog 3002] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060512101336.F3E542AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.1 --- /dev/null Fri May 12 19:13:36 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Fri May 12 19:13:36 2006 @@ -0,0 +1,198 @@ + 0) ? new Legacy_ModulePreferenceEditState($this) : new Legacy_PreferenceEditState($this); + $state->prepare($controller, $xoopsUser); + + if ($this->mPreparedFlag) { + $handler =& xoops_gethandler('config'); + + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('conf_modid', $this->mActionForm->getModuleId())); + $criteria->add(new Criteria('conf_catid', $this->mActionForm->getCategoryId())); + + $this->mObjects =& $handler->getConfigs($criteria); + $this->mActionForm->prepare($this->mObjects); + } + } + + function getDefaultView(&$controller, &$xoopsUser) + { + if (!$this->mPreparedFlag) { + return LEGACY_FRAME_VIEW_ERROR; + } + + return LEGACY_FRAME_VIEW_INPUT; + } + + function execute(&$controller, &$xoopsUser) + { + if (!$this->mPreparedFlag) { + return LEGACY_FRAME_VIEW_ERROR; + } + + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + if ($this->mActionForm->hasError()) { + return $this->getDefaultView($controller, $xoopsUser); + } + + $this->mActionForm->update($this->mObjects); + $handler =& xoops_gethandler('config'); + + foreach (array_keys($this->mObjects) as $key) { + if (!$handler->insertConfig($this->mObjects[$key])) { + die("ERROR" . $this->mObjects[$key]->get('conf_name')); + } + } + + return LEGACY_FRAME_VIEW_SUCCESS; + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("preference_edit.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('objectArr', $this->mObjects); + + $handler =& xoops_gethandler('timezone'); + $timezoneArr =& $handler->getObjects(); + $render->setAttribute('timezoneArr', $timezoneArr); + + $handler =& xoops_gethandler('group'); + $groupArr =& $handler->getObjects(); + $render->setAttribute('groupArr', $groupArr); + + // + // Make the array of tplset object + // + $handler =& xoops_gethandler('tplset'); + $tplsetArr =& $handler->getObjects(); + $render->setAttribute('tplsetArr', $tplsetArr); + + // + // Make the list of installed languages. + // + $languageArr = array(); + $dirHandler = opendir(XOOPS_ROOT_PATH . "/language/"); + while ($file = readdir($dirHandler)) { + if (is_dir(XOOPS_ROOT_PATH . "/language/" . $file) && preg_match("/^[a-z_]+$/", $file)) { + $languageArr[$file] = $file; + } + } + closedir($dirHandler); + $render->setAttribute('languageArr', $languageArr); + + + // + // Make the array of module object for selecting startpage. + // + $handler =& xoops_gethandler('module'); + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('hasmain', 1)); + $criteria->add(new Criteria('isactive', 1)); + $moduleArr = $handler->getObjects($criteria); + $render->setAttribute('moduleArr', $moduleArr); + + + // + // Make the list of theme. + // + $themeArr = array(); + $dirHandler = opendir(XOOPS_THEME_PATH . "/"); + while ($file = readdir($dirHandler)) { + if (is_dir(XOOPS_THEME_PATH . "/" . $file) && preg_match("/^[a-z_]+$/", $file) && file_exists(XOOPS_THEME_PATH . "/${file}/theme.html")) { + $themeArr[$file] = $file; + } + } + closedir($dirHandler); + $render->setAttribute('themeArr', $themeArr); + + // + // Make the array of cachetime. + // + $handler =& xoops_gethandler('cachetime'); + $cachetimeArr = $handler->getObjects(); + $render->setAttribute('cachetimeArr', $cachetimeArr); + + // + // Make the list of user + // + $handler =& xoops_gethandler('member'); + $userArr = $handler->getUserList(); + $render->setAttribute('userArr', $userArr); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=PreferenceList"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=PreferenceList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +class Legacy_AbstractPreferenceEditState +{ + var $mMaster = null; + + function Legacy_AbstractPreferenceEditState(&$master) + { + $this->mMaster =& $master; + } + + function prepare(&$controller, &$xoopsUser) + { + } +} + +class Legacy_PreferenceEditState extends Legacy_AbstractPreferenceEditState +{ + function prepare(&$controller, &$xoopsUser) + { + $handler =& xoops_gethandler('configcategory'); + $category =& $handler->get(intval(xoops_getrequest('confcat_id'))); + + if (!is_object($category)) { + return; + } + + $this->mMaster->mActionForm =& new Legacy_PreferenceEditForm($category); + + $this->mMaster->mPreparedFlag = true; + } +} + +class Legacy_ModulePreferenceEditState extends Legacy_AbstractPreferenceEditState +{ + function prepare(&$controller, &$xoopsUser) + { + $handler =& xoops_gethandler('module'); + $module =& $handler->get(intval(xoops_getrequest('confmod_id'))); + + if (!is_object($module)) { + return; + } + + $this->mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($module); + + $this->mMaster->mPreparedFlag = true; + } +} + +?> Index: xoops2jp/html/modules/base/admin/actions/PreferenceListAction.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/actions/PreferenceListAction.class.php:1.1.2.1 --- /dev/null Fri May 12 19:13:36 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceListAction.class.php Fri May 12 19:13:36 2006 @@ -0,0 +1,35 @@ +mObjects =& $handler->getObjects(); + + return LEGACY_FRAME_VIEW_INDEX; + } + + function execute(&$controller, &$xoopsUser) + { + return $this->getDefaultView($controller, $xoopsUser); + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("preference_list.html"); + $render->setAttribute('objects', $this->mObjects); + } +} + +?> From minahito @ users.sourceforge.jp Fri May 12 19:13:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:13:54 +0900 Subject: [xoops-cvslog 3003] CVS update: xoops2jp/html/modules/base/admin/blocks Message-ID: <20060512101354.B42332AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php diff -u xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.8 --- xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.7 Tue Mar 28 22:28:48 2006 +++ xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php Fri May 12 19:13:54 2006 @@ -79,7 +79,7 @@ || ($module->getInfo('config') && is_array($module->getInfo('config'))) || ($module->getInfo('comments') && is_array($module->getInfo('comments')))) { $module->adminmenu[] = array( - 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$module->getVar('mid'), + 'link' => XOOPS_URL.'/modules/base/admin/index.php?action=PreferenceEdit&confmod_id='.$module->getVar('mid'), 'title' => _PREFERENCES, 'absolute' => true); } From minahito @ users.sourceforge.jp Fri May 12 19:14:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:14:22 +0900 Subject: [xoops-cvslog 3004] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060512101422.222002AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/PreferenceEditForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/PreferenceEditForm.class.php:1.1.2.1 --- /dev/null Fri May 12 19:14:22 2006 +++ xoops2jp/html/modules/base/admin/forms/PreferenceEditForm.class.php Fri May 12 19:14:22 2006 @@ -0,0 +1,142 @@ +mKeyValue = $category->get('confcat_id'); + } + + function getTokenName() + { + return "module.base.PreferenceEditForm.TOKEN" . $this->mId; + } + + function getCategoryId() + { + return $this->mKeyValue; + } + + function getModuleId() + { + return 0; + } + + function prepare(&$configArr) + { + // + // Set form properties + // + foreach ($configArr as $config) { + switch ($config->get('conf_valuetype')) { + case 'text': + if ($config->get('conf_formtype') == 'textarea') { + $this->mFormProperties[$config->get('conf_name')] =& new XCube_TextProperty($config->get('conf_name')); + } + else { + $this->mFormProperties[$config->get('conf_name')] =& new XCube_StringProperty($config->get('conf_name')); + } + $this->set($config->get('conf_name'), $config->get('conf_value')); + break; + + case 'float': + $this->mFormProperties[$config->get('conf_name')] =& new XCube_FloatProperty($config->get('conf_name')); + $this->set($config->get('conf_name'), $config->get('conf_value')); + + $this->mFieldProperties[$config->get('conf_name')] =& new XCube_FieldProperty($this); + $this->mFieldProperties[$config->get('conf_name')]->setDependsByArray(array('required')); + $this->mFieldProperties[$config->get('conf_name')]->addMessage('required', _AD_BASE_ERROR_REQUIRED, $config->get('conf_title')); + break; + + case 'int': + $this->mFormProperties[$config->get('conf_name')] =& new XCube_IntProperty($config->get('conf_name')); + $this->set($config->get('conf_name'), $config->get('conf_value')); + + $this->mFieldProperties[$config->get('conf_name')] =& new XCube_FieldProperty($this); + $this->mFieldProperties[$config->get('conf_name')]->setDependsByArray(array('required')); + $this->mFieldProperties[$config->get('conf_name')]->addMessage('required', _AD_BASE_ERROR_REQUIRED, $config->get('conf_title')); + break; + + case 'other': + $this->mFormProperties[$config->get('conf_name')] =& new XCube_StringProperty($config->get('conf_name')); + $this->set($config->get('conf_name'), $config->get('conf_value')); + break; + + case 'array': + if($config->get('conf_formtype') == 'textarea') { + $this->mFormProperties[$config->get('conf_name')] =& new XCube_StringProperty($config->get('conf_name')); + $this->set($config->get('conf_name'), implode("|", unserialize($config->get('conf_value')))); + } + else { + $this->mFormProperties[$config->get('conf_name')] =& new XCube_StringArrayProperty($config->get('conf_name')); + $t_arr = unserialize($config->get('conf_value')); + foreach ($t_arr as $_key => $_value) { + $this->set($config->get('conf_name'), $_key, $_value); + } + } + break; + } + } + } + + function getImploadValue($key) + { + $value = $this->get($key); + return is_array($value) ? implode("|", $value) : $value; + } + + function update(&$configArr) + { + foreach (array_keys($configArr) as $key) { + $value = $this->get($configArr[$key]->get('conf_name')); + + if ($configArr[$key]->get('conf_valuetype') == 'array') { + if (is_array($value)) { + $configArr[$key]->set('conf_value', serialize($value)); + } + else { + $configArr[$key]->set('conf_value', serialize(explode("|", $value))); + } + } + else { + $configArr[$key]->set('conf_value', $value); + } + } + } +} + +class Legacy_ModulePreferenceEditForm extends Legacy_PreferenceEditForm +{ + var $mKeyName = "confmod_id"; + + function Legacy_ModulePreferenceEditForm(&$module) + { + parent::XCube_ActionForm(); + $this->mKeyValue = $module->get('mid'); + } + + function getTokenName() + { + return "module.base.ModulePreferenceEditForm.TOKEN" . $this->mId; + } + + function getCategoryId() + { + return 0; + } + + function getModuleId() + { + return $this->mKeyValue; + } +} + +?> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u /dev/null xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.1 --- /dev/null Fri May 12 19:14:22 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Fri May 12 19:14:22 2006 @@ -0,0 +1,93 @@ +mFormProperties['image_id'] =& new XCube_IntProperty('image_id'); + $this->mFormProperties['image_name'] =& new XCube_StringProperty('image_name'); + $this->mFormProperties['image_nicename'] =& new XCube_StringProperty('image_nicename'); + $this->mFormProperties['image_mimetype'] =& new XCube_StringProperty('image_mimetype'); + $this->mFormProperties['image_created'] =& new XCube_IntProperty('image_created'); + $this->mFormProperties['image_display'] =& new XCube_BoolProperty('image_display'); + $this->mFormProperties['image_weight'] =& new XCube_IntProperty('image_weight'); + $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); + + // + // Set field properties + // + + $this->mFieldProperties['image_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_id']->setDependsByArray(array('required')); + $this->mFieldProperties['image_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_ID); + + $this->mFieldProperties['image_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_name']->setDependsByArray(array('required','maxlength')); + $this->mFieldProperties['image_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME, '30'); + $this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_NAME, '30'); + $this->mFieldProperties['image_name']->addVar('maxlength', '30'); + + $this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_nicename']->setDependsByArray(array('required','maxlength')); + $this->mFieldProperties['image_nicename']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NICENAME, '255'); + $this->mFieldProperties['image_nicename']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_NICENAME, '255'); + $this->mFieldProperties['image_nicename']->addVar('maxlength', '255'); + + $this->mFieldProperties['image_mimetype'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_mimetype']->setDependsByArray(array('required','maxlength')); + $this->mFieldProperties['image_mimetype']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_MIMETYPE, '30'); + $this->mFieldProperties['image_mimetype']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_MIMETYPE, '30'); + $this->mFieldProperties['image_mimetype']->addVar('maxlength', '30'); + + $this->mFieldProperties['image_created'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_created']->setDependsByArray(array('required')); + $this->mFieldProperties['image_created']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_CREATED); + + $this->mFieldProperties['image_weight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_weight']->setDependsByArray(array('required')); + $this->mFieldProperties['image_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_WEIGHT); + + $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); + } + + function load(&$obj) + { + $this->set('image_id', $obj->get('image_id')); + $this->set('image_name', $obj->get('image_name')); + $this->set('image_nicename', $obj->get('image_nicename')); + $this->set('image_mimetype', $obj->get('image_mimetype')); + $this->set('image_created', $obj->get('image_created')); + $this->set('image_display', $obj->get('image_display')); + $this->set('image_weight', $obj->get('image_weight')); + $this->set('imgcat_id', $obj->get('imgcat_id')); + } + + function update(&$obj) + { + $obj->set('image_id', $this->get('image_id')); + $obj->set('image_name', $this->get('image_name')); + $obj->set('image_nicename', $this->get('image_nicename')); + $obj->set('image_mimetype', $this->get('image_mimetype')); + $obj->set('image_created', $this->get('image_created')); + $obj->set('image_display', $this->get('image_display')); + $obj->set('image_weight', $this->get('image_weight')); + $obj->set('imgcat_id', $this->get('imgcat_id')); + } +} + +?> From minahito @ users.sourceforge.jp Fri May 12 19:14:33 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:14:33 +0900 Subject: [xoops-cvslog 3005] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060512101433.8AD032AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_edit.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.1 --- /dev/null Fri May 12 19:14:33 2006 +++ xoops2jp/html/modules/base/admin/templates/image_edit.html Fri May 12 19:14:33 2006 @@ -0,0 +1,77 @@ +
+ <{$smarty.const._MI_BASE_NAME}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> + <{if $actionForm->get('image_id')}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_EDIT}> + <{else}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_NEW}> + <{/if}> +
+ + <{if $actionForm->get('image_id')}> +

<{$smarty.const._AD_BASE_LANG_IMAGE_EDIT}>

+ <{else}> +

<{$smarty.const._AD_BASE_LANG_IMAGE_NEW}>

+ <{/if}> + +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> +
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}>"> + <{xoops_input type=text name=image_name value=$actionForm->get('image_name') size=15 maxlength=30}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}>"> + <{xoops_input type=text name=image_nicename value=$actionForm->get('image_nicename') size=15 maxlength=255}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}>"> + <{xoops_input type=text name=image_mimetype value=$actionForm->get('image_mimetype') size=15 maxlength=30}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>"> + <{xoops_input type=text name=image_created value=$actionForm->get('image_created')}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}>"> + <{xoops_input type=checkbox name=image_display value=1 default=$actionForm->get('image_display')}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}>"> + <{xoops_input type=text name=image_weight value=$actionForm->get('image_weight')}> +
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>"> + <{xoops_input type=text name=imgcat_id value=$actionForm->get('imgcat_id')}> +
+ + +
+
From minahito @ users.sourceforge.jp Fri May 12 19:14:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:14:43 +0900 Subject: [xoops-cvslog 3006] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060512101443.C73142AC074@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.1 --- /dev/null Fri May 12 19:14:43 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Fri May 12 19:14:43 2006 @@ -0,0 +1,171 @@ +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> +
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=$actionForm->mKeyName value=$actionForm->mKeyValue}> + + + + <{foreach item=config from=$objectArr}> + + + + + <{/foreach}> + + + +
+ <{$config->getTitle()|escape}> + <{if $config->get('conf_desc') != null}> +

+ <{$config->getDesc()|escape}> + <{/if}> +
+ <{if $config->get('conf_formtype') == 'textarea'}> + <{xoops_textarea name=$config->getVar('conf_name') id=$config->getVar('conf_name') rows=5 cols=50 value=$actionForm->get($config->get('conf_name'))}> + + + <{elseif $config->get('conf_formtype') == 'select'}> + + + + <{elseif $config->get('conf_formtype') == 'select_multi'}> + + + + <{elseif $config->get('conf_formtype') == 'yesno'}> + <{xoops_input type=radio name=$config->get('conf_name') id=$config->get('conf_name') value=1 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._YES}> + <{xoops_input type=radio name=$config->get('conf_name') id=$config->get('conf_name') value=0 default=$actionForm->get($config->get('conf_name'))}><{$smarty.const._NO}> + + + <{elseif $config->get('conf_formtype') == 'theme'}> + + + + <{elseif $config->get('conf_formtype') == 'theme_multi'}> + + + + <{elseif $config->get('conf_formtype') == 'tplset'}> + + + + <{elseif $config->get('conf_formtype') == 'timezone'}> + + + + <{elseif $config->get('conf_formtype') == 'language'}> + + + + <{elseif $config->get('conf_formtype') == 'startpage'}> + + + + <{elseif $config->get('conf_formtype') == 'group'}> + + + + <{elseif $config->get('conf_formtype') == 'group_multi'}> + + + + <{elseif $config->get('conf_formtype') == 'user'}> + + + + <{elseif $config->get('conf_formtype') == 'user_multi'}> + + + + <{elseif $config->get('conf_formtype') == 'module_cache'}> + <{foreach item=module from=$moduleArr}> + <{$module->getVar('name')}> + +
+ <{/foreach}> + + + <{elseif $config->get('conf_formtype') == 'password'}> + <{xoops_input type=password name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + + + <{elseif $config->get('conf_formtype') == 'textbox'}> + <{xoops_input type=text name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + + + <{/if}> +
+ + +
+
Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u /dev/null xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.1 --- /dev/null Fri May 12 19:14:43 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Fri May 12 19:14:43 2006 @@ -0,0 +1,28 @@ + + +

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

+ + +
+ + + + + + + + <{foreach item=obj from=$objects}> + + + + + + <{/foreach}> +
<{$smarty.const._AD_BASE_LANG_CONFCAT_ID}><{$smarty.const._AD_BASE_LANG_CONFCAT_NAME}><{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('confcat_id')}><{$obj->getVar('confcat_name')}> + " alt="<{$smarty.const._EDIT}>" /> +
+
+
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Fri May 12 19:15:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:15:53 +0900 Subject: [xoops-cvslog 3007] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060512101553.9B4C62AC05E@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.28 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.29 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.28 Fri May 12 00:50:57 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Fri May 12 19:15:53 2006 @@ -69,7 +69,7 @@ define('_AD_BASE_LANG_FUNC_FILE', "Callback file name"); define('_AD_BASE_LANG_FUNC_NUM', "Function number"); define('_AD_BASE_LANG_ID', "ID"); -define('_AD_BASE_LANG_IMAGE_COUNT', "image count"); +define('_AD_BASE_LANG_IMAGE_COUNT', "Image count"); define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); @@ -99,6 +99,7 @@ define('_AD_BASE_LANG_ISACTIVE', "Active"); define('_AD_BASE_LANG_LAST_MODIFIED', "Last modified"); define('_AD_BASE_LANG_LCR', "L-CTR-R"); +define('_AD_BASE_LANG_LIST', "List"); define('_AD_BASE_LANG_MID', "MID"); define('_AD_BASE_LANG_NAME', "Name"); define('_AD_BASE_LANG_ONLINE_IP', "Online ip"); From minahito @ users.sourceforge.jp Fri May 12 19:16:21 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:16:21 +0900 Subject: [xoops-cvslog 3008] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060512101621.25F152AC05E@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.33 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.34 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.33 Fri May 12 00:50:57 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Fri May 12 19:16:21 2006 @@ -99,6 +99,7 @@ define('_AD_BASE_LANG_ISACTIVE', "アクティブ"); define('_AD_BASE_LANG_LAST_MODIFIED', "最終更新日時"); define('_AD_BASE_LANG_LCR', "右-中央-左"); +define('_AD_BASE_LANG_LIST', "一覧"); define('_AD_BASE_LANG_MID', "モジュール"); define('_AD_BASE_LANG_NAME', "name"); define('_AD_BASE_LANG_ONLINE_IP', "IP"); From minahito @ users.sourceforge.jp Fri May 12 19:16:48 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:16:48 +0900 Subject: [xoops-cvslog 3009] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060512101648.B69E72AC05E@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.14 xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.15 --- xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.14 Tue May 9 19:21:27 2006 +++ xoops2jp/html/modules/base/language/japanese/modinfo.php Fri May 12 19:16:48 2006 @@ -40,6 +40,7 @@ define('_MI_BASE_MENU_IMAGE_MANAGE', "Image Manage"); define('_MI_BASE_MENU_MODULEINSTALL', "モジュールのインストール"); define('_MI_BASE_MENU_MODULELIST', "モジュールの管理"); +define('_MI_BASE_MENU_PREFERENCE', "Preference"); define('_MI_BASE_MENU_SMILES_MANAGE', "顔アイコンの管理"); define('_MI_BASE_NAME', "互換モジュール"); define('_MI_BASE_NAME_DESC', "XOOPS Cube にXOOPS 2.0.x シリーズの互換性を与えます"); From minahito @ users.sourceforge.jp Fri May 12 19:16:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:16:53 +0900 Subject: [xoops-cvslog 3010] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060512101653.27E3F2AC05E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/modinfo.php diff -u xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.14 xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.15 --- xoops2jp/html/modules/base/language/english/modinfo.php:1.1.2.14 Tue May 9 19:21:27 2006 +++ xoops2jp/html/modules/base/language/english/modinfo.php Fri May 12 19:16:53 2006 @@ -40,6 +40,7 @@ define('_MI_BASE_MENU_IMAGE_MANAGE', "Image Manage"); define('_MI_BASE_MENU_MODULEINSTALL', "Install module"); define('_MI_BASE_MENU_MODULELIST', "Module management"); +define('_MI_BASE_MENU_PREFERENCE', "Preference"); define('_MI_BASE_MENU_SMILES_MANAGE', "Smiles management"); define('_MI_BASE_NAME', "Legacy system"); define('_MI_BASE_NAME_DESC', "This module provides compatibility of XOOPS Cube with XOOPS 2.0.x."); From minahito @ users.sourceforge.jp Fri May 12 19:17:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:17:55 +0900 Subject: [xoops-cvslog 3011] CVS update: xoops2jp/html/class Message-ID: <20060512101755.203BA2AC016@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_ActionForm.class.php diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.31 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.32 --- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.31 Thu Apr 6 15:49:35 2006 +++ xoops2jp/html/class/XCube_ActionForm.class.php Fri May 12 19:17:54 2006 @@ -419,7 +419,7 @@ parent::fetch($key); if (preg_match_all("/[\\x00-\\x1f]/", $this->mValue, $matches, PREG_PATTERN_ORDER)) { foreach ($matches[0] as $match) { - die("Get control code :" . ord($match)); + die("[". $this->mName . "]Get control code :" . ord($match)); } } } From minahito @ users.sourceforge.jp Fri May 12 19:21:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:21:11 +0900 Subject: [xoops-cvslog 3012] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060512102111.34ACD2AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php diff -u xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.6 xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.7 --- xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php:1.1.2.6 Tue Mar 28 22:29:21 2006 +++ xoops2jp/html/modules/base/class/Legacy_ModuleAdapter.class.php Fri May 12 19:21:11 2006 @@ -54,7 +54,7 @@ if($findFlag) { $eventArgs->addRecord($this->mAdaptee->getVar('name'), - XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$this->mAdaptee->getVar('mid'), + XOOPS_URL.'/modules/base/admin/index.php?action=PreferenceEdit&confmod_id='.$this->mAdaptee->getVar('mid'), _PREFERENCES ); } } From minahito @ users.sourceforge.jp Fri May 12 19:22:14 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 12 May 2006 19:22:14 +0900 Subject: [xoops-cvslog 3013] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060512102214.BBBEE2AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.1 Fri May 12 19:14:43 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Fri May 12 19:22:14 2006 @@ -5,9 +5,6 @@

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

- -
- From tom_g3x @ users.sourceforge.jp Sat May 13 00:59:16 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Sat, 13 May 2006 00:59:16 +0900 Subject: [xoops-cvslog 3014] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060512155916.6B5E72AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.1 Fri May 12 19:14:43 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Sat May 13 00:59:16 2006 @@ -1,3 +1,10 @@ +
+ *module name* + »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> +
+ +

<{$smarty.const._MI_BASE_MENU_PREFERENCE}>

+ <{if $actionForm->hasError()}>
    <{foreach item=message from=$actionForm->getErrorMessages()}> @@ -10,17 +17,20 @@ <{xoops_input type=hidden name=$actionForm->mKeyName value=$actionForm->mKeyValue}>
<{$smarty.const._AD_BASE_LANG_CONFCAT_ID}>
+ + + <{foreach item=config from=$objectArr}> - - + - Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.2 Fri May 12 19:22:14 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Sat May 13 00:59:16 2006 @@ -1,25 +1,24 @@
<{$smarty.const._MI_BASE_NAME}> - »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}> + »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> +
-

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

+

<{$smarty.const._MI_BASE_MENU_PREFERENCE}>

-
*module name* <{$smarty.const._MI_BASE_MENU_PREFERENCE}>
- <{$config->getTitle()|escape}> +
+ <{$config->getTitle()|escape}> <{if $config->get('conf_desc') != null}>

- <{$config->getDesc()|escape}> + <{$config->getDesc()|escape}> <{/if}>
+ "> <{if $config->get('conf_formtype') == 'textarea'}> <{xoops_textarea name=$config->getVar('conf_name') id=$config->getVar('conf_name') rows=5 cols=50 value=$actionForm->get($config->get('conf_name'))}> @@ -156,6 +166,8 @@ <{elseif $config->get('conf_formtype') == 'textbox'}> <{xoops_input type=text name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> + <{elseif $config->get('conf_formtype') == 'text'}> <{* deprecated *}> + <{xoops_input type=text name=$config->get('conf_name') id=$config->get('conf_name') size=50 maxlength=255 value=$actionForm->get($config->get('conf_name'))}> <{/if}>
+
<{foreach item=obj from=$objects}> - + - + <{/foreach}>
<{$smarty.const._AD_BASE_LANG_CONFCAT_ID}> <{$smarty.const._AD_BASE_LANG_CONFCAT_NAME}> <{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('confcat_id')}><{$obj->getVar('confcat_name')}><{$obj->getVar('confcat_name')}> - " alt="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._EDIT}> title="<{$smarty.const._EDIT}>" />
-
-
<{xoops_pagenavi pagenavi=$pageNavi}>
From minahito @ users.sourceforge.jp Mon May 15 12:13:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 12:13:10 +0900 Subject: [xoops-cvslog 3015] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515031310.C00822AC085@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.1 Fri May 12 19:13:36 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Mon May 15 12:13:10 2006 @@ -7,6 +7,8 @@ class Legacy_PreferenceEditAction extends Legacy_Action { var $mPreparedFlag = false; + + var $mCategory = null; var $mObjects = array(); var $mActionForm = null; @@ -68,6 +70,8 @@ $render->setAttribute('actionForm', $this->mActionForm); $render->setAttribute('objectArr', $this->mObjects); + $render->setAttribute('category', $this->mCategory); + $handler =& xoops_gethandler('timezone'); $timezoneArr =& $handler->getObjects(); $render->setAttribute('timezoneArr', $timezoneArr); @@ -149,11 +153,11 @@ class Legacy_AbstractPreferenceEditState { - var $mMaster = null; + var $_mMaster = null; function Legacy_AbstractPreferenceEditState(&$master) { - $this->mMaster =& $master; + $this->_mMaster =& $master; } function prepare(&$controller, &$xoopsUser) @@ -166,15 +170,15 @@ function prepare(&$controller, &$xoopsUser) { $handler =& xoops_gethandler('configcategory'); - $category =& $handler->get(intval(xoops_getrequest('confcat_id'))); + $this->_mMaster->mCategory =& $handler->get(intval(xoops_getrequest('confcat_id'))); - if (!is_object($category)) { + if (!is_object($this->_mMaster->mCategory)) { return; } - $this->mMaster->mActionForm =& new Legacy_PreferenceEditForm($category); + $this->_mMaster->mActionForm =& new Legacy_PreferenceEditForm($category); - $this->mMaster->mPreparedFlag = true; + $this->_mMaster->mPreparedFlag = true; } } @@ -189,9 +193,9 @@ return; } - $this->mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($module); + $this->_mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($module); - $this->mMaster->mPreparedFlag = true; + $this->_mMaster->mPreparedFlag = true; } } From minahito @ users.sourceforge.jp Mon May 15 12:16:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 12:16:35 +0900 Subject: [xoops-cvslog 3016] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515031635.921E72AC085@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.2 Mon May 15 12:13:10 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Mon May 15 12:16:35 2006 @@ -9,6 +9,7 @@ var $mPreparedFlag = false; var $mCategory = null; + var $mModule = null; var $mObjects = array(); var $mActionForm = null; @@ -71,6 +72,7 @@ $render->setAttribute('objectArr', $this->mObjects); $render->setAttribute('category', $this->mCategory); + $render->setAttribute('category', $this->mModule); $handler =& xoops_gethandler('timezone'); $timezoneArr =& $handler->getObjects(); @@ -187,13 +189,13 @@ function prepare(&$controller, &$xoopsUser) { $handler =& xoops_gethandler('module'); - $module =& $handler->get(intval(xoops_getrequest('confmod_id'))); + $this->_mMaster->mModule =& $handler->get(intval(xoops_getrequest('confmod_id'))); - if (!is_object($module)) { + if (!is_object($this->_mMaster->mModule)) { return; } - $this->_mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($module); + $this->_mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($this->_mMaster->mModule); $this->_mMaster->mPreparedFlag = true; } From minahito @ users.sourceforge.jp Mon May 15 12:22:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 12:22:31 +0900 Subject: [xoops-cvslog 3017] CVS update: xoops2jp/html/modules/user Message-ID: <20060515032231.F0CFF2AC0C8@users.sourceforge.jp> Index: xoops2jp/html/modules/user/xoops_version.php diff -u xoops2jp/html/modules/user/xoops_version.php:1.1.2.17 xoops2jp/html/modules/user/xoops_version.php:1.1.2.18 --- xoops2jp/html/modules/user/xoops_version.php:1.1.2.17 Thu Apr 27 19:22:45 2006 +++ xoops2jp/html/modules/user/xoops_version.php Mon May 15 12:22:31 2006 @@ -1,5 +1,5 @@ "minpass", "title"=>"_MI_USER_CONF_MINPASS", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>5 ); @@ -93,7 +93,7 @@ $modversion['config'][]=array ( "name"=>"minuname", "title"=>"_MI_USER_CONF_MINUNAME", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>3 ); @@ -101,7 +101,7 @@ $modversion['config'][]=array ( "name"=>"maxuname", "title"=>"_MI_USER_CONF_MAXUNAME", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>10 ); @@ -169,7 +169,7 @@ "name"=>"avatar_minposts", "title"=>"_MI_USER_CONF_AVATAR_MINPOSTS", "description"=>"_MI_USER_CONF_AVATAR_MINPOSTS_DESC", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>0 ); @@ -177,7 +177,7 @@ $modversion['config'][]=array ( "name"=>"avatar_width", "title"=>"_MI_USER_CONF_AVATAR_WIDTH", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>80 ); @@ -185,7 +185,7 @@ $modversion['config'][]=array ( "name"=>"avatar_height", "title"=>"_MI_USER_CONF_AVATAR_HEIGHT", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>80 ); @@ -193,7 +193,7 @@ $modversion['config'][]=array ( "name"=>"avatar_maxsize", "title"=>"_MI_USER_CONF_AVATAR_MAXSIZE", - "formtype"=>"text", + "formtype"=>"textbox", "valuetype"=>"int", "default"=>35000 ); From minahito @ users.sourceforge.jp Mon May 15 13:29:44 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 13:29:44 +0900 Subject: [xoops-cvslog 3018] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515042944.68DD52AC0C3@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.4 --- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.3 Mon May 15 12:16:35 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Mon May 15 13:29:44 2006 @@ -72,7 +72,7 @@ $render->setAttribute('objectArr', $this->mObjects); $render->setAttribute('category', $this->mCategory); - $render->setAttribute('category', $this->mModule); + $render->setAttribute('module', $this->mModule); $handler =& xoops_gethandler('timezone'); $timezoneArr =& $handler->getObjects(); From minahito @ users.sourceforge.jp Mon May 15 14:26:02 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:26:02 +0900 Subject: [xoops-cvslog 3019] CVS update: xoops2jp/html/modules/base/admin/.xml Message-ID: <20060515052602.1E91B2AC0CA@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/.xml/image_edit.xml diff -u xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.1 xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.2 --- xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.1 Fri May 12 19:13:16 2006 +++ xoops2jp/html/modules/base/admin/.xml/image_edit.xml Mon May 15 14:26:01 2006 @@ -2,10 +2,8 @@ - + - - @@ -15,38 +13,27 @@ - + - - + + - + - - - - - - - - - - - - - - - + + + + From minahito @ users.sourceforge.jp Mon May 15 14:26:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:26:42 +0900 Subject: [xoops-cvslog 3020] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515052642.8D0612AC0CF@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.1 Fri May 12 19:13:28 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Mon May 15 14:26:42 2006 @@ -5,7 +5,7 @@ require_once XOOPS_MODULE_PATH . "/base/class/AbstractEditAction.class.php"; require_once XOOPS_MODULE_PATH . "/base/admin/forms/ImageAdminEditForm.class.php"; -class Base_ImageEditAction extends Base_AbstractEditAction +class Legacy_ImageEditAction extends Legacy_AbstractEditAction { function _getId() { @@ -20,16 +20,37 @@ function _setupActionForm() { - $this->mActionForm =& new Base_ImageAdminEditForm(); + $this->mActionForm =& new Legacy_ImageAdminEditForm(); $this->mActionForm->prepare(); } + function _doExecute() + { + if ($this->mActionForm->mFormFile != null) { + if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) { + return false; + } + } + + // + // If there is a old file, delete it + // + if ($this->mActionForm->mOldFilename != null) { + @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFilename); + } + + return parent::_doExecute(); + } + function executeViewInput(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("image_edit.html"); $render->setAttribute('actionForm', $this->mActionForm); - #cubson::lazy_load('image', $this->mObject) $render->setAttribute('object', $this->mObject); + + $handler =& xoops_getmodulehandler('imagecategory'); + $categoryArr =& $handler->getObjects(); + $render->setAttribute('categoryArr', $categoryArr); } function executeViewSuccess(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Mon May 15 14:26:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:26:50 +0900 Subject: [xoops-cvslog 3021] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060515052650.79FCA2AC0CF@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.1 Fri May 12 19:14:22 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Mon May 15 14:26:50 2006 @@ -5,11 +5,15 @@ require_once XOOPS_ROOT_PATH . "/class/XCube_ActionForm.class.php"; require_once XOOPS_MODULE_PATH . "/base/class/Legacy_Validator.class.php"; -class Base_ImageAdminEditForm extends XCube_ActionForm +class Legacy_ImageAdminEditForm extends XCube_ActionForm { + var $mOldFileName = null; + var $_mIsNew = null; + var $mFormFile = null; + function getTokenName() { - return "module.base.ImageAdminEditForm.TOKEN"; + return "module.base.ImageAdminEditForm.TOKEN" . $this->get('image_id'); } function prepare() @@ -18,10 +22,8 @@ // Set form properties // $this->mFormProperties['image_id'] =& new XCube_IntProperty('image_id'); - $this->mFormProperties['image_name'] =& new XCube_StringProperty('image_name'); + $this->mFormProperties['image_name'] =& new XCube_ImageFileProperty('image_name'); $this->mFormProperties['image_nicename'] =& new XCube_StringProperty('image_nicename'); - $this->mFormProperties['image_mimetype'] =& new XCube_StringProperty('image_mimetype'); - $this->mFormProperties['image_created'] =& new XCube_IntProperty('image_created'); $this->mFormProperties['image_display'] =& new XCube_BoolProperty('image_display'); $this->mFormProperties['image_weight'] =& new XCube_IntProperty('image_weight'); $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); @@ -29,64 +31,93 @@ // // Set field properties // - $this->mFieldProperties['image_id'] =& new XCube_FieldProperty($this); $this->mFieldProperties['image_id']->setDependsByArray(array('required')); $this->mFieldProperties['image_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_ID); $this->mFieldProperties['image_name'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_name']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['image_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME, '30'); - $this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_NAME, '30'); - $this->mFieldProperties['image_name']->addVar('maxlength', '30'); + $this->mFieldProperties['image_name']->setDependsByArray(array('extension')); + $this->mFieldProperties['image_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME); + $this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_EXTENSION, _AD_BASE_LANG_IMAGE_NAME); + $this->mFieldProperties['image_name']->addVar('extension', 'jpg,gif,png'); $this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_nicename']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['image_nicename']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NICENAME, '255'); - $this->mFieldProperties['image_nicename']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_NICENAME, '255'); - $this->mFieldProperties['image_nicename']->addVar('maxlength', '255'); - - $this->mFieldProperties['image_mimetype'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_mimetype']->setDependsByArray(array('required','maxlength')); - $this->mFieldProperties['image_mimetype']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_MIMETYPE, '30'); - $this->mFieldProperties['image_mimetype']->addMessage('maxlength', _AD_BASE_ERROR_MAXLENGTH, _AD_BASE_LANG_IMAGE_MIMETYPE, '30'); - $this->mFieldProperties['image_mimetype']->addVar('maxlength', '30'); - - $this->mFieldProperties['image_created'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_created']->setDependsByArray(array('required')); - $this->mFieldProperties['image_created']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_CREATED); + $this->mFieldProperties['image_nicename']->setDependsByArray(array('required')); + $this->mFieldProperties['image_nicename']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NICENAME); $this->mFieldProperties['image_weight'] =& new XCube_FieldProperty($this); $this->mFieldProperties['image_weight']->setDependsByArray(array('required')); $this->mFieldProperties['image_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_WEIGHT); $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required')); + $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required','objectExist')); $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addMessage('objectExist', _AD_BASE_ERROR_OBJECTEXIST, _AD_BASE_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addVar('handler', 'imagecategory'); + $this->mFieldProperties['imgcat_id']->addVar('module', 'base'); + } + + function validateImage_name() + { + $formFile = $this->get('image_name'); + + if ($formFile == null && $this->_mIsNew ) { + $this->addErrorMessage(_AD_BASE_ERROR_REQUIRED); + } + } + + function validate() + { + parent::validate(); + + $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $category =& $handler->get($this->get('imgcat_id')); + + $formFile = $this->get('image_name'); + + if ($formFile != null && is_object($category)) { + // + // Imagefile width & height check. + // + if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { + $this->addErrorMessage(_AD_BASE_ERROR_IMG_SIZE); + } + + // + // Check file size + // + if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { + $this->addErrorMessage(_AD_BASE_ERROR_IMG_FILESIZE); + } + } } function load(&$obj) { $this->set('image_id', $obj->get('image_id')); - $this->set('image_name', $obj->get('image_name')); $this->set('image_nicename', $obj->get('image_nicename')); - $this->set('image_mimetype', $obj->get('image_mimetype')); - $this->set('image_created', $obj->get('image_created')); $this->set('image_display', $obj->get('image_display')); $this->set('image_weight', $obj->get('image_weight')); $this->set('imgcat_id', $obj->get('imgcat_id')); + + $this->_mIsNew = $obj->isNew(); + $this->mOldFileName = $obj->get('image_name'); } function update(&$obj) { $obj->set('image_id', $this->get('image_id')); - $obj->set('image_name', $this->get('image_name')); $obj->set('image_nicename', $this->get('image_nicename')); - $obj->set('image_mimetype', $this->get('image_mimetype')); - $obj->set('image_created', $this->get('image_created')); $obj->set('image_display', $this->get('image_display')); $obj->set('image_weight', $this->get('image_weight')); $obj->set('imgcat_id', $this->get('imgcat_id')); + + $this->mFormFile = $this->get('image_name'); + if ($this->mFormFile != null) { + $this->mFormFile->setRandomToBodyName('img'); + $obj->set('image_name', $this->mFormFile->getFileName()); + $obj->set('image_mimetype', $this->mFormFile->getContentType()); + } } } From minahito @ users.sourceforge.jp Mon May 15 14:26:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:26:56 +0900 Subject: [xoops-cvslog 3022] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060515052656.B73202AC0CA@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_edit.html diff -u xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.1 xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.2 --- xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.1 Fri May 12 19:14:33 2006 +++ xoops2jp/html/modules/base/admin/templates/image_edit.html Mon May 15 14:26:56 2006 @@ -21,14 +21,14 @@ <{/foreach}> <{/if}> -
+ <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> @@ -38,18 +38,6 @@ - - - - - - - - From minahito @ users.sourceforge.jp Mon May 15 14:27:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:27:28 +0900 Subject: [xoops-cvslog 3023] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060515052728.841062AC0D1@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.34 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.35 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.34 Fri May 12 19:16:21 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Mon May 15 14:27:28 2006 @@ -4,6 +4,8 @@ define('_AD_BASE_ERROR_DBUPDATE_FAILED', "データベースの更新に失敗しました"); define('_AD_BASE_ERROR_EXTENSION', "許可されたファイル形式ではありません"); define('_AD_BASE_ERROR_GROUPID', "最低1グループ以上にアクセス権限を与えてください"); +define('_AD_BASE_ERROR_IMG_FILESIZE', "Img filesize"); +define('_AD_BASE_ERROR_IMG_SIZE', "Img size"); define('_AD_BASE_ERROR_INTRANGE', "{0}の値が不正です"); define('_AD_BASE_ERROR_MAXLENGTH', "{0}は半角{1}文字以下で入力して下さい"); define('_AD_BASE_ERROR_OBJECTEXIST', "{0}の値が不正です"); From minahito @ users.sourceforge.jp Mon May 15 14:27:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:27:28 +0900 Subject: [xoops-cvslog 3024] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060515052728.A79602AC0D3@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.29 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.30 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.29 Fri May 12 19:15:53 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Mon May 15 14:27:28 2006 @@ -4,6 +4,8 @@ define('_AD_BASE_ERROR_DBUPDATE_FAILED', "Database update failed."); define('_AD_BASE_ERROR_EXTENSION', "Uploaded file's extension does not match any entry in the allowed list."); define('_AD_BASE_ERROR_GROUPID', "Group Id"); +define('_AD_BASE_ERROR_IMG_FILESIZE', "Img filesize"); +define('_AD_BASE_ERROR_IMG_SIZE', "Img size"); 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', "{0} is wrong."); From minahito @ users.sourceforge.jp Mon May 15 14:33:30 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:33:30 +0900 Subject: [xoops-cvslog 3025] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060515053330.C7E6E2AC0C9@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.2 Mon May 15 14:26:50 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Mon May 15 14:33:30 2006 @@ -80,14 +80,14 @@ // Imagefile width & height check. // if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { - $this->addErrorMessage(_AD_BASE_ERROR_IMG_SIZE); + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); } // // Check file size // if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { - $this->addErrorMessage(_AD_BASE_ERROR_IMG_FILESIZE); + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); } } } From minahito @ users.sourceforge.jp Mon May 15 14:33:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:33:49 +0900 Subject: [xoops-cvslog 3026] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060515053349.72A392AC0C9@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.35 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.36 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.35 Mon May 15 14:27:28 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Mon May 15 14:33:49 2006 @@ -4,8 +4,8 @@ define('_AD_BASE_ERROR_DBUPDATE_FAILED', "データベースの更新に失敗しました"); define('_AD_BASE_ERROR_EXTENSION', "許可されたファイル形式ではありません"); define('_AD_BASE_ERROR_GROUPID', "最低1グループ以上にアクセス権限を与えてください"); -define('_AD_BASE_ERROR_IMG_FILESIZE', "Img filesize"); -define('_AD_BASE_ERROR_IMG_SIZE', "Img size"); +define('_AD_BASE_ERROR_IMG_FILESIZE', "画像の最大ファイルサイズは{0}バイトです"); +define('_AD_BASE_ERROR_IMG_SIZE', "画像の最大サイズは {0} x {1} です"); define('_AD_BASE_ERROR_INTRANGE', "{0}の値が不正です"); define('_AD_BASE_ERROR_MAXLENGTH', "{0}は半角{1}文字以下で入力して下さい"); define('_AD_BASE_ERROR_OBJECTEXIST', "{0}の値が不正です"); @@ -76,7 +76,7 @@ define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); define('_AD_BASE_LANG_IMAGE_EDIT', "Image edit"); -define('_AD_BASE_LANG_IMAGE_ID', "image id"); +define('_AD_BASE_LANG_IMAGE_ID', "ID"); define('_AD_BASE_LANG_IMAGE_LIST', "Image list"); define('_AD_BASE_LANG_IMAGE_MIMETYPE', "image mimetype"); define('_AD_BASE_LANG_IMAGE_NAME', "image name"); @@ -88,7 +88,7 @@ define('_AD_BASE_LANG_IMAGECATEGORY_LIST', "Imagecategory list"); define('_AD_BASE_LANG_IMAGECATEGORY_NEW', "Imagecategory new"); define('_AD_BASE_LANG_IMGCAT_DISPLAY', "表示"); -define('_AD_BASE_LANG_IMGCAT_ID', "ID"); +define('_AD_BASE_LANG_IMGCAT_ID', "カテゴリID"); define('_AD_BASE_LANG_IMGCAT_MAXHEIGHT', "高さ"); define('_AD_BASE_LANG_IMGCAT_MAXSIZE', "容量"); define('_AD_BASE_LANG_IMGCAT_MAXWIDTH', "横幅"); From minahito @ users.sourceforge.jp Mon May 15 14:36:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 14:36:42 +0900 Subject: [xoops-cvslog 3027] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515053642.CE9FF2AC0C9@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.4 Mon May 15 13:29:44 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Mon May 15 14:36:42 2006 @@ -178,7 +178,7 @@ return; } - $this->_mMaster->mActionForm =& new Legacy_PreferenceEditForm($category); + $this->_mMaster->mActionForm =& new Legacy_PreferenceEditForm($this->_mMaster->mCategory); $this->_mMaster->mPreparedFlag = true; } From minahito @ users.sourceforge.jp Mon May 15 15:56:47 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 15:56:47 +0900 Subject: [xoops-cvslog 3028] CVS update: xoops2jp/html/kernel Message-ID: <20060515065647.31AD92AC039@users.sourceforge.jp> Index: xoops2jp/html/kernel/configcategory.php diff -u xoops2jp/html/kernel/configcategory.php:1.2 xoops2jp/html/kernel/configcategory.php:1.2.8.1 --- xoops2jp/html/kernel/configcategory.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/kernel/configcategory.php Mon May 15 15:56:47 2006 @@ -1,5 +1,5 @@ initVar('confcat_name', XOBJ_DTYPE_OTHER, null); $this->initVar('confcat_order', XOBJ_DTYPE_INT, 0); } + + /** + * Get a constract of name + */ + function getName() + { + return defined($this->get('confcat_name')) ? constant($this->get('confcat_name')) : $this->get('confcat_name'); + } } From minahito @ users.sourceforge.jp Mon May 15 15:58:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 15:58:31 +0900 Subject: [xoops-cvslog 3029] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060515065831.BB27D2AC039@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.3 Sat May 13 00:59:16 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Mon May 15 15:58:31 2006 @@ -15,7 +15,7 @@ <{foreach item=obj from=$objects}> - + From minahito @ users.sourceforge.jp Mon May 15 15:59:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 15:59:34 +0900 Subject: [xoops-cvslog 3030] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060515065934.6944C2AC039@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.30 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.31 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.30 Mon May 15 14:27:28 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Mon May 15 15:59:34 2006 @@ -232,4 +232,179 @@ define('_MD_A_BASE_LANG_VERSION', "Version"); define('_MD_A_BASE_LANG_WEIGHT', "Weight"); +define("_MD_AM_SITEPREF","Site Preferences"); +define("_MD_AM_SITENAME","Site name"); +define("_MD_AM_SLOGAN","Slogan for your site"); +define("_MD_AM_ADMINML","Admin mail address"); +define("_MD_AM_LANGUAGE","Default language"); +define("_MD_AM_STARTPAGE","Module for your start page"); +define("_MD_AM_NONE","None"); +define("_MD_AM_SERVERTZ","Server timezone"); +define("_MD_AM_DEFAULTTZ","Default timezone"); +define("_MD_AM_DTHEME","Default theme"); +define("_MD_AM_THEMESET","Theme Set"); +define("_MD_AM_ANONNAME","Username for anonymous users"); +define("_MD_AM_MINPASS","Minimum length of password required"); +define("_MD_AM_NEWUNOTIFY","Notify by mail when a new user is registered?"); +define("_MD_AM_SELFDELETE","Allow users to delete own account?"); +define("_MD_AM_LOADINGIMG","Display loading... image?"); +define("_MD_AM_USEGZIP","Use gzip compression?"); +define("_MD_AM_UNAMELVL","Select the level of strictness for username filtering"); +define("_MD_AM_STRICT","Strict (only alphabets and numbers)"); +define("_MD_AM_MEDIUM","Medium"); +define("_MD_AM_LIGHT","Light (recommended for multi-byte chars)"); +define("_MD_AM_USERCOOKIE","Name for user cookies."); +define("_MD_AM_USERCOOKIEDSC","This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box."); +define("_MD_AM_USEMYSESS","Use custom session"); +define("_MD_AM_USEMYSESSDSC","Select yes to customise session related values."); +define("_MD_AM_SESSNAME","Session name"); +define("_MD_AM_SESSNAMEDSC","The name of session (Valid only when 'use custom session' is enabled)"); +define("_MD_AM_SESSEXPIRE","Session expiration"); +define("_MD_AM_SESSEXPIREDSC","Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled. Works only when you are using PHP4.2.0 or later.)"); +define("_MD_AM_BANNERS","Activate banner ads?"); +define("_MD_AM_MYIP","Your IP address"); +define("_MD_AM_MYIPDSC","This IP will not counted as impression for banners"); +define("_MD_AM_ALWDHTML","HTML tags allowed in all posts."); +define("_MD_AM_INVLDMINPASS","Invalid value for minimum length of password."); +define("_MD_AM_INVLDUCOOK","Invalid value for usercookie name."); +define("_MD_AM_INVLDSCOOK","Invalid value for sessioncookie name."); +define("_MD_AM_INVLDSEXP","Invalid value for session expiration time."); +define("_MD_AM_ADMNOTSET","Admin mail is not set."); +define("_MD_AM_YES","Yes"); +define("_MD_AM_NO","No"); +define("_MD_AM_DONTCHNG","Don't change!"); +define("_MD_AM_REMEMBER","Remember to chmod 666 this file in order to let the system write to it properly."); +define("_MD_AM_IFUCANT","If you can't change the permissions you can edit the rest of this file by hand."); + + +define("_MD_AM_COMMODE","Default Comment Display Mode"); +define("_MD_AM_COMORDER","Default Comments Display Order"); +define("_MD_AM_ALLOWHTML","Allow HTML tags in user comments?"); +define("_MD_AM_DEBUGMODE","Debug mode"); +define("_MD_AM_DEBUGMODEDSC","Several debug options. A running website should have this turned off."); +define("_MD_AM_AVATARALLOW","Allow custom avatar upload?"); +define('_MD_AM_AVATARMP','Minimum posts required'); +define('_MD_AM_AVATARMPDSC','Enter the minimum number of posts required to upload a custom avatar'); +define("_MD_AM_AVATARW","Avatar image max width (pixel)"); +define("_MD_AM_AVATARH","Avatar image max height (pixel)"); +define("_MD_AM_AVATARMAX","Avatar image max filesize (byte)"); +define("_MD_AM_AVATARCONF","Custom avatar settings"); +define("_MD_AM_CHNGUTHEME","Change all users' theme"); +define("_MD_AM_NOTIFYTO","Select group to which new user notification mail will be sent"); +define("_MD_AM_ALLOWTHEME","Allow users to select theme?"); +define("_MD_AM_ALLOWIMAGE","Allow users to display image files in posts?"); + +define("_MD_AM_USERACTV","Requires activation by user (recommended)"); +define("_MD_AM_AUTOACTV","Activate automatically"); +define("_MD_AM_ADMINACTV","Activation by administrators"); +define("_MD_AM_ACTVTYPE","Select activation type of newly registered users"); +define("_MD_AM_ACTVGROUP","Select group to which activation mail will be sent"); +define("_MD_AM_ACTVGROUPDSC","Valid only when 'Activation by administrators' is selected"); +define('_MD_AM_USESSL', 'Use SSL for login?'); +define('_MD_AM_SSLPOST', 'SSL Post variable name'); +define('_MD_AM_SSLPOSTDSC', 'The name of variable used to transfer session value via POST. If you are unsure, set any name that is hard to guess.'); +define('_MD_AM_DEBUGMODE0','Off'); +define('_MD_AM_DEBUGMODE1','PHP Debug'); +define('_MD_AM_DEBUGMODE2','MySQL/Blocks Debug'); +define('_MD_AM_DEBUGMODE3','Smarty Templates Debug'); +define('_MD_AM_MINUNAME', 'Minimum length of username required'); +define('_MD_AM_MAXUNAME', 'Maximum length of username'); +define('_MD_AM_GENERAL', 'General Settings'); +define('_MD_AM_USERSETTINGS', 'User Info Settings'); +define('_MD_AM_ALLWCHGMAIL', 'Allow users to change email address?'); +define('_MD_AM_ALLWCHGMAILDSC', ''); +define('_MD_AM_IPBAN', 'IP Banning'); +define('_MD_AM_BADEMAILS', 'Enter emails that should not be used in user profile'); +define('_MD_AM_BADEMAILSDSC', 'Separate each with a |, case insensitive, regex enabled.'); +define('_MD_AM_BADUNAMES', 'Enter names that should not be selected as username'); +define('_MD_AM_BADUNAMESDSC', 'Separate each with a |, case insensitive, regex enabled.'); +define('_MD_AM_DOBADIPS', 'Enable IP bans?'); +define('_MD_AM_DOBADIPSDSC', 'Users from specified IP addresses will not be able to view your site'); +define('_MD_AM_BADIPS', 'Enter IP addresses that should be banned from the site.
Separate each with a |, case insensitive, regex enabled.'); +define('_MD_AM_BADIPSDSC', '^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc
aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc
aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc'); +define('_MD_AM_PREFMAIN', 'Preferences Main'); +define('_MD_AM_METAKEY', 'Meta Keywords'); +define('_MD_AM_METAKEYDSC', 'The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)'); +define('_MD_AM_METARATING', 'Meta Rating'); +define('_MD_AM_METARATINGDSC', 'The rating meta tag defines your site age and content rating'); +define('_MD_AM_METAOGEN', 'General'); +define('_MD_AM_METAO14YRS', '14 years'); +define('_MD_AM_METAOREST', 'Restricted'); +define('_MD_AM_METAOMAT', 'Mature'); +define('_MD_AM_METAROBOTS', 'Meta Robots'); +define('_MD_AM_METAROBOTSDSC', 'The Robots Tag declares to search engines what content to index and spider'); +define('_MD_AM_INDEXFOLLOW', 'Index, Follow'); +define('_MD_AM_NOINDEXFOLLOW', 'No Index, Follow'); +define('_MD_AM_INDEXNOFOLLOW', 'Index, No Follow'); +define('_MD_AM_NOINDEXNOFOLLOW', 'No Index, No Follow'); +define('_MD_AM_METAAUTHOR', 'Meta Author'); +define('_MD_AM_METAAUTHORDSC', 'The author meta tag defines the name of the author of the document being read. Supported data formats include the name, email address of the webmaster, company name or URL.'); +define('_MD_AM_METACOPYR', 'Meta Copyright'); +define('_MD_AM_METACOPYRDSC', 'The copyright meta tag defines any copyright statements you wish to disclose about your web page documents.'); +define('_MD_AM_METADESC', 'Meta Description'); +define('_MD_AM_METADESCDSC', 'The description meta tag is a general description of what is contained in your web page'); +define('_MD_AM_METAFOOTER', 'Meta Tags and Footer'); +define('_MD_AM_FOOTER', 'Footer'); +define('_MD_AM_FOOTERDSC', 'Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages.'); +define('_MD_AM_CENSOR', 'Word Censoring Options'); +define('_MD_AM_DOCENSOR', 'Enable censoring of unwanted words?'); +define('_MD_AM_DOCENSORDSC', 'Words will be censored if this option is enabled. This option may be turned off for enhanced site speed.'); +define('_MD_AM_CENSORWRD', 'Words to censor'); +define('_MD_AM_CENSORWRDDSC', 'Enter words that should be censored in user posts.
Separate each with a |, case insensitive.'); +define('_MD_AM_CENSORRPLC', 'Bad words will be replaced with:'); +define('_MD_AM_CENSORRPLCDSC', 'Censored words will be replaced with the characters entered in this textbox'); + +define('_MD_AM_SEARCH', 'Search Options'); +define('_MD_AM_DOSEARCH', 'Enable global searches?'); +define('_MD_AM_DOSEARCHDSC', 'Allow searching for posts/items within your site.'); +define('_MD_AM_MINSEARCH', 'Minimum keyword length'); +define('_MD_AM_MINSEARCHDSC', 'Enter the minimum keyword length that users are required to enter to perform search'); +define('_MD_AM_MODCONFIG', 'Module Config Options'); +define('_MD_AM_DSPDSCLMR', 'Display disclaimer?'); +define('_MD_AM_DSPDSCLMRDSC', 'Select yes to display disclaimer in registration page'); +define('_MD_AM_REGDSCLMR', 'Registration disclaimer'); +define('_MD_AM_REGDSCLMRDSC', 'Enter text to be displayed as registration disclaimer'); +define('_MD_AM_ALLOWREG', 'Allow new user registration?'); +define('_MD_AM_ALLOWREGDSC', 'Select yes to accept new user registration'); +define('_MD_AM_THEMEFILE', 'Update module template .html files from themes/your theme/templates directory?'); +define('_MD_AM_THEMEFILEDSC', 'If this option is enabled, module template .html files will be updated automatically if there are newer files under the themes/your theme/templates directory for the current theme. This should be turned off once the site goes public.'); +define('_MD_AM_CLOSESITE', 'Turn your site off?'); +define('_MD_AM_CLOSESITEDSC', 'Select yes to turn your site off so that only users in selected groups have access to the site. '); +define('_MD_AM_CLOSESITEOK', 'Select groups that are allowed to access while the site is turned off.'); +define('_MD_AM_CLOSESITEOKDSC', 'Users in the default webmasters group are always granted access.'); +define('_MD_AM_CLOSESITETXT', 'Reason for turning off the site'); +define('_MD_AM_CLOSESITETXTDSC', 'The text that is presented when the site is closed.'); +define('_MD_AM_SITECACHE', 'Site-wide Cache'); +define('_MD_AM_SITECACHEDSC', 'Caches whole contents of the site for a specified amount of time to enhance performance. Setting site-wide cache will override module-level cache, block-level cache, and module item level cache if any.'); +define('_MD_AM_MODCACHE', 'Module-wide Cache'); +define('_MD_AM_MODCACHEDSC', 'Caches module contents for a specified amount of time to enhance performance. Setting module-wide cache will override module item level cache if any.'); +define('_MD_AM_NOMODULE', 'There is no module that can be cached.'); +define('_MD_AM_DTPLSET', 'Default template set'); +define('_MD_AM_SSLLINK', 'URL where SSL login page is located'); + +// added for mailer +define("_MD_AM_MAILER","Mail Setup"); +define("_MD_AM_MAILER_MAIL",""); +define("_MD_AM_MAILER_SENDMAIL",""); +define("_MD_AM_MAILER_",""); +define("_MD_AM_MAILFROM","FROM address"); +define("_MD_AM_MAILFROMDESC",""); +define("_MD_AM_MAILFROMNAME","FROM name"); +define("_MD_AM_MAILFROMNAMEDESC",""); +// RMV-NOTIFY +define("_MD_AM_MAILFROMUID","FROM user"); +define("_MD_AM_MAILFROMUIDDESC","When the system sends a private message, which user should appear to have sent it?"); +define("_MD_AM_MAILERMETHOD","Mail delivery method"); +define("_MD_AM_MAILERMETHODDESC","Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); +define("_MD_AM_SMTPHOST","SMTP host(s)"); +define("_MD_AM_SMTPHOSTDESC","List of SMTP servers to try to connect to."); +define("_MD_AM_SMTPUSER","SMTPAuth username"); +define("_MD_AM_SMTPUSERDESC","Username to connect to an SMTP host with SMTPAuth."); +define("_MD_AM_SMTPPASS","SMTPAuth password"); +define("_MD_AM_SMTPPASSDESC","Password to connect to an SMTP host with SMTPAuth."); +define("_MD_AM_SENDMAILPATH","Path to sendmail"); +define("_MD_AM_SENDMAILPATHDESC","Path to the sendmail program (or substitute) on the webserver."); +define("_MD_AM_THEMEOK","Selectable themes"); +define("_MD_AM_THEMEOKDSC","Choose themes that users can select as the default theme"); + ?> From minahito @ users.sourceforge.jp Mon May 15 16:00:31 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 16:00:31 +0900 Subject: [xoops-cvslog 3031] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060515070031.0D6022AC039@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.36 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.37 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.36 Mon May 15 14:33:49 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Mon May 15 16:00:30 2006 @@ -232,4 +232,184 @@ define('_MD_A_BASE_LANG_VERSION', "バージョン"); define('_MD_A_BASE_LANG_WEIGHT', "表示順"); +define("_MD_AM_SITEPREF","サイト一般設定"); +define("_MD_AM_SITENAME","サイト名"); +define("_MD_AM_SLOGAN","サイト副題"); +define("_MD_AM_ADMINML","管理者メールアドレス"); +define("_MD_AM_LANGUAGE","使用言語"); +define("_MD_AM_STARTPAGE","開始モジュール"); +define("_MD_AM_NONE","なし"); +define("_MD_AM_SERVERTZ","サーバのタイムゾーン"); +define("_MD_AM_DEFAULTTZ","デフォルト・タイムゾーン"); +define("_MD_AM_DTHEME","デフォルト・サイトテーマ"); +define("_MD_AM_THEMESET","テーマ・セット"); +define("_MD_AM_ANONNAME","未登録ユーザの表示名"); +define("_MD_AM_ANONPOST","未登録ユーザの投稿を許可する"); +define("_MD_AM_MINPASS","パスワードの最低文字数"); +define("_MD_AM_NEWUNOTIFY","新規ユーザ登録の際にメールにて知らせを受け取る"); +define("_MD_AM_SELFDELETE","ユーザが自分自身のアカウントを削除できる"); +define("_MD_AM_LOADINGIMG","「loading..」画像を表示させる"); +define("_MD_AM_USEGZIP","gzip圧縮を使用する"); +define("_MD_AM_UNAMELVL","ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。"); +define("_MD_AM_STRICT","強(アルファベットおよび数字のみ)←推奨"); +define("_MD_AM_MEDIUM","中"); +define("_MD_AM_LIGHT","弱(漢字・平仮名も使用可)"); +define("_MD_AM_USERCOOKIE","ユーザ名の保存に使用するクッキーの名称"); +define("_MD_AM_USERCOOKIEDSC","このクッキーにはユーザ名のみが保存され、ユーザのPCのハードディスク中に1年間保管されます。このクッキーを使用するかしないかはユーザ自身が選択できます。");//This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box."); +define("_MD_AM_USEMYSESS","セッションの設定をカスタマイズする"); +define("_MD_AM_USEMYSESSDSC","セッションの設定のカスタマイズ(セッションがタイムアウトするまでの時間の設定や、セッション名の変更)を行えます"); + +define("_MD_AM_SESSNAME","セッションIDの保存に使用するクッキーの名称"); +define("_MD_AM_SESSNAMEDSC","このクッキーに保存されるセッションIDは、セッションがタイムアウトするか、ユーザがログアウトするまでの間有効です。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); +define("_MD_AM_SESSEXPIRE","セッションがタイムアウトするまでの時間(単位:分)"); +define("_MD_AM_SESSEXPIREDSC","セッションがタイムアウトするまでの時間を分単位で指定してください。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); +define("_MD_AM_BANNERS","バナー広告を有効にする"); +//define("_MD_AM_ADMINGRAPHIC","管理者メニューにおいて画像メニューを使用しますか?"); +define("_MD_AM_MYIP","あなたのIPアドレスを入力してください。"); +define("_MD_AM_MYIPDSC","このIPは、バナーのインプレッションおよびサイト統計においてカウントされません。"); +define("_MD_AM_ALWDHTML","投稿文の中で使用可能なHTMLタグ"); +define("_MD_AM_INVLDMINPASS","パスワードの最低文字数が正しくありません。"); +define("_MD_AM_INVLDUCOOK","ユーザクッキーの名称が正しくありません。"); +define("_MD_AM_INVLDSCOOK","セッションIDクッキーの名称が正しくありません。"); +define("_MD_AM_INVLDSEXP","セッションのタイムアウト時間が正しくありません。"); +define("_MD_AM_ADMNOTSET","管理者のメールアドレスが設定されていません。"); +define("_MD_AM_YES","はい"); +define("_MD_AM_NO","いいえ"); +define("_MD_AM_DONTCHNG","以下は絶対に変更しないで下さい"); +define("_MD_AM_REMEMBER","このファイルをウェブ上の管理者画面から編集できるようにするには、このファイルのアクセス権限を666(chmod 666)に設定する必要があります。"); +define("_MD_AM_IFUCANT","もしファイルのアクセス権限を変更できない場合は、このファイルを直接編集してください。"); + +define("_MD_AM_COMMODE","デフォルトのコメント表示モード"); +define("_MD_AM_COMORDER","デフォルトのコメント表示順"); +//define("_MD_AM_ALLOWSIG","コメント文において署名の使用を許可する"); +define("_MD_AM_ALLOWHTML","コメント文においてHTMLタグの使用を許可する"); +define("_MD_AM_DEBUGMODE","デバッグモードを有効にする"); +define("_MD_AM_DEBUGMODEDSC","(デバッグ用に使用してください。実際のサイト運営時には解除してください。)"); + +define("_MD_AM_AVATARALLOW","アバター画像のアップロードを許可する"); +define('_MD_AM_AVATARMP','アバターアップロード権を得るための発言数'); +define('_MD_AM_AVATARMPDSC','ユーザが自分で作成したアバターをアップロードするために必要な最低投稿数を設定してください。'); +define("_MD_AM_AVATARW","アバター画像の最大幅(ピクセル)"); +define("_MD_AM_AVATARH","アバター画像の最大高さ(ピクセル)"); +define("_MD_AM_AVATARMAX","アバター画像の最大ファイルサイズ(バイト)"); +define("_MD_AM_AVATARCONF","ユーザ独自のアバター画像に関する設定"); +define("_MD_AM_CHNGUTHEME","全てのユーザのテーマを変更する"); +define("_MD_AM_NOTIFYTO","通知先グループ"); +define("_MD_AM_ALLOWTHEME","サイトテーマの選択を許可する"); + +define("_MD_AM_ALLOWIMAGE","投稿への画像ファイルの表示を許可する"); + +define("_MD_AM_USERACTV","ユーザ自身の確認が必要(推奨)"); +define("_MD_AM_AUTOACTV","自動的にアカウントを有効にする"); +define("_MD_AM_ADMINACTV","管理者が確認してアカウントを有効にする"); +define("_MD_AM_ACTVTYPE","新規登録ユーザアカウントの有効化の方法"); +define("_MD_AM_ACTVGROUP","アカウント有効化依頼のメールの送信先グループ"); +define("_MD_AM_ACTVGROUPDSC","「管理者が確認してアカウントを有効にする」設定になっている場合のみ有効です"); +define('_MD_AM_USESSL', 'ログインにSSLを使用する'); +define('_MD_AM_SSLPOST', 'SSLログイン時に使用するPOST変数の名称'); +define('_MD_AM_DEBUGMODE0','オフ'); +define('_MD_AM_DEBUGMODE1','PHPデバグ'); +define('_MD_AM_DEBUGMODE2','MySQL/Blocksデバグ'); +define('_MD_AM_DEBUGMODE3','Smartyテンプレート・デバグ'); +define('_MD_AM_MINUNAME', 'ユーザ名の最低文字数(byte)'); +define('_MD_AM_MAXUNAME', 'ユーザ名の最大文字数(byte)'); +define('_MD_AM_GENERAL', '一般設定'); +define('_MD_AM_USERSETTINGS', 'ユーザ情報設定'); +define('_MD_AM_ALLWCHGMAIL', 'ユーザ自身のEmailアドレス変更を許可する'); +define('_MD_AM_ALLWCHGMAILDSC', ''); +define('_MD_AM_IPBAN', 'IP Banning'); //[MADA] +define('_MD_AM_BADEMAILS', 'ユーザのemailアドレスとして使用できない文字列'); +define('_MD_AM_BADEMAILSDSC', 'それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); +define('_MD_AM_BADUNAMES', 'ユーザ名として使用できない文字列'); +define('_MD_AM_BADUNAMESDSC', 'それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); +define('_MD_AM_DOBADIPS', 'IPアクセス拒否を有効にしますか?'); +define('_MD_AM_DOBADIPSDSC', 'アクセス拒否IPからのユーザはあなたのサイトには入れません。'); +define('_MD_AM_BADIPS', 'このサイトへのアクセス拒否IPを入れてください。
IPとIPの間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); +define('_MD_AM_BADIPSDSC', '^aaa.bbb.ccc は それで始まる IPアドレスからのアクセスを拒否します。
aaa.bbb.ccc$ は それで終わる IPアドレスからのアクセスを拒否します。
aaa.bbb.ccc はその IPアドレスを含むアドレスからのアクセスを拒否します。'); +define('_MD_AM_PREFMAIN', 'システム設定メイン'); +define('_MD_AM_METAKEY', 'METAタグ(キーワード)'); +define('_MD_AM_METAKEYDSC', 'METAキーワードはあなたのサイトの内容を表すものです。キーワードはカンマで区切って記述してください。(例: XOOPS, PHP, mySQL, ポータル)'); +define('_MD_AM_METARATING', 'METAタグ(RATING)'); +define('_MD_AM_METARATINGDSC', '閲覧対象年齢層の指定'); +define('_MD_AM_METAOGEN', 'General'); //[MADA] +define('_MD_AM_METAO14YRS', '14 years'); //[MADA] +define('_MD_AM_METAOREST', 'Restricted'); //[MADA] +define('_MD_AM_METAOMAT', 'Mature'); //[MADA] +define('_MD_AM_METAROBOTS', 'METAタグ(ROBOTS)'); +define('_MD_AM_METAROBOTSDSC', 'ロボット型検索エンジンへの対応'); +define('_MD_AM_INDEXFOLLOW', 'Index, Follow'); //[MADA] +define('_MD_AM_NOINDEXFOLLOW', 'No Index, Follow'); //[MADA] +define('_MD_AM_INDEXNOFOLLOW', 'Index, No Follow'); //[MADA] +define('_MD_AM_NOINDEXNOFOLLOW', 'No Index, No Follow'); //[MADA] +define('_MD_AM_METAAUTHOR', 'METAタグ(作成者)'); +define('_MD_AM_METAAUTHORDSC', '作成者METAタグは、サイト文書の作成者情報を定義します。名前、WebmasterのEMailアドレス、会社名、URLなどを記述します。'); +define('_MD_AM_METACOPYR', 'METAタグ(コピーライト)'); +define('_MD_AM_METACOPYRDSC', 'METAコピーライトタグは、あなたのサイト上の情報に対するの著作権情報を定義します。'); +define('_MD_AM_METADESC', 'METAタグ(Description)'); +define('_MD_AM_METADESCDSC', 'METAタグ(Description) は、あなたのサイトの内容を説明する一般的なタグです。'); +define('_MD_AM_METAFOOTER', 'METAタグ/フッタ設定'); +define('_MD_AM_FOOTER', 'フッタ'); +define('_MD_AM_FOOTERDSC', 'リンクを記入する場合は必ずフルパス(http://〜)で入力してください。フルパスで入力しなかった場合、モジュール内ページでうまく表示されないことがあります。'); +define('_MD_AM_CENSOR', '禁止用語設定'); +define('_MD_AM_DOCENSOR', '禁止用語処理を有効にする'); +define('_MD_AM_DOCENSORDSC', 'このオプションを有効にすると禁止用語のチェックを行うようになります。このオプションを無効にすることでサイトの処理速度が向上するかもしれません。'); +define('_MD_AM_CENSORWRD', '禁止用語'); +define('_MD_AM_CENSORWRDDSC', 'ユーザが投稿する際に使用を禁止sする文字列を入力してください。文字列と文字列の間は
| で区切り、大文字小文字は区別しません。'); +define('_MD_AM_CENSORRPLC', '禁止用語を置き換える文字列:'); +define('_MD_AM_CENSORRPLCDSC', '禁止用語がこのテキストボックスで指定した文字列に置き換えられます。'); + +define('_MD_AM_SEARCH', '検索オプション'); +define('_MD_AM_DOSEARCH', 'グローバルサーチを有効にする'); +define('_MD_AM_DOSEARCHDSC', 'サイト内の投稿/記事の全検索を行います。'); +define('_MD_AM_MINSEARCH', 'キーワード最低文字数'); +define('_MD_AM_MINSEARCHDSC', 'ユーザが検索を行う際に必要なキーワードの最低文字数を指定してください。'); +define('_MD_AM_MODCONFIG', 'モジュール設定オプション'); +define('_MD_AM_DSPDSCLMR', '利用許諾文を表示する'); +define('_MD_AM_DSPDSCLMRDSC', '「はい」にするとユーザの新規登録ページに利用許諾の文章を表示します。'); +define('_MD_AM_REGDSCLMR', '利用許諾文'); +define('_MD_AM_REGDSCLMRDSC', 'ユーザの新規登録ページに表示する利用許諾文を入力してください。'); +define('_MD_AM_ALLOWREG', '新規ユーザの登録を許可する'); +define('_MD_AM_ALLOWREGDSC', '「はい」を選択すると新規ユーザの登録を許可します。'); +define('_MD_AM_THEMEFILE', 'themes/ ディレクトリからの自動アップデートを有効にする'); +define('_MD_AM_THEMEFILEDSC', '現在使用中のテーマよりも更新日時が新しいファイルが themes/ディレクトリ下にある場合に、自動的にデータベース内のデータを更新します。サイト公開時には無効にする事をお勧めします。'); +define('_MD_AM_CLOSESITE', 'サイトを閉鎖する'); +define('_MD_AM_CLOSESITEDSC', '特定グループ以外はサイトにアクセスすることができないようにします。'); +define('_MD_AM_CLOSESITEOK', 'サイト閉鎖時でもアクセスが認められているグループ'); +define('_MD_AM_CLOSESITEOKDSC', 'デフォルトの管理者グループは常にアクセスできます'); +define('_MD_AM_CLOSESITETXT', 'サイト閉鎖の理由'); +define('_MD_AM_CLOSESITETXTDSC', 'サイト閉鎖時に表示します'); +define('_MD_AM_SITECACHE', 'サイト・キャッシュ'); +define('_MD_AM_SITECACHEDSC', 'サイト内のコンテンツをモジュール別にキャッシュします。サイト・キャッシュは、モジュール独自のキャッシュ機能(ある場合)よりも優先されます。'); //[MADA] +define('_MD_AM_MODCACHE', 'モジュール・キャッシュ'); +define('_MD_AM_MODCACHEDSC', '各モジュールのコンテンツをキャッシュしておく時間の長さを指定してください。モジュールに既にキャッシュ機能がある場合は「キャッシュしない」を選択することをお勧めします。ブロック・キャッシュは含まれません。'); +define('_MD_AM_NOMODULE', 'キャッシュ可能なモジュールはありません。'); +define('_MD_AM_DTPLSET', 'デフォルトのテンプレート・セット'); +define('_MD_AM_SSLLINK', 'SSLログインページへのURL'); + +// added for mailer +define("_MD_AM_MAILER","メール設定"); +define("_MD_AM_MAILER_MAIL",""); +define("_MD_AM_MAILER_SENDMAIL",""); +define("_MD_AM_MAILER_",""); +define("_MD_AM_MAILFROM","送信者メールアドレス"); +define("_MD_AM_MAILFROMDESC",""); +define("_MD_AM_MAILFROMNAME","送信者"); +define("_MD_AM_MAILFROMNAMEDESC","メール送信の際に送信者として表示される名前を入力してください"); +// RMV-NOTIFY +define("_MD_AM_MAILFROMUID","PM送信者"); +define("_MD_AM_MAILFROMUIDDESC","プライベートメッセージ送信の際に送信者としてデフォルト表示されるユーザを選択してください"); +define("_MD_AM_MAILERMETHOD","メール送信方法"); +define("_MD_AM_MAILERMETHODDESC","メールを送信する方法を選択してください。デフォルトではPHPのmail()関数を使用します。"); +define("_MD_AM_SMTPHOST","SMTPサーバアドレス"); +define("_MD_AM_SMTPHOSTDESC","SMTPサーバのアドレスの一覧を記入してください。"); +define("_MD_AM_SMTPUSER","SMTPAuthユーザ名"); +define("_MD_AM_SMTPUSERDESC","SMTPAuthを使用してSMTPサーバにアクセスするためのユーザ名"); +define("_MD_AM_SMTPPASS","SMTPAuthパスワード"); +define("_MD_AM_SMTPPASSDESC","SMTPAuthを使用してSMTPサーバにアクセスするためのパスワード"); +define("_MD_AM_SENDMAILPATH","sendmailへのパス"); +define("_MD_AM_SENDMAILPATHDESC","sendmailへのフルパスを記入してください"); +define("_MD_AM_THEMEOK","選択可能なテーマ"); +define("_MD_AM_THEMEOKDSC","ユーザが選択することのできるテーマファイルを指定してください"); + + ?> From minahito @ users.sourceforge.jp Mon May 15 17:33:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:33:08 +0900 Subject: [xoops-cvslog 3032] CVS update: xoops2jp/html/modules/base/.xml/data Message-ID: <20060515083308.269AD2AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/data/image.cbs.xml diff -u xoops2jp/html/modules/base/.xml/data/image.cbs.xml:1.1.2.1 xoops2jp/html/modules/base/.xml/data/image.cbs.xml:1.1.2.2 --- xoops2jp/html/modules/base/.xml/data/image.cbs.xml:1.1.2.1 Tue May 9 19:19:25 2006 +++ xoops2jp/html/modules/base/.xml/data/image.cbs.xml Mon May 15 17:33:07 2006 @@ -1,4 +1,4 @@ -鏤??xml version="1.0" encoding="utf-8"?> + @@ -12,5 +12,6 @@ + \ No newline at end of file From minahito @ users.sourceforge.jp Mon May 15 17:33:18 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:33:18 +0900 Subject: [xoops-cvslog 3033] CVS update: xoops2jp/html/modules/base/.xml/data Message-ID: <20060515083318.AFCAB2AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/data/imagebody.cbs.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/data/imagebody.cbs.xml:1.1.2.1 --- /dev/null Mon May 15 17:33:18 2006 +++ xoops2jp/html/modules/base/.xml/data/imagebody.cbs.xml Mon May 15 17:33:18 2006 @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file From minahito @ users.sourceforge.jp Mon May 15 17:33:38 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:33:38 +0900 Subject: [xoops-cvslog 3034] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515083338.7273C2AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.2 Mon May 15 14:26:42 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Mon May 15 17:33:38 2006 @@ -26,6 +26,21 @@ function _doExecute() { + $handler =& xoops_getmodulehandler('imagecategory'); + $category =& $handler->get($this->mActionForm->get('imgcat_id')); + + if ($category->get('imgcat_storetype') == 'file') { + $this->_storeFile(); + } + else { + $this->_storeDB(); + } + + return parent::_doExecute(); + } + + function _storeFile() + { if ($this->mActionForm->mFormFile != null) { if (!$this->mActionForm->mFormFile->saveAs(XOOPS_UPLOAD_PATH)) { return false; @@ -38,8 +53,11 @@ if ($this->mActionForm->mOldFilename != null) { @unlink(XOOPS_UPLOAD_PATH . "/" . $this->mActionForm->mOldFilename); } + } + + function _storeDB() + { - return parent::_doExecute(); } function executeViewInput(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Mon May 15 17:33:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:33:54 +0900 Subject: [xoops-cvslog 3035] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515083354.BE0C22AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php:1.1.2.5 Mon May 15 14:36:42 2006 +++ xoops2jp/html/modules/base/admin/actions/PreferenceEditAction.class.php Mon May 15 17:33:54 2006 @@ -197,6 +197,12 @@ $this->_mMaster->mActionForm =& new Legacy_ModulePreferenceEditForm($this->_mMaster->mModule); + // + // Load constants + // + $root =& XCube_Root::getSingleton(); + $root->mLanguageManager->loadManifestoLanguage($this->_mMaster->mModule->get('dirname')); + $this->_mMaster->mPreparedFlag = true; } } From minahito @ users.sourceforge.jp Mon May 15 17:34:09 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:34:09 +0900 Subject: [xoops-cvslog 3036] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060515083409.EC6132AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.4 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.3 Mon May 15 14:33:30 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Mon May 15 17:34:09 2006 @@ -112,11 +112,34 @@ $obj->set('image_weight', $this->get('image_weight')); $obj->set('imgcat_id', $this->get('imgcat_id')); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $category =& $handler->get($this->get('imgcat_id')); + $this->mFormFile = $this->get('image_name'); + if ($this->mFormFile != null) { $this->mFormFile->setRandomToBodyName('img'); + + $filename = $this->mFormFile->getBodyName(); + $this->mFormFile->setBodyName(substr($filename, 0, 24)); + $obj->set('image_name', $this->mFormFile->getFileName()); $obj->set('image_mimetype', $this->mFormFile->getContentType()); + + // + // To store db + // + if ($category->get('imgcat_storetype') == 'db') { + $obj->loadImageBody(); + if (!is_object($obj->mImageBody)) { + $obj->mImageBody =& $obj->createImageBody(); + } + + // + // Access to private member property. + // + $obj->mImageBody->set('image_body', file_get_contents($this->mFormFile->_mTmpFileName)); + } } } } From minahito @ users.sourceforge.jp Mon May 15 17:34:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:34:25 +0900 Subject: [xoops-cvslog 3037] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060515083425.80A442AC039@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/image.php diff -u xoops2jp/html/modules/base/class/image.php:1.1.2.2 xoops2jp/html/modules/base/class/image.php:1.1.2.3 --- xoops2jp/html/modules/base/class/image.php:1.1.2.2 Wed May 10 19:23:50 2006 +++ xoops2jp/html/modules/base/class/image.php Mon May 15 17:34:25 2006 @@ -6,6 +6,8 @@ { var $mImageCategory = null; var $_mImageCategoryLoadedFlag = false; + var $mImageBody = null; + var $_mImageBodyLoadedFlag = false; function BaseImageObject() { @@ -27,6 +29,23 @@ $this->_mImageCategoryLoadedFlag = true; } } + + function loadImagebody() + { + if ($this->_mImageBodyLoadedFlag == false) { + $handler =& xoops_getmodulehandler('imagebody'); + $this->mImageBody =& $handler->get($this->get('image_id')); + $this->_mImageBodyLoadedFlag = true; + } + } + + function &createImagebody() + { + $handler =& xoops_getmodulehandler('imagebody'); + $obj =& $handler->create(); + $obj->set('image_id', $this->get('image_id')); + return $obj; + } } class BaseImageHandler extends XoopsObjectGenericHandler @@ -35,6 +54,21 @@ var $mPrimary = "image_id"; var $mClass = "BaseImageObject"; + function insert(&$obj, $force = false) + { + if (parent::insert($obj, $force)) { + if (is_object($obj->mImageBody)) { + $obj->mImageBody->set('image_id', $obj->get('image_id')); + $handler =& xoops_getmodulehandler('imagebody', 'base'); + return $handler->insert($obj->mImageBody, $force); + } + + return true; + } + + return false; + } + /** * * Delete object and image file. @@ -51,6 +85,9 @@ @unlink($filepath); } + $handler =& xoops_gethandler('imagebody', 'base'); + $handler->delete($this->get('image_id')); + return true; } From minahito @ users.sourceforge.jp Mon May 15 17:34:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:34:32 +0900 Subject: [xoops-cvslog 3038] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060515083432.B957A2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/imagebody.php diff -u /dev/null xoops2jp/html/modules/base/class/imagebody.php:1.1.2.1 --- /dev/null Mon May 15 17:34:32 2006 +++ xoops2jp/html/modules/base/class/imagebody.php Mon May 15 17:34:32 2006 @@ -0,0 +1,60 @@ +initVar('image_id', XOBJ_DTYPE_INT, '', false); + $this->initVar('image_body', XOBJ_DTYPE_TEXT, '', true); + } + + function loadImagebody() + { + if ($this->_mImageBodyLoadedFlag == false) { + $handler =& xoops_getmodulehandler('imagebody'); + $this->mImageBody =& $handler->get($this->get('image_id')); + $this->_mImageBodyLoadedFlag = true; + } + } + + function &createImagebody() + { + $handler =& xoops_getmodulehandler('imagebody'); + $obj =& $handler->create(); + $obj->set('image_id', $this->get('image_id')); + return $obj; + } +} + +class BaseImagebodyHandler extends XoopsObjectGenericHandler +{ + var $mTable = "imagebody"; + var $mPrimary = "image_id"; + var $mClass = "BaseImagebodyObject"; + + function insert(&$obj, $force = false) + { + if (!parent::insert($obj, $force)) { + print_r($this->db); + die(); + } + + return true; + } + + function delete(&$obj, $force = false) + { + $handler =& xoops_getmodulehandler('imagebody'); + $handler->delete($obj->get('image_id')); + unset($handler); + + return parent::delete($obj, $force); + } +} + +?> From minahito @ users.sourceforge.jp Mon May 15 17:37:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:37:27 +0900 Subject: [xoops-cvslog 3039] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060515083727.BC12B2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php:1.1.2.1 Tue May 9 19:20:44 2006 +++ xoops2jp/html/modules/base/admin/forms/ImagecategoryAdminNewForm.class.php Mon May 15 17:37:27 2006 @@ -41,7 +41,7 @@ function update(&$obj) { parent::update($obj); - $this->set('imgcat_storetype', $obj->get('imgcat_storetype')); + $obj->set('imgcat_storetype', $this->get('imgcat_storetype')); } } From minahito @ users.sourceforge.jp Mon May 15 17:40:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:40:13 +0900 Subject: [xoops-cvslog 3040] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060515084013.613412AC0CB@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.1 xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.1 Wed May 10 19:25:10 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php Mon May 15 17:40:13 2006 @@ -28,6 +28,11 @@ function executeViewIndex(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("image_list.html"); + + foreach (array_keys($this->mObjects) as $key) { + $this->mObjects[$key]->loadImagecategory(); + } + $render->setAttribute("objects", $this->mObjects); $render->setAttribute("pageNavi", $this->mNavi); } From minahito @ users.sourceforge.jp Mon May 15 17:46:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 15 May 2006 17:46:46 +0900 Subject: [xoops-cvslog 3041] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060515084646.D6F2F2AC025@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.2 Fri May 12 00:46:05 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Mon May 15 17:46:46 2006 @@ -38,7 +38,15 @@ <{foreach item=obj from=$objects}> - + From tom_g3x @ users.sourceforge.jp Tue May 16 01:09:56 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Tue, 16 May 2006 01:09:56 +0900 Subject: [xoops-cvslog 3042] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060515160956.A91392AC04B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html:1.1.2.2 Fri May 12 00:46:05 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_edit.html Tue May 16 01:09:56 2006 @@ -1,6 +1,6 @@
<{$smarty.const._MI_BASE_NAME}> - »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}> + »» <{$smarty.const._MI_BASE_MENU_IMAGE_MANAGE}> <{if $actionForm->get('imgcat_id')}> »» <{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_EDIT}> <{else}> Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.3 Mon May 15 17:46:46 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Tue May 16 01:09:56 2006 @@ -1,11 +1,12 @@ -

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}>

+

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> (*category name*)

- +
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}> "> - <{xoops_input type=text name=image_name value=$actionForm->get('image_name') size=15 maxlength=30}> + <{xoops_input type=file name=image_name}>
<{$smarty.const._AD_BASE_LANG_IMAGE_MIMETYPE}>"> - <{xoops_input type=text name=image_mimetype value=$actionForm->get('image_mimetype') size=15 maxlength=30}> -
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>"> - <{xoops_input type=text name=image_created value=$actionForm->get('image_created')}> -
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}> "> <{xoops_input type=checkbox name=image_display value=1 default=$actionForm->get('image_display')}> @@ -64,7 +52,9 @@
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}> "> - <{xoops_input type=text name=imgcat_id value=$actionForm->get('imgcat_id')}> +
<{$obj->getVar('confcat_id')}><{$obj->getVar('confcat_name')}><{$obj->getName()}> " alt="<{$smarty.const._EDIT}> title="<{$smarty.const._EDIT}>" />
<{$obj->getVar('image_id')}><{$obj->getVar('image_name')}> + <{if $obj->mImageCategory != null}> + <{if $obj->mImageCategory->get('imgcat_storetype') == 'file'}> + + <{else}> + + <{/if}> + <{/if}> + <{$obj->getVar('image_nicename')}> <{$obj->getVar('image_mimetype')}> <{$obj->getVar('image_created')}>
@@ -49,7 +50,7 @@ - + Index: xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.2 Fri May 12 00:46:05 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html Tue May 16 01:09:56 2006 @@ -1,6 +1,6 @@ Index: xoops2jp/html/modules/base/admin/templates/image_delete.html diff -u xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/image_delete.html:1.1.2.2 Fri May 12 00:46:05 2006 +++ xoops2jp/html/modules/base/admin/templates/image_delete.html Tue May 16 01:09:56 2006 @@ -1,6 +1,7 @@ @@ -13,6 +14,11 @@ <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}>
<{$obj->getVar('image_nicename')}> <{$obj->getVar('image_mimetype')}><{$obj->getVar('image_created')}><{$obj->getVar('image_created')|xoops_formattimestamp:l}> <{$obj->getVar('image_display')}> <{$obj->getVar('image_weight')}> <{$obj->getVar('imgcat_id')}>
+ + + @@ -30,7 +36,7 @@ - + Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.3 Fri May 12 00:46:05 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Tue May 16 01:09:56 2006 @@ -1,6 +1,7 @@

<{$smarty.const._AD_BASE_LANG_IMAGECATEGORY_LIST}>

@@ -41,7 +42,7 @@ <{foreach item=obj from=$objects}> - + Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.2 Sat May 13 00:59:16 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Tue May 16 01:09:56 2006 @@ -12,7 +12,7 @@ <{/foreach}> <{/if}> - + <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=$actionForm->mKeyName value=$actionForm->mKeyValue}> Index: xoops2jp/html/modules/base/admin/templates/image_edit.html diff -u xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.2 xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.3 --- xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.2 Mon May 15 14:26:56 2006 +++ xoops2jp/html/modules/base/admin/templates/image_edit.html Tue May 16 01:09:56 2006 @@ -1,6 +1,7 @@
<{$smarty.const._MI_BASE_NAME}> - »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> + »» <{$smarty.const._MI_BASE_MENU_IMAGE_MANAGE}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> <{if $actionForm->get('image_id')}> »» <{$smarty.const._AD_BASE_LANG_IMAGE_EDIT}> <{else}> @@ -24,33 +25,42 @@ <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=image_id value=$actionForm->get('image_id')}> -
+ <{$smarty.const._AD_BASE_LANG_IMAGE_DELETE}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_ID}> "><{$object->getVar('image_id')}>
<{$smarty.const._AD_BASE_LANG_IMAGE_CREATED}>"><{$object->getVar('image_created')}>"><{$object->getVar('image_created')|xoops_formattimestamp:l}>
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}> <{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('imgcat_id')}> <{$obj->getVar('imgcat_name')}> <{$obj->getVar('imgcat_maxsize')}>
+
- + + + + - + - + - + - + - From nobunobu @ users.sourceforge.jp Tue May 16 21:46:26 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:46:26 +0900 Subject: [xoops-cvslog 3043] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060516124626.2D3552AC043@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.13 xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.14 --- xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php:1.1.2.13 Sun Apr 2 22:06:02 2006 +++ xoops2jp/html/modules/base/class/Legacy_AdminModuleController.class.php Tue May 16 21:46:25 2006 @@ -1,5 +1,5 @@ getByDirname($dirname); } else { - $module=&$moduleHandler->getByDirname("system"); + $module=&$moduleHandler->getByDirname("base"); } // @@ -144,7 +144,7 @@ || ($module->getInfo('config') && is_array($module->getInfo('config'))) || ($module->getInfo('comments') && is_array($module->getInfo('comments')))) { $module->adminmenu[] = array( - 'link' => XOOPS_URL.'/modules/system/admin.php?fct=preferences&op=showmod&mod='.$module->getVar('mid'), + 'link' => XOOPS_URL.'/modules/base/admin/index.php?action=PreferenceEdit&confmod_id='.$module->getVar('mid'), 'title' => _PREFERENCES, 'absolute' => true); } From nobunobu @ users.sourceforge.jp Tue May 16 21:46:26 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:46:26 +0900 Subject: [xoops-cvslog 3044] CVS update: xoops2jp/html/modules/base Message-ID: <20060516124626.529152AC046@users.sourceforge.jp> Index: xoops2jp/html/modules/base/xoops_version.php diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.19 xoops2jp/html/modules/base/xoops_version.php:1.1.2.20 --- xoops2jp/html/modules/base/xoops_version.php:1.1.2.19 Sun Apr 9 10:26:43 2006 +++ xoops2jp/html/modules/base/xoops_version.php Tue May 16 21:46:26 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/settings/site_default.ini.php diff -u xoops2jp/html/settings/site_default.ini.php:1.1.2.10 xoops2jp/html/settings/site_default.ini.php:1.1.2.11 --- xoops2jp/html/settings/site_default.ini.php:1.1.2.10 Tue Apr 11 17:39:08 2006 +++ xoops2jp/html/settings/site_default.ini.php Tue May 16 21:46:26 2006 @@ -3,7 +3,8 @@ [Cube] Controller=Legacy_Controller -SystemModules=system,base,user,legacyRender +#SystemModules=system,base,user,legacyRender +SystemModules=base,user,legacyRender RecommendedModules=stdCache,pm CacheSystem.path=/modules/stdCache/kernel CacheSystem.class=StdRenderCache @@ -31,7 +32,7 @@ [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 +SystemTemplate=system_comment.html, system_comments_flat.html, system_comments_thread.html, system_comments_nest.html, system_notification_select.html, system_dummy.html, system_redirect.html SystemTemplatePrefix=legacy [Legacy_AdminRenderSystem] From nobunobu @ users.sourceforge.jp Tue May 16 21:46:26 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:46:26 +0900 Subject: [xoops-cvslog 3046] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060516124626.AAFE12AC046@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_dummy.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_dummy.html:1.1.2.1 --- /dev/null Tue May 16 21:46:26 2006 +++ xoops2jp/html/modules/base/templates/legacy_dummy.html Tue May 16 21:46:26 2006 @@ -0,0 +1 @@ +<{$dummy_content}> \ No newline at end of file Index: xoops2jp/html/modules/base/templates/legacy_redirect.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_redirect.html:1.1.2.1 --- /dev/null Tue May 16 21:46:26 2006 +++ xoops2jp/html/modules/base/templates/legacy_redirect.html Tue May 16 21:46:26 2006 @@ -0,0 +1,13 @@ + + + + +<{$xoops_sitename}> + + +
+

<{$message}>

+

<{$lang_ifnotreload}>

+
+ + \ No newline at end of file From nobunobu @ users.sourceforge.jp Tue May 16 21:47:19 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:47:19 +0900 Subject: [xoops-cvslog 3047] CVS update: xoops2jp/html/modules/user Message-ID: <20060516124719.8A84B2AC043@users.sourceforge.jp> Index: xoops2jp/html/modules/user/xoops_version.php diff -u xoops2jp/html/modules/user/xoops_version.php:1.1.2.18 xoops2jp/html/modules/user/xoops_version.php:1.1.2.19 --- xoops2jp/html/modules/user/xoops_version.php:1.1.2.18 Mon May 15 12:22:31 2006 +++ xoops2jp/html/modules/user/xoops_version.php Tue May 16 21:47:19 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/install/class/dbmanager.php diff -u xoops2jp/html/install/class/dbmanager.php:1.2.8.2 xoops2jp/html/install/class/dbmanager.php:1.2.8.3 --- xoops2jp/html/install/class/dbmanager.php:1.2.8.2 Tue Mar 7 22:11:39 2006 +++ xoops2jp/html/install/class/dbmanager.php Tue May 16 21:59:36 2006 @@ -32,7 +32,7 @@ * database manager for XOOPS installer * * @author Haruki Setoyama -* @version $Id: dbmanager.php,v 1.2.8.2 2006/03/07 13:11:39 nobunobu Exp $ +* @version $Id: dbmanager.php,v 1.2.8.3 2006/05/16 12:59:36 nobunobu Exp $ * @access public **/ class db_manager { @@ -47,17 +47,28 @@ $this->db->setLogger(XoopsLogger::instance()); } + function connectDB($selectdb = true) { + $ret = $this->db->connect($selectdb); + if ($ret != false) { + $fname = dirname(dirname(__FILE__)).'/language/'.$GLOBALS['language'].'/charset_mysql.php'; + if (file_exists($fname)) { + require_once($fname); + } + } + return $ret; + } + function isConnectable(){ - return ($this->db->connect(false) != false) ? true : false; + return ($this->connectDB(false) != false) ? true : false; } function dbExists(){ - return ($this->db->connect() != false) ? true : false; + return ($this->connectDB() != false) ? true : false; } function createDB() { - $this->db->connect(false); + $this->connectDB(false); $result = $this->db->query("CREATE DATABASE ".XOOPS_DB_NAME); @@ -72,7 +83,7 @@ } $sql_query = trim(fread(fopen($sql_file_path, 'r'), filesize($sql_file_path))); OldSqlUtility::splitMySqlFile($pieces, $sql_query); - $this->db->connect(); + $this->connectDB(); foreach ($pieces as $piece) { $piece = trim($piece); // [0] contains the prefixed query @@ -178,22 +189,22 @@ } function query($sql){ - $this->db->connect(); + $this->connectDB(); return $this->db->query($sql); } function prefix($table){ - $this->db->connect(); + $this->connectDB(); return $this->db->prefix($table); } function fetchArray($ret){ - $this->db->connect(); + $this->connectDB(); return $this->db->fetchArray($ret); } function insert($table, $query){ - $this->db->connect(); + $this->connectDB(); $table = $this->db->prefix($table); $query = 'INSERT INTO '.$table.' '.$query; if(!$this->db->queryF($query)){ @@ -219,7 +230,7 @@ function deleteTables($tables){ $deleted = array(); - $this->db->connect(); + $this->connectDB(); foreach ($tables as $key => $val) { if(! $this->db->query("DROP TABLE ".$this->db->prefix($key))){ $deleted[] = $ct; @@ -232,7 +243,7 @@ $table = trim($table); $ret = false; if ($table != '') { - $this->db->connect(); + $this->connectDB(); $sql = 'SELECT * FROM '.$this->db->prefix($table); $ret = (false != $this->db->query($sql)) ? true : false; } From nobunobu @ users.sourceforge.jp Tue May 16 21:59:36 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:59:36 +0900 Subject: [xoops-cvslog 3049] CVS update: xoops2jp/html/install/include Message-ID: <20060516125936.7BB832AC046@users.sourceforge.jp> Index: xoops2jp/html/install/include/makedata.php diff -u xoops2jp/html/install/include/makedata.php:1.1.2.2 xoops2jp/html/install/include/makedata.php:1.1.2.3 --- xoops2jp/html/install/include/makedata.php:1.1.2.2 Tue Apr 11 17:39:06 2006 +++ xoops2jp/html/install/include/makedata.php Tue May 16 21:59:36 2006 @@ -1,5 +1,5 @@ insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://xoopscube.jp/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://xoopscube.jp/', 1008813250)"); - $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://xoopscube.jp/', 1008813250)"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (1, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner.gif', 'http://xoopscube.jp/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (2, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/xoops_banner_2.gif', 'http://xoopscube.jp/', 1008813250, '')"); + $dbm->insert("banner", " (bid, cid, imptotal, impmade, clicks, imageurl, clickurl, date, htmlcode) VALUES (3, 1, 0, 1, 0, '".XOOPS_URL."/images/banners/banner.swf', 'http://xoopscube.jp/', 1008813250, '')"); // default theme From nobunobu @ users.sourceforge.jp Tue May 16 21:59:36 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:59:36 +0900 Subject: [xoops-cvslog 3050] CVS update: xoops2jp/html/kernel Message-ID: <20060516125936.A414A2AC03A@users.sourceforge.jp> Index: xoops2jp/html/kernel/XCube_Controller.class.php diff -u xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.8 xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.9 --- xoops2jp/html/kernel/XCube_Controller.class.php:1.1.2.8 Wed Apr 5 20:00:37 2006 +++ xoops2jp/html/kernel/XCube_Controller.class.php Tue May 16 21:59:36 2006 @@ -168,6 +168,10 @@ return $this->mDB; } + function _setupLanguage() + { + } + function _setupConfig() { } From nobunobu @ users.sourceforge.jp Tue May 16 21:59:36 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:59:36 +0900 Subject: [xoops-cvslog 3051] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060516125936.D153B2AC046@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.32 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.33 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.32 Fri Apr 28 15:47:13 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Tue May 16 21:59:36 2006 @@ -51,6 +51,53 @@ $this->_mControllerState= $adminStateFlag ? new BaseControllerAdminState() : new BaseControllerPublicState(); } + /** + * @access public + */ + function executeCommon() + { + // + // Setup Filter chain and execute the process of these filters. + // + $this->_setupFilterChain(); + $this->_processFilter(); + + $this->mRoot->setEventManager($this->_createEventManager()); + $this->mRoot->setServiceManager($this->_createServiceManager()); + + // ^^; + $this->_setupErrorHandler(); + + $this->_setupEnvironment(); + + $this->_setupLogger(); + + $this->_setupDB(); + + $this->_setupLanguage(); + + $this->_setupConfig(); + + $this->_setupDebugger(); + + $this->_processPreBlockFilter(); // What's !? + + $languageManager =& $this->_createLanguageManager(); + $this->mRoot->setLanguageManager($languageManager); + + $this->_processHostAbstractLayer(); + + $this->_setupSession(); + + $this->_setupUser(); + + $this->_setupModuleController(); + + $this->_setupRenderSystem(); + + $this->_processModuleController(); + } + function _setupLogger() { require_once XOOPS_ROOT_PATH.'/class/logger.php'; @@ -312,16 +359,36 @@ $GLOBALS['xoopsDB']=&$this->mDB; } + function _setupLanguage() + { + if (!$this->mLanguage) { + $configHandler=&xoops_gethandler('config'); + $criteria =& new CriteriaCompo(new Criteria('conf_modid',0)); + $criteria->add(new Criteria('conf_catid',XOOPS_CONF)); + $criteria->add(new Criteria('conf_name','language')); + $configs =& $configHandler->getConfigs($criteria); + if (count($configs)) { + $this->mLanguage = $configs[0]->getVar('conf_value'); + } + } + if ($this->mLanguage) { + $fname = XOOPS_MODULE_PATH .'/base/language/' .$this->mLanguage .'/charset_'.XOOPS_DB_TYPE.'.php'; + if (file_exists($fname)) { + require_once($fname); + } + } + } + function _setupConfig() { $configHandler=&xoops_gethandler('config'); $this->mConfig=&$configHandler->getConfigsByCat(XOOPS_CONF); $this->mRoot->setThemeName($this->mConfig['theme_set']); - + if ($this->mLanguage) { + $this->mConfig['language'] = $this->mLanguage; + } $GLOBALS['xoopsConfig']=&$this->mConfig; - - $this->mRoot->setThemeName($this->mConfig['theme_set']); } /** @@ -338,11 +405,11 @@ if (defined("OH_MY_GOD_HELP_ME")) { $debug_mode = XOOPS_DEBUG_PHP; } - + $this->mDebugger =& Legacy_DebuggerManager::getInstance($debug_mode); $this->mDebugger->prepare(); - $GLOBALS['xoopsDebugger'] =& $this->mDebugger; + $GLOBALS['xoopsDebugger']=&$this->mDebugger; } function _processPreBlockFilter() @@ -536,9 +603,9 @@ // // Debug Process // - $isAdmin = false; - if (is_object($this->mXoopsUser)) { - if ($this->mModuleController->isModuleProcess() && $this->mModuleController->isActive()) { + $isAdmin=false; + if(is_object($this->mXoopsUser)) { + if($this->mModuleController->isModuleProcess() && $this->mModuleController->isActive()) { // @todo I depend on Legacy Module Controller. $mid=$this->mModuleController->mModuleObject->getVar('mid'); } From nobunobu @ users.sourceforge.jp Tue May 16 21:59:37 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:59:37 +0900 Subject: [xoops-cvslog 3052] CVS update: xoops2jp/html/install/language/japanese Message-ID: <20060516125937.07D802AC03A@users.sourceforge.jp> Index: xoops2jp/html/install/language/japanese/charset_mysql.php diff -u /dev/null xoops2jp/html/install/language/japanese/charset_mysql.php:1.1.2.1 --- /dev/null Tue May 16 21:59:36 2006 +++ xoops2jp/html/install/language/japanese/charset_mysql.php Tue May 16 21:59:36 2006 @@ -0,0 +1,8 @@ +db->queryF("SET NAMES ujis"); + $this->db->queryF("SET SESSION character_set_database=ujis"); + $this->db->queryF("SET SESSION character_set_server=ujis"); + $this->db->queryF("SET SESSION collation_connection=ujis_japanese_ci"); + $this->db->queryF("SET SESSION collation_database=ujis_japanese_ci"); + $this->db->queryF("SET SESSION collation_server=ujis_japanese_ci"); +?> From nobunobu @ users.sourceforge.jp Tue May 16 21:59:37 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 21:59:37 +0900 Subject: [xoops-cvslog 3053] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060516125937.2CD062AC046@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/charset_mysql.php diff -u /dev/null xoops2jp/html/modules/base/language/japanese/charset_mysql.php:1.1.2.1 --- /dev/null Tue May 16 21:59:37 2006 +++ xoops2jp/html/modules/base/language/japanese/charset_mysql.php Tue May 16 21:59:37 2006 @@ -0,0 +1,8 @@ +queryF("SET NAMES ujis"); + $GLOBALS['xoopsDB']->queryF("SET SESSION character_set_database=ujis"); + $GLOBALS['xoopsDB']->queryF("SET SESSION character_set_server=ujis"); + $GLOBALS['xoopsDB']->queryF("SET SESSION collation_connection=ujis_japanese_ci"); + $GLOBALS['xoopsDB']->queryF("SET SESSION collation_database=ujis_japanese_ci"); + $GLOBALS['xoopsDB']->queryF("SET SESSION collation_server=ujis_japanese_ci"); +?> From nobunobu @ users.sourceforge.jp Tue May 16 22:11:28 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 22:11:28 +0900 Subject: [xoops-cvslog 3054] CVS update: xoops2jp/html/language/japanese Message-ID: <20060516131128.F393D2AC020@users.sourceforge.jp> Index: xoops2jp/html/language/japanese/xoopsmailerlocal.php diff -u xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.1.8.2 xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.1.8.3 --- xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.1.8.2 Fri Nov 25 22:19:00 2005 +++ xoops2jp/html/language/japanese/xoopsmailerlocal.php Tue May 16 22:11:28 2006 @@ -1,5 +1,5 @@ EncodeHeader($addr[1], 'text') . " <" . - $addr[0] . ">"; + $formatted = $this->EncodeHeader($addr[1], 'text') . " <" . + $addr[0] . ">"; } return $formatted; } function EncodeHeader ($str, $position = 'text', $force=false) { - $encode_charset = strtoupper($this->CharSet); - if (function_exists('mb_convert_encoding')) { //Using mb_string extension if exists. - if ($this->needs_encode || $force) { - $str_encoding = mb_detect_encoding($str, 'ASCII,'.$encode_charset ); - if ($str_encoding == 'ASCII') { // Return original if string from only ASCII chars. - return $str; - } else if ($str_encoding != $encode_charset) { // Maybe this case may not occur. - $str = mb_convert_encoding($str, $encode_charset, $str_encoding); + if (!preg_match('/^4\.4\.[01]([^0-9]+|$)/',PHP_VERSION)) { + if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists. + if ($this->needs_encode || $force) { + $encoded = mb_convert_encoding($str, _CHARSET, mb_detect_encoding($str)); + $encoded = mb_encode_mimeheader($encoded, "ISO-2022-JP", "B", "\n"); + } else { + $encoded = $str; } - //Following Logic are made for recovering PHP4.4.x mb_encode_mimeheader() bug. - //TODO: If mb_encode_mimeheader() bug is fixed. Replace this to simple logic. - $cut_start = 0; - $encoded =''; - $cut_length = floor((76-strlen('Subject: =?'.$encode_charset.'?B?'.'?='))/4)*3; - while($cut_start < strlen($str)) { - $partstr = mb_strcut ( $str, $cut_start, $cut_length, $encode_charset); - $partstr_length = strlen($partstr); - if (!$partstr_length) break; - if ($encode_charset == 'ISO-2022-JP') { - //Should Adjust next cutting place for SO & SI char insertion. - if ((substr($partstr, 0, 3)===chr(27).'$B') - && (substr($str, $cut_start, 3) !== chr(27).'$B')) { - $partstr_length -= 3; - } - if ((substr($partstr,-3)===chr(27).'(B') - && (substr($str, $cut_start+$partstr_length-3, 3) !== chr(27).'(B')) { - $partstr_length -= 3; + } else { + $encoded = parent::EncodeHeader($str, $position); + } + return $encoded; + } else { + //Following Logic are made for recovering PHP4.4.0 and 4.4.1 mb_encode_mimeheader() bug. + //TODO: If mb_encode_mimeheader() bug is fixed. Replace this to simple logic. + $encode_charset = strtoupper($this->CharSet); + if (function_exists('mb_convert_encoding')) { //Using mb_string extension if exists. + if ($this->needs_encode || $force) { + $str_encoding = mb_detect_encoding($str, 'ASCII,'.$encode_charset ); + if ($str_encoding == 'ASCII') { // Return original if string from only ASCII chars. + return $str; + } else if ($str_encoding != $encode_charset) { // Maybe this case may not occur. + $str = mb_convert_encoding($str, $encode_charset, $str_encoding); + } + $cut_start = 0; + $encoded =''; + $cut_length = floor((76-strlen('Subject: =?'.$encode_charset.'?B?'.'?='))/4)*3; + while($cut_start < strlen($str)) { + $partstr = mb_strcut ( $str, $cut_start, $cut_length, $encode_charset); + $partstr_length = strlen($partstr); + if (!$partstr_length) break; + if ($encode_charset == 'ISO-2022-JP') { + //Should Adjust next cutting place for SO & SI char insertion. + if ((substr($partstr, 0, 3)===chr(27).'$B') + && (substr($str, $cut_start, 3) !== chr(27).'$B')) { + $partstr_length -= 3; + } + if ((substr($partstr,-3)===chr(27).'(B') + && (substr($str, $cut_start+$partstr_length-3, 3) !== chr(27).'(B')) { + $partstr_length -= 3; + } } - } - if ($cut_start) $encoded .= "\r\n\t"; - $encoded .= '=?' . $encode_charset . '?B?' . base64_encode($partstr) . '?='; - $cut_start += $partstr_length; + if ($cut_start) $encoded .= "\r\n\t"; + $encoded .= '=?' . $encode_charset . '?B?' . base64_encode($partstr) . '?='; + $cut_start += $partstr_length; + } + } else { + $encoded = $str; } } else { - $encoded = $str; + $encoded = parent::EncodeHeader($str, $position); } - } else { - $encoded = parent::encode_header($str, $position); - } - return $encoded; + return $encoded; + } } } ?> From nobunobu @ users.sourceforge.jp Tue May 16 22:12:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 22:12:04 +0900 Subject: [xoops-cvslog 3055] CVS update: xoops2jp/html/language/japanese Message-ID: <20060516131204.1A1792AC03A@users.sourceforge.jp> Index: xoops2jp/html/language/japanese/xoopsmailerlocal.php diff -u xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.2 xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.2.6.1 --- xoops2jp/html/language/japanese/xoopsmailerlocal.php:1.2 Mon Sep 5 05:46:09 2005 +++ xoops2jp/html/language/japanese/xoopsmailerlocal.php Tue May 16 22:12:03 2006 @@ -1,5 +1,5 @@ reset(); $this->charSet = 'iso-2022-jp'; $this->encoding = '7bit'; + $this->multimailer->CharSet = $this->charSet; } function encodeFromName($text){ @@ -62,7 +63,7 @@ --------------------------------------*/ function STRtoJIS($str, $from_charset){ if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists. - $str_JIS = mb_convert_encoding($str, "ISO-2022-JP", $from_charset); + $str_JIS = mb_convert_encoding($str, "ISO-2022-JP", $from_charset); } else if ($from_charset=='EUC-JP') { $str_JIS = ''; $mode = 0; @@ -115,27 +116,71 @@ } } - function addr_format($addr) { + function AddrFormat($addr) { if(empty($addr[1])) { $formatted = $addr[0]; } else { - $formatted = sprintf('%s <%s>', $this->encode_header($addr[1], 'text', true), $addr[0]); + $formatted = $this->EncodeHeader($addr[1], 'text') . " <" . + $addr[0] . ">"; } return $formatted; } - function encode_header ($str, $position = 'text', $force=false) { - if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists. - if ($this->needs_encode || $force) { - $encoded = mb_convert_encoding($str, _CHARSET, mb_detect_encoding($str)); - $encoded = mb_encode_mimeheader($encoded, "ISO-2022-JP", "B", "\n"); + function EncodeHeader ($str, $position = 'text', $force=false) { + if (!preg_match('/^4\.4\.[01]([^0-9]+|$)/',PHP_VERSION)) { + if (function_exists('mb_convert_encoding')) { //Use mb_string extension if exists. + if ($this->needs_encode || $force) { + $encoded = mb_convert_encoding($str, _CHARSET, mb_detect_encoding($str)); + $encoded = mb_encode_mimeheader($encoded, "ISO-2022-JP", "B", "\n"); + } else { + $encoded = $str; + } } else { - $encoded = $str; + $encoded = parent::EncodeHeader($str, $position); } + return $encoded; } else { - $encoded = parent::encode_header($str, $position); - } - return $encoded; + //Following Logic are made for recovering PHP4.4.0 and 4.4.1 mb_encode_mimeheader() bug. + //TODO: If mb_encode_mimeheader() bug is fixed. Replace this to simple logic. + $encode_charset = strtoupper($this->CharSet); + if (function_exists('mb_convert_encoding')) { //Using mb_string extension if exists. + if ($this->needs_encode || $force) { + $str_encoding = mb_detect_encoding($str, 'ASCII,'.$encode_charset ); + if ($str_encoding == 'ASCII') { // Return original if string from only ASCII chars. + return $str; + } else if ($str_encoding != $encode_charset) { // Maybe this case may not occur. + $str = mb_convert_encoding($str, $encode_charset, $str_encoding); + } + $cut_start = 0; + $encoded =''; + $cut_length = floor((76-strlen('Subject: =?'.$encode_charset.'?B?'.'?='))/4)*3; + while($cut_start < strlen($str)) { + $partstr = mb_strcut ( $str, $cut_start, $cut_length, $encode_charset); + $partstr_length = strlen($partstr); + if (!$partstr_length) break; + if ($encode_charset == 'ISO-2022-JP') { + //Should Adjust next cutting place for SO & SI char insertion. + if ((substr($partstr, 0, 3)===chr(27).'$B') + && (substr($str, $cut_start, 3) !== chr(27).'$B')) { + $partstr_length -= 3; + } + if ((substr($partstr,-3)===chr(27).'(B') + && (substr($str, $cut_start+$partstr_length-3, 3) !== chr(27).'(B')) { + $partstr_length -= 3; + } + } + if ($cut_start) $encoded .= "\r\n\t"; + $encoded .= '=?' . $encode_charset . '?B?' . base64_encode($partstr) . '?='; + $cut_start += $partstr_length; + } + } else { + $encoded = $str; + } + } else { + $encoded = parent::EncodeHeader($str, $position); + } + return $encoded; + } } } ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Tue May 16 22:25:07 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 22:25:07 +0900 Subject: [xoops-cvslog 3056] CVS update: xoops2jp/html/class Message-ID: <20060516132507.0FE932AC020@users.sourceforge.jp> Index: xoops2jp/html/class/token.php diff -u xoops2jp/html/class/token.php:1.3.6.2 xoops2jp/html/class/token.php:1.3.6.3 --- xoops2jp/html/class/token.php:1.3.6.2 Tue Feb 28 23:36:04 2006 +++ xoops2jp/html/class/token.php Tue May 16 22:25:06 2006 @@ -285,7 +285,8 @@ function &quickCreate($name,$timeout = XOOPS_TOKEN_TIMEOUT) { $handler =& new XoopsSingleTokenHandler(); - return $handler->create($name,$timeout); + $ret =& $handler->create($name,$timeout); + return $ret; } /** @@ -361,7 +362,8 @@ function &quickCreate($name,$timeout = XOOPS_TOKEN_TIMEOUT) { $handler =& new XoopsMultiTokenHandler(); - return $handler->create($name,$timeout); + $ret =& $handler->create($name,$timeout); + return $ret; } /** Index: xoops2jp/html/class/xoopslists.php diff -u xoops2jp/html/class/xoopslists.php:1.2.8.2 xoops2jp/html/class/xoopslists.php:1.2.8.3 --- xoops2jp/html/class/xoopslists.php:1.2.8.2 Tue Feb 28 23:36:04 2006 +++ xoops2jp/html/class/xoopslists.php Tue May 16 22:25:06 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/system/admin.php diff -u xoops2jp/html/modules/system/admin.php:1.2 xoops2jp/html/modules/system/admin.php:1.2.8.1 --- xoops2jp/html/modules/system/admin.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin.php Tue May 16 22:25:07 2006 @@ -1,5 +1,5 @@ 0) { - $groups =& $xoopsUser->getGroups(); + $groups = $xoopsUser->getGroups(); if (in_array(XOOPS_GROUP_ADMIN, $groups) || false != $sysperm_handler->checkRight('system_admin', $category, $groups, $xoopsModule->getVar('mid'))){ if (file_exists(XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php")) { include_once XOOPS_ROOT_PATH."/modules/system/admin/".$fct."/main.php"; From nobunobu @ users.sourceforge.jp Tue May 16 22:26:46 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 16 May 2006 22:26:46 +0900 Subject: [xoops-cvslog 3058] CVS update: xoops2jp/html/install/language/english Message-ID: <20060516132646.976FA2AC020@users.sourceforge.jp> Index: xoops2jp/html/install/language/english/install.php diff -u xoops2jp/html/install/language/english/install.php:1.2.8.2 xoops2jp/html/install/language/english/install.php:1.2.8.3 --- xoops2jp/html/install/language/english/install.php:1.2.8.2 Tue Apr 11 17:39:07 2006 +++ xoops2jp/html/install/language/english/install.php Tue May 16 22:26:46 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,7 +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_L210","The 2nd Step Installation"); define('_INSTALL_CHARSET','ISO-8859-1'); From tom_g3x @ users.sourceforge.jp Wed May 17 00:27:17 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Wed, 17 May 2006 00:27:17 +0900 Subject: [xoops-cvslog 3059] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060516152717.5A1C32AC058@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.5 --- xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.4 Tue May 16 01:09:56 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Wed May 17 00:27:17 2006 @@ -4,9 +4,9 @@ »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> -

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> (*category name*)

+

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> (<{$objects[0]->mImageCategory->getVar('imgcat_name')}>)

- +
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}> + <{if $actionForm->get('image_id')}> + <{$smarty.const._AD_BASE_LANG_IMAGE_EDIT}> + <{else}> + <{$smarty.const._AD_BASE_LANG_IMAGE_NEW}> + <{/if}> +
<{$smarty.const._AD_BASE_LANG_IMAGE_NAME}> "> <{xoops_input type=file name=image_name}>
<{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}><{$smarty.const._AD_BASE_LANG_IMAGE_NICENAME}> "> - <{xoops_input type=text name=image_nicename value=$actionForm->get('image_nicename') size=15 maxlength=255}> + <{xoops_input type=text name=image_nicename value=$actionForm->get('image_nicename') size=30 maxlength=255}>
<{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}><{$smarty.const._AD_BASE_LANG_IMAGE_DISPLAY}> "> - <{xoops_input type=checkbox name=image_display value=1 default=$actionForm->get('image_display')}> + <{xoops_input type=checkbox name=image_display value=1 default=$actionForm->get('image_display') size=45}>
<{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}><{$smarty.const._AD_BASE_LANG_IMAGE_WEIGHT}> "> - <{xoops_input type=text name=image_weight value=$actionForm->get('image_weight')}> + <{xoops_input type=text name=image_weight value=$actionForm->get('image_weight') size=5}>
<{$smarty.const._AD_BASE_LANG_IMGCAT_ID}><{$smarty.const._AD_BASE_LANG_IMGCAT_ID}> ">
+
@@ -37,7 +37,7 @@ <{foreach item=obj from=$objects}> - + - +
<{$smarty.const._AD_BASE_LANG_CONTROL}>
<{$obj->getVar('image_id')}> <{if $obj->mImageCategory != null}> @@ -51,7 +51,7 @@ <{$obj->getVar('image_nicename')}> <{$obj->getVar('image_mimetype')}> <{$obj->getVar('image_created')|xoops_formattimestamp:l}><{$obj->getVar('image_display')}><{if $obj->getVar('image_display') == 1}><{$smarty.const._YES}><{else}><{$smarty.const._YES}><{/if}> <{$obj->getVar('image_weight')}> <{$obj->getVar('imgcat_id')}> @@ -62,4 +62,4 @@ <{/foreach}>
- + Index: xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html:1.1.2.3 Tue May 16 01:09:56 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_delete.html Wed May 17 00:27:17 2006 @@ -25,15 +25,15 @@ <{$smarty.const._AD_BASE_LANG_IMGCAT_MAXSIZE}> - "><{$object->getVar('imgcat_maxsize')}> + "><{$object->getVar('imgcat_maxsize')|number_format}> <{$smarty.const._AD_BASE_LANG_IMGCAT_MAXWIDTH}> - "><{$object->getVar('imgcat_maxwidth')}> + "><{$object->getVar('imgcat_maxwidth')|number_format}> <{$smarty.const._AD_BASE_LANG_IMGCAT_MAXHEIGHT}> - "><{$object->getVar('imgcat_maxheight')}> + "><{$object->getVar('imgcat_maxheight')|number_format}> <{$smarty.const._AD_BASE_LANG_IMGCAT_DISPLAY}> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.5 --- xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.4 Tue May 16 01:09:56 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Wed May 17 00:27:17 2006 @@ -45,16 +45,16 @@ <{$obj->getVar('imgcat_id')}> <{$obj->getVar('imgcat_name')}> - <{$obj->getVar('imgcat_maxsize')}> - <{$obj->getVar('imgcat_maxwidth')}> - <{$obj->getVar('imgcat_maxheight')}> + <{$obj->getVar('imgcat_maxsize')|number_format}> + <{$obj->getVar('imgcat_maxwidth')|number_format}> + <{$obj->getVar('imgcat_maxheight')|number_format}> <{$obj->getVar('imgcat_display')}> <{$obj->getVar('imgcat_weight')}> <{$obj->getVar('imgcat_type')}> <{$obj->getVar('imgcat_storetype')}> <{$obj->getImageCount()|escape}> - <{$smarty.const._AD_BASE_LANG_LIST}> + " alt="<{$smarty.const._AD_BASE_LANG_LIST}>" title="<{$smarty.const._AD_BASE_LANG_LIST}>" /> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.3 Tue May 16 01:09:56 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Wed May 17 00:27:17 2006 @@ -1,9 +1,26 @@
- *module name* - »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + <{if $module != null}> + <{$module->getVar('name')}> + <{if $category != null}> + »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + »» <{$category->getVar('confcat_name')}> + <{else}> + »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + <{/if}> + <{else}> + <{$smarty.const._MI_BASE_NAME}> + »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + »» <{$category->getVar('confcat_name')}> + <{/if}>
-

<{$smarty.const._MI_BASE_MENU_PREFERENCE}>

+

+ <{if $category != null}> + <{$category->getVar('confcat_name')}> + <{else}> + <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + <{/if}> +

<{if $actionForm->hasError()}>
    @@ -12,13 +29,18 @@ <{/foreach}>
<{/if}> + <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=$actionForm->mKeyName value=$actionForm->mKeyValue}> - - + <{foreach item=config from=$objectArr}> Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.5 --- xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.4 Mon May 15 15:58:31 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Wed May 17 00:27:17 2006 @@ -1,7 +1,6 @@
<{$smarty.const._MI_BASE_NAME}> »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> -

<{$smarty.const._MI_BASE_MENU_PREFERENCE}>

Index: xoops2jp/html/modules/base/admin/templates/image_edit.html diff -u xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.3 xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.4 --- xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.3 Tue May 16 01:09:56 2006 +++ xoops2jp/html/modules/base/admin/templates/image_edit.html Wed May 17 00:27:17 2006 @@ -1,7 +1,7 @@
<{$smarty.const._MI_BASE_NAME}> »» <{$smarty.const._MI_BASE_MENU_IMAGE_MANAGE}> - »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> + »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> <{if $actionForm->get('image_id')}> »» <{$smarty.const._AD_BASE_LANG_IMAGE_EDIT}> <{else}> From minahito @ users.sourceforge.jp Wed May 17 12:09:19 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 12:09:19 +0900 Subject: [xoops-cvslog 3060] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060517030919.DAF222AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.3 xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.4 --- xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.3 Mon May 15 17:33:38 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Wed May 17 12:09:19 2006 @@ -73,12 +73,12 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { - $controller->executeForward("./index.php?action=ImageList"); + $controller->executeForward("./index.php?action=ImageList&imgcat_id=" . $this->mActionForm->get('imgcat_id')); } function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=ImageList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); + redirect_header("./index.php?action=ImagecategoryList", 1, _AD_BASE_ERROR_DBUPDATE_FAILED); } } From minahito @ users.sourceforge.jp Wed May 17 12:09:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 12:09:35 +0900 Subject: [xoops-cvslog 3061] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060517030935.0ACAB2AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.2 xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php:1.1.2.2 Mon May 15 17:40:13 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageListAction.class.php Wed May 17 12:09:34 2006 @@ -24,6 +24,22 @@ { return "./index.php?action=ImageList"; } + + function getDefaultView(&$contoller, &$xoopsUser) + { + $result = parent::getDefaultView($controller, $xoopsUser); + if ($result == LEGACY_FRAME_VIEW_INDEX) { + $cat_id = xoops_getrequest('imgcat_id'); + $handler =& xoops_getmodulehandler('imagecategory'); + $this->mCategory =& $handler->get($cat_id); + + if ($this->mCategory == null) { + $result = LEGACY_FRAME_VIEW_ERROR; + } + } + + return $result; + } function executeViewIndex(&$controller, &$xoopsUser, &$render) { @@ -35,6 +51,13 @@ $render->setAttribute("objects", $this->mObjects); $render->setAttribute("pageNavi", $this->mNavi); + + $render->setAttribute("category", $this->mCategory); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?Action=ImagecategoryList"); } } From minahito @ users.sourceforge.jp Wed May 17 12:09:48 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 12:09:48 +0900 Subject: [xoops-cvslog 3062] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060517030948.48CD42AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_list.html diff -u xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.6 --- xoops2jp/html/modules/base/admin/templates/image_list.html:1.1.2.5 Wed May 17 00:27:17 2006 +++ xoops2jp/html/modules/base/admin/templates/image_list.html Wed May 17 12:09:48 2006 @@ -4,9 +4,9 @@ »» <{$smarty.const._AD_BASE_LANG_IMAGE_LIST}>
-

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> (<{$objects[0]->mImageCategory->getVar('imgcat_name')}>)

+

<{$smarty.const._AD_BASE_LANG_IMAGE_LIST}> (<{$category->getVar('imgcat_name')}>)

- +
*module name* <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + <{$smarty.const._MI_BASE_MENU_PREFERENCE}> + <{if $category != null}> + - <{$category->getVar('confcat_name')}> + <{/if}> +
From minahito @ users.sourceforge.jp Wed May 17 12:10:02 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 12:10:02 +0900 Subject: [xoops-cvslog 3063] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060517031005.D55A52AC021@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.37 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.38 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.37 Mon May 15 16:00:30 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Wed May 17 12:10:02 2006 @@ -72,21 +72,21 @@ define('_AD_BASE_LANG_FUNC_NUM', "関数ナンバ"); define('_AD_BASE_LANG_ID', "ID"); define('_AD_BASE_LANG_IMAGE_COUNT', "画像数"); -define('_AD_BASE_LANG_IMAGE_CREATED', "image created"); -define('_AD_BASE_LANG_IMAGE_DELETE', "Image delete"); -define('_AD_BASE_LANG_IMAGE_DISPLAY', "image display"); -define('_AD_BASE_LANG_IMAGE_EDIT', "Image edit"); +define('_AD_BASE_LANG_IMAGE_CREATED', "作成日"); +define('_AD_BASE_LANG_IMAGE_DELETE', "イメージの削除"); +define('_AD_BASE_LANG_IMAGE_DISPLAY', "表示"); +define('_AD_BASE_LANG_IMAGE_EDIT', "イメージの編集"); define('_AD_BASE_LANG_IMAGE_ID', "ID"); -define('_AD_BASE_LANG_IMAGE_LIST', "Image list"); -define('_AD_BASE_LANG_IMAGE_MIMETYPE', "image mimetype"); -define('_AD_BASE_LANG_IMAGE_NAME', "image name"); -define('_AD_BASE_LANG_IMAGE_NEW', "Image new"); -define('_AD_BASE_LANG_IMAGE_NICENAME', "image nicename"); -define('_AD_BASE_LANG_IMAGE_WEIGHT', "image weight"); -define('_AD_BASE_LANG_IMAGECATEGORY_DELETE', "Imagecategory delete"); -define('_AD_BASE_LANG_IMAGECATEGORY_EDIT', "Imagecategory edit"); -define('_AD_BASE_LANG_IMAGECATEGORY_LIST', "Imagecategory list"); -define('_AD_BASE_LANG_IMAGECATEGORY_NEW', "Imagecategory new"); +define('_AD_BASE_LANG_IMAGE_LIST', "イメージの一覧"); +define('_AD_BASE_LANG_IMAGE_MIMETYPE', "Mimetype"); +define('_AD_BASE_LANG_IMAGE_NAME', "名前"); +define('_AD_BASE_LANG_IMAGE_NEW', "イメージの新規追加"); +define('_AD_BASE_LANG_IMAGE_NICENAME', "イメージ名"); +define('_AD_BASE_LANG_IMAGE_WEIGHT', "表示順"); +define('_AD_BASE_LANG_IMAGECATEGORY_DELETE', "イメージカテゴリの削除"); +define('_AD_BASE_LANG_IMAGECATEGORY_EDIT', "イメージカテゴリの編集"); +define('_AD_BASE_LANG_IMAGECATEGORY_LIST', "イメージカテゴリの一覧"); +define('_AD_BASE_LANG_IMAGECATEGORY_NEW', "イメージカテゴリの新規追加"); define('_AD_BASE_LANG_IMGCAT_DISPLAY', "表示"); define('_AD_BASE_LANG_IMGCAT_ID', "カテゴリID"); define('_AD_BASE_LANG_IMGCAT_MAXHEIGHT', "高さ"); From minahito @ users.sourceforge.jp Wed May 17 14:30:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 14:30:32 +0900 Subject: [xoops-cvslog 3064] CVS update: xoops2jp/html/class/smarty/plugins Message-ID: <20060517053032.164972AC068@users.sourceforge.jp> Index: xoops2jp/html/class/smarty/plugins/resource.db.php diff -u xoops2jp/html/class/smarty/plugins/resource.db.php:1.1.8.1 xoops2jp/html/class/smarty/plugins/resource.db.php:1.1.8.2 --- xoops2jp/html/class/smarty/plugins/resource.db.php:1.1.8.1 Sun Apr 9 10:24:03 2006 +++ xoops2jp/html/class/smarty/plugins/resource.db.php Wed May 17 14:30:31 2006 @@ -32,6 +32,9 @@ $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 && $GLOBALS['xoopsConfig']['template_set'] != "default") { + $tplobj =& $tplfile_handler->find('default', null, null, null, $tpl_name, true); + } if (count($tplobj) > 0) { if (false != $smarty->xoops_canUpdateFromFile()) { $conf_theme = isset($GLOBALS['xoopsConfig']['theme_set']) ? $GLOBALS['xoopsConfig']['theme_set'] : 'default'; @@ -88,6 +91,9 @@ $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 && $GLOBALS['xoopsConfig']['template_set'] != "default") { + $tplobj =& $tplfile_handler->find('default', null, null, null, $tpl_name, true); + } if (count($tplobj) > 0) { if (false != $smarty->xoops_canUpdateFromFile()) { $conf_theme = isset($GLOBALS['xoopsConfig']['theme_set']) ? $GLOBALS['xoopsConfig']['theme_set'] : 'default'; From minahito @ users.sourceforge.jp Wed May 17 16:19:39 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:19:39 +0900 Subject: [xoops-cvslog 3065] CVS update: xoops2jp/html/modules/legacyRender/admin/.xml Message-ID: <20060517071939.1C5CD2AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_clone.xml diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_clone.xml:1.1.2.1 --- /dev/null Wed May 17 16:19:39 2006 +++ xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_clone.xml Wed May 17 16:19:38 2006 @@ -0,0 +1,12 @@ + + + + + + + + + + + + From minahito @ users.sourceforge.jp Wed May 17 16:19:47 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:19:47 +0900 Subject: [xoops-cvslog 3066] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517071947.6EBF82AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.1 --- /dev/null Wed May 17 16:19:47 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php Wed May 17 16:19:47 2006 @@ -0,0 +1,67 @@ +_getId(); + + $this->mObjectHandler =& $this->_getHandler(); + $obj =& $this->mObjectHandler->get($id); + + if (is_object($obj) && $obj->get('tpl_tplset') == 'default') { + $this->mObject =& $obj->createClone(xoops_getrequest('tpl_tplset')); + } + } + + function isEnableCreate() + { + return false; + } + + function _setupActionForm() + { + $this->mActionForm =& new LegacyRender_TplfileCloneForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("tplfile_clone.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + $render->setAttribute('tpl_id', xoops_getrequest('tpl_id')); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $tplset = $this->mObject->get('tpl_tplset'); + $module = $this->mObject->get('tpl_module'); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 16:19:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:19:56 +0900 Subject: [xoops-cvslog 3067] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517071956.34BC82AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php:1.1.2.1 --- /dev/null Wed May 17 16:19:56 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileCloneForm.class.php Wed May 17 16:19:56 2006 @@ -0,0 +1,62 @@ +mFormProperties['tpl_tplset'] =& new XCube_StringProperty('tpl_tplset'); + + // + // Set field properties + // + $this->mFieldProperties['tpl_tplset'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['tpl_tplset']->setDependsByArray(array('required')); + $this->mFieldProperties['tpl_tplset']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPL_TPLSET); + } + + function validateTpl_tplset() + { + $tplset = $this->get('tpl_tplset'); + + $handler =& xoops_getmodulehandler('tplset', 'legacyRender'); + $criteria =& new Criteria('tplset_name', $this->get('tpl_tplset')); + $objs =& $handler->getObjects($criteria); + + if (count($objs) == 0) { + $this->addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_WRONG); + } + } + + function load(&$obj) + { + parent::load($obj); + $this->set('tpl_tplset', $obj->get('tpl_tplset')); + } + + function update(&$obj) + { + $obj->loadSource(); + + $obj->setVar('tpl_desc', $this->get('tpl_desc')); + $obj->setVar('tpl_lastmodified', time()); + + $obj->Source->setVar('tpl_source', $this->get('tpl_source')); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 16:20:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:20:34 +0900 Subject: [xoops-cvslog 3068] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060517072034.63B8D2AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplfile.php diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.7 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.7 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/class/tplfile.php Wed May 17 16:20:34 2006 @@ -9,6 +9,8 @@ */ var $Source = null; + var $mOverride = null; + function LegacyRenderTplfileObject() { $this->initVar('tpl_id', XOBJ_DTYPE_INT, '', true); @@ -57,6 +59,28 @@ return $obj; } + + /** + * Load override template file object by $tplset that is the name of template-set specified. + * And, set it to mOverride. + */ + function loadOverride($tplset) + { + if ($tplset == 'default' || $this->mOverride != null) { + return; + } + + $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); + + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('tpl_tplset', $tplset)); + $criteria->add(new Criteria('tpl_file', $this->get('tpl_file'))); + + $objs =& $handler->getObjects($criteria); + if (count($objs) > 0) { + $this->mOverride =& $objs[0]; + } + } } class LegacyRenderTplfileHandler extends XoopsObjectGenericHandler From minahito @ users.sourceforge.jp Wed May 17 16:20:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:20:52 +0900 Subject: [xoops-cvslog 3069] CVS update: xoops2jp/html/modules/legacyRender/language/english Message-ID: <20060517072052.BE4B82AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/english/admin.php diff -u xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.16 xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.17 --- xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.16 Tue Apr 25 14:16:45 2006 +++ xoops2jp/html/modules/legacyRender/language/english/admin.php Wed May 17 16:20:52 2006 @@ -9,6 +9,7 @@ define('_AD_LEGACYRENDER_ERROR_REQUIRED', "{0} is required."); define('_AD_LEGACYRENDER_ERROR_TPLSET_NAME_RULE', "You have to name template set with a-z, 0-9 and under-score (_)."); define('_AD_LEGACYRENDER_ERROR_TPLSET_NO_EXIST', "Specified template set does not exist."); +define('_AD_LEGACYRENDER_ERROR_TPLSET_WRONG', "Tplset wrong"); define('_AD_LEGACYRENDER_ERROR_UNIQUE_NAME', "Input unique name"); define('_AD_LEGACYRENDER_LANG_AUTHOR', "Author"); define('_AD_LEGACYRENDER_LANG_BANNER', "Banner"); @@ -86,6 +87,8 @@ define('_AD_LEGACYRENDER_LANG_TPL_SOURCE', "Source"); define('_AD_LEGACYRENDER_LANG_TPL_TPLSET', "Template set"); define('_AD_LEGACYRENDER_LANG_TPL_TYPE', "Type"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_DELETE', "Tplfile delete"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_LIST', "Tplfile list"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREATED', "Created"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREDITS', "Credits"); define('_AD_LEGACYRENDER_LANG_TPLSET_DESC', "Description"); From minahito @ users.sourceforge.jp Wed May 17 16:20:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:20:52 +0900 Subject: [xoops-cvslog 3070] CVS update: xoops2jp/html/modules/legacyRender/language/japanese Message-ID: <20060517072052.F110C2AC076@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/japanese/admin.php diff -u xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.17 xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.18 --- xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.17 Tue Apr 25 14:16:53 2006 +++ xoops2jp/html/modules/legacyRender/language/japanese/admin.php Wed May 17 16:20:52 2006 @@ -9,6 +9,7 @@ define('_AD_LEGACYRENDER_ERROR_REQUIRED', "{0}は必ず入力して下さい"); define('_AD_LEGACYRENDER_ERROR_TPLSET_NAME_RULE', "テンプレートセットの名称は半角英数字およびアンダースコア(_)の組み合わせを使用してください"); define('_AD_LEGACYRENDER_ERROR_TPLSET_NO_EXIST', "指定されたテンプレートセットは存在しません"); +define('_AD_LEGACYRENDER_ERROR_TPLSET_WRONG', "Tplset wrong"); define('_AD_LEGACYRENDER_ERROR_UNIQUE_NAME', "他のテンプレートセットと重複しない名前を指定してください"); define('_AD_LEGACYRENDER_LANG_AUTHOR', "作成者"); define('_AD_LEGACYRENDER_LANG_BANNER', "バナー"); @@ -85,6 +86,8 @@ define('_AD_LEGACYRENDER_LANG_TPL_SOURCE', "ソース"); define('_AD_LEGACYRENDER_LANG_TPL_TPLSET', "テンプレートセット"); define('_AD_LEGACYRENDER_LANG_TPL_TYPE', "タイプ"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_DELETE', "Tplfile delete"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_LIST', "Tplfile list"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREATED', "作成日"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREDITS', "クレジット"); define('_AD_LEGACYRENDER_LANG_TPLSET_DESC', "概要"); From minahito @ users.sourceforge.jp Wed May 17 16:21:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:21:13 +0900 Subject: [xoops-cvslog 3071] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060517072113.47A812AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html:1.1.2.1 --- /dev/null Wed May 17 16:21:13 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_clone.html Wed May 17 16:21:13 2006 @@ -0,0 +1,80 @@ +
+ <{$smarty.const._MI_LEGACYRENDER_NAME}> + »» <{$smarty.const._MI_LEGACYRENDER_ADMENU_TPLFILE_MANAGE}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_FILE_EDIT}> +
+ +

<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_FILE_EDIT}>

+ + + +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> + + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=tpl_id value=$tpl_id}> + <{xoops_input type=hidden name=tpl_tplset value=$actionForm->get('tpl_tplset')}> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_FILE_EDIT}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>"><{$object->getVar('tpl_tplset')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>"><{$object->getVar('tpl_module')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>"><{$object->getVar('tpl_file')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}>"><{$actionForm->get('tpl_desc')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_SOURCE}>"> +
+ <{$smarty.const._AD_LEGACYRENDER_LANG_MORE_SMALL}> + »» + [480x360] + » + [600x400] + » + [600x600] + » + [640x700] + »» + <{$smarty.const._AD_LEGACYRENDER_LANG_MORE_LARGE}> +
+ +
+ +
+
From minahito @ users.sourceforge.jp Wed May 17 16:21:21 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:21:21 +0900 Subject: [xoops-cvslog 3072] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060517072121.32BDF2AC076@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.7 Thu Apr 13 00:11:20 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html Wed May 17 16:21:21 2006 @@ -80,24 +80,53 @@ <{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}> <{foreach item=obj from=$objects}> - <{if $obj->getVar('tpl_type') == "block"}> + <{if $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> + + <{elseif $obj->getVar('tpl_type') == "block"}> <{else}> <{/if}> - <{$obj->getVar('tpl_id')}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_id')}> + <{else}> + <{$obj->getVar('tpl_id')}> + <{/if}> + <{$obj->getVar('tpl_module')}> - <{$obj->getVar('tpl_tplset')}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_tplset')}> + <{else}> + <{$obj->getVar('tpl_tplset')}> + <{/if}> + <{$obj->getVar('tpl_file')}>
<{$obj->getVar('tpl_desc')}> - <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> - <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{else}> + <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{/if}> + + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{else}> + <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{/if}> + <{$obj->getVar('tpl_type')}> - <{if $obj->getVar('tpl_tplset') == "default"}> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + <{if $targetTplset == 'default'}> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + <{elseif $obj->mOverride != null}> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> <{else}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> <{/if}> From minahito @ users.sourceforge.jp Wed May 17 16:21:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:21:27 +0900 Subject: [xoops-cvslog 3073] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517072127.B98E42AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.6 Tue Mar 28 22:30:48 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php Wed May 17 16:21:27 2006 @@ -2,7 +2,6 @@ if (!defined('XOOPS_ROOT_PATH')) exit(); -define('TPLFILE_SORT_KEY_DEFAULT', 0); define('TPLFILE_SORT_KEY_TPL_ID', 1); define('TPLFILE_SORT_KEY_TPL_REFID', 2); define('TPLFILE_SORT_KEY_TPL_MODULE', 3); @@ -14,6 +13,8 @@ define('TPLFILE_SORT_KEY_TPL_TYPE', 9); define('TPLFILE_SORT_KEY_MAXVALUE', 9); +define('TPLFILE_SORT_KEY_DEFAULT', TPLFILE_SORT_KEY_TPL_ID); + class LegacyRender_TplfileFilterForm { var $mSort = 0; @@ -47,7 +48,7 @@ function fetch() { - $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : 0; + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : TPLFILE_SORT_KEY_DEFAULT; if (abs($this->mSort) > TPLFILE_SORT_KEY_MAXVALUE) { $this->mSort = TPLFILE_SORT_KEY_DEFAULT; @@ -63,7 +64,13 @@ if (isset($_REQUEST['tpl_tplset'])) { $this->_mNavi->addExtra('tpl_tplset', xoops_getrequest('tpl_tplset')); - $this->_mCriteria->add(new Criteria('tpl_tplset', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_tplset')))); + + // + // For the procedure of override, must load 'default' template-set here. + // The template of the specified template-set will be loaded in Tplset Object. + // See business-logic. + // + $this->_mCriteria->add(new Criteria('tpl_tplset', 'default')); $handler =& xoops_getmodulehandler('tplset'); $tplsets =& $handler->getObjects(new Criteria('tplset_name', xoops_getrequest('tpl_tplset'))); From minahito @ users.sourceforge.jp Wed May 17 16:21:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:21:43 +0900 Subject: [xoops-cvslog 3074] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517072143.C791A2AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.7 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Wed May 17 16:21:43 2006 @@ -27,10 +27,24 @@ function executeViewIndex(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("tplfile_list.html"); + + // + // Load override file. + // + if ($this->mFilter->mTplset != null && $this->mFilter->mTplset->get('tplset_name') != 'default') { + foreach (array_keys($this->mObjects) as $key) { + $this->mObjects[$key]->loadOverride($this->mFilter->mTplset->get('tplset_name')); + } + } + $render->setAttribute('objects', $this->mObjects); $render->setAttribute('pageNavi', $this->mPageNavi); $render->setAttribute('filterForm', $this->mFilter); + if ($this->mFilter->mTplset != null) { + $render->setAttribute('targetTplset', $this->mFilter->mTplset->get('tplset_name')); + } + // // TODO We must fetch only module objects that has templates. // From minahito @ users.sourceforge.jp Wed May 17 16:27:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:27:04 +0900 Subject: [xoops-cvslog 3075] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060517072704.391A22AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html:1.1.2.1 --- /dev/null Wed May 17 16:27:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_delete.html Wed May 17 16:27:04 2006 @@ -0,0 +1,58 @@ +
+ <{$smarty.const._MI_LEGACYRENDER_NAME}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TPLFILE_LIST}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TPLFILE_DELETE}> +
+ +

<{$smarty.const._AD_LEGACYRENDER_LANG_TPLFILE_DELETE}>

+ +

<{$smarty.const._AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE}>

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_ID}>"><{$object->getVar('tpl_id')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_REFID}>"><{$object->getVar('tpl_refid')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>"><{$object->getVar('tpl_module')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>"><{$object->getVar('tpl_tplset')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>"><{$object->getVar('tpl_file')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_DESC}>"><{$object->getVar('tpl_desc')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTMODIFIED}>"><{$object->getVar('tpl_lastmodified')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}>"><{$object->getVar('tpl_lastimported')}>
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}>"><{$object->getVar('tpl_type')}>

+
+ <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=tpl_id value=$actionForm->get('tpl_id')}> + + +
+
From minahito @ users.sourceforge.jp Wed May 17 16:27:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:27:04 +0900 Subject: [xoops-cvslog 3076] CVS update: xoops2jp/html/modules/legacyRender/admin/.xml Message-ID: <20060517072704.5AD5F2AC076@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_delete.xml diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_delete.xml:1.1.2.1 --- /dev/null Wed May 17 16:27:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_delete.xml Wed May 17 16:27:04 2006 @@ -0,0 +1,12 @@ + + + + + + + + + + + + From minahito @ users.sourceforge.jp Wed May 17 16:27:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:27:04 +0900 Subject: [xoops-cvslog 3077] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517072704.A14262AC076@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileAdminDeleteForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplfileAdminDeleteForm.class.php:1.1.2.1 --- /dev/null Wed May 17 16:27:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileAdminDeleteForm.class.php Wed May 17 16:27:04 2006 @@ -0,0 +1,42 @@ +mFormProperties['tpl_id'] =& new XCube_IntProperty('tpl_id'); + + // + // Set field properties + // + + $this->mFieldProperties['tpl_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['tpl_id']->setDependsByArray(array('required')); + $this->mFieldProperties['tpl_id']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPL_ID); + } + + function load(&$obj) + { + $this->set('tpl_id', $obj->get('tpl_id')); + } + + function update(&$obj) + { + $obj->set('tpl_id', $this->get('tpl_id')); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 16:27:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 16:27:04 +0900 Subject: [xoops-cvslog 3078] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517072704.7F52E2AC021@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.1 --- /dev/null Wed May 17 16:27:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php Wed May 17 16:27:04 2006 @@ -0,0 +1,56 @@ +mObject != null && $this->mObject->get('tpl_tplset') == 'default') { + $this->mObject = null; + } + } + + function _setupActionForm() + { + $this->mActionForm =& new LegacyRender_TplfileAdminDeleteForm(); + $this->mActionForm->prepare(); + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("tplfile_delete.html"); + $render->setAttribute('actionForm', $this->mActionForm); + #cubson::lazy_load('tplfile', $this->mObject); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $tplset = $this->mObject->get('tpl_tplset'); + $module = $this->mObject->get('tpl_module'); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=" . $this->mObject->get('tpl_tplset')); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplfileList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 18:35:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:35:05 +0900 Subject: [xoops-cvslog 3079] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517093505.5C2532AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.1 Wed May 17 16:19:47 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php Wed May 17 18:35:05 2006 @@ -55,7 +55,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Wed May 17 18:35:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:35:11 +0900 Subject: [xoops-cvslog 3080] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517093511.7EFBF2AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.1 Wed May 17 16:27:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php Wed May 17 18:35:11 2006 @@ -44,7 +44,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=" . $this->mObject->get('tpl_tplset')); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.5 xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.6 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.5 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php Wed May 17 18:35:11 2006 @@ -49,7 +49,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Wed May 17 18:35:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:35:32 +0900 Subject: [xoops-cvslog 3081] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060517093532.2494B2AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplfile.php diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.8 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.9 --- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.8 Wed May 17 16:20:34 2006 +++ xoops2jp/html/modules/legacyRender/class/tplfile.php Wed May 17 18:35:32 2006 @@ -111,6 +111,38 @@ } } + /** + * This method load objects of two template sets by $criteria. Then, build + * the return value from the objects of 'default', and set the objects of + * $tplset to object->mOverride. + */ + function &getObjectsWithOverride($criteria, $tplset) + { + $objs =& $this->getObjects($criteria); + + $ret = array(); + + $i = 0; + foreach (array_keys($objs) as $srckey) { + if ($objs[$srckey]->get('tpl_tplset') == 'default') { + $ret[$i] =& $objs[$srckey]; + + // + // Find the same object in $tplset, set it to mOverride. + // + foreach (array_keys($objs) as $destkey) { + if ($objs[$srckey]->get('tpl_file') == $objs[$destkey]->get('tpl_file') && $objs[$destkey]->get('tpl_tplset') == $tplset) { + $ret[$i]->mOverride =& $objs[$destkey]; + } + } + + $i++; + } + } + + return $ret; + } + function delete(&$obj, $force) { $obj->loadSource(); From minahito @ users.sourceforge.jp Wed May 17 18:35:39 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:35:39 +0900 Subject: [xoops-cvslog 3082] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517093539.A8BE02AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileSetFilterForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplfileSetFilterForm.class.php:1.1.2.1 --- /dev/null Wed May 17 18:35:39 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileSetFilterForm.class.php Wed May 17 18:35:39 2006 @@ -0,0 +1,70 @@ +_mNavi =& $navi; + $this->_mCriteria =& new CriteriaCompo(); + } + + function fetch() + { + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : TPLFILE_SORT_KEY_DEFAULT; + + if (abs($this->mSort) > TPLFILE_SORT_KEY_MAXVALUE) { + $this->mSort = TPLFILE_SORT_KEY_DEFAULT; + } + + if (isset($_REQUEST['tpl_module'])) { + $this->_mNavi->addExtra('tpl_module', xoops_getrequest('tpl_module')); + $this->_mCriteria->add(new Criteria('tpl_module', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_module')))); + + $handler =& xoops_gethandler('module'); + $this->mModule =& $handler->getByDirname(xoops_getrequest('tpl_module')); + } + + if (isset($_REQUEST['tpl_tplset'])) { + $this->_mNavi->addExtra('tpl_tplset', xoops_getrequest('tpl_tplset')); + + // + // For the procedure of override, must load 'default' template-set here. + // The template of the specified template-set will be loaded in Tplset Object. + // See business-logic. + // + $subCriteria =& new CriteriaCompo(); + $subCriteria->add(new Criteria('tpl_tplset', 'default'), 'OR'); + + $handler =& xoops_getmodulehandler('tplset'); + $tplsets =& $handler->getObjects(new Criteria('tplset_name', xoops_getrequest('tpl_tplset'))); + if (count($tplsets) > 0) { + $subCriteria->add(new Criteria('tpl_tplset', xoops_getrequest('tpl_tplset'))); + $this->mTplset =& $tplsets[0]; + } + } + + if (isset($_REQUEST['tpl_type'])) { + $this->_mNavi->addExtra('tpl_type', xoops_getrequest('tpl_type')); + $this->_mCriteria->add(new Criteria('tpl_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_type')))); + } + + $this->_mNavi->addExtra('sort', $this->mSort); + + // + // check filtering criterion and if module & tplset specified mode, then remove paging function. + // + if ($this->mModule != null && $this->mTplset != null) { + $this->_mNavi->setPerpage(0); + $this->_mNavi->freezePerpage(); + } + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 18:36:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:36:04 +0900 Subject: [xoops-cvslog 3083] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517093604.5E4322AC016@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php:1.1.2.7 Wed May 17 16:21:27 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileFilterForm.class.php Wed May 17 18:36:04 2006 @@ -62,42 +62,15 @@ $this->mModule =& $handler->getByDirname(xoops_getrequest('tpl_module')); } - if (isset($_REQUEST['tpl_tplset'])) { - $this->_mNavi->addExtra('tpl_tplset', xoops_getrequest('tpl_tplset')); - - // - // For the procedure of override, must load 'default' template-set here. - // The template of the specified template-set will be loaded in Tplset Object. - // See business-logic. - // - $this->_mCriteria->add(new Criteria('tpl_tplset', 'default')); - - $handler =& xoops_getmodulehandler('tplset'); - $tplsets =& $handler->getObjects(new Criteria('tplset_name', xoops_getrequest('tpl_tplset'))); - if (count($tplsets) > 0) { - $this->mTplset =& $tplsets[0]; - } - } - - if (isset($_REQUEST['tpl_file'])) { - $this->_mNavi->addExtra('tpl_file', xoops_getrequest('tpl_file')); - $this->_mCriteria->add(new Criteria('tpl_file', array(XOBJ_DTYPE_STRING, "%" . xoops_getrequest('tpl_file') . "%"), 'LIKE')); - } - if (isset($_REQUEST['tpl_type'])) { $this->_mNavi->addExtra('tpl_type', xoops_getrequest('tpl_type')); $this->_mCriteria->add(new Criteria('tpl_type', array(XOBJ_DTYPE_STRING, xoops_getrequest('tpl_type')))); } - $this->_mNavi->addExtra('sort', $this->mSort); - // - // check filtering criterion and if module & tplset specified mode, then remove paging function. + // @todo We can remove the following code: // - if ($this->mModule != null && $this->mTplset != null) { - $this->_mNavi->setPerpage(0); - $this->_mNavi->freezePerpage(); - } + $this->_mNavi->addExtra('sort', $this->mSort); } function getSort() From minahito @ users.sourceforge.jp Wed May 17 18:37:02 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:37:02 +0900 Subject: [xoops-cvslog 3084] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517093702.B216C2AC07C@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.8 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.9 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.8 Wed May 17 16:21:43 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Wed May 17 18:37:02 2006 @@ -4,6 +4,7 @@ require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractListAction.class.php"; require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileFilterForm.class.php"; +require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileSetFilterForm.class.php"; class LegacyRender_TplfileListAction extends LegacyRender_AbstractListAction { @@ -15,7 +16,7 @@ function &_getFilterForm() { - $filter =& new LegacyRender_TplfileFilterForm($this->mPageNavi); + $filter = isset($_REQUEST['tpl_tplset']) ? new LegacyRender_TplfileSetFilterForm($this->mPageNavi) : new LegacyRender_TplfileFilterForm($this->mPageNavi); return $filter; } @@ -24,6 +25,32 @@ return "./index.php?action=TplfileList"; } + function getDefaultView(&$controller, &$xoopsUser) + { + $this->mPageNavi =& new LegacyRender_PageNavigator($this->_getBaseUrl(), 0, XCUBE_PAGENAVI_START | XCUBE_PAGENAVI_PERPAGE); + + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + + $total = $handler->getCount($this->mFilter->getCriteria()); + + $this->mPageNavi->setTotal($total); + $this->mPageNavi->fetch(); + + $criteria = $this->mFilter->getCriteria($this->mPageNavi->getStart(), $this->mPageNavi->getPerpage()); + + if (isset($_REQUEST['tpl_tplset'])) { + $this->mObjects =& $handler->getObjectsWithOverride($criteria, xoops_getrequest('tpl_tplset')); + } + else { + $this->mObjects =& $handler->getObjects($criteria); + } + + return LEGACYRENDER_FRAME_VIEW_INDEX; + } + function executeViewIndex(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("tplfile_list.html"); From minahito @ users.sourceforge.jp Wed May 17 18:43:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 18:43:27 +0900 Subject: [xoops-cvslog 3085] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517094327.2E3032AC07F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.2 Wed May 17 18:35:11 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php Wed May 17 18:43:27 2006 @@ -44,7 +44,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.2 xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php:1.1.2.2 Wed May 17 18:35:05 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileCloneAction.class.php Wed May 17 18:43:27 2006 @@ -55,7 +55,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.6 xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.7 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.6 Wed May 17 18:35:11 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php Wed May 17 18:43:27 2006 @@ -49,7 +49,7 @@ { $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); - $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tpl_tplset}&tpl_module=${tpl_module}"); + $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); } function executeViewError(&$controller, &$xoopsUser, &$render) From minahito @ users.sourceforge.jp Wed May 17 20:13:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:13:22 +0900 Subject: [xoops-cvslog 3086] CVS update: xoops2jp/html/class Message-ID: <20060517111322.68F402AC045@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_FormFile.class.php diff -u xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.5 xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.6 --- xoops2jp/html/class/XCube_FormFile.class.php:1.1.2.5 Thu Jan 26 19:04:16 2006 +++ xoops2jp/html/class/XCube_FormFile.class.php Wed May 17 20:13:22 2006 @@ -14,6 +14,8 @@ class XCube_FormFile { var $mName=null; + + var $mKey = null; var $mContentType=null; @@ -24,9 +26,10 @@ var $mUploadFileFlag=false; - function XCube_FormFile($name=null) + function XCube_FormFile($name = null, $key = null) { - $this->mName=$name; + $this->mName = $name; + $this->mKey = $key; } /** @@ -35,10 +38,18 @@ function fetch() { if($this->mName && isset($_FILES[$this->mName])) { - $this->setFileName($_FILES[$this->mName]['name']); - $this->setContentType($_FILES[$this->mName]['type']); - $this->setFileSize($_FILES[$this->mName]['size']); - $this->_mTmpFileName = $_FILES[$this->mName]['tmp_name']; + if ($this->mKey != null) { + $this->setFileName($_FILES[$this->mName]['name'][$this->mKey]); + $this->setContentType($_FILES[$this->mName]['type'][$this->mKey]); + $this->setFileSize($_FILES[$this->mName]['size'][$this->mKey]); + $this->_mTmpFileName = $_FILES[$this->mName]['tmp_name'][$this->mKey]; + } + else { + $this->setFileName($_FILES[$this->mName]['name']); + $this->setContentType($_FILES[$this->mName]['type']); + $this->setFileSize($_FILES[$this->mName]['size']); + $this->_mTmpFileName = $_FILES[$this->mName]['tmp_name']; + } if($this->getFileSize()>0) $this->mUploadFileFlag=true; From minahito @ users.sourceforge.jp Wed May 17 20:14:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:14:50 +0900 Subject: [xoops-cvslog 3087] CVS update: xoops2jp/html/class Message-ID: <20060517111450.B8C242AC045@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_ActionForm.class.php diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.32 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.33 --- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.32 Fri May 12 19:17:54 2006 +++ xoops2jp/html/class/XCube_ActionForm.class.php Wed May 17 20:14:50 2006 @@ -480,6 +480,8 @@ return false; } + $this->mValue->mKey = $key; + $this->mValue->fetch(); if (!$this->mValue->hasUploadFile()) { $this->mValue = null; @@ -506,6 +508,23 @@ } } +class XCube_FileArrayProperty extends XCube_AbstractArrayProperty +{ + var $mPropertyClassName = "XCube_FileProperty"; + + function fetch($key = null) + { + unset($this->mProperties); + $this->mProperties = array(); + if (isset($_FILES[$this->mName]) && is_array($_FILES[$this->mName]['name'])) { + foreach ($_FILES[$this->mName]['name'] as $_key => $_val) { + $this->mProperties[$_key] =& new $this->mPropertyClassName($this->mName); + $this->mProperties[$_key]->fetch($_key); + } + } + } +} + class XCube_ImageFileProperty extends XCube_FileProperty { function XCube_ImageFileProperty($name) @@ -515,6 +534,11 @@ } } +class XCube_ImageFileArrayProperty extends XCube_FileArrayProperty +{ + var $mPropertyClassName = "XCube_ImageFileProperty"; +} + class XCube_FieldProperty { var $mForm; From minahito @ users.sourceforge.jp Wed May 17 20:15:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:15:32 +0900 Subject: [xoops-cvslog 3088] CVS update: xoops2jp/html/modules/legacyRender/admin/.xml Message-ID: <20060517111532.046E32AC047@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_upload.xml diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_upload.xml:1.1.2.1 --- /dev/null Wed May 17 20:15:31 2006 +++ xoops2jp/html/modules/legacyRender/admin/.xml/tplfile_upload.xml Wed May 17 20:15:31 2006 @@ -0,0 +1,6 @@ + + + + + + From minahito @ users.sourceforge.jp Wed May 17 20:15:38 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:15:38 +0900 Subject: [xoops-cvslog 3089] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517111538.C55592AC045@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.1 --- /dev/null Wed May 17 20:15:38 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php Wed May 17 20:15:38 2006 @@ -0,0 +1,48 @@ +mObject =& $handler->get($id); + + return $this->mObject != null ? LEGACYRENDER_FRAME_VIEW_SUCCESS : LEGACYRENDER_FRAME_VIEW_ERROR; + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $this->mObject->loadSource(); + $source = $this->mObject->Source->get('tpl_source'); + + header('Cache-Control: no-cache, must-revalidate'); + header('Pragma: no-cache'); + header('Content-Type: application/force-download'); + + if (preg_match("/MSIE 5.5/", $_SERVER['HTTP_USER_AGENT'])) { + header('Content-Disposition: filename=' . $this->mObject->getVar('tpl_file')); + } else { + header('Content-Disposition: attachment; filename=' . $this->mObject->getVar('tpl_file')); + } + + header('Content-length: ' . strlen($source)); + print $source; + + exit(0); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 20:15:51 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:15:51 +0900 Subject: [xoops-cvslog 3090] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060517111551.561FC2AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.9 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.10 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.9 Wed May 17 18:37:02 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Wed May 17 20:15:51 2006 @@ -6,8 +6,18 @@ require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileFilterForm.class.php"; require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileSetFilterForm.class.php"; +require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplfileUploadForm.class.php"; + class LegacyRender_TplfileListAction extends LegacyRender_AbstractListAction { + var $mActionForm = null; + + function prepare(&$controller, &$xoopsUser) + { + $this->mActionForm =& new LegacyRender_TplfileUploadForm(); + $this->mActionForm->prepare(); + } + function &_getHandler() { $handler =& xoops_getmodulehandler('tplfile'); @@ -51,6 +61,66 @@ return LEGACYRENDER_FRAME_VIEW_INDEX; } + function execute(&$controller, &$xoopsUser) + { + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + if ($this->mActionForm->hasError()) { + return $this->getDefaultView($controller, $xoopsUser); + } + + $formFileArr = $this->mActionForm->get('upload'); + + // + // Set tpl_module and tpl_tplset of the last object to the following variable for redirect. + // + $last_tplset = null; + $last_module = null; + + $handler =& xoops_getmodulehandler('tplfile'); + + $successFlag = true; + + foreach (array_keys($formFileArr) as $key) { + $formFile =& $formFileArr[$key]; + + $obj =& $handler->get($key); + if ($obj == null) { + continue; + } + + // + // If $obj belongs to 'default' template-set, kick! + // + if ($obj->get('tpl_tplset') == 'default') { + continue; + } + + $obj->loadSource(); + + $last_tplset = $obj->getVar('tpl_tplset'); + $last_module = $obj->getVar('tpl_module'); + + // + // [Warning] Access to a private property of XCube_FormFile. + // + $source = file_get_contents($formFile->_mTmpFileName); + $obj->Source->set('tpl_source', $source); + $obj->set('tpl_lastmodified', time()); + $obj->set('tpl_lastimported', time()); + + $successFlag &= $handler->insert($obj); + + unset($obj); + unset($formFile); + } + + $errorMessage = $successFlag ? _AD_LEGACYRENDER_MESSAGE_UPLOAD_TEMPLATE_SUCCESS : _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED; + + XCube_Utils::redirectHeader("index.php?action=TplfileList&tpl_tplset=${last_tplset}&tpl_module=${last_module}", 1, $errorMessage); + } + function executeViewIndex(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("tplfile_list.html"); @@ -67,11 +137,14 @@ $render->setAttribute('objects', $this->mObjects); $render->setAttribute('pageNavi', $this->mPageNavi); $render->setAttribute('filterForm', $this->mFilter); + $render->setAttribute('actionForm', $this->mActionForm); if ($this->mFilter->mTplset != null) { $render->setAttribute('targetTplset', $this->mFilter->mTplset->get('tplset_name')); } + $render->setAttribute('targetModule', xoops_getrequest('tpl_module')); + // // TODO We must fetch only module objects that has templates. // From minahito @ users.sourceforge.jp Wed May 17 20:15:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:15:58 +0900 Subject: [xoops-cvslog 3091] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060517111558.864452AC00F@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplfileUploadForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplfileUploadForm.class.php:1.1.2.1 --- /dev/null Wed May 17 20:15:58 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplfileUploadForm.class.php Wed May 17 20:15:58 2006 @@ -0,0 +1,28 @@ +mFormProperties['upload'] =& new XCube_FileArrayProperty('upload'); + + // + // Set field properties + // + } +} + +?> From minahito @ users.sourceforge.jp Wed May 17 20:16:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:16:05 +0900 Subject: [xoops-cvslog 3092] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060517111605.8BCC32AC047@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.8 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.9 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.8 Wed May 17 16:21:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html Wed May 17 20:16:05 2006 @@ -54,83 +54,105 @@
- - - - - - - - - - - - <{foreach item=obj from=$objects}> - <{if $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> - - <{elseif $obj->getVar('tpl_type') == "block"}> - - <{else}> - - <{/if}> - - - - - - - - +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> + + + <{xoops_token form=$actionForm}> +
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_ID}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTMODIFIED}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}>
- " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
- <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_id')}> - <{else}> - <{$obj->getVar('tpl_id')}> - <{/if}> - <{$obj->getVar('tpl_module')}> - <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_tplset')}> - <{else}> - <{$obj->getVar('tpl_tplset')}> - <{/if}> - <{$obj->getVar('tpl_file')}>
- <{$obj->getVar('tpl_desc')}>
- <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> - <{else}> - <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> - <{/if}> - - <{if $obj->mOverride != null}> - <{$obj->mOverride->getVar('tpl_lastimported')|xoops_formattimestamp:l}> - <{else}> - <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> - <{/if}> - <{$obj->getVar('tpl_type')}> - <{if $targetTplset == 'default'}> - " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> - <{elseif $obj->mOverride != null}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> - <{else}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - <{/if}> -
+ + + + + + + + + - <{/foreach}> -
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_ID}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_MODULE}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TPLSET}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_FILE}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTMODIFIED}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_LASTIMPORTED}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}>
+ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
<{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
+ <{foreach item=obj from=$objects}> + <{if $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> + + <{elseif $obj->getVar('tpl_type') == "block"}> + + <{else}> + + <{/if}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_id')}> + <{else}> + <{$obj->getVar('tpl_id')}> + <{/if}> + + <{$obj->getVar('tpl_module')}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_tplset')}> + <{else}> + <{$obj->getVar('tpl_tplset')}> + <{/if}> + + <{$obj->getVar('tpl_file')}>
+ <{$obj->getVar('tpl_desc')}> + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{else}> + <{$obj->getVar('tpl_lastmodified')|xoops_formattimestamp:l}> + <{/if}> + + + <{if $obj->mOverride != null}> + <{$obj->mOverride->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{else}> + <{$obj->getVar('tpl_lastimported')|xoops_formattimestamp:l}> + <{/if}> + + <{$obj->getVar('tpl_type')}> + + <{if $targetTplset == 'default'}> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + [Download ] + <{elseif $obj->mOverride != null}> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> + [Download ] + <{xoops_input type=file name=upload key=$obj->mOverride->getVar('tpl_id')}> + <{else}> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + [Download ] + <{/if}> + + + <{/foreach}> + + + <{if $targetTplset != null && $targetTplset != 'default'}> + <{xoops_input type=hidden name=tpl_tplset value=$targetTplset}> + <{xoops_input type=hidden name=tpl_module value=$targetModule}> + + <{/if}> + + From minahito @ users.sourceforge.jp Wed May 17 20:16:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:16:17 +0900 Subject: [xoops-cvslog 3093] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060517111617.14F482AC045@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplfile.php diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.9 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.10 --- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.9 Wed May 17 18:35:32 2006 +++ xoops2jp/html/modules/legacyRender/class/tplfile.php Wed May 17 20:16:16 2006 @@ -143,7 +143,7 @@ return $ret; } - function delete(&$obj, $force) + function delete(&$obj, $force = false) { $obj->loadSource(); From minahito @ users.sourceforge.jp Wed May 17 20:16:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:16:34 +0900 Subject: [xoops-cvslog 3094] CVS update: xoops2jp/html/modules/legacyRender/language/english Message-ID: <20060517111634.13F362AC045@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/english/admin.php diff -u xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.17 xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.18 --- xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.17 Wed May 17 16:20:52 2006 +++ xoops2jp/html/modules/legacyRender/language/english/admin.php Wed May 17 20:16:33 2006 @@ -11,6 +11,7 @@ define('_AD_LEGACYRENDER_ERROR_TPLSET_NO_EXIST', "Specified template set does not exist."); define('_AD_LEGACYRENDER_ERROR_TPLSET_WRONG', "Tplset wrong"); define('_AD_LEGACYRENDER_ERROR_UNIQUE_NAME', "Input unique name"); +define('_AD_LEGACYRENDER_ERROR_UPLOAD_TEMPLATE_FAIL', "Upload template fail"); define('_AD_LEGACYRENDER_LANG_AUTHOR', "Author"); define('_AD_LEGACYRENDER_LANG_BANNER', "Banner"); define('_AD_LEGACYRENDER_LANG_BANNER_DELETE', "Banner delete"); @@ -105,6 +106,7 @@ define('_AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE', "confirm delete"); define('_AD_LEGACYRENDER_MESSAGE_NO_MANIFESTO', "No manifesto"); define('_AD_LEGACYRENDER_MESSAGE_NO_PACKAGE', "No package information"); +define('_AD_LEGACYRENDER_MESSAGE_UPLOAD_TEMPLATE_SUCCESS', "Upload template success"); define('_AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_1', "When you need to edit the template, make a copy of default template set, and customize your site with modifying templates. To learn more details, read the help."); define('_AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_2', "Do you change template set for your site. To select template set, click 'Select' button. To learn more details, read the help."); define('_AD_LEGACYRENDER_TIPS_THEME_ADMIN', "Do you change your site's looks to your favorite? Click 'select' button to change theme.
Do you think your site theme should be selectable by users? Add themes to theme selection block with checking checkboxes. To learn more details, read the help."); From minahito @ users.sourceforge.jp Wed May 17 20:16:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 17 May 2006 20:16:34 +0900 Subject: [xoops-cvslog 3095] CVS update: xoops2jp/html/modules/legacyRender/language/japanese Message-ID: <20060517111634.385152AC047@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/japanese/admin.php diff -u xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.18 xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.19 --- xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.18 Wed May 17 16:20:52 2006 +++ xoops2jp/html/modules/legacyRender/language/japanese/admin.php Wed May 17 20:16:34 2006 @@ -11,6 +11,7 @@ define('_AD_LEGACYRENDER_ERROR_TPLSET_NO_EXIST', "指定されたテンプレートセットは存在しません"); define('_AD_LEGACYRENDER_ERROR_TPLSET_WRONG', "Tplset wrong"); define('_AD_LEGACYRENDER_ERROR_UNIQUE_NAME', "他のテンプレートセットと重複しない名前を指定してください"); +define('_AD_LEGACYRENDER_ERROR_UPLOAD_TEMPLATE_FAIL', "テンプレートのアップロードに失敗しました"); define('_AD_LEGACYRENDER_LANG_AUTHOR', "作成者"); define('_AD_LEGACYRENDER_LANG_BANNER', "バナー"); define('_AD_LEGACYRENDER_LANG_BANNER_DELETE', "バナーの削除"); @@ -103,6 +104,7 @@ define('_AD_LEGACYRENDER_LANGE_TEMPLATE_MANAGE', "テンプレート管理"); define('_AD_LEGACYRENDER_MESSAGE_CONFIRM_DELETE', "以下のデータを本当に削除しますか?"); define('_AD_LEGACYRENDER_MESSAGE_NO_PACKAGE', "パッケージ情報なし"); +define('_AD_LEGACYRENDER_MESSAGE_UPLOAD_TEMPLATE_SUCCESS', "テンプレートのアップロードに成功しました"); define('_AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_1', "まず、デフォルトのテンプレートセットの複製を作成し、テンプレートを変更してサイトをカスタマイズしましょう。詳しくはヘルプをご覧ください。"); define('_AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_2', "サイトに適用するテンプレートセットを変更しますか? 選択ボタンを押して、テンプレートセットを選びましょう。詳しくはヘルプをご覧ください。"); define('_AD_LEGACYRENDER_TIPS_THEME_ADMIN', "選択ボタンを押して、このサイトの外観をお好みのテーマに変更しましょう。
ユーザーにテーマを選択させたいですか? チェックボックスにチェックを入れて、「テーマ選択ブロック」にリストアップしてください。詳しくはヘルプをご覧ください。"); From nobunobu @ users.sourceforge.jp Thu May 18 01:42:32 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 01:42:32 +0900 Subject: [xoops-cvslog 3096] CVS update: xoops2jp/html/modules/user/admin/actions Message-ID: <20060517164232.6FF752AC017@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.4 xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.5 --- xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.4 Tue Apr 11 17:42:17 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php Thu May 18 01:42:32 2006 @@ -52,22 +52,23 @@ // // Get... // - require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; - $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); - while ($file = readdir($fileHandler)) { - $infoFile = XOOPS_ROOT_PATH . "/modules/system/admin/" . $file . "/xoops_version.php"; - if (file_exists($infoFile)) { - require_once $infoFile; - if (!empty($modversion['category'])) { - $item =& new User_PermissionSystemAdminItem($modversion['category'], $modversion['name']); - $this->mSystemPermissions[] =& new User_Permission($this->mGroup->getVar('groupid'), $item); - - unset($item); - } - unset($modversion); - } - } - + if (file_exists(XOOPS_ROOT_PATH . "/modules/system/constants.php")) { + require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; + $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); + while ($file = readdir($fileHandler)) { + $infoFile = XOOPS_ROOT_PATH . "/modules/system/admin/" . $file . "/xoops_version.php"; + if (file_exists($infoFile)) { + require_once $infoFile; + if (!empty($modversion['category'])) { + $item =& new User_PermissionSystemAdminItem($modversion['category'], $modversion['name']); + $this->mSystemPermissions[] =& new User_Permission($this->mGroup->getVar('groupid'), $item); + + unset($item); + } + unset($modversion); + } + } + } // // Get module list // From nobunobu @ users.sourceforge.jp Thu May 18 01:42:32 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 01:42:32 +0900 Subject: [xoops-cvslog 3097] CVS update: xoops2jp/html/modules/user/admin/templates Message-ID: <20060517164232.95D212AC038@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/templates/group_perm.html diff -u xoops2jp/html/modules/user/admin/templates/group_perm.html:1.1.2.9 xoops2jp/html/modules/user/admin/templates/group_perm.html:1.1.2.10 --- xoops2jp/html/modules/user/admin/templates/group_perm.html:1.1.2.9 Thu Apr 13 00:31:39 2006 +++ xoops2jp/html/modules/user/admin/templates/group_perm.html Thu May 18 01:42:32 2006 @@ -50,6 +50,7 @@
<{xoops_token form=$actionForm}> +<{if $systemPermissions }> @@ -67,7 +68,7 @@
<{$smarty.const._AD_USER_LANG_PERM_SYSTEM_PERM_MODULE}>

- +<{/if}> Index: xoops2jp/html/modules/user/admin/templates/group_property.html diff -u xoops2jp/html/modules/user/admin/templates/group_property.html:1.1.2.7 xoops2jp/html/modules/user/admin/templates/group_property.html:1.1.2.8 --- xoops2jp/html/modules/user/admin/templates/group_property.html:1.1.2.7 Thu Apr 13 00:31:39 2006 +++ xoops2jp/html/modules/user/admin/templates/group_property.html Thu May 18 01:42:32 2006 @@ -76,6 +76,7 @@

<{$smarty.const._AD_USER_LANG_PERM_ACCESS_ADMIN}>

<{$smarty.const._AD_USER_LANG_PERM_MODULE_ACCESS}>
+<{if $systemPermissions }>
<{$smarty.const._AD_USER_LANG_PERM_GROUP_PERM_MODULE}>
@@ -97,6 +98,7 @@
<{$smarty.const._AD_USER_LANG_PERM_SYSTEM_PERM_MODULE}>

+<{/if}> From minahito @ users.sourceforge.jp Thu May 18 12:04:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 18 May 2006 12:04:08 +0900 Subject: [xoops-cvslog 3097] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060518030408.074F92AC08D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php:1.1.2.1 --- /dev/null Thu May 18 12:04:07 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetDownloadAction.class.php Thu May 18 12:04:07 2006 @@ -0,0 +1,114 @@ +mDownloader =& $this->_createDownloader($method); + + if ($this->mDownloader == null) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + $id = xoops_getrequest('tplset_id'); + + $handler =& xoops_getmodulehandler('tplset'); + $this->mTplset =& $handler->get($id); + + if ($this->mTplset == null) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + $xml = "" . "\n" . + "" . "\n" . + " " . $this->mTplset->getVar('tplset_name') . "" . "\n" . + " " . $this->mTplset->getVar('tplset_created') . "" . "\n" . + " " . $this->mTplset->getVar('tplset_credits') . "" . "\n" . + " " . XOOPS_VERSION. "" . "\n"; + + $handler =& xoops_getmodulehandler('tplfile'); + $files =& $handler->getObjects(new Criteria('tpl_tplset', $this->mTplset->get('tplset_name'))); + + $count = count($files); + + if ($count > 0) { + $xml .= " " . "\n"; + for ($i = 0; $i < $count; $i++) { + $files[$i]->loadSource(); + if ($files[$i]->Source != null) { + $type = null; + if ($files[$i]->get('tpl_type') == 'block') { + $path = $this->mTplset->getVar('tplset_name') . '/templates/' . $files[$i]->getVar('tpl_module') . "/blocks/" . $files[$i]->getVar('tpl_file'); + $type = "block"; + } + elseif ($files[$i]->get('tpl_type') == 'module') { + $path = $this->mTplset->getVar('tplset_name') . '/templates/' . $files[$i]->getVar('tpl_module') . "/" . $files[$i]->getVar('tpl_file'); + $type = "module"; + } + $xml .= ' " . "\n"; + + $this->mDownloader->addFileData($files[$i]->Source->get('tpl_source'), $path, $files[$i]->getVar('tpl_lastmodified')); + } + } + + $xml .= " " . "\n"; + } + + $xml .= ""; + + $this->mDownloader->addFileData($xml, $this->mTplset->getVar('tplset_name') . '/tplset.xml', time()); + + return LEGACYRENDER_FRAME_VIEW_SUCCESS; + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + print $this->mDownloader->download($this->mTplset->getVar('tplset_name'), true); + exit(0); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Thu May 18 12:04:51 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 18 May 2006 12:04:51 +0900 Subject: [xoops-cvslog 3098] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060518030451.F38CE2AC08D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php:1.1.2.1 Wed May 17 20:15:38 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDownloadAction.class.php Thu May 18 12:04:51 2006 @@ -21,6 +21,10 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { $this->mObject->loadSource(); + if ($this->mObject->Source == null) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + $source = $this->mObject->Source->get('tpl_source'); header('Cache-Control: no-cache, must-revalidate'); From minahito @ users.sourceforge.jp Thu May 18 12:05:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 18 May 2006 12:05:04 +0900 Subject: [xoops-cvslog 3099] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060518030504.DCCE12AC08D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.11 xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.12 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.11 Thu Apr 13 00:11:20 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html Thu May 18 12:05:04 2006 @@ -78,7 +78,7 @@ <{/if}> -<{* " alt="*Download*" title="*Download*" /> *}> + " alt="*Download*" title="*Download*" />" alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" />
<{if $obj->getVar('tplset_name') != "default"}> From nobunobu @ users.sourceforge.jp Thu May 18 23:04:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 23:04:04 +0900 Subject: [xoops-cvslog 3100] CVS update: xoops2jp/html/install/sql Message-ID: <20060518140404.444D52AC059@users.sourceforge.jp> Index: xoops2jp/html/install/sql/mysql.structure.sql diff -u xoops2jp/html/install/sql/mysql.structure.sql:1.1 xoops2jp/html/install/sql/mysql.structure.sql:1.1.8.1 --- xoops2jp/html/install/sql/mysql.structure.sql:1.1 Thu Sep 9 14:15:04 2004 +++ xoops2jp/html/install/sql/mysql.structure.sql Thu May 18 23:04:04 2006 @@ -362,7 +362,8 @@ KEY hasnotification (hasnotification), KEY dirname (dirname), KEY name (name(15)) -) TYPE=MyISAM; +) TYPE=MyISAM AUTO_INCREMENT=2 ; +# mid=1 is reserved for old XOOPS system module # -------------------------------------------------------- # From nobunobu @ users.sourceforge.jp Thu May 18 23:04:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 23:04:04 +0900 Subject: [xoops-cvslog 3101] CVS update: xoops2jp/html/kernel Message-ID: <20060518140404.6BEB72AC0ED@users.sourceforge.jp> Index: xoops2jp/html/kernel/module.php diff -u xoops2jp/html/kernel/module.php:1.2.8.10 xoops2jp/html/kernel/module.php:1.2.8.11 --- xoops2jp/html/kernel/module.php:1.2.8.10 Wed Apr 19 14:30:07 2006 +++ xoops2jp/html/kernel/module.php Thu May 18 23:04:04 2006 @@ -1,5 +1,5 @@ isNew()) { - $mid = $this->db->genId('modules_mid_seq'); + if (empty($mid)) { //Memo: if system module, mid might be set to 1 + $mid = $this->db->genId('modules_mid_seq'); + } $sql = sprintf("INSERT INTO %s (mid, name, version, last_update, weight, isactive, dirname, hasmain, hasadmin, hassearch, hasconfig, hascomments, hasnotification) VALUES (%u, %s, %u, %u, %u, %u, %s, %u, %u, %u, %u, %u, %u)", $this->db->prefix('modules'), $mid, $this->db->quoteString($name), $version, time(), $weight, 1, $this->db->quoteString($dirname), $hasmain, $hasadmin, $hassearch, $hasconfig, $hascomments, $hasnotification); } else { $sql = sprintf("UPDATE %s SET name = %s, dirname = %s, version = %u, last_update = %u, weight = %u, isactive = %u, hasmain = %u, hasadmin = %u, hassearch = %u, hasconfig = %u, hascomments = %u, hasnotification = %u WHERE mid = %u", $this->db->prefix('modules'), $this->db->quoteString($name), $this->db->quoteString($dirname), $version, time(), $weight, $isactive, $hasmain, $hasadmin, $hassearch, $hasconfig, $hascomments, $hasnotification, $mid); @@ -479,6 +481,13 @@ $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'module_read' AND gperm_itemid = %u", $this->db->prefix('group_permission'), $module->getVar('mid')); $this->db->query($sql); + if ($module->getVar('mid')==1) { + $sql = sprintf("DELETE FROM %s WHERE gperm_name = 'system_admin'", $this->db->prefix('group_permission')); + } else { + $sql = sprintf("DELETE FROM %s WHERE gperm_modid = %u", $this->db->prefix('group_permission'), $module->getVar('mid')); + } + $this->db->query($sql); + $sql = sprintf("SELECT block_id FROM %s WHERE module_id = %u", $this->db->prefix('block_module_link'), $module->getVar('mid')); if ($result = $this->db->query($sql)) { $block_id_arr = array(); From nobunobu @ users.sourceforge.jp Thu May 18 23:04:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 23:04:04 +0900 Subject: [xoops-cvslog 3102] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060518140404.9B75B2AC059@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.11 xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.12 --- xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php:1.1.2.11 Tue Apr 11 17:39:07 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleInstaller.class.php Thu May 18 23:04:04 2006 @@ -37,6 +37,10 @@ return $ret; } + if ($module->get('dirname') == 'system') { + $module->setVar('mid', 1); + } + if (isset($module->modinfo['installer']) && isset($module->modinfo['installer']['licence']) ) { $this->mAgree = true; } @@ -65,14 +69,23 @@ // 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')); + require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; + $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); + while ($file = readdir($fileHandler)) { + $infoFile = XOOPS_ROOT_PATH . "/modules/system/admin/" . $file . "/xoops_version.php"; + if (file_exists($infoFile)) { + require_once $infoFile; + if (!empty($modversion['category'])) { + $sysAdminPerm =& $this->_createPermission(XOOPS_GROUP_ADMIN); + $adminPerm->setVar('gperm_itemid', $modversion['category']); + $adminPerm->setVar('gperm_name', 'system_admin'); + if (!$gpermHandler->insert($adminPerm)) { + $log->addError("Could not set system admin permission " . $this->mModule->getVar('mid')); + } + unset($sysAdminPerm); + } + unset($modversion); } - unset($sysAdminPerm); } } From nobunobu @ users.sourceforge.jp Thu May 18 23:04:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Thu, 18 May 2006 23:04:04 +0900 Subject: [xoops-cvslog 3103] CVS update: xoops2jp/html/modules/user/admin/actions Message-ID: <20060518140404.BF84A2AC0ED@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.5 xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.6 --- xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php:1.1.2.5 Thu May 18 01:42:32 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupPropertyAction.class.php Thu May 18 23:04:04 2006 @@ -49,25 +49,28 @@ $this->mUsers =& $memberHandler->getUsersByGroup($this->mGroup->getVar('groupid'), true, $this->mPageNavi->getPerPage(), $this->mPageNavi->getStart()); + $moduleHandler =& xoops_gethandler('module'); // // Get... // if (file_exists(XOOPS_ROOT_PATH . "/modules/system/constants.php")) { - require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; - $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); - while ($file = readdir($fileHandler)) { - $infoFile = XOOPS_ROOT_PATH . "/modules/system/admin/" . $file . "/xoops_version.php"; - if (file_exists($infoFile)) { - require_once $infoFile; - if (!empty($modversion['category'])) { - $item =& new User_PermissionSystemAdminItem($modversion['category'], $modversion['name']); - $this->mSystemPermissions[] =& new User_Permission($this->mGroup->getVar('groupid'), $item); - - unset($item); - } - unset($modversion); - } - } + if($moduleHandler->getByDirname('system')) { + require_once XOOPS_ROOT_PATH . "/modules/system/constants.php"; + $fileHandler = opendir(XOOPS_ROOT_PATH . "/modules/system/admin"); + while ($file = readdir($fileHandler)) { + $infoFile = XOOPS_ROOT_PATH . "/modules/system/admin/" . $file . "/xoops_version.php"; + if (file_exists($infoFile)) { + require_once $infoFile; + if (!empty($modversion['category'])) { + $item =& new User_PermissionSystemAdminItem($modversion['category'], $modversion['name']); + $this->mSystemPermissions[] =& new User_Permission($this->mGroup->getVar('groupid'), $item); + + unset($item); + } + unset($modversion); + } + } + } } // // Get module list From nobunobu @ users.sourceforge.jp Fri May 19 16:43:14 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 19 May 2006 16:43:14 +0900 Subject: [xoops-cvslog 3104] CVS update: xoops2jp/html/modules/legacyRender/kernel Message-ID: <20060519074314.5B8202AC0B9@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php diff -u xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.15 xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.16 --- xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php:1.1.2.15 Wed May 10 12:37:14 2006 +++ xoops2jp/html/modules/legacyRender/kernel/Legacy_RenderSystem.class.php Fri May 19 16:43:14 2006 @@ -1,6 +1,6 @@ getConfigsByCat(0,XOOPS_CONF_METAFOOTER); - foreach ($configs as $config) { + +// $configs =& $configHandler->getConfigsByCat(XOOPS_CONF_METAFOOTER); + $moduleHandler =& xoops_gethandler('module'); + $legacyRender =& $moduleHandler->getByDirname('legacyRender'); + $configs =& $configHandler->getConfigsByCat(0, $legacyRender->getVar('mid')); + + foreach ($configs as $name=>$value) { // prefix each tag with 'xoops_' - if(is_object($config)) - $this->mXoopsTpl->assign('xoops_'.$config->getVar('conf_name'), $config->getConfValueForOutput()); + $this->mXoopsTpl->assign('xoops_'.$name, $value); } // -------------------------------------- From nobunobu @ users.sourceforge.jp Fri May 19 16:43:14 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 19 May 2006 16:43:14 +0900 Subject: [xoops-cvslog 3105] CVS update: xoops2jp/html/modules/legacyRender/language/english Message-ID: <20060519074314.875892AC0BA@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/english/modinfo.php diff -u xoops2jp/html/modules/legacyRender/language/english/modinfo.php:1.1.2.8 xoops2jp/html/modules/legacyRender/language/english/modinfo.php:1.1.2.9 --- xoops2jp/html/modules/legacyRender/language/english/modinfo.php:1.1.2.8 Mon Apr 24 16:31:33 2006 +++ xoops2jp/html/modules/legacyRender/language/english/modinfo.php Fri May 19 16:43:14 2006 @@ -31,4 +31,28 @@ define('_MI_LEGACYRENDER_NAME', "Legacy renderer"); define('_MI_LEGACYRENDER_NAME_DESC', "This rendering engine (renderer) has compatibility with XOOPS 2.0.9 and XOOPS JP 2.0.x. You can use XOOPS2 Theme on this system."); +define('_MI_LR_META_KEYWORDS', 'Meta Keywords'); +define('_MI_LR_META_KEYWORDS_DESC', 'The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)'); +define('_MI_LR_META_DESCRIPTION', 'Meta Description'); +define('_MI_LR_META_DESCRIPTION_DESC', 'The description meta tag is a general description of what is contained in your web page'); +define('_MI_LR_META_ROBOTS', 'Meta Robots'); +define('_MI_LR_META_ROBOTS_DESC', 'The Robots Tag declares to search engines what content to index and spider'); +define('_MI_LR_META_RATING', 'Meta Rating'); +define('_MI_LR_META_RATING_DESC', 'The rating meta tag defines your site age and content rating'); +define('_MI_LR_META_AUTHOR', 'Meta Author'); +define('_MI_LR_META_AUTHOR_DESC', 'The author meta tag defines the name of the author of the document being read. Supported data formats include the name, email address of the webmaster, company name or URL.'); +define('_MI_LR_META_COPYRIGHT', 'Meta Copyright'); +define('_MI_LR_META_COPYRIGHT_DESC', 'The copyright meta tag defines any copyright statements you wish to disclose about your web page documents.'); +define('_MI_LR_FOOTER', 'Footer'); +define('_MI_LR_FOOTER_DESC', 'Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages.'); +; +define('_MI_LR_ROBOT_INDEXFOLLOW', 'Index, Follow'); +define('_MI_LR_ROBOT_NOINDEXFOLLOW', 'No Index, Follow'); +define('_MI_LR_ROBOT_INDEXNOFOLLOW', 'Index, No Follow'); +define('_MI_LR_ROBOT_NOINDEXNOFOLLOW', 'No Index, No Follow'); + +define('_MI_LR_ROBOT_METAOGEN', 'General'); +define('_MI_LR_ROBOT_METAO14YRS', '14 years'); +define('_MI_LR_ROBOT_METAOREST', 'Restricted'); +define('_MI_LR_ROBOT_METAOMAT', 'Mature'); ?> From nobunobu @ users.sourceforge.jp Fri May 19 16:43:14 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 19 May 2006 16:43:14 +0900 Subject: [xoops-cvslog 3106] CVS update: xoops2jp/html/modules/legacyRender/language/japanese Message-ID: <20060519074314.B53412AC0BD@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/japanese/modinfo.php diff -u xoops2jp/html/modules/legacyRender/language/japanese/modinfo.php:1.1.2.7 xoops2jp/html/modules/legacyRender/language/japanese/modinfo.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/language/japanese/modinfo.php:1.1.2.7 Mon Apr 24 16:31:33 2006 +++ xoops2jp/html/modules/legacyRender/language/japanese/modinfo.php Fri May 19 16:43:14 2006 @@ -31,4 +31,29 @@ define('_MI_LEGACYRENDER_NAME', "互換レンダーシステム"); define('_MI_LEGACYRENDER_NAME_DESC', "XOOPS 2.0.9/XOOPS JP 2.0.x のテーマエンジンと互換性のあるレンダーシステムです。XOOPS2テーマを使用可能です。"); +define('_MI_LR_META_KEYWORDS', 'METAタグ(キーワード)'); +define('_MI_LR_META_KEYWORDS_DESC', 'METAキーワードはあなたのサイトの内容を表すものです。キーワードはカンマで区切って記述してください。(例: XOOPS, PHP, mySQL, ポータル)'); +define('_MI_LR_META_DESCRIPTION', 'METAタグ(Description)'); +define('_MI_LR_META_DESCRIPTION_DESC', 'METAタグ(Description) は、あなたのサイトの内容を説明する一般的なタグです。'); +define('_MI_LR_META_ROBOTS', 'METAタグ(ROBOTS)'); +define('_MI_LR_META_ROBOTS_DESC', 'ロボット型検索エンジンへの対応'); +define('_MI_LR_META_RATING', 'METAタグ(RATING)'); +define('_MI_LR_META_RATING_DESC', '閲覧対象年齢層の指定'); +define('_MI_LR_META_AUTHOR', 'METAタグ(作成者)'); +define('_MI_LR_META_AUTHOR_DESC', '作成者METAタグは、サイト文書の作成者情報を定義します。名前、WebmasterのEMailアドレス、会社名、URLなどを記述します。'); +define('_MI_LR_META_COPYRIGHT', 'METAタグ(コピーライト)'); +define('_MI_LR_META_COPYRIGHT_DESC', 'METAコピーライトタグは、あなたのサイト上の情報に対するの著作権情報を定義します。'); +define('_MI_LR_FOOTER', 'フッタ'); +define('_MI_LR_FOOTER_DESC', 'リンクを記入する場合は必ずフルパス(http://〜)で入力してください。フルパスで入力しなかった場合、モジュール内ページでうまく表示されないことがあります。'); +; +define('_MI_LR_ROBOT_INDEXFOLLOW', 'Index, Follow'); +define('_MI_LR_ROBOT_NOINDEXFOLLOW', 'No Index, Follow'); +define('_MI_LR_ROBOT_INDEXNOFOLLOW', 'Index, No Follow'); +define('_MI_LR_ROBOT_NOINDEXNOFOLLOW', 'No Index, No Follow'); + +define('_MI_LR_ROBOT_METAOGEN', 'General'); +define('_MI_LR_ROBOT_METAO14YRS', '14 years'); +define('_MI_LR_ROBOT_METAOREST', 'Restricted'); +define('_MI_LR_ROBOT_METAOMAT', 'Mature'); + ?> From nobunobu @ users.sourceforge.jp Fri May 19 16:43:14 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Fri, 19 May 2006 16:43:14 +0900 Subject: [xoops-cvslog 3107] CVS update: xoops2jp/html/modules/legacyRender Message-ID: <20060519074314.F25372AC0B9@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/xoops_version.php diff -u xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.6 xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.7 --- xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.6 Fri Mar 24 22:05:45 2006 +++ xoops2jp/html/modules/legacyRender/xoops_version.php Fri May 19 16:43:14 2006 @@ -1,6 +1,6 @@ "meta_keywords", + "title"=>"_MI_LR_META_KEYWORDS", + "description"=>"_MI_LR_META_KEYWORDS_DESC", + "formtype"=>"textarea", + "valuetype"=>"text", + "default"=>"news, technology, headlines, xoops, xoop, nuke, myphpnuke, myphp-nuke, phpnuke, SE, geek, geeks, hacker, hackers, linux, software, download, downloads, free, community, mp3, forum, forums, bulletin, board, boards, bbs, php, survey, poll, polls, kernel, comment, comments, portal, odp, open, source, opensource, FreeSoftware, gnu, gpl, license, Unix, *nix, mysql, sql, database, databases, web site, weblog, guru, module, modules, theme, themes, cms, content management" + ); + +$modversion['config'][]=array ( + "name"=>"meta_description", + "title"=>"_MI_LR_META_DESCRIPTION", + "description"=>"_MI_LR_META_DESCRIPTION_DESC", + "formtype"=>"textarea", + "valuetype"=>"text", + "default"=>"XOOPS is a dynamic Object Oriented based open source portal script written in PHP." + ); + +$modversion['config'][]=array ( + "name"=>"meta_robots", + "title"=>"_MI_LR_META_ROBOTS", + "description"=>"_MI_LR_META_ROBOTS_DESC", + "formtype"=>"select", + "valuetype"=>"text", + "options"=>array("_MI_LR_ROBOT_INDEXFOLLOW"=>"index,follow","_MI_LR_ROBOT_NOINDEXFOLLOW"=>"noindex,follow","_MI_LR_ROBOT_INDEXNOFOLLOW"=>"index,nofollow","_MI_LR_ROBOT_NOINDEXNOFOLLOW"=>"noindex,nofollow"), + "default"=>"index,follow" + ); + +$modversion['config'][]=array ( + "name"=>"meta_rating", + "title"=>"_MI_LR_META_RATING", + "description"=>"_MI_LR_META_RATING_DESC", + "formtype"=>"select", + "valuetype"=>"text", + "options"=>array("_MI_LR_ROBOT_METAOGEN"=>"general","_MI_LR_ROBOT_METAO14YRS"=>"14 years","_MI_LR_ROBOT_METAOREST"=>"restricted","_MI_LR_ROBOT_METAOMAT"=>"mature"), + "default"=>"general" + ); + +$modversion['config'][]=array ( + "name"=>"meta_author", + "title"=>"_MI_LR_META_AUTHOR", + "description"=>"_MI_LR_META_AUTHOR_DESC", + "formtype"=>"textbox", + "valuetype"=>"text", + "default"=>"XOOPS" + ); + +$modversion['config'][]=array ( + "name"=>"meta_copyright", + "title"=>"_MI_LR_META_COPYRIGHT", + "description"=>"_MI_LR_META_COPYRIGHT_DESC", + "formtype"=>"textbox", + "valuetype"=>"text", + "default"=>"Copyright © 2001-2003" + ); +$modversion['config'][]=array ( + "name"=>"footer", + "title"=>"_MI_LR_FOOTER", + "description"=>"_MI_LR_FOOTER_DESC", + "formtype"=>"textarea", + "valuetype"=>"text", + "default"=>"Powered by XOOPS Cube 2.1© 2001-2006 The XOOPS Cube Project" + ); // Menu $modversion['hasMain']=0; From minahito @ users.sourceforge.jp Fri May 19 19:23:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 19 May 2006 19:23:56 +0900 Subject: [xoops-cvslog 3108] CVS update: xoops2jp/html/kernel Message-ID: <20060519102356.656252AC02E@users.sourceforge.jp> Index: xoops2jp/html/kernel/configitem.php diff -u xoops2jp/html/kernel/configitem.php:1.2.8.5 xoops2jp/html/kernel/configitem.php:1.2.8.6 --- xoops2jp/html/kernel/configitem.php:1.2.8.5 Tue May 16 22:25:07 2006 +++ xoops2jp/html/kernel/configitem.php Fri May 19 19:23:56 2006 @@ -1,5 +1,5 @@ get('conf_desc')) ? constant($this->get('conf_desc')) : $this->get('conf_desc'); + return defined($this->get('conf_desc')) ? constant($this->get('conf_desc')) : null; } /** From minahito @ users.sourceforge.jp Fri May 19 20:05:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 19 May 2006 20:05:13 +0900 Subject: [xoops-cvslog 3109] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060519110513.072FB2AC0EF@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.1 --- /dev/null Fri May 19 20:05:12 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html Fri May 19 20:05:12 2006 @@ -0,0 +1,40 @@ +
+ <{$smarty.const._MI_LEGACYRENDER_NAME}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_MANAGE}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_UPLOAD}> +
+ +

<{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_UPLOAD}>

+ +<{if $actionForm->hasError()}> +
    + <{foreach item=message from=$actionForm->getErrorMessages()}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+<{/if}> + + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=tplset_id value=$actionForm->get('tplset_id')}> +
<{$smarty.const._AD_USER_LANG_PERM_GROUP_PERM_MODULE}>
+ + + + + + + + + + + +
<{$smarty.const._AD_LEGACYRENDER_LANG_UPLOAD_TEMPLATE_SET_FILE}>"> + <{xoops_input type=file name=upload}> +
<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_NAME}>"> + <{xoops_input type=text name=tplset_name size=50 maxlength=255}> +
+ + +
+ From minahito @ users.sourceforge.jp Fri May 19 20:05:21 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 19 May 2006 20:05:21 +0900 Subject: [xoops-cvslog 3110] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060519110521.B0B772AC0EF@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php:1.1.2.1 --- /dev/null Fri May 19 20:05:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php Fri May 19 20:05:21 2006 @@ -0,0 +1,41 @@ +mFormProperties['upload'] =& new XCube_FileProperty('upload'); + $this->mFormProperties['tplset_name'] =& new XCube_StringProperty('tplset_name'); + + // + // Set field properties + // + $this->mFieldProperties['upload'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['upload']->setDependsByArray(array('required')); + $this->mFieldProperties['upload']->addMessage('required', _AD_LEGACYRENDER_ERROR_REQUIRED, _AD_LEGACYRENDER_LANG_TPLSET_UPLOAD_FILE); + + $this->mFieldProperties['tplset_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['tplset_name']->setDependsByArray(array('maxlength')); + $this->mFieldProperties['tplset_name']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '50'); + $this->mFieldProperties['tplset_name']->addVar('maxlength', '50'); + } +} + +?> From minahito @ users.sourceforge.jp Fri May 19 20:05:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 19 May 2006 20:05:28 +0900 Subject: [xoops-cvslog 3111] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060519110528.65F662AC0EF@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php:1.1.2.1 --- /dev/null Fri May 19 20:05:28 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php Fri May 19 20:05:28 2006 @@ -0,0 +1,51 @@ +mActionForm =& new LegacyRender_TplsetUploadForm(); + $this->mActionForm->prepare(); + } + + function isEnableCreate() + { + return true; + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("tplset_upload.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + header("location: ./index.php?action=TplsetList"); + exit(); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Fri May 19 20:05:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 19 May 2006 20:05:35 +0900 Subject: [xoops-cvslog 3112] CVS update: xoops2jp/html/modules/legacyRender/admin/.xml Message-ID: <20060519110535.D92502AC0EF@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/.xml/tplset_upload.xml diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/.xml/tplset_upload.xml:1.1.2.1 --- /dev/null Fri May 19 20:05:35 2006 +++ xoops2jp/html/modules/legacyRender/admin/.xml/tplset_upload.xml Fri May 19 20:05:35 2006 @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + From nobunobu @ users.sourceforge.jp Sun May 21 10:21:48 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 21 May 2006 10:21:48 +0900 Subject: [xoops-cvslog 3113] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060521012148.9A01F2AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.5 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.4 Wed May 17 00:27:17 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Sun May 21 10:21:48 2006 @@ -102,7 +102,7 @@ <{elseif $config->get('conf_formtype') == 'tplset'}> From onokazu @ users.sourceforge.jp Sun May 21 12:32:07 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Sun, 21 May 2006 12:32:07 +0900 Subject: [xoops-cvslog 3114] CVS update: xoops2jp/html/install/class Message-ID: <20060521033207.3B8CB2AC068@users.sourceforge.jp> Index: xoops2jp/html/install/class/settingmanager.php diff -u xoops2jp/html/install/class/settingmanager.php:1.2 xoops2jp/html/install/class/settingmanager.php:1.2.16.1 --- xoops2jp/html/install/class/settingmanager.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/class/settingmanager.php Sun May 21 12:32:07 2006 @@ -29,7 +29,7 @@ * setting manager for XOOPS installer * * @author Haruki Setoyama -* @version $Id: settingmanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $ +* @version $Id: settingmanager.php,v 1.2.16.1 2006/05/21 03:32:07 onokazu Exp $ * @access public **/ class setting_manager { @@ -72,7 +72,7 @@ if ( substr($filepath, -1) == "/" ) { $filepath = substr($filepath, 0, -1); } - $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'; + $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://'; $this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST']; } } @@ -268,7 +268,7 @@ function getDBList() { - return array('mysql'); + return array('mysql'); //$dirname = '../class/database/'; //$dirlist = array(); //if (is_dir($dirname) && $handle = opendir($dirname)) { Index: xoops2jp/html/install/class/textsanitizer.php diff -u xoops2jp/html/install/class/textsanitizer.php:1.2 xoops2jp/html/install/class/textsanitizer.php:1.2.16.1 --- xoops2jp/html/install/class/textsanitizer.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/class/textsanitizer.php Sun May 21 12:32:07 2006 @@ -1,5 +1,5 @@ should not be allowed since nl2br will be used - * when storing data - */ - function TextSanitizer() - { - - } - - function &getInstance() - { - static $instance; - if (!isset($instance)) { - $instance = new TextSanitizer(); - } - return $instance; - } - - function &makeClickable(&$text) - { - $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i"); - $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3"); - return preg_replace($patterns, $replacements, $text); - } - - function &nl2Br($text) - { - return preg_replace("/(\015\012)|(\015)|(\012)/","
",$text); - } - - function &addSlashes($text, $force=false) - { - if ($force) { - return addslashes($text); - } - if (!get_magic_quotes_gpc()) { - $text =& addslashes($text); - } - return $text; - } - - /* - * if magic_quotes_gpc is on, stirip back slashes - */ - function &stripSlashesGPC($text) - { - if (get_magic_quotes_gpc()) { - $text =& stripslashes($text); - } - return $text; - } - - /* - * for displaying data in html textbox forms - */ - function &htmlSpecialChars($text) - { - return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); - } - - function &undoHtmlSpecialChars(&$text) - { - return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); - } - - /* - * Filters textarea form data in DB for display - */ - function &displayText($text, $html=false) - { - if (! $html) { - // html not allowed - $text =& $this->htmlSpecialChars($text); - } - $text =& $this->makeClickable($text); - $text =& $this->nl2Br($text); - return $text; - } - - /* - * Filters textarea form data submitted for preview - */ - function &previewText($text, $html=false) - { - $text =& $this->stripSlashesGPC($text); - return $this->displayText($text, $html); - } + /* + * Constructor of this class + * Gets allowed html tags from admin config settings + *
should not be allowed since nl2br will be used + * when storing data + */ + function TextSanitizer() + { + + } + + function &getInstance() + { + static $instance; + if (!isset($instance)) { + $instance = new TextSanitizer(); + } + return $instance; + } + + function &makeClickable(&$text) + { + $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i"); + $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3"); + $ret = preg_replace($patterns, $replacements, $text); + return $ret; + } + + function &nl2Br($text) + { + $ret = preg_replace("/(\015\012)|(\015)|(\012)/","
",$text); + return $ret; + } + + function &addSlashes($text, $force=false) + { + if ($force) { + return addslashes($text); + } + if (!get_magic_quotes_gpc()) { + $text =& addslashes($text); + } + return $text; + } + + /* + * if magic_quotes_gpc is on, stirip back slashes + */ + function &stripSlashesGPC($text) + { + if (get_magic_quotes_gpc()) { + $text =& stripslashes($text); + } + return $text; + } + + /* + * for displaying data in html textbox forms + */ + function &htmlSpecialChars($text) + { + $ret = preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); + return $ret; + } + + function &undoHtmlSpecialChars(&$text) + { + $ret = preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); + return $ret; + } + + /* + * Filters textarea form data in DB for display + */ + function &displayText($text, $html=false) + { + if (! $html) { + // html not allowed + $text =& $this->htmlSpecialChars($text); + } + $text =& $this->makeClickable($text); + $text =& $this->nl2Br($text); + return $text; + } + + /* + * Filters textarea form data submitted for preview + */ + function &previewText($text, $html=false) + { + $text =& $this->stripSlashesGPC($text); + $ret = $this->displayText($text, $html); + return $ret; + } ##################### Deprecated Methods ###################### - function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - $text = $this->oopsStripSlashesGPC($text); - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function makeTboxData4Save($text) - { - //$text = $this->undoHtmlSpecialChars($text); - return $this->addSlashes($text); - } - - function makeTboxData4Show($text, $smiley=0) - { - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4Edit($text) - { - return $this->htmlSpecialChars($text); - } - - function makeTboxData4Preview($text, $smiley=0) - { - $text = $this->stripSlashesGPC($text); - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4PreviewInForm($text) - { - $text = $this->stripSlashesGPC($text); - return $this->htmlSpecialChars($text); - } - - function makeTareaData4Save($text) - { - return $this->addSlashes($text); - } - - function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->displayTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4Edit($text) - { - return htmlSpecialChars($text, ENT_QUOTES); - } - - function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->previewTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4PreviewInForm($text) - { - //if magic_quotes_gpc is on, do stipslashes - $text = $this->stripSlashesGPC($text); - return htmlSpecialChars($text, ENT_QUOTES); - } - - function makeTareaData4InsideQuotes($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsStripSlashesGPC($text) - { - return $this->stripSlashesGPC($text); - } - - function &oopsStripSlashesRT($text) - { - if (get_magic_quotes_runtime()) { - $text =& stripslashes($text); - } - return $text; - } - - function &oopsAddSlashes($text) - { - return $this->addSlashes($text); - } - - function &oopsHtmlSpecialChars($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsNl2Br($text) - { - return $this->nl2br($text); - } + function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + $text = $this->oopsStripSlashesGPC($text); + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function makeTboxData4Save($text) + { + //$text = $this->undoHtmlSpecialChars($text); + return $this->addSlashes($text); + } + + function makeTboxData4Show($text, $smiley=0) + { + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4Edit($text) + { + return $this->htmlSpecialChars($text); + } + + function makeTboxData4Preview($text, $smiley=0) + { + $text = $this->stripSlashesGPC($text); + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4PreviewInForm($text) + { + $text = $this->stripSlashesGPC($text); + return $this->htmlSpecialChars($text); + } + + function makeTareaData4Save($text) + { + return $this->addSlashes($text); + } + + function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) + { + return $this->displayTarea($text, $html, $smiley, $xcode); + } + + function makeTareaData4Edit($text) + { + return htmlSpecialChars($text, ENT_QUOTES); + } + + function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) + { + return $this->previewTarea($text, $html, $smiley, $xcode); + } + + function makeTareaData4PreviewInForm($text) + { + //if magic_quotes_gpc is on, do stipslashes + $text = $this->stripSlashesGPC($text); + return htmlSpecialChars($text, ENT_QUOTES); + } + + function makeTareaData4InsideQuotes($text) + { + return $this->htmlSpecialChars($text); + } + + function &oopsStripSlashesGPC($text) + { + return $this->stripSlashesGPC($text); + } + + function &oopsStripSlashesRT($text) + { + if (get_magic_quotes_runtime()) { + $text =& stripslashes($text); + } + return $text; + } + + function &oopsAddSlashes($text) + { + return $this->addSlashes($text); + } + + function &oopsHtmlSpecialChars($text) + { + return $this->htmlSpecialChars($text); + } + + function &oopsNl2Br($text) + { + return $this->nl2br($text); + } } ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Mon May 22 14:20:04 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 22 May 2006 14:20:04 +0900 Subject: [xoops-cvslog 3115] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060522052011.756CB2AC0AF@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.5 Wed Mar 29 22:52:01 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php Mon May 22 14:20:04 2006 @@ -36,9 +36,9 @@ return $ret; $this->mPreVersion = $module->getVar('version'); - + $name = $module->getVar('name','n'); $module->loadInfoAsVar($dirname); - + $module->setVar('name', $name, true); return $module; } From nobunobu @ users.sourceforge.jp Mon May 22 15:28:50 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 22 May 2006 15:28:50 +0900 Subject: [xoops-cvslog 3116] CVS update: xoops2jp/html/modules/base/admin/class Message-ID: <20060522062850.673B32AC0B9@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.6 xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.7 --- xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php:1.1.2.6 Mon May 22 14:20:04 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUpdater.class.php Mon May 22 15:28:50 2006 @@ -97,18 +97,23 @@ $blockHandler =& xoops_gethandler('block'); $func_num=0; - foreach ($definedBlocks as $block) { - $func_num++; + $showfuncs = array(); + $funcfiles = array(); + for ($i=1; $i<= count($definedBlocks); $i++) { + $block =& $definedBlocks[$i]; + $func_num = $i; + $showfuncs[]=$block['show_func']; + $funcfiles[]=$block['file']; $newBlock =& Legacy_ModuleUtils::createBlockByInfo($this->mModule, $block); - // // Get a installed block by mid and name. // $criteria = new CriteriaCompo(); $criteria->add(new Criteria('mid', $this->mModule->getVar('mid'))); - $criteria->add(new Criteria('name', $block['name'])); + $criteria->add(new Criteria('func_num', $func_num)); + $criteria->add(new Criteria('show_func', $block['show_func'])); + $criteria->add(new Criteria('func_file', $block['file'])); $installedBlocks =& $blockHandler->getObjectsDirectly($criteria); - // // If a installed block is not found, push it to new install block list. // @@ -137,32 +142,24 @@ unset($newBlock); unset($oldBlock); } - $criteria = new CriteriaCompo(); $criteria->add(new Criteria('mid', $this->mModule->getVar('mid'))); $installedBlocks =& $blockHandler->getObjectsDirectly($criteria); foreach ($installedBlocks as $blockObj) { - $name = $blockObj->getVar('name'); - $findFlag = false; - foreach ($definedBlocks as $definedBlock) { - $findFlag |= ($definedBlock['name'] == $blockObj->getVar('name')); - } - - if (!$findFlag) { + if (!in_array($blockObj->getVar('show_func'), $showfuncs) || !in_array($blockObj->getVar('func_file'), $funcfiles)) { $unInstallBlocks[] =& $blockObj; unset($blockObj); - } - } + } + } foreach ($installBlocks as $block) { Legacy_ModuleUtils::installBlock($this->mModule, $block[0], $block[1], $this->mLog); } - - /* + foreach ($unInstallBlocks as $block) { - Legacy_ModuleUtils::unInstallBlock($block); + Legacy_ModuleUtils::unInstallBlock($block, $this->mLog); } - */ + } function _installPreference() Index: xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php diff -u xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.16 xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.17 --- xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php:1.1.2.16 Sun Apr 23 00:57:24 2006 +++ xoops2jp/html/modules/base/admin/class/ModuleUtils.class.php Mon May 22 15:28:50 2006 @@ -317,6 +317,21 @@ } } + function unInstallBlock(&$block, &$log) { + $blockHandler =& xoops_gethandler('block'); + $blockHandler->delete($block); + $log->addReport("Uninstall block '".$block->getVar('name')); + // + // delete permission + // + $gpermHandler =& xoops_gethandler('groupperm'); + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('gperm_name', 'block_read')); + $criteria->add(new Criteria('gperm_itemid', $block->getVar('bid'))); + $criteria->add(new Criteria('gperm_modid', 1)); + $gpermHandler->deleteAll($criteria); + } + /** * Save the information of block's template specified and the source code of it * to database. From nobunobu @ users.sourceforge.jp Mon May 22 15:46:11 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 22 May 2006 15:46:11 +0900 Subject: [xoops-cvslog 3117] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060522064611.D1C6F2AC0B3@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.6 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.5 Sun May 21 10:21:48 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Mon May 22 15:46:11 2006 @@ -102,13 +102,13 @@ <{elseif $config->get('conf_formtype') == 'tplset'}> <{elseif $config->get('conf_formtype') == 'timezone'}> @@ -123,7 +123,7 @@ <{elseif $config->get('conf_formtype') == 'startpage'}> From nobunobu @ users.sourceforge.jp Mon May 22 15:50:36 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 22 May 2006 15:50:36 +0900 Subject: [xoops-cvslog 3118] CVS update: xoops2jp/html/modules/legacyRender Message-ID: <20060522065036.E06642AC03D@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/xoops_version.php diff -u xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.7 xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/xoops_version.php:1.1.2.7 Fri May 19 16:43:14 2006 +++ xoops2jp/html/modules/legacyRender/xoops_version.php Mon May 22 15:50:36 2006 @@ -1,6 +1,6 @@ "_MI_LR_META_COPYRIGHT_DESC", "formtype"=>"textbox", "valuetype"=>"text", - "default"=>"Copyright © 2001-2003" + "default"=>"Copyright © 2001-2006" ); + $modversion['config'][]=array ( "name"=>"footer", "title"=>"_MI_LR_FOOTER", From nobunobu @ users.sourceforge.jp Mon May 22 21:26:01 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Mon, 22 May 2006 21:26:01 +0900 Subject: [xoops-cvslog 3119] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060522122601.B42FA2AC021@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.5 xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php:1.1.2.5 Sat Apr 15 12:03:33 2006 +++ xoops2jp/html/modules/base/admin/forms/BlockInstallFilterForm.class.php Mon May 22 21:26:01 2006 @@ -86,6 +86,8 @@ $this->_mCriteria->add(new Criteria('dirname', array(XOBJ_DTYPE_STRING, xoops_getrequest('dirname')))); } + $this->_mNavi->addExtra('sort', $this->mSort); + $this->_mCriteria->add(new Criteria('visible', array(XOBJ_DTYPE_BOOL, 0))); $this->_mCriteria->add(new Criteria('isactive', array(XOBJ_DTYPE_BOOL, 1))); From minahito @ users.sourceforge.jp Tue May 23 11:10:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 23 May 2006 11:10:11 +0900 Subject: [xoops-cvslog 3120] CVS update: xoops2jp/html Message-ID: <20060523021011.778E92AC046@users.sourceforge.jp> Index: xoops2jp/html/misc.php diff -u xoops2jp/html/misc.php:1.6 xoops2jp/html/misc.php:1.6.4.1 --- xoops2jp/html/misc.php:1.6 Mon Oct 24 20:44:16 2005 +++ xoops2jp/html/misc.php Tue May 23 11:10:11 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/header.php diff -u xoops2jp/html/header.php:1.6 xoops2jp/html/header.php:1.6.2.1 --- xoops2jp/html/header.php:1.6 Mon May 1 11:37:26 2006 +++ xoops2jp/html/header.php Tue May 23 13:00:10 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/index.php diff -u xoops2jp/html/index.php:1.2 xoops2jp/html/index.php:1.2.18.1 --- xoops2jp/html/index.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/index.php Wed May 24 14:42:55 2006 @@ -1,5 +1,5 @@ - Index: xoops2jp/html/misc.php diff -u xoops2jp/html/misc.php:1.6.4.1 xoops2jp/html/misc.php:1.6.4.2 --- xoops2jp/html/misc.php:1.6.4.1 Tue May 23 11:10:11 2006 +++ xoops2jp/html/misc.php Wed May 24 14:43:08 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/index.php diff -u xoops2jp/html/index.php:1.2.18.1 xoops2jp/html/index.php:1.2.18.2 --- xoops2jp/html/index.php:1.2.18.1 Wed May 24 14:42:55 2006 +++ xoops2jp/html/index.php Wed May 24 14:45:50 2006 @@ -1,5 +1,5 @@ -Gu Index: xoops2jp/html/header.php diff -u xoops2jp/html/header.php:1.6.2.1 xoops2jp/html/header.php:1.6.2.2 --- xoops2jp/html/header.php:1.6.2.1 Tue May 23 13:00:10 2006 +++ xoops2jp/html/header.php Wed May 24 15:24:29 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/pm/service/LegacyPmService.class.php diff -u xoops2jp/html/modules/pm/service/LegacyPmService.class.php:1.1.2.2 xoops2jp/html/modules/pm/service/LegacyPmService.class.php:1.1.2.3 --- xoops2jp/html/modules/pm/service/LegacyPmService.class.php:1.1.2.2 Tue Mar 28 22:30:49 2006 +++ xoops2jp/html/modules/pm/service/LegacyPmService.class.php Wed May 24 18:42:25 2006 @@ -29,7 +29,7 @@ $pmHandler=&xoops_gethandler('privmessage'); $pm=&$pmHandler->create(); $pm->setVar("to_userid",$parameters['to_uid']); - $pm->setVar("to_userid",$parameters['from_uid']); + $pm->setVar("from_userid",$parameters['from_uid']); $pm->setVar("subject",$parameters['subject']); $pm->setVar("msg_text",$parameters['message']); From minahito @ users.sourceforge.jp Wed May 24 18:43:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 24 May 2006 18:43:53 +0900 Subject: [xoops-cvslog 3127] CVS update: xoops2jp/html/modules/user/class Message-ID: <20060524094353.32A212AC01A@users.sourceforge.jp> Index: xoops2jp/html/modules/user/class/mailjob.php diff -u xoops2jp/html/modules/user/class/mailjob.php:1.1.2.4 xoops2jp/html/modules/user/class/mailjob.php:1.1.2.5 --- xoops2jp/html/modules/user/class/mailjob.php:1.1.2.4 Thu Apr 27 19:26:11 2006 +++ xoops2jp/html/modules/user/class/mailjob.php Wed May 24 18:43:53 2006 @@ -47,10 +47,6 @@ $root->mEventManager->add("Module.User.Mailjob.ReplaceBody", new XCube_InstanceDelegate($this, "getReplaceBody")); - if ($this->get('is_pm')) { - $root->mEventManager->add("Module.User.Mailjob.Send", new XCube_InstanceDelegate($this, "sendPM")); - } - $this->loadUser(); $handler =& xoops_getmodulehandler('mailjob_link', 'user'); @@ -83,62 +79,6 @@ $eventArgs['body'] = str_replace('{X_UEMAIL}', $eventArgs['to_user']->get('email'), $eventArgs['body']); // TODO {X_UACTLINK} } - - function sendPM(&$sender, &$eventArgs) - { - $root =& XCube_Root::getSingleton(); - $serviceMgr =& $root->getServiceManager(); - $pmService =& $serviceMgr->searchXCubeService('PrivateMessage'); - - $pmClient =& new XCube_ServiceClient($pmService); - - // - // Convert body message. - // - $replaceEventArgs = array(); - $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); - $replaceEventArgs['to_user'] =& $eventArgs['to_user']; - $replaceEventArgs['from_user'] =& $eventArgs['from_user']; - $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; - $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); - - $param = array( - 'to_uid' => $eventArgs['to_user']->get('uid'), - 'from_uid' => $eventArgs['from_user']->get('uid'), - 'subject' => $eventArgs['mailjob']->get('title'), - 'message' => $replaceEventArgs['body'] - ); - - $result =& $pmClient->call('send', $param); - } - - function sendMail(&$sender, &$eventArgs) - { - $root =& XCube_Root::getSingleton(); - $serviceMgr =& $root->getServiceManager(); - $pmService =& $serviceMgr->searchXCubeService('PrivateMessage'); - - $pmClient =& new XCube_ServiceClient($pmService); - - // - // Convert body message. - // - $replaceEventArgs = array(); - $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); - $replaceEventArgs['to_user'] =& $eventArgs['to_user']; - $replaceEventArgs['from_user'] =& $eventArgs['from_user']; - $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; - $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); - - $param = array( - 'to_uid' => $eventArgs['to_user']->get('uid'), - 'from_uid' => $eventArgs['from_user']->get('uid'), - 'subject' => $eventArgs['mailjob']->get('title'), - 'message' => $replaceEventArgs['body'] - ); - - $result =& $pmClient->call('send', $param); - } } class UserMailjobHandler extends XoopsObjectGenericHandler From minahito @ users.sourceforge.jp Wed May 24 18:44:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 24 May 2006 18:44:11 +0900 Subject: [xoops-cvslog 3128] CVS update: xoops2jp/html/modules/user/admin/actions Message-ID: <20060524094411.9C44C2AC01A@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php diff -u xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.1 xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.2 --- xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php:1.1.2.1 Thu Apr 27 19:23:38 2006 +++ xoops2jp/html/modules/user/admin/actions/MailjobSendAction.class.php Wed May 24 18:44:11 2006 @@ -54,12 +54,21 @@ if ($this->mActionForm->hasError()) { return USER_FRAME_VIEW_INPUT; } - + + $root =& XCube_Root::getSingleton(); + if ($this->mMailjob->get('is_pm')) { + $root->mEventManager->add("Module.User.Mailjob.Send", new XCube_InstanceDelegate($this, "sendPM")); + } + + if ($this->mMailjob->get('is_mail')) { + $root->mEventManager->add("Module.User.Mailjob.Send", new XCube_InstanceDelegate($this, "sendMail")); + } + $this->mMailjob->send($xoopsUser); $this->mMailjob->loadUserCount(); - return ($this->mMailjob->mCount > 0) ? USER_FRAME_VIEW_INPUT : USER_FRAME_VIEW_SUCCESS; + return ($this->mMailjob->mUserCount > 0) ? USER_FRAME_VIEW_INPUT : USER_FRAME_VIEW_SUCCESS; } function executeViewSuccess(&$controller, &$xoopsUser, &$render) @@ -82,6 +91,70 @@ $render->setAttribute('object', $this->mMailjob); $render->setAttribute('actionForm', $this->mActionForm); } + + function sendPM(&$sender, &$eventArgs) + { + $root =& XCube_Root::getSingleton(); + $serviceMgr =& $root->getServiceManager(); + $pmService =& $serviceMgr->searchXCubeService('PrivateMessage'); + + $pmClient =& new XCube_ServiceClient($pmService); + + // + // Convert body message. + // + $replaceEventArgs = array(); + $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); + $replaceEventArgs['to_user'] =& $eventArgs['to_user']; + $replaceEventArgs['from_user'] =& $eventArgs['from_user']; + $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; + $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); + + $param = array( + 'to_uid' => $eventArgs['to_user']->get('uid'), + 'from_uid' => $eventArgs['from_user']->get('uid'), + 'subject' => $eventArgs['mailjob']->get('title'), + 'message' => $replaceEventArgs['body'] + ); + + $result =& $pmClient->call('send', $param); + } + + function sendMail(&$sender, &$eventArgs) + { + $xoopsMailer =& getMailer(); + $xoopsMailer->useMail(); + + // + // Set To + // + $xoopsMailer->setToUsers($eventArgs['to_user']); + + // + // Set From + // + $xoopsMailer->setFromEmail($eventArgs['mailjob']->get('from_email')); + $xoopsMailer->setFromName($eventArgs['mailjob']->get('from_name')); + + // + // Convert body message. + // + $replaceEventArgs = array(); + $replaceEventArgs['body'] = $eventArgs['mailjob']->get('body'); + $replaceEventArgs['to_user'] =& $eventArgs['to_user']; + $replaceEventArgs['from_user'] =& $eventArgs['from_user']; + $replaceEventArgs['mailjob'] =& $eventArgs['mailjob']; + + $root =& XCube_Root::getSingleton(); + $root->mEventManager->raiseEvent('Module.User.Mailjob.ReplaceBody', $this, $replaceEventArgs); + + $xoopsMailer->setBody($replaceEventArgs['body']); + + // + // TODO Error handling. + // + $xoopsMailer->send(true); + } } ?> From minahito @ users.sourceforge.jp Wed May 24 22:54:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Wed, 24 May 2006 22:54:37 +0900 Subject: [xoops-cvslog 3129] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060524135437.6C99E2AC08F@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.5 xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/actions/HelpAction.class.php:1.1.2.5 Tue Apr 11 19:03:38 2006 +++ xoops2jp/html/modules/base/admin/actions/HelpAction.class.php Wed May 24 22:54:37 2006 @@ -1,6 +1,6 @@ force_compile = true; $this->register_modifier("helpurl", "Legacy_modifier_helpurl"); + $this->register_modifier("helpimage", "Legacy_modifier_helpimage"); } function setDirname($dirname) @@ -60,6 +61,23 @@ return $url; } +function Legacy_modifier_helpimage($file) +{ + $root =& XCube_Root::getSingleton(); + $modController =& $root->mController->getModuleController(); + $moduleObject =& $modController->getXoopsModule(); + + $language = $root->mController->getConfig('language'); + $dirname = $moduleObject->getVar('dirname'); + + $url = XOOPS_MODULE_URL . "/${dirname}/language/${language}/helpimages/${file}"; + if (!file_exists($url) && $language != "english") { + $url = XOOPS_MODULE_URL . "/${dirname}/language/english/helpimages/${file}"; + } + + return $url; +} + /** * This action will show the information of a module specified to user. */ From minahito @ users.sourceforge.jp Thu May 25 14:14:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:14:10 +0900 Subject: [xoops-cvslog 3130] CVS update: xoops2jp/html/class Message-ID: <20060525051410.269772AC020@users.sourceforge.jp> Index: xoops2jp/html/class/XCube_ActionForm.class.php diff -u xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.33 xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.34 --- xoops2jp/html/class/XCube_ActionForm.class.php:1.1.2.33 Wed May 17 20:14:50 2006 +++ xoops2jp/html/class/XCube_ActionForm.class.php Thu May 25 14:14:10 2006 @@ -491,7 +491,7 @@ function isNull() { if (!is_object($this->mValue)) { - return false; + return true; } return !$this->mValue->hasUploadFile(); From minahito @ users.sourceforge.jp Thu May 25 14:15:53 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:15:53 +0900 Subject: [xoops-cvslog 3131] CVS update: xoops2jp/html/include Message-ID: <20060525051553.5FDF32AC020@users.sourceforge.jp> Index: xoops2jp/html/include/version.php diff -u xoops2jp/html/include/version.php:1.4.8.3 xoops2jp/html/include/version.php:1.4.8.4 --- xoops2jp/html/include/version.php:1.4.8.3 Sat Feb 4 03:10:06 2006 +++ xoops2jp/html/include/version.php Thu May 25 14:15:53 2006 @@ -1,5 +1,5 @@ \ No newline at end of file From minahito @ users.sourceforge.jp Thu May 25 14:17:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:17:37 +0900 Subject: [xoops-cvslog 3132] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060525051737.3289C2AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php:1.1.2.1 Fri May 19 20:05:28 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplsetUploadAction.class.php Thu May 25 14:17:37 2006 @@ -5,35 +5,166 @@ require_once XOOPS_MODULE_PATH . "/legacyRender/admin/class/AbstractEditAction.class.php"; require_once XOOPS_MODULE_PATH . "/legacyRender/admin/forms/TplsetUploadForm.class.php"; -class LegacyRender_TplsetUploadAction extends LegacyRender_AbstractEditAction +class LegacyRender_TplsetUploadAction extends LegacyRender_Action { - function _getId() + var $mActionForm = null; + var $mErrorMessages = array(); + + function prepare(&$controller, &$xoopsUser) { - return isset($_REQUEST['tplset_id']) ? intval($_REQUEST['tplset_id']) : 0; + $this->mActionForm =& new LegacyRender_TplsetUploadForm(); + $this->mActionForm->prepare(); } - - function &_getHandler() + + function getDefaultView(&$controller, &$xoopsUser) { - $handler = xoops_getmodulehandler('tplset'); - return $handler; + return LEGACYRENDER_FRAME_VIEW_INPUT; } - - function _setupActionForm() + + function _addErrorMessage($msg) { - $this->mActionForm =& new LegacyRender_TplsetUploadForm(); - $this->mActionForm->prepare(); + $this->mErrorMessages[] = $msg; + } + + function execute(&$controller, &$xoopsUser) + { + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + if ($this->mActionForm->hasError()) { + return $this->getDefaultView($controller, $xoopsUser); + } + + require_once XOOPS_ROOT_PATH . "/class/class.tar.php"; + $tar =& new tar(); + + $formFile = $this->mActionForm->get('upload'); + + // + // [Warn] access private member directly + // TODO We should define the access method because we oftern + // access private member of XCube_FormFile. + // + $tar->openTar($formFile->_mTmpFileName); + + $tplsetName = null; + foreach ($tar->files as $id => $info) { + $infoArr = explode('/', str_replace("\\", '/', $info['name'])); + $tplsetName = $this->mActionForm->get('tplset_name'); + if ($tplsetName == null) { + $tplsetName = trim($infoArr[0]); + } + + if ($tplsetName != null) { + break; + } + } + + // + // Check tplset name. + // + if ($tplsetName == null || preg_match('/[' . preg_quote('\/:*?"<>|','/') . ']/', $tplsetName)) { + $this->_addErrorMessage(_AD_LEGACYRENDER_ERROR_TPLSET_NAME_WRONG); + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + $handler =& xoops_getmodulehandler('tplset'); + if ($handler->getCount(new Criteria('tplset_name', $tplsetName)) != 0) { + $this->_addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACYRENDER_ERROR_TPLSET_ALREADY_EXISTS, $tplsetName)); + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + $tplset =& $handler->create(); + $tplset->set('tplset_name', $tplsetName); + if (!$handler->insert($tplset)) { + $this->_addErrorMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_TPLSET); + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + $themeimages = array(); + if (!$this->_fetchTemplateFiles($tar, $tplset, $themeimages)) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + if (!$this->_fetchImageset($tar, $tplset, $themeimages)) { + return LEGACYRENDER_FRAME_VIEW_ERROR; + } + + return LEGACYRENDER_FRAME_VIEW_SUCCESS; + } + + function _fetchTemplateFiles(&$tar, &$tplset, &$themeimages) + { + $handler =& xoops_getmodulehandler('tplfile'); + foreach ($tar->files as $id => $info) { + $infoArr = explode('/', str_replace("\\", '/', $info['name'])); + if (isset($infoArr[3]) && trim($infoArr[3]) == 'blocks') { + $default =& $handler->find('default', 'block', null, trim($infoArr[2]), trim($infoArr[4])); + } elseif ((!isset($infoArr[4]) || trim($infoArr[4]) == '') && $infoArr[1] == 'templates') { + $default =& $handler->find('default', 'module', null, trim($infoArr[2]), trim($infoArr[3])); + } elseif (isset($infoArr[3]) && trim($infoArr[3]) == 'images') { + $infoArr[2] = trim($infoarr[2]); + if (preg_match("/(.*)\.(gif|jpg|jpeg|png)$/i", $infoArr[2], $match)) { + $themeimages[] = array('name' => $infoArr[2], 'content' => $info['file']); + } + } + if (count($default) > 0) { + $tplfile =& $default[0]->createClone($tplset->get('tplset_name')); + $tplfile->Source->set('tpl_source', $info['file']); + + if (!$handler->insert($tplfile)) { + $this->_addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_TPLFILE, $tplfile->get('tpl_file'))); + } + unset($default); + } + unset($info); + } + + return true; } - function isEnableCreate() + function _fetchImageset(&$tar, &$tplset, &$themeimages) { + if (count($themeimages) == 0) { + return true; + } + + $handler =& xoops_gethandler('imageset'); + $imgset =& $handler->create(); + $imgset->set('imgset_name', $tplset->get('tplset_name')); + $imgset->set('imgset_refid', 0); + + if (!$handler->insert($imgset)) { + $this->_addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_IMAGESET, $tplset->get('tplset_name'))); + return false; + } + + if (!$handler->linktplset($imgset->get('imgset_id'), $tplset->get('tplset_name'))) { + $this->_addErrorMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_LINKTPLSET); + return false; + } + + $handler =& xoops_gethandler('imagesetimg'); + for ($i = 0; $i < count($themeimages); $i++) { + if (isset($themeimages[$i]['name']) && $themeimages[$i]['name'] != '') { + $image =& $handler->create(); + $image->set('imgsetimg_file', $themeimages[$i]['name']); + $image->set('imgsetimg_imgset', $imgset->get('imgset_id')); + $image->set('imgsetimg_body', $themeimages[$i]['content'], true); + if (!$handler->insert($image)) { + $this->_addErrorMessage(XCube_Utils::formatMessage(_AD_LEGACYRENDER_ERROR_COULD_NOT_SAVE_IMAGE_FILE, $image->get('imgsetimg_file'))); + } + unset($image); + } + } + return true; } - + function executeViewInput(&$controller, &$xoopsUser, &$render) { $render->setTemplateName("tplset_upload.html"); $render->setAttribute('actionForm', $this->mActionForm); - $render->setAttribute('object', $this->mObject); } function executeViewSuccess(&$controller, &$xoopsUser, &$render) @@ -44,7 +175,13 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + if (count($this->mErrorMessages) == 0) { + redirect_header("./index.php?action=TplsetList", 1, _AD_LEGACYRENDER_ERROR_DBUPDATE_FAILED); + } + else { + $render->setTemplateName("tplset_upload_error.html"); + $render->setAttribute('errorMessages', $this->mErrorMessages); + } } } From minahito @ users.sourceforge.jp Thu May 25 14:19:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:19:05 +0900 Subject: [xoops-cvslog 3133] CVS update: xoops2jp/html/modules/legacyRender/admin/forms Message-ID: <20060525051905.E20642AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php diff -u xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php:1.1.2.1 Fri May 19 20:05:21 2006 +++ xoops2jp/html/modules/legacyRender/admin/forms/TplsetUploadForm.class.php Thu May 25 14:19:05 2006 @@ -10,6 +10,7 @@ var $mOldFileName = null; var $_mIsNew = null; var $mFormFile = null; + var $_allowExtensions = array('tar', 'tar.gz', 'tgz', 'gz'); function getTokenName() { @@ -36,6 +37,21 @@ $this->mFieldProperties['tplset_name']->addMessage('maxlength', _AD_LEGACYRENDER_ERROR_MAXLENGTH, _AD_LEGACYRENDER_LANG_TPLSET_DESC, '50'); $this->mFieldProperties['tplset_name']->addVar('maxlength', '50'); } + + function validateUpload() + { + $formFile = $this->get('upload'); + if ($formFile != null) { + $flag = false; + foreach ($this->_allowExtensions as $ext) { + $flag |= preg_match("/" . str_replace(".", "\.", $ext) . "$/", $formFile->getFileName()); + } + + if (!$flag) { + $this->addErrorMessage(_AD_LEGACYRENDER_ERROR_EXTENSION_IS_WRONG); + } + } + } } ?> From minahito @ users.sourceforge.jp Thu May 25 14:19:17 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:19:17 +0900 Subject: [xoops-cvslog 3134] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060525051917.956102AC042@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload_error.html diff -u /dev/null xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload_error.html:1.1.2.1 --- /dev/null Thu May 25 14:19:17 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload_error.html Thu May 25 14:19:17 2006 @@ -0,0 +1,12 @@ +

<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_UPLOAD_RESULT}>

+ +
    + <{foreach item=message from=$errorMessages}> +
  • <{$message|escape}>
  • + <{/foreach}> +
+ +

+ [ <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_LIST}> ] + [ <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_UPLOAD}> ] +

From minahito @ users.sourceforge.jp Thu May 25 14:19:37 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:19:37 +0900 Subject: [xoops-cvslog 3135] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060525051937.494632AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.12 xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.13 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.12 Thu May 18 12:05:04 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html Thu May 25 14:19:37 2006 @@ -20,6 +20,10 @@
<{$smarty.const._AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_2}>
<{/if}> + + <{if $actionForm->hasError()}>
    <{foreach item=message from=$actionForm->getErrorMessages()}> From minahito @ users.sourceforge.jp Thu May 25 14:20:03 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:20:03 +0900 Subject: [xoops-cvslog 3136] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060525052003.D7EC82AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.1 xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.2 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html:1.1.2.1 Fri May 19 20:05:12 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_upload.html Thu May 25 14:20:03 2006 @@ -1,10 +1,14 @@
    <{$smarty.const._MI_LEGACYRENDER_NAME}> »» <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_MANAGE}> - »» <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_UPLOAD}> + »» <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_UPLOAD}>
    -

    <{$smarty.const._AD_LEGACYRENDER_LANG_TEMPLATE_SET_UPLOAD}>

    +

    <{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_UPLOAD}>

    + +
    + <{$smarty.const._AD_LEGACYRENDER_TIPS_TPLSET_UPLOAD}> +
    <{if $actionForm->hasError()}>
      @@ -14,12 +18,12 @@
    <{/if}> -
    + <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=tplset_id value=$actionForm->get('tplset_id')}> - + @@ -32,7 +36,7 @@ From minahito @ users.sourceforge.jp Thu May 25 14:20:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:20:55 +0900 Subject: [xoops-cvslog 3137] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060525052055.4B9DD2AC042@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/tplfile.php diff -u xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.10 xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.11 --- xoops2jp/html/modules/legacyRender/class/tplfile.php:1.1.2.10 Wed May 17 20:16:16 2006 +++ xoops2jp/html/modules/legacyRender/class/tplfile.php Thu May 25 14:20:55 2006 @@ -35,7 +35,13 @@ } } - function &createClone($name) + /** + * Create the clone with source for the template set that is specified by $tplsetName. + * + * @param $tplsetName string + * @return object LegacyRenderTplfileObject + */ + function &createClone($tplsetName) { $this->loadSource(); @@ -44,7 +50,7 @@ $obj->set('tpl_refid', $this->get('tpl_refid')); $obj->set('tpl_module', $this->get('tpl_module')); - $obj->set('tpl_tplset', $name); + $obj->set('tpl_tplset', $tplsetName); $obj->set('tpl_file', $this->get('tpl_file')); $obj->set('tpl_desc', $this->get('tpl_desc')); @@ -157,6 +163,12 @@ return parent::delete($obj, $force); } + /** + * This is a kind of getObjects(). Return objects that were modified recently. + * + * @param $limit int + * @return array array of the object + */ function &getRecentModifyFile($limit = 10) { $criteria = new Criteria('tpl_id', 0, '>'); @@ -170,6 +182,38 @@ return $objs; } + + /** + * This is a kind of getObjects(). Call getObjects() by 5 parameters and return + * the result. Parameters are guaranteed Type Safe because these are used by + * getObjects() for XoopsSimpleObject. + * + * @param $tplsetName string + * @param $type string + * @param $refId int + * @param $module string + * @param $file string + * @return array array of the object. + */ + function &find($tplsetName, $type = null, $refId = null, $module = null, $file = null) { + $criteria =& new CriteriaCompo(); + $criteria->add(new Criteria('tpl_tplset', $tplsetName)); + if ($type != null) { + $criteria->add(new Criteria('tpl_type', $type)); + } + if ($refId != null) { + $criteria->add(new Criteria('tpl_refid', $refId)); + } + if ($module != null) { + $criteria->add(new Criteria('tpl_module', $module)); + } + if ($file != null) { + $criteria->add(new Criteria('tpl_file', $file)); + } + + $objs =& $this->getObjects($criteria); + return $objs; + } } ?> From minahito @ users.sourceforge.jp Thu May 25 14:21:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:21:10 +0900 Subject: [xoops-cvslog 3138] CVS update: xoops2jp/html/modules/legacyRender/language/japanese Message-ID: <20060525052110.8B51D2AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/japanese/admin.php diff -u xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.19 xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.20 --- xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.19 Wed May 17 20:16:34 2006 +++ xoops2jp/html/modules/legacyRender/language/japanese/admin.php Thu May 25 14:21:10 2006 @@ -1,13 +1,21 @@ ユーザーにテーマを選択させたいですか? チェックボックスにチェックを入れて、「テーマ選択ブロック」にリストアップしてください。詳しくはヘルプをご覧ください。"); +define('_AD_LEGACYRENDER_TIPS_TPLSET_UPLOAD', "もしこの場で名前を指定しなかった場合は、アップロードされたファイルからテンプレートセット名が取得されます。
    このシステムが対応しているTAR.GZ形式のファイルをアップロードしてください。"); ?> From minahito @ users.sourceforge.jp Thu May 25 14:21:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 14:21:10 +0900 Subject: [xoops-cvslog 3139] CVS update: xoops2jp/html/modules/legacyRender/language/english Message-ID: <20060525052110.B0DB22AC042@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/english/admin.php diff -u xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.18 xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.19 --- xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.18 Wed May 17 20:16:33 2006 +++ xoops2jp/html/modules/legacyRender/language/english/admin.php Thu May 25 14:21:10 2006 @@ -1,5 +1,11 @@ Do you think your site theme should be selectable by users? Add themes to theme selection block with checking checkboxes. To learn more details, read the help."); +define('_AD_LEGACYRENDER_TIPS_TPLSET_UPLOAD', "If you don't input template set name, the name is got from the uploaded file. Upload TAR.GZ Format file that this system can accept."); ?> From minahito @ users.sourceforge.jp Thu May 25 18:27:40 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:27:40 +0900 Subject: [xoops-cvslog 3140] CVS update: xoops2jp/html Message-ID: <20060525092740.B55A62AC0A4@users.sourceforge.jp> Index: xoops2jp/html/imagemanager.php diff -u xoops2jp/html/imagemanager.php:1.2.8.1 xoops2jp/html/imagemanager.php:1.2.8.2 --- xoops2jp/html/imagemanager.php:1.2.8.1 Wed Oct 19 02:12:57 2005 +++ xoops2jp/html/imagemanager.php Thu May 25 18:27:40 2006 @@ -1,255 +1,18 @@ // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------ // - -include './mainfile.php'; -if (!isset($_GET['target']) && !isset($_POST['target'])) { - exit(); -} -$op = 'list'; -if (isset($_GET['op']) && $_GET['op'] == 'upload') { - $op = 'upload'; -} elseif (isset($_POST['op']) && $_POST['op'] == 'doupload') { - $op = 'doupload'; -} - -if (!is_object($xoopsUser)) { - $group = array(XOOPS_GROUP_ANONYMOUS); -} else { - $group =& $xoopsUser->getGroups(); -} -if ($op == 'list') { - require_once XOOPS_ROOT_PATH.'/class/template.php'; - $xoopsTpl = new XoopsTpl(); - $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER); - $xoopsTpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); - $target = htmlspecialchars($_GET['target'], ENT_QUOTES); - $xoopsTpl->assign('target', $target); - $imgcat_handler =& xoops_gethandler('imagecategory'); - $catlist =& $imgcat_handler->getList($group, 'imgcat_read', 1); - $catcount = count($catlist); - $xoopsTpl->assign('lang_align', _ALIGN); - $xoopsTpl->assign('lang_add', _ADD); - $xoopsTpl->assign('lang_close', _CLOSE); - if ($catcount > 0) { - $xoopsTpl->assign('lang_go', _GO); - $catshow = !isset($_GET['cat_id']) ? 0 : intval($_GET['cat_id']); - $catshow = (!empty($catshow) && in_array($catshow, array_keys($catlist))) ? $catshow : 0; - $xoopsTpl->assign('show_cat', $catshow); - if ($catshow > 0) { - $xoopsTpl->assign('lang_addimage', _ADDIMAGE); - } - $catlist = array('0' => '--') + $catlist; - $cat_options = ''; - foreach ($catlist as $c_id => $c_name) { - $sel = ''; - if ($c_id == $catshow) { - $sel = ' selected="selected"'; - } - $cat_options .= ''; - } - $xoopsTpl->assign('cat_options', $cat_options); - if ($catshow > 0) { - $image_handler = xoops_gethandler('image'); - $criteria = new CriteriaCompo(new Criteria('imgcat_id', $catshow)); - $criteria->add(new Criteria('image_display', 1)); - $total = $image_handler->getCount($criteria); - if ($total > 0) { - $imgcat_handler =& xoops_gethandler('imagecategory'); - $imgcat =& $imgcat_handler->get($catshow); - $xoopsTpl->assign('image_total', $total); - $xoopsTpl->assign('lang_image', _IMAGE); - $xoopsTpl->assign('lang_imagename', _IMAGENAME); - $xoopsTpl->assign('lang_imagemime', _IMAGEMIME); - $start = isset($_GET['start']) ? intval($_GET['start']) : 0; - $criteria->setLimit(10); - $criteria->setStart($start); - $storetype = $imgcat->getVar('imgcat_storetype'); - if ($storetype == 'db') { - $images =& $image_handler->getObjects($criteria, false, true); - } else { - $images =& $image_handler->getObjects($criteria, false, false); - } - $imgcount = count($images); - $max = ($imgcount > 10) ? 10 : $imgcount; - - for ($i = 0; $i < $max; $i++) { - if ($storetype == 'db') { - $lcode = '[img align=left id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]'; - $code = '[img id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]'; - $rcode = '[img align=right id='.$images[$i]->getVar('image_id').']'.$images[$i]->getVar('image_nicename').'[/img]'; - $src = XOOPS_URL."/image.php?id=".$images[$i]->getVar('image_id'); - } else { - $lcode = '[img align=left]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]'; - $code = '[img]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]'; - $rcode = '[img align=right]'.XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name').'[/img]'; - $src = XOOPS_UPLOAD_URL.'/'.$images[$i]->getVar('image_name'); - } - $xoopsTpl->append('images', array('id' => $images[$i]->getVar('image_id'), 'nicename' => $images[$i]->getVar('image_nicename'), 'mimetype' => $images[$i]->getVar('image_mimetype'), 'src' => $src, 'lxcode' => $lcode, 'xcode' => $code, 'rxcode' => $rcode)); - } - if ($total > 10) { - include_once XOOPS_ROOT_PATH.'/class/pagenav.php'; - $nav = new XoopsPageNav($total, 10, $start, 'start', 'target='.$target.'&cat_id='.$catshow); - $xoopsTpl->assign('pagenav', $nav->renderNav()); - } - } else { - $xoopsTpl->assign('image_total', 0); - } - } - $xoopsTpl->assign('xsize', 600); - $xoopsTpl->assign('ysize', 400); - } else { - $xoopsTpl->assign('xsize', 400); - $xoopsTpl->assign('ysize', 180); - } - $xoopsTpl->display('db:system_imagemanager.html'); - exit(); -} - -if ($op == 'upload') { - $imgcat_handler =& xoops_gethandler('imagecategory'); - $imgcat_id = intval($_GET['imgcat_id']); - $imgcat =& $imgcat_handler->get($imgcat_id); - $error = false; - if (!is_object($imgcat)) { - $error = true; - } else { - $imgcatperm_handler =& xoops_gethandler('groupperm'); - if (is_object($xoopsUser)) { - if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoopsUser->getGroups())) { - $error = true; - } - } else { - if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, XOOPS_GROUP_ANONYMOUS)) { - $error = true; - } - } - } - if ($error != false) { - xoops_header(false); - echo '
    '; - xoops_footer(); - exit(); - } - require_once XOOPS_ROOT_PATH.'/class/template.php'; - $xoopsTpl = new XoopsTpl(); - $xoopsTpl->assign('show_cat', $imgcat_id); - $xoopsTpl->assign('lang_imgmanager', _IMGMANAGER); - $xoopsTpl->assign('sitename', htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES)); - $xoopsTpl->assign('target', htmlspecialchars($_GET['target'], ENT_QUOTES)); - include_once XOOPS_ROOT_PATH.'/class/xoopsformloader.php'; - $form = new XoopsThemeForm('', 'image_form', 'imagemanager.php'); - $form->setExtra('enctype="multipart/form-data"'); - $form->addElement(new XoopsFormText(_IMAGENAME, 'image_nicename', 20, 255), true); - $form->addElement(new XoopsFormLabel(_IMAGECAT, $imgcat->getVar('imgcat_name'))); - $form->addElement(new XoopsFormFile(_IMAGEFILE, 'image_file', $imgcat->getVar('imgcat_maxsize')), true); - $form->addElement(new XoopsFormLabel(_IMGMAXSIZE, $imgcat->getVar('imgcat_maxsize'))); - $form->addElement(new XoopsFormLabel(_IMGMAXWIDTH, $imgcat->getVar('imgcat_maxwidth'))); - $form->addElement(new XoopsFormLabel(_IMGMAXHEIGHT, $imgcat->getVar('imgcat_maxheight'))); - $form->addElement(new XoopsFormHidden('imgcat_id', $imgcat_id)); - $form->addElement(new XoopsFormHidden('op', 'doupload')); - $form->addElement(new XoopsFormToken(XoopsMultiTokenHandler::quickCreate('imagemanager'))); - $form->addElement(new XoopsFormHidden('target', $target)); - $form->addElement(new XoopsFormButton('', 'img_button', _SUBMIT, 'submit')); - $form->assign($xoopsTpl); - $xoopsTpl->assign('lang_close', _CLOSE); - $xoopsTpl->display('db:system_imagemanager2.html'); - exit(); -} - -if ($op == 'doupload') { - if (!XoopsMultiTokenHandler::quickValidate('imagemanager')) { - exit(); - } - $image_nicename = isset($_POST['image_nicename']) ? $_POST['image_nicename'] : ''; - $xoops_upload_file = isset($_POST['xoops_upload_file']) ? $_POST['xoops_upload_file'] : array(); - $target = isset($_POST['target']) ? $_POST['target'] : ''; - $imgcat_id = isset($_POST['imgcat_id']) ? intval($_POST['imgcat_id']) : 0; - include_once XOOPS_ROOT_PATH.'/class/uploader.php'; - $imgcat_handler =& xoops_gethandler('imagecategory'); - $imgcat =& $imgcat_handler->get($imgcat_id); - $error = false; - if (!is_object($imgcat)) { - $error = true; - } else { - $imgcatperm_handler =& xoops_gethandler('groupperm'); - if (is_object($xoopsUser)) { - if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, $xoopsUser->getGroups())) { - $error = true; - } - } else { - if (!$imgcatperm_handler->checkRight('imgcat_write', $imgcat_id, XOOPS_GROUP_ANONYMOUS)) { - $error = true; - } - } - } - if ($error != false) { - xoops_header(false); - echo '
    '; - xoops_footer(); - exit(); - } - $uploader = new XoopsMediaUploader(XOOPS_UPLOAD_PATH, array('image/gif', 'image/jpeg', 'image/pjpeg', 'image/x-png', 'image/png'), $imgcat->getVar('imgcat_maxsize'), $imgcat->getVar('imgcat_maxwidth'), $imgcat->getVar('imgcat_maxheight')); - $uploader->setAllowedExtensions(array('gif', 'jpeg', 'jpg', 'png')); - $uploader->setPrefix('img'); - if ($uploader->fetchMedia($xoops_upload_file[0])) { - if (!$uploader->upload()) { - $err = $uploader->getErrors(); - } else { - $image_handler =& xoops_gethandler('image'); - $image =& $image_handler->create(); - $image->setVar('image_name', $uploader->getSavedFileName()); - $image->setVar('image_nicename', $image_nicename); - $image->setVar('image_mimetype', $uploader->getMediaType()); - $image->setVar('image_created', time()); - $image->setVar('image_display', 1); - $image->setVar('image_weight', 0); - $image->setVar('imgcat_id', $imgcat_id); - if ($imgcat->getVar('imgcat_storetype') == 'db') { - $fp = @fopen($uploader->getSavedDestination(), 'rb'); - $fbinary = @fread($fp, filesize($uploader->getSavedDestination())); - @fclose($fp); - $image->setVar('image_body', $fbinary, true); - @unlink($uploader->getSavedDestination()); - } - if (!$image_handler->insert($image)) { - $err = sprintf(_FAILSAVEIMG, $image->getVar('image_nicename')); - } - } - } else { - $err = _FAILFETCHIMG; - } - if (isset($err)) { - xoops_header(false); - xoops_error($err); - echo '
    '; - xoops_footer(); - exit(); - } - header('location: imagemanager.php?cat_id='.$imgcat_id.'&target='.$target); -} +/** + * This file was full scratched in XOOPS Cube Legacy project. + * + * @version $Id: imagemanager.php,v 1.2.8.2 2006/05/25 09:27:40 minahito Exp $ + */ + +require_once "mainfile.php"; + +// +// This is old page controller in Xoops 2.0.x +// Raise event "Legacypage.Imagemanager.Access" +// +$root=&XCube_Root::getSingleton(); +$eventArgs = array(); +$root->mEventManager->raiseEvent("Legacypage.Imagemanager.Access", $root->mController, $eventArgs); ?> \ No newline at end of file From minahito @ users.sourceforge.jp Thu May 25 18:28:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:28:29 +0900 Subject: [xoops-cvslog 3141] CVS update: xoops2jp/html/modules/base Message-ID: <20060525092829.A88E32AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/xoops_version.php diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.20 xoops2jp/html/modules/base/xoops_version.php:1.1.2.21 --- xoops2jp/html/modules/base/xoops_version.php:1.1.2.20 Tue May 16 21:46:26 2006 +++ xoops2jp/html/modules/base/xoops_version.php Thu May 25 18:28:29 2006 @@ -1,5 +1,5 @@ From minahito @ users.sourceforge.jp Thu May 25 18:28:38 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:28:38 +0900 Subject: [xoops-cvslog 3142] CVS update: xoops2jp/html/modules/base Message-ID: <20060525092838.ED32B2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/index.php diff -u /dev/null xoops2jp/html/modules/base/index.php:1.1.2.1 --- /dev/null Thu May 25 18:28:38 2006 +++ xoops2jp/html/modules/base/index.php Thu May 25 18:28:38 2006 @@ -0,0 +1,20 @@ +setActionName($actionName); + +$root->mController->setActionStrategy($moduleRunner); + +$root->mController->executeAction(); + +require_once XOOPS_ROOT_PATH . "/footer.php"; + +?> From minahito @ users.sourceforge.jp Thu May 25 18:28:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:28:50 +0900 Subject: [xoops-cvslog 3143] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060525092850.DB6A32AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/ImageListAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.1 --- /dev/null Thu May 25 18:28:50 2006 +++ xoops2jp/html/modules/base/actions/ImageListAction.class.php Thu May 25 18:28:50 2006 @@ -0,0 +1,91 @@ +setDialogMode(true); + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('image'); + return $handler; + } + + function &_getFilterForm(&$navi) + { + $filter =& new Legacy_ImageFilterForm($navi); + return $filter; + } + + function _getBaseUrl() + { + return "./index.php?action=ImageList"; + } + + function getDefaultView(&$contoller, &$xoopsUser) + { + $result = parent::getDefaultView($controller, $xoopsUser); + if ($result == LEGACY_FRAME_VIEW_INDEX) { + $this->mImgcatId = xoops_getrequest('imgcat_id'); + $handler =& xoops_getmodulehandler('imagecategory'); + $this->mCategory =& $handler->get($this->mImgcatId ); + } + + return $result; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("legacy_image_list.html"); + + foreach (array_keys($this->mObjects) as $key) { + $this->mObjects[$key]->loadImagecategory(); + } + + $render->setAttribute("objects", $this->mObjects); + $render->setAttribute("pageNavi", $this->mNavi); + + $render->setAttribute('imgcatId', $this->mImgcatId); + + $handler =& xoops_getmodulehandler('imagecategory'); + + if (is_object($xoopsUser)) { + $groups =& $xoopsUser->getGroups(); + } + else { + $groups = array(XOOPS_GROUP_ANONYMOUS); + } + $categoryArr =& $handler->getObjectsWithReadPerm($groups); + + $render->setAttribute('categoryArr', $categoryArr); + + // + // If current category object exists, check the permission of uploading. + // + $hasUploadPerm = null; + if ($this->mCategory != null) { + $hasUploadPerm = $this->mCategory->hasUploadPerm($groups); + } + $render->setAttribute('hasUploadPerm', $hasUploadPerm); + $render->setAttribute("category", $this->mCategory); + + $render->setAttribute('target', xoops_getrequest('target')); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?Action=ImageList"); + } +} + +?> Index: xoops2jp/html/modules/base/actions/ImageUploadAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.1 --- /dev/null Thu May 25 18:28:50 2006 +++ xoops2jp/html/modules/base/actions/ImageUploadAction.class.php Thu May 25 18:28:50 2006 @@ -0,0 +1,77 @@ +setDialogMode(true); + } + + function &_getHandler() + { + $handler =& xoops_getmodulehandler('image'); + return $handler; + } + + function _setupObject() + { + $this->mObjectHandler =& $this->_getHandler(); + $this->mObject =& $this->mObjectHandler->create(); + $this->mObject->set('imgcat_id', xoops_getrequest('imgcat_id')); + } + + function _setupActionForm() + { + $this->mActionForm =& new Legacy_ImageUploadForm(); + $this->mActionForm->prepare(); + } + + function hasPerm(&$controller, &$xoopsUser) + { + $groups = array(); + if (is_object($xoopsUser)) { + $groups =& $xoopsUser->getGroups(); + } + else { + $groups = array(XOOPS_GROUP_ANONYMOUS); + } + + $handler =& xoops_getmodulehandler('imagecategory'); + $this->mCategory =& $handler->get(xoops_getrequest('imgcat_id')); + if (!is_object($this->mCategory ) || (is_object($this->mCategory) && !$this->mCategory->hasUploadPerm($groups))) { + return false; + } + + return true; + } + + function executeViewInput(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("legacy_image_upload.html"); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('object', $this->mObject); + + $render->setAttribute('category', $this->mCategory); + $render->setAttribute('target', xoops_getrequest('target')); + } + + function executeViewSuccess(&$controller, &$xoopsUser, &$render) + { + $controller->executeForward("./index.php?action=ImageList&imgcat_id=" . $this->mActionForm->get('imgcat_id') . "&target=" . xoops_getrequest('target')); + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + redirect_header("./index.php?action=ImageList", 1, _MD_BASE_ERROR_DBUPDATE_FAILED); + } +} + +?> From minahito @ users.sourceforge.jp Thu May 25 18:29:03 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:29:03 +0900 Subject: [xoops-cvslog 3144] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060525092903.108CF2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_image_upload.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_image_upload.html:1.1.2.1 --- /dev/null Thu May 25 18:29:03 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_upload.html Thu May 25 18:29:02 2006 @@ -0,0 +1,32 @@ +<{if $actionForm->hasError()}> +
      + <{foreach item=message from=$actionForm->getErrorMessages()}> +
    • <{$message|escape}>
    • + <{/foreach}> +
    +<{/if}> + + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> + <{xoops_input type=hidden name=target value=$target}> +
    <{$smarty.const._AD_LEGACYRENDER_LANG_UPLOAD_TEMPLATE_SET_FILE}><{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_UPLOAD_FILE}> "> <{xoops_input type=file name=upload}>
    - +
    + + + + + + + + + + + +
    <{$smarty.const._MD_BASE_LANG_IMAGE_FILE}>"> + <{xoops_input type=file name=image_name}> +
    <{$smarty.const._MD_BASE_LANG_IMAGE_NICENAME}>"> + <{xoops_input type=text name=image_nicename value=$actionForm->get('image_nicename') size=30 maxlength=255}> +
    + + +
    +
    Index: xoops2jp/html/modules/base/templates/legacy_image_list.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.1 --- /dev/null Thu May 25 18:29:03 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_list.html Thu May 25 18:29:02 2006 @@ -0,0 +1,54 @@ + +
    + + +
    + +<{if $hasUploadPerm}> + [ <{$smarty.const._MD_BASE_LANG_IMAGE_UPLOAD}> ] +<{/if}> + + + + + <{foreach item=obj from=$objects}> + + + + + + + <{/foreach}> +
    <{$smarty.const._MD_BASE_LANG_IMAGE_NICENAME}> + <{$smarty.const._MD_BASE_LANG_IMAGE}> + <{$smarty.const._MD_BASE_LANG_IMAGE_MIMETYPE}> + <{$smarty.const._MD_BASE_LANG_IMAGE_POSITION}> +
    <{$obj->getVar('image_nicename')}> + <{if $obj->mImageCategory != null}> + <{if $obj->mImageCategory->get('imgcat_storetype') == 'file'}> + + <{else}> + + <{/if}> + <{/if}> + <{$obj->getVar('image_mimetype')}> + <{if $obj->mImageCategory->get('imgcat_storetype') == 'file'}> + Left + Center + Left + <{else}> + Left + Center + Left + <{/if}> +
    + + + + + From minahito @ users.sourceforge.jp Thu May 25 18:29:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:29:22 +0900 Subject: [xoops-cvslog 3145] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060525092922.5AAA02AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/main.php diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.13 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.14 --- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.13 Tue May 9 19:21:27 2006 +++ xoops2jp/html/modules/base/language/japanese/main.php Thu May 25 18:29:22 2006 @@ -1,99 +1,105 @@ -%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 May 25 18:29:22 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:29:22 +0900 Subject: [xoops-cvslog 3146] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060525092922.7E6602AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/main.php diff -u xoops2jp/html/modules/base/language/english/main.php:1.1.2.12 xoops2jp/html/modules/base/language/english/main.php:1.1.2.13 --- xoops2jp/html/modules/base/language/english/main.php:1.1.2.12 Mon Apr 10 20:40:58 2006 +++ xoops2jp/html/modules/base/language/english/main.php Thu May 25 18:29:22 2006 @@ -1,97 +1,103 @@ ->"); -define('_SR_NOMATCH', "No entries found that match your query."); -define('_SR_PLZENTER', "Please enter all required data!"); -define('_SR_PREVIOUS', "<< Previous"); -define('_SR_SEARCH', "Search"); -define('_SR_SEARCHIN', "Search in"); -define('_SR_SEARCHRESULTS', "Search Results"); -define('_SR_SEARCHRULE', "Seach Rule"); -define('_SR_SHOWALLR', "Show all results"); -define('_SR_SHOWING', "(Showing %d - %d)"); -define('_SR_TYPE', "Type"); - -?> +>"); +define('_SR_NOMATCH', "No entries found that match your query."); +define('_SR_PLZENTER', "Please enter all required data!"); +define('_SR_PREVIOUS', "<< Previous"); +define('_SR_SEARCH', "Search"); +define('_SR_SEARCHIN', "Search in"); +define('_SR_SEARCHRESULTS', "Search Results"); +define('_SR_SEARCHRULE', "Seach Rule"); +define('_SR_SHOWALLR', "Show all results"); +define('_SR_SHOWING', "(Showing %d - %d)"); +define('_SR_TYPE', "Type"); + +?> From minahito @ users.sourceforge.jp Thu May 25 18:29:33 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:29:33 +0900 Subject: [xoops-cvslog 3147] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060525092933.8E24A2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u /dev/null xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.1 --- /dev/null Thu May 25 18:29:33 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Thu May 25 18:29:33 2006 @@ -0,0 +1,16 @@ +executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList"); + } +} + +?> \ No newline at end of file From minahito @ users.sourceforge.jp Thu May 25 18:30:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:30:11 +0900 Subject: [xoops-cvslog 3148] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060525093011.9142E2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/imagecategory_list.html diff -u xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.6 --- xoops2jp/html/modules/base/admin/templates/imagecategory_list.html:1.1.2.5 Wed May 17 00:27:17 2006 +++ xoops2jp/html/modules/base/admin/templates/imagecategory_list.html Thu May 25 18:30:11 2006 @@ -8,7 +8,6 @@ - + + + + <{/if}> +
    <{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>
    From minahito @ users.sourceforge.jp Thu May 25 18:30:34 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:30:34 +0900 Subject: [xoops-cvslog 3149] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060525093034.EAEB32AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.4 Mon May 15 17:34:09 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Thu May 25 18:30:34 2006 @@ -4,13 +4,10 @@ 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/forms/ImageUploadForm.class.php"; -class Legacy_ImageAdminEditForm extends XCube_ActionForm +class Legacy_ImageAdminEditForm extends Legacy_ImageUploadForm { - var $mOldFileName = null; - var $_mIsNew = null; - var $mFormFile = null; - function getTokenName() { return "module.base.ImageAdminEditForm.TOKEN" . $this->get('image_id'); @@ -18,15 +15,14 @@ function prepare() { + parent::prepare(); + // // Set form properties // $this->mFormProperties['image_id'] =& new XCube_IntProperty('image_id'); - $this->mFormProperties['image_name'] =& new XCube_ImageFileProperty('image_name'); - $this->mFormProperties['image_nicename'] =& new XCube_StringProperty('image_nicename'); $this->mFormProperties['image_display'] =& new XCube_BoolProperty('image_display'); $this->mFormProperties['image_weight'] =& new XCube_IntProperty('image_weight'); - $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); // // Set field properties @@ -35,112 +31,29 @@ $this->mFieldProperties['image_id']->setDependsByArray(array('required')); $this->mFieldProperties['image_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_ID); - $this->mFieldProperties['image_name'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_name']->setDependsByArray(array('extension')); - $this->mFieldProperties['image_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME); - $this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_EXTENSION, _AD_BASE_LANG_IMAGE_NAME); - $this->mFieldProperties['image_name']->addVar('extension', 'jpg,gif,png'); - - $this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['image_nicename']->setDependsByArray(array('required')); - $this->mFieldProperties['image_nicename']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NICENAME); - $this->mFieldProperties['image_weight'] =& new XCube_FieldProperty($this); $this->mFieldProperties['image_weight']->setDependsByArray(array('required')); $this->mFieldProperties['image_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_WEIGHT); - - $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); - $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required','objectExist')); - $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); - $this->mFieldProperties['imgcat_id']->addMessage('objectExist', _AD_BASE_ERROR_OBJECTEXIST, _AD_BASE_LANG_IMGCAT_ID); - $this->mFieldProperties['imgcat_id']->addVar('handler', 'imagecategory'); - $this->mFieldProperties['imgcat_id']->addVar('module', 'base'); } - function validateImage_name() + function validateImgcat_id() { - $formFile = $this->get('image_name'); - - if ($formFile == null && $this->_mIsNew ) { - $this->addErrorMessage(_AD_BASE_ERROR_REQUIRED); - } } - function validate() - { - parent::validate(); - - $handler =& xoops_getmodulehandler('imagecategory', 'base'); - $category =& $handler->get($this->get('imgcat_id')); - - $formFile = $this->get('image_name'); - - if ($formFile != null && is_object($category)) { - // - // Imagefile width & height check. - // - if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { - $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); - } - - // - // Check file size - // - if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { - $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); - } - } - } - function load(&$obj) { + parent::load($obj); $this->set('image_id', $obj->get('image_id')); - $this->set('image_nicename', $obj->get('image_nicename')); $this->set('image_display', $obj->get('image_display')); $this->set('image_weight', $obj->get('image_weight')); - $this->set('imgcat_id', $obj->get('imgcat_id')); - - $this->_mIsNew = $obj->isNew(); - $this->mOldFileName = $obj->get('image_name'); } function update(&$obj) { + parent::update($obj); $obj->set('image_id', $this->get('image_id')); - $obj->set('image_nicename', $this->get('image_nicename')); $obj->set('image_display', $this->get('image_display')); $obj->set('image_weight', $this->get('image_weight')); - $obj->set('imgcat_id', $this->get('imgcat_id')); - - $handler =& xoops_getmodulehandler('imagecategory', 'base'); - $category =& $handler->get($this->get('imgcat_id')); - - $this->mFormFile = $this->get('image_name'); - - if ($this->mFormFile != null) { - $this->mFormFile->setRandomToBodyName('img'); - - $filename = $this->mFormFile->getBodyName(); - $this->mFormFile->setBodyName(substr($filename, 0, 24)); - - $obj->set('image_name', $this->mFormFile->getFileName()); - $obj->set('image_mimetype', $this->mFormFile->getContentType()); - - // - // To store db - // - if ($category->get('imgcat_storetype') == 'db') { - $obj->loadImageBody(); - if (!is_object($obj->mImageBody)) { - $obj->mImageBody =& $obj->createImageBody(); - } - - // - // Access to private member property. - // - $obj->mImageBody->set('image_body', file_get_contents($this->mFormFile->_mTmpFileName)); - } - } } } From minahito @ users.sourceforge.jp Thu May 25 18:30:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:30:42 +0900 Subject: [xoops-cvslog 3150] CVS update: xoops2jp/html/modules/base/admin/.xml Message-ID: <20060525093042.E533C2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/.xml/image_edit.xml diff -u xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.2 xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.3 --- xoops2jp/html/modules/base/admin/.xml/image_edit.xml:1.1.2.2 Mon May 15 14:26:01 2006 +++ xoops2jp/html/modules/base/admin/.xml/image_edit.xml Thu May 25 18:30:42 2006 @@ -1,39 +1,18 @@ - + - - - - - - - - - - - - - - - - - - - - - From minahito @ users.sourceforge.jp Thu May 25 18:30:52 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:30:52 +0900 Subject: [xoops-cvslog 3151] CVS update: xoops2jp/html/modules/base/.xml Message-ID: <20060525093052.6E6082AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/image_upload.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/image_upload.xml:1.1.2.1 --- /dev/null Thu May 25 18:30:52 2006 +++ xoops2jp/html/modules/base/.xml/image_upload.xml Thu May 25 18:30:52 2006 @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + From minahito @ users.sourceforge.jp Thu May 25 18:31:09 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:31:09 +0900 Subject: [xoops-cvslog 3152] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060525093109.0BCA52AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/AbstractEditAction.class.php diff -u xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.3 xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.4 --- xoops2jp/html/modules/base/class/AbstractEditAction.class.php:1.1.2.3 Tue May 9 19:31:18 2006 +++ xoops2jp/html/modules/base/class/AbstractEditAction.class.php Thu May 25 18:31:08 2006 @@ -24,7 +24,7 @@ { $id = $this->_getId(); - $this->mObjectHandler = $this->_getHandler(); + $this->mObjectHandler =& $this->_getHandler(); $this->mObject =& $this->mObjectHandler->get($id); From minahito @ users.sourceforge.jp Thu May 25 18:31:35 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:31:35 +0900 Subject: [xoops-cvslog 3153] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060525093135.08DBA2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/imagecategory.php diff -u xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.2 xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.3 --- xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.2 Wed May 10 19:24:17 2006 +++ xoops2jp/html/modules/base/class/imagecategory.php Thu May 25 18:31:34 2006 @@ -84,6 +84,23 @@ return $this->_mReadGroupsLoadedFlag; } + /** + * If $groups has the permission of reading this object, return true. + */ + function hasReadPerm($groups) + { + $this->loadReadGroups(); + foreach (array_keys($this->mReadGroups) as $key) { + foreach ($groups as $group) { + if ($this->mReadGroups[$key]->get('groupid') == $group) { + return true; + } + } + } + + return false; + } + function loadUploadGroups() { if ($this->_mUploadGroupsLoadedFlag) { @@ -111,6 +128,20 @@ { return $this->_mUploadGroupsLoadedFlag; } + + function hasUploadPerm($groups) + { + $this->loadUploadGroups(); + foreach (array_keys($this->mUploadGroups) as $key) { + foreach ($groups as $group) { + if ($this->mUploadGroups[$key]->get('groupid') == $group) { + return true; + } + } + } + + return false; + } } class BaseImagecategoryHandler extends XoopsObjectGenericHandler @@ -169,6 +200,27 @@ return $returnFlag; } + + function &getObjectsWithReadPerm($groups = array(), $display = null) + { + $criteria = new CriteriaCompo(); + if ($display != null) { + $criteria->add(new Criteria('imgcat_display', $display)); + } + $criteria->setSort('imgcat_weight'); + $objs =& $this->getObjects($criteria); + unset($criteria); + + $handler =& xoops_gethandler('groupperm'); + $ret = array(); + foreach (array_keys($objs) as $key) { + if ($objs[$key]->hasReadPerm($groups)) { + $ret[] =& $objs[$key]; + } + } + + return $ret; + } function delete(&$obj, $force = false) { From minahito @ users.sourceforge.jp Thu May 25 18:31:49 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:31:49 +0900 Subject: [xoops-cvslog 3154] CVS update: xoops2jp/html/modules/base/forms Message-ID: <20060525093149.EAD3E2AC0A4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/forms/ImageUploadForm.class.php diff -u /dev/null xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.1 --- /dev/null Thu May 25 18:31:49 2006 +++ xoops2jp/html/modules/base/forms/ImageUploadForm.class.php Thu May 25 18:31:49 2006 @@ -0,0 +1,158 @@ +get('imgcat_id'); + } + + function prepare() + { + // + // Set form properties + // + $this->mFormProperties['image_name'] =& new XCube_ImageFileProperty('image_name'); + $this->mFormProperties['image_nicename'] =& new XCube_StringProperty('image_nicename'); + $this->mFormProperties['imgcat_id'] =& new XCube_IntProperty('imgcat_id'); + + // + // Set field properties + // + $this->mFieldProperties['image_name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_name']->setDependsByArray(array('extension')); + $this->mFieldProperties['image_name']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NAME); + $this->mFieldProperties['image_name']->addMessage('maxlength', _AD_BASE_ERROR_EXTENSION, _AD_BASE_LANG_IMAGE_NAME); + $this->mFieldProperties['image_name']->addVar('extension', 'jpg,gif,png'); + + $this->mFieldProperties['image_nicename'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['image_nicename']->setDependsByArray(array('required')); + $this->mFieldProperties['image_nicename']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_NICENAME); + + $this->mFieldProperties['imgcat_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['imgcat_id']->setDependsByArray(array('required','objectExist')); + $this->mFieldProperties['imgcat_id']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addMessage('objectExist', _AD_BASE_ERROR_OBJECTEXIST, _AD_BASE_LANG_IMGCAT_ID); + $this->mFieldProperties['imgcat_id']->addVar('handler', 'imagecategory'); + $this->mFieldProperties['imgcat_id']->addVar('module', 'base'); + } + + /** + * Check the permission of uploading. + */ + function validateImgcat_id() + { + $imgcat_id = $this->get('imgcat_id'); + if ($imgcat_id != null) { + $root =& XCube_Root::getSingleton(); + $xoopsUser =& $root->mController->getXoopsUser(); + + $groups = array(); + if (is_object($xoopsUser)) { + $groups =& $xoopsUser->getGroups(); + } + else { + $groups = array(XOOPS_GROUP_ANONYMOUS); + } + + $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $imgcat =& $handler->get($imgcat_id); + if (is_object($imgcat) && !$imgcat->hasUploadPerm($groups)) { + $this->addErrorMessage(_MD_BASE_ERROR_PERMISSION); + } + } + } + + function validateImage_name() + { + $formFile = $this->get('image_name'); + + if ($formFile == null && $this->_mIsNew ) { + $this->addErrorMessage(_AD_BASE_ERROR_REQUIRED); + } + } + + function validate() + { + parent::validate(); + + $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $category =& $handler->get($this->get('imgcat_id')); + + $formFile = $this->get('image_name'); + + if ($formFile != null && is_object($category)) { + // + // Imagefile width & height check. + // + if ($formFile->getWidth() > $category->get('imgcat_maxwidth') || $formFile->getHeight() > $category->get('imgcat_maxheight')) { + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_SIZE, $category->get('imgcat_maxwidth'), $category->get('imgcat_maxheight'))); + } + + // + // Check file size + // + if ($formFile->getFilesize() > $category->get('imgcat_maxsize')) { + $this->addErrorMessage(XCube_Utils::formatMessage(_AD_BASE_ERROR_IMG_FILESIZE, $category->get('imgcat_maxsize'))); + } + } + } + + function load(&$obj) + { + $this->set('image_nicename', $obj->get('image_nicename')); + $this->set('imgcat_id', $obj->get('imgcat_id')); + + $this->_mIsNew = $obj->isNew(); + $this->mOldFileName = $obj->get('image_name'); + } + + function update(&$obj) + { + $obj->set('image_nicename', $this->get('image_nicename')); + $obj->set('image_display', true); + $obj->set('imgcat_id', $this->get('imgcat_id')); + + $handler =& xoops_getmodulehandler('imagecategory', 'base'); + $category =& $handler->get($this->get('imgcat_id')); + + $this->mFormFile = $this->get('image_name'); + + if ($this->mFormFile != null) { + $this->mFormFile->setRandomToBodyName('img'); + + $filename = $this->mFormFile->getBodyName(); + $this->mFormFile->setBodyName(substr($filename, 0, 24)); + + $obj->set('image_name', $this->mFormFile->getFileName()); + $obj->set('image_mimetype', $this->mFormFile->getContentType()); + + // + // To store db + // + if ($category->get('imgcat_storetype') == 'db') { + $obj->loadImageBody(); + if (!is_object($obj->mImageBody)) { + $obj->mImageBody =& $obj->createImageBody(); + } + + // + // Access to private member property. + // + $obj->mImageBody->set('image_body', file_get_contents($this->mFormFile->_mTmpFileName)); + } + } + } +} + +?> Index: xoops2jp/html/modules/base/forms/ImageFilterForm.class.php diff -u /dev/null xoops2jp/html/modules/base/forms/ImageFilterForm.class.php:1.1.2.1 --- /dev/null Thu May 25 18:31:49 2006 +++ xoops2jp/html/modules/base/forms/ImageFilterForm.class.php Thu May 25 18:31:49 2006 @@ -0,0 +1,61 @@ + 'image_id', + IMAGE_SORT_KEY_IMAGE_NAME => 'image_name', + IMAGE_SORT_KEY_IMAGE_NICENAME => 'image_nicename', + IMAGE_SORT_KEY_IMAGE_MIMETYPE => 'image_mimetype', + IMAGE_SORT_KEY_IMAGE_CREATED => 'image_created', + IMAGE_SORT_KEY_IMAGE_DISPLAY => 'image_display', + IMAGE_SORT_KEY_IMAGE_WEIGHT => 'image_weight', + IMAGE_SORT_KEY_IMGCAT_ID => 'imgcat_id' + ); + var $_mCriteria = null; + + function fetch() + { + $this->mSort = isset($_REQUEST['sort']) ? intval($_REQUEST['sort']) : IMAGE_SORT_KEY_DEFAULT; + + if ($this->mSort > IMAGE_SORT_KEY_MAXVALUE) { + $this->mSort = IMAGE_SORT_KEY_DEFAULT; + } + + $this->_mNavi->addExtra('target', xoops_getrequest('target')); + + if (isset($_REQUEST['imgcat_id'])) { + $this->_mNavi->addExtra('imgcat_id', xoops_getrequest('imgcat_id')); + $this->_mCriteria->add(new Criteria('imgcat_id', array(XOBJ_DTYPE_INT, xoops_getrequest('imgcat_id')))); + } + else { + $this->_mCriteria->add(new Criteria('imgcat_id', 0)); + } + + $this->_mCriteria->add(new Criteria('image_display', 1)); + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); + if (abs($this->mSort) != IMAGE_SORT_KEY_IMAGE_WEIGHT) { + $this->_mCriteria->addSort(IMAGE_SORT_KEY_IMAGE_WEIGHT, $this->getOrder()); + } + } +} + +?> From minahito @ users.sourceforge.jp Thu May 25 18:32:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:32:05 +0900 Subject: [xoops-cvslog 3155] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060525093205.0348A2AC0A4@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.33 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.34 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.33 Tue May 16 21:59:36 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Thu May 25 18:32:04 2006 @@ -638,6 +638,9 @@ require_once XOOPS_ROOT_PATH."/modules/base/kernel/MiscEventFunctions.class.php"; $manager->setAnchorDelegate("Legacypage.Misc.Access", new XCube_Delegate("Legacy_MiscEventFunction","AccessToMisc")); + + require_once XOOPS_ROOT_PATH . "/modules/base/kernel/Legacy_EventFunctions.class.php"; + $manager->setAnchorDelegate("Legacypage.Imagemanager.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToImageManager")); // // We write the following lines for test here. From minahito @ users.sourceforge.jp Thu May 25 18:32:27 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Thu, 25 May 2006 18:32:27 +0900 Subject: [xoops-cvslog 3156] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060525093227.4F26A2AC0B5@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:1.1.2.4 xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:1.1.2.5 --- xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php:1.1.2.4 Fri Feb 3 11:41:34 2006 +++ xoops2jp/html/modules/base/kernel/MiscEventFunctions.class.php Thu May 25 18:32:27 2006 @@ -1,8 +1,10 @@ Index: xoops2jp/html/install/include/functions.php diff -u xoops2jp/html/install/include/functions.php:1.1.2.1 xoops2jp/html/install/include/functions.php:1.1.2.2 --- xoops2jp/html/install/include/functions.php:1.1.2.1 Tue Mar 7 22:11:39 2006 +++ xoops2jp/html/install/include/functions.php Thu May 25 21:27:23 2006 @@ -111,7 +111,7 @@ } function check_language($language){ - if ( file_exists('../modules/system/language/'.$language.'/modinfo.php') ) { + if ( file_exists('./language/'.$language.'/install.php') ) { return $language; } else { return 'english'; From tom_g3x @ users.sourceforge.jp Thu May 25 23:41:28 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Thu, 25 May 2006 23:41:28 +0900 Subject: [xoops-cvslog 3158] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060525144128.614202AC0C4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_image_list.html diff -u xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.2 --- xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.1 Thu May 25 18:29:02 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_list.html Thu May 25 23:41:28 2006 @@ -8,7 +8,7 @@ <{if $hasUploadPerm}> - [ <{$smarty.const._MD_BASE_LANG_IMAGE_UPLOAD}> ] + [ <{$smarty.const._MD_BASE_LANG_IMAGE_UPLOAD}> ] <{/if}> From onokazu @ users.sourceforge.jp Fri May 26 12:31:54 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Fri, 26 May 2006 12:31:54 +0900 Subject: [xoops-cvslog 3159] CVS update: xoops2jp/html/class Message-ID: <20060526033154.DA7E92AC011@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.5 xoops2jp/html/class/criteria.php:1.5.8.1 --- xoops2jp/html/class/criteria.php:1.5 Wed Aug 3 21:39:11 2005 +++ xoops2jp/html/class/criteria.php Fri May 26 12:31:54 2006 @@ -1,5 +1,5 @@ value; if (!in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - $value = "'".$value."'"; - } + $value = "'".$value."'"; } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; if ( !empty($this->function) ) { From minahito @ users.sourceforge.jp Fri May 26 13:22:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 13:22:46 +0900 Subject: [xoops-cvslog 3160] CVS update: xoops2jp/html/modules/base Message-ID: <20060526042246.758642AC011@users.sourceforge.jp> Index: xoops2jp/html/modules/base/xoops_version.php diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.21 xoops2jp/html/modules/base/xoops_version.php:1.1.2.22 --- xoops2jp/html/modules/base/xoops_version.php:1.1.2.21 Thu May 25 18:28:29 2006 +++ xoops2jp/html/modules/base/xoops_version.php Fri May 26 13:22:46 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/base/actions/BackendAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.1 --- /dev/null Fri May 26 13:22:54 2006 +++ xoops2jp/html/modules/base/actions/BackendAction.class.php Fri May 26 13:22:54 2006 @@ -0,0 +1,109 @@ +_getRSSInformation(); + + $sortArr = array(); + foreach ($items as $item) { + $i = intval($item['pubdate']); + for (; isset($sortArr[$i]) ; $i++); + + $sortArr[$i] = $item; + } + + $this->mItems = krsort($sortArr); + + return LEGACY_FRAME_VIEW_INDEX; + } + + /** + * The spec of getRSS(): + * append your RSS item to $eventArgs array. You don't need to sanitize your values. Use raw value. + * + * $item['title'] + * $item['link'] ... permanent link + * $item['guid'] ... permanent link + * $item['pubdate'] ... unixtime + * $item['description'] ... not required. + */ + function _getRSSInformation() + { + $root =& XCube_Root::getSingleton(); + $eventArgs = array(); + $root->mEventManager->raiseEvent("Module.Legacy.Backend.getRSS", $this, $eventArgs); + + return $eventArgs; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + global $xoopsConfig; + + // + // Set up the render buffer. + // + $renderTarget =& new XCube_RenderTarget(); + $renderTarget->setType(XCUBE_RENDER_TARGET_TYPE_MAIN); + + $renderTarget->setTemplateName("legacy_rss.html"); + + $renderTarget->setAttribute('channel_title', $xoopsConfig['sitename']); + $renderTarget->setAttribute('channel_link', XOOPS_URL . '/'); + $renderTarget->setAttribute('channel_desc', $xoopsConfig['slogan']); + $renderTarget->setAttribute('channel_lastbuild', formatTimestamp(time(), 'rss')); + $renderTarget->setAttribute('channel_webmaster', $xoopsConfig['adminmail']); + $renderTarget->setAttribute('channel_editor', $xoopsConfig['adminmail']); + $renderTarget->setAttribute('channel_category', 'News'); + $renderTarget->setAttribute('channel_generator', 'XOOPS Cube'); + $renderTarget->setAttribute('image_url', XOOPS_URL . '/images/logo.gif'); + + $dimention = getimagesize(XOOPS_ROOT_PATH . '/images/logo.gif'); + + $width = 0; + if (empty($dimention[0])) { + $width = 88; + } + else { + $width = ($dimention[0] > 144) ? 144 : $dimention[0]; + } + + $height = 0; + if (empty($dimention[1])) { + $height = 31; + } else { + $height = ($dimention[1] > 400) ? 400 : $dimention[1]; + } + + $renderTarget->setAttribute('image_width', $width); + $renderTarget->setAttribute('image_height', $height); + + $renderTarget->setAttribute('items', $this->mItems); + + // + // Rendering + // + $controller->mRenderSystem->renderWithTarget($renderTarget); + + // $count = $sarray; + // foreach ($sarray as $story) { + // $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($story->hometext(), ENT_QUOTES)))); + // } + + if (function_exists('mb_http_output')) { + mb_http_output('pass'); + } + header ('Content-Type:text/xml; charset=utf-8'); + + + print xoops_utf8_encode($renderTarget->getResult()); + + exit(0); + } +} From minahito @ users.sourceforge.jp Fri May 26 13:23:06 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 13:23:06 +0900 Subject: [xoops-cvslog 3162] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060526042306.628F52AC011@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_rss.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_rss.html:1.1.2.1 --- /dev/null Fri May 26 13:23:06 2006 +++ xoops2jp/html/modules/base/templates/legacy_rss.html Fri May 26 13:23:06 2006 @@ -0,0 +1,35 @@ + + + + <{$channel_title|escape}> + <{$channel_link|escape}> + <{$channel_desc|escape}> + <{$channel_lastbuild|escape}> + http://backend.userland.com/rss/ + <{$channel_generator|escape}> + <{$channel_category|escape}> + <{$channel_editor|escape}> + <{$channel_webmaster|escape}> + <{$channel_language|escape}> + <{if $image_url != ""}> + + <{$channel_title|escape}> + <{$image_url|escape}> + <{$channel_link|escape}> + <{$image_width|escape}> + <{$image_height|escape}> + + <{/if}> + <{foreach item=item from=$items}> + + <{$item.title|escape}> + <{$item.link|escape}> + <{if $item.description}> + <{$item.description|escape}> + <{/if}> + <{$item.pubdate|xoops_formattimestamp:rss}> + <{$item.guid|escape}> + + <{/foreach}> + + From minahito @ users.sourceforge.jp Fri May 26 13:23:28 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 13:23:28 +0900 Subject: [xoops-cvslog 3163] CVS update: xoops2jp/html Message-ID: <20060526042328.B40F22AC011@users.sourceforge.jp> Index: xoops2jp/html/backend.php diff -u xoops2jp/html/backend.php:1.2 xoops2jp/html/backend.php:1.2.8.1 --- xoops2jp/html/backend.php:1.2 Fri Mar 18 21:51:55 2005 +++ xoops2jp/html/backend.php Fri May 26 13:23:28 2006 @@ -1,71 +1,18 @@ // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------ // +/** + * This file was full scratched in XOOPS Cube Legacy project. + * + * @version $Id: backend.php,v 1.2.8.1 2006/05/26 04:23:28 minahito Exp $ + */ + +require_once "mainfile.php"; + +// +// This is old page controller in Xoops 2.0.x +// Raise event "Legacypage.Backend.Access" +// +$root=&XCube_Root::getSingleton(); +$eventArgs = array(); +$root->mEventManager->raiseEvent("Legacypage.Backend.Access", $root->mController, $eventArgs); -include 'mainfile.php'; -include_once XOOPS_ROOT_PATH.'/class/template.php'; -include_once XOOPS_ROOT_PATH.'/modules/news/class/class.newsstory.php'; -if (function_exists('mb_http_output')) { - mb_http_output('pass'); -} -header ('Content-Type:text/xml; charset=utf-8'); -$tpl = new XoopsTpl(); -$tpl->xoops_setCaching(2); -$tpl->xoops_setCacheTime(3600); -if (!$tpl->is_cached('db:system_rss.html')) { - $sarray = NewsStory::getAllPublished(10, 0); - if (is_array($sarray)) { - $tpl->assign('channel_title', xoops_utf8_encode(htmlspecialchars($xoopsConfig['sitename'], ENT_QUOTES))); - $tpl->assign('channel_link', XOOPS_URL.'/'); - $tpl->assign('channel_desc', xoops_utf8_encode(htmlspecialchars($xoopsConfig['slogan'], ENT_QUOTES))); - $tpl->assign('channel_lastbuild', formatTimestamp(time(), 'rss')); - $tpl->assign('channel_webmaster', $xoopsConfig['adminmail']); - $tpl->assign('channel_editor', $xoopsConfig['adminmail']); - $tpl->assign('channel_category', 'News'); - $tpl->assign('channel_generator', 'XOOPS'); - $tpl->assign('channel_language', _LANGCODE); - $tpl->assign('image_url', XOOPS_URL.'/images/logo.gif'); - $dimention = getimagesize(XOOPS_ROOT_PATH.'/images/logo.gif'); - if (empty($dimention[0])) { - $width = 88; - } else { - $width = ($dimention[0] > 144) ? 144 : $dimention[0]; - } - if (empty($dimention[1])) { - $height = 31; - } else { - $height = ($dimention[1] > 400) ? 400 : $dimention[1]; - } - $tpl->assign('image_width', $width); - $tpl->assign('image_height', $height); - $count = $sarray; - foreach ($sarray as $story) { - $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($story->hometext(), ENT_QUOTES)))); - } - } -} -$tpl->display('db:system_rss.html'); ?> \ No newline at end of file From minahito @ users.sourceforge.jp Fri May 26 18:01:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:01:46 +0900 Subject: [xoops-cvslog 3164] CVS update: xoops2jp/html/modules/user/admin/actions Message-ID: <20060526090146.F04AF2AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php diff -u xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.4 xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.5 --- xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php:1.1.2.4 Tue Mar 28 22:31:14 2006 +++ xoops2jp/html/modules/user/admin/actions/GroupPermAction.class.php Fri May 26 18:01:46 2006 @@ -57,34 +57,22 @@ $moduleHandler =& xoops_gethandler('module'); $modPerms = array(); + // + // Store module read permission + // foreach ($this->mActionForm->get('module') as $mid => $value) { $module =& $moduleHandler->get($mid); - if (is_object($module)) { - $item =& new User_PermissionModuleItem($module); - $modPerms[$mid] =& new User_Permission($this->mGroup->getVar('groupid'), $item); - - if (isset($_POST['module_admin']) && isset($_POST['module_admin'][$mid])) { - $value |= $_POST['module_admin'][$mid]; - } - - $modPerms[$mid]->setValue($value); - - $modPerms[$mid]->save(); + if (is_object($module) && $value) { + $gpermHandler->addRight('module_read', $mid, $this->mGroup->getVar('groupid')); } } foreach ($this->mActionForm->get('module_admin') as $mid => $value) { $module =& $moduleHandler->get($mid); - if (is_object($module)) { - if (!isset($modPerms[$mid])) { - $item =& new User_PermissionModuleItem($module); - $modPerms[$mid] =& new User_Permission($this->mGroup->getVar('groupid'), $item); - $modPerms[$mid]->setValue($value); - - $modPerms[$mid]->save(); - } + if (is_object($module) && $value) { + $gpermHandler->addRight('module_admin', $mid, $this->mGroup->getVar('groupid')); } } @@ -93,13 +81,8 @@ foreach ($this->mActionForm->get('block') as $bid => $value) { $block =& $blockHandler->get($bid); - if (is_object($block)) { - $item =& new User_PermissionBlockItem($block); - $perm =& new User_Permission($this->mGroup->getVar('groupid'), $item); - $perm->setValue($value); - $perm->save(); - - unset($perm); + if (is_object($block) && $value) { + $gpermHandler->addRight('block_read', $bid, $this->mGroup->getVar('groupid')); } } From minahito @ users.sourceforge.jp Fri May 26 18:02:46 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:02:46 +0900 Subject: [xoops-cvslog 3165] CVS update: xoops2jp/html/modules/base/admin/blocks Message-ID: <20060526090246.3F8692AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php diff -u xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.8 xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.9 --- xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php:1.1.2.8 Fri May 12 19:13:54 2006 +++ xoops2jp/html/modules/base/admin/blocks/AdminSideMenu.class.php Fri May 26 18:02:46 2006 @@ -55,7 +55,7 @@ // // TODO : We don't use handler and write sql directly. // - $sql = "SELECT {mod}.* FROM {mod},{perm} ". + $sql = "SELECT DISTINCT {mod}.mid FROM {mod},{perm} ". "WHERE {mod}.isactive=1 AND {mod}.mid={perm}.gperm_itemid AND {perm}.gperm_name='module_admin' AND {perm}.gperm_groupid IN ({groups}) ". "ORDER BY {mod}.weight, {mod}.mid"; @@ -66,9 +66,11 @@ $sql=XCube_Utils::formatMessageByMap($sql,$replaceMap); $result=$db->query($sql); + + $handler =& xoops_gethandler('module'); + while($row=$db->fetchArray($result)) { - $module = new XoopsModule(); - $module->assignVars($row); + $module =& $handler->get($row['mid']); $dmy=&$module->getInfo(); // From minahito @ users.sourceforge.jp Fri May 26 18:15:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:15:50 +0900 Subject: [xoops-cvslog 3166] CVS update: xoops2jp/html/class Message-ID: <20060526091550.782302AC044@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.8.6 xoops2jp/html/class/criteria.php:1.2.8.7 --- xoops2jp/html/class/criteria.php:1.2.8.6 Tue Apr 11 15:12:15 2006 +++ xoops2jp/html/class/criteria.php Fri May 26 18:15:50 2006 @@ -1,5 +1,5 @@ value; if (!in_array(strtoupper($this->operator), array('IN', 'NOT IN'))) { - if ( (substr($value, 0, 1) != '`') && (substr($value, -1) != '`') ) { - $value = "'".$value."'"; - } + $value = "'".$value."'"; } $clause = (!empty($this->prefix) ? "{$this->prefix}." : "") . $this->column; if ( !empty($this->function) ) { From minahito @ users.sourceforge.jp Fri May 26 18:19:57 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:19:57 +0900 Subject: [xoops-cvslog 3167] CVS update: xoops2jp/html/class Message-ID: <20060526091957.AE0442AC011@users.sourceforge.jp> Index: xoops2jp/html/class/criteria.php diff -u xoops2jp/html/class/criteria.php:1.2.8.7 xoops2jp/html/class/criteria.php:1.2.8.8 --- xoops2jp/html/class/criteria.php:1.2.8.7 Fri May 26 18:15:50 2006 +++ xoops2jp/html/class/criteria.php Fri May 26 18:19:57 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/base/actions/BackendAction.class.php diff -u xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.1 Fri May 26 13:22:54 2006 +++ xoops2jp/html/modules/base/actions/BackendAction.class.php Fri May 26 18:34:43 2006 @@ -44,7 +44,7 @@ function executeViewIndex(&$controller, &$xoopsUser, &$render) { - global $xoopsConfig; + $xoopsConfig = $controller->getConfig(); // // Set up the render buffer. From minahito @ users.sourceforge.jp Fri May 26 18:38:56 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:38:56 +0900 Subject: [xoops-cvslog 3169] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060526093856.8A4182AC011@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.1 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.2 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.1 Thu May 25 18:29:33 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Fri May 26 18:38:56 2006 @@ -1,6 +1,6 @@ executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList"); } + + function AccessToBackend(&$controller,$eventArgs) + { + $controller->executeForward(XOOPS_MODULE_URL . "/base/index.php?action=Backend"); + } } ?> \ No newline at end of file From minahito @ users.sourceforge.jp Fri May 26 18:53:15 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 18:53:15 +0900 Subject: [xoops-cvslog 3170] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060526095315.0799A2AC04A@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.34 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.35 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.34 Thu May 25 18:32:04 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Fri May 26 18:53:14 2006 @@ -641,6 +641,7 @@ require_once XOOPS_ROOT_PATH . "/modules/base/kernel/Legacy_EventFunctions.class.php"; $manager->setAnchorDelegate("Legacypage.Imagemanager.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToImageManager")); + $manager->setAnchorDelegate("Legacypage.Backend.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToBackend")); // // We write the following lines for test here. From minahito @ users.sourceforge.jp Fri May 26 21:01:05 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 21:01:05 +0900 Subject: [xoops-cvslog 3171] CVS update: xoops2jp/html/modules/base/.xml Message-ID: <20060526120105.562802AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/search.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/search.xml:1.1.2.1 --- /dev/null Fri May 26 21:01:05 2006 +++ xoops2jp/html/modules/base/.xml/search.xml Fri May 26 21:01:05 2006 @@ -0,0 +1,8 @@ + + + + + + + + From minahito @ users.sourceforge.jp Fri May 26 21:08:15 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 21:08:15 +0900 Subject: [xoops-cvslog 3172] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060526120815.657642AC0AC@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.2 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.3 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.2 Fri May 26 18:38:56 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Fri May 26 21:08:15 2006 @@ -1,6 +1,6 @@ executeForward(XOOPS_MODULE_URL . "/base/index.php?action=Backend"); + require_once XOOPS_MODULE_PATH . "/base/class/ActionFrame.class.php"; + + $moduleRunner =& new Legacy_ActionFrame(false); + $moduleRunner->setActionName('Backend'); + + $controller->setActionStrategy($moduleRunner); + + $controller->executeAction(); + + $controller->executeView(); } } From minahito @ users.sourceforge.jp Fri May 26 21:08:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Fri, 26 May 2006 21:08:32 +0900 Subject: [xoops-cvslog 3173] CVS update: xoops2jp/html Message-ID: <20060526120832.135DC2AC053@users.sourceforge.jp> Index: xoops2jp/html/backend.php diff -u xoops2jp/html/backend.php:1.2.8.1 xoops2jp/html/backend.php:1.2.8.2 --- xoops2jp/html/backend.php:1.2.8.1 Fri May 26 13:23:28 2006 +++ xoops2jp/html/backend.php Fri May 26 21:08:31 2006 @@ -2,10 +2,11 @@ /** * This file was full scratched in XOOPS Cube Legacy project. * - * @version $Id: backend.php,v 1.2.8.1 2006/05/26 04:23:28 minahito Exp $ + * @version $Id: backend.php,v 1.2.8.2 2006/05/26 12:08:31 minahito Exp $ */ require_once "mainfile.php"; +require_once XOOPS_ROOT_PATH . "/header.php"; // // This is old page controller in Xoops 2.0.x From nobunobu @ users.sourceforge.jp Sat May 27 00:48:03 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 00:48:03 +0900 Subject: [xoops-cvslog 3174] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060526154803.E8E902AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/BackendAction.class.php diff -u xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.2 Fri May 26 18:34:43 2006 +++ xoops2jp/html/modules/base/actions/BackendAction.class.php Sat May 27 00:48:03 2006 @@ -9,7 +9,7 @@ function getDefaultView(&$controll, &$xoopsUser) { $items= $this->_getRSSInformation(); - + $sortArr = array(); foreach ($items as $item) { $i = intval($item['pubdate']); @@ -17,9 +17,8 @@ $sortArr[$i] = $item; } - - $this->mItems = krsort($sortArr); - + krsort($sortArr); + $this->mItems = $sortArr; return LEGACY_FRAME_VIEW_INDEX; } @@ -83,7 +82,6 @@ $renderTarget->setAttribute('image_width', $width); $renderTarget->setAttribute('image_height', $height); - $renderTarget->setAttribute('items', $this->mItems); // From tom_g3x @ users.sourceforge.jp Sat May 27 01:11:45 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Sat, 27 May 2006 01:11:45 +0900 Subject: [xoops-cvslog 3175] CVS update: xoops2jp/html/modules/legacyRender/language/english Message-ID: <20060526161145.AD9B92AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/english/admin.php diff -u xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.19 xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.20 --- xoops2jp/html/modules/legacyRender/language/english/admin.php:1.1.2.19 Thu May 25 14:21:10 2006 +++ xoops2jp/html/modules/legacyRender/language/english/admin.php Sat May 27 01:11:45 2006 @@ -98,9 +98,11 @@ define('_AD_LEGACYRENDER_LANG_TPL_TYPE', "Type"); define('_AD_LEGACYRENDER_LANG_TPLFILE_DELETE', "Tplfile delete"); define('_AD_LEGACYRENDER_LANG_TPLFILE_LIST', "Tplfile list"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_UPLOAD', "Upload"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREATED', "Created"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREDITS', "Credits"); define('_AD_LEGACYRENDER_LANG_TPLSET_DESC', "Description"); +define('_AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD', "Download"); define('_AD_LEGACYRENDER_LANG_TPLSET_ID', "ID"); define('_AD_LEGACYRENDER_LANG_TPLSET_NAME', "Name"); define('_AD_LEGACYRENDER_LANG_TPLSET_UPLOAD', "Tplset upload"); From tom_g3x @ users.sourceforge.jp Sat May 27 01:11:45 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Sat, 27 May 2006 01:11:45 +0900 Subject: [xoops-cvslog 3176] CVS update: xoops2jp/html/modules/legacyRender/language/japanese Message-ID: <20060526161145.DD50A2AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/language/japanese/admin.php diff -u xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.20 xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.21 --- xoops2jp/html/modules/legacyRender/language/japanese/admin.php:1.1.2.20 Thu May 25 14:21:10 2006 +++ xoops2jp/html/modules/legacyRender/language/japanese/admin.php Sat May 27 01:11:45 2006 @@ -97,9 +97,11 @@ define('_AD_LEGACYRENDER_LANG_TPL_TYPE', "タイプ"); define('_AD_LEGACYRENDER_LANG_TPLFILE_DELETE', "Tplfile delete"); define('_AD_LEGACYRENDER_LANG_TPLFILE_LIST', "Tplfile list"); +define('_AD_LEGACYRENDER_LANG_TPLFILE_UPLOAD', "アップロード"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREATED', "作成日"); define('_AD_LEGACYRENDER_LANG_TPLSET_CREDITS', "クレジット"); define('_AD_LEGACYRENDER_LANG_TPLSET_DESC', "概要"); +define('_AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD', "ダウンロード"); define('_AD_LEGACYRENDER_LANG_TPLSET_ID', "ID"); define('_AD_LEGACYRENDER_LANG_TPLSET_NAME', "名前"); define('_AD_LEGACYRENDER_LANG_TPLSET_UPLOAD', "テンプレートセットのアップロード"); From tom_g3x @ users.sourceforge.jp Sat May 27 01:12:32 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Sat, 27 May 2006 01:12:32 +0900 Subject: [xoops-cvslog 3177] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060526161232.ABDDA2AC04A@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.9 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.10 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.9 Wed May 17 20:16:05 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html Sat May 27 01:12:32 2006 @@ -87,7 +87,8 @@ - + <{if $targetTplset != null && $targetTplset != 'default'}> <{foreach item=obj from=$objects}> <{if $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> @@ -132,27 +133,34 @@ <{else}> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> - [Download ] + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> <{/if}> <{/foreach}> -
    <{$smarty.const._AD_LEGACYRENDER_LANG_TPL_TYPE}>
    " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
    <{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}><{else}><{/if}> + <{$smarty.const._AD_LEGACYRENDER_LANG_CONTROL}>
    <{if $targetTplset == 'default'}> " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> - [Download ] + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> <{elseif $obj->mOverride != null}> " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> " alt="<{$smarty.const._DELETE}>" title="<{$smarty.const._DELETE}>" /> - [Download ] - <{xoops_input type=file name=upload key=$obj->mOverride->getVar('tpl_id')}> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + + <{xoops_input type=file name=upload key=$obj->mOverride->getVar('tpl_id')}> +
    - <{if $targetTplset != null && $targetTplset != 'default'}> - <{xoops_input type=hidden name=tpl_tplset value=$targetTplset}> - <{xoops_input type=hidden name=tpl_module value=$targetModule}> - - <{/if}> + <{if $targetTplset != null && $targetTplset != 'default'}> +
    + <{xoops_input type=hidden name=tpl_tplset value=$targetTplset}> + <{xoops_input type=hidden name=tpl_module value=$targetModule}> + +
    Index: xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.13 xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.14 --- xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html:1.1.2.13 Thu May 25 14:19:37 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplset_list.html Sat May 27 01:12:32 2006 @@ -20,7 +20,7 @@
    <{$smarty.const._AD_LEGACYRENDER_TIPS_TEMPLATE_MANAGE_2}>
    <{/if}> -
    + @@ -82,7 +82,7 @@ <{/if}> - " alt="*Download*" title="*Download*" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> " alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" />
    <{if $obj->getVar('tplset_name') != "default"}> From onokazu @ users.sourceforge.jp Sat May 27 12:11:44 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Sat, 27 May 2006 12:11:44 +0900 Subject: [xoops-cvslog 3178] CVS update: xoops2jp/html/install/class Message-ID: <20060527031144.8D4EC2AC036@users.sourceforge.jp> Index: xoops2jp/html/install/class/textsanitizer.php diff -u xoops2jp/html/install/class/textsanitizer.php:1.2 xoops2jp/html/install/class/textsanitizer.php:1.2.18.1 --- xoops2jp/html/install/class/textsanitizer.php:1.2 Fri Mar 18 21:52:14 2005 +++ xoops2jp/html/install/class/textsanitizer.php Sat May 27 12:11:44 2006 @@ -1,5 +1,5 @@ should not be allowed since nl2br will be used - * when storing data - */ - function TextSanitizer() - { - - } - - function &getInstance() - { - static $instance; - if (!isset($instance)) { - $instance = new TextSanitizer(); - } - return $instance; - } - - function &makeClickable(&$text) - { - $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i"); - $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3"); - return preg_replace($patterns, $replacements, $text); - } - - function &nl2Br($text) - { - return preg_replace("/(\015\012)|(\015)|(\012)/","
    ",$text); - } - - function &addSlashes($text, $force=false) - { - if ($force) { - return addslashes($text); - } - if (!get_magic_quotes_gpc()) { - $text =& addslashes($text); - } - return $text; - } - - /* - * if magic_quotes_gpc is on, stirip back slashes - */ - function &stripSlashesGPC($text) - { - if (get_magic_quotes_gpc()) { - $text =& stripslashes($text); - } - return $text; - } - - /* - * for displaying data in html textbox forms - */ - function &htmlSpecialChars($text) - { - return preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); - } - - function &undoHtmlSpecialChars(&$text) - { - return preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); - } - - /* - * Filters textarea form data in DB for display - */ - function &displayText($text, $html=false) - { - if (! $html) { - // html not allowed - $text =& $this->htmlSpecialChars($text); - } - $text =& $this->makeClickable($text); - $text =& $this->nl2Br($text); - return $text; - } - - /* - * Filters textarea form data submitted for preview - */ - function &previewText($text, $html=false) - { - $text =& $this->stripSlashesGPC($text); - return $this->displayText($text, $html); - } + /* + * Constructor of this class + * Gets allowed html tags from admin config settings + *
    should not be allowed since nl2br will be used + * when storing data + */ + function TextSanitizer() + { + + } + + function &getInstance() + { + static $instance; + if (!isset($instance)) { + $instance = new TextSanitizer(); + } + return $instance; + } + + function &makeClickable(&$text) + { + $patterns = array("/([^]_a-z0-9-=\"'\/])([a-z]+?):\/\/([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([^, \r\n\"\(\)'<>]+)/i", "/([^]_a-z0-9-=\"'\/])([a-z0-9\-_.]+?)@([^, \r\n\"\(\)'<>]+)/i"); + $replacements = array("\\1\\2://\\3", "\\1www.\\2.\\3", "\\1\\2@\\3"); + $ret = preg_replace($patterns, $replacements, $text); + return $ret; + } + + function &nl2Br($text) + { + $ret = preg_replace("/(\015\012)|(\015)|(\012)/","
    ",$text); + return $ret; + } + + function &addSlashes($text, $force=false) + { + if ($force) { + $ret = addslashes($text); + return $ret; + } + if (!get_magic_quotes_gpc()) { + $text = addslashes($text); + } + return $text; + } + + /* + * if magic_quotes_gpc is on, stirip back slashes + */ + function &stripSlashesGPC($text) + { + if (get_magic_quotes_gpc()) { + $text = stripslashes($text); + } + return $text; + } + + /* + * for displaying data in html textbox forms + */ + function &htmlSpecialChars($text) + { + $ret = preg_replace("/&/i", '&', htmlspecialchars($text, ENT_QUOTES)); + return $ret; + } + + function &undoHtmlSpecialChars(&$text) + { + $ret = preg_replace(array("/>/i", "/</i", "/"/i", "/'/i"), array(">", "<", "\"", "'"), $text); + return $ret; + } + + /* + * Filters textarea form data in DB for display + */ + function &displayText($text, $html=false) + { + if (! $html) { + // html not allowed + $text =& $this->htmlSpecialChars($text); + } + $text =& $this->makeClickable($text); + $text =& $this->nl2Br($text); + return $text; + } + + /* + * Filters textarea form data submitted for preview + */ + function &previewText($text, $html=false) + { + $text =& $this->stripSlashesGPC($text); + $ret = $this->displayText($text, $html); + return $ret; + } ##################### Deprecated Methods ###################### - function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) - { - $text = $this->oopsStripSlashesGPC($text); - if ( $allowhtml == 0 ) { - $text = $this->htmlSpecialChars($text); - } else { - //$config =& $GLOBALS['xoopsConfig']; - //$allowed = $config['allowed_html']; - //$text = strip_tags($text, $allowed); - $text = $this->makeClickable($text); - } - if ( $smiley == 1 ) { - $text = $this->smiley($text); - } - if ( $bbcode == 1 ) { - $text = $this->xoopsCodeDecode($text); - } - $text = $this->nl2Br($text); - return $text; - } - - function makeTboxData4Save($text) - { - //$text = $this->undoHtmlSpecialChars($text); - return $this->addSlashes($text); - } - - function makeTboxData4Show($text, $smiley=0) - { - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4Edit($text) - { - return $this->htmlSpecialChars($text); - } - - function makeTboxData4Preview($text, $smiley=0) - { - $text = $this->stripSlashesGPC($text); - $text = $this->htmlSpecialChars($text); - return $text; - } - - function makeTboxData4PreviewInForm($text) - { - $text = $this->stripSlashesGPC($text); - return $this->htmlSpecialChars($text); - } - - function makeTareaData4Save($text) - { - return $this->addSlashes($text); - } - - function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->displayTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4Edit($text) - { - return htmlSpecialChars($text, ENT_QUOTES); - } - - function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) - { - return $this->previewTarea($text, $html, $smiley, $xcode); - } - - function makeTareaData4PreviewInForm($text) - { - //if magic_quotes_gpc is on, do stipslashes - $text = $this->stripSlashesGPC($text); - return htmlSpecialChars($text, ENT_QUOTES); - } - - function makeTareaData4InsideQuotes($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsStripSlashesGPC($text) - { - return $this->stripSlashesGPC($text); - } - - function &oopsStripSlashesRT($text) - { - if (get_magic_quotes_runtime()) { - $text =& stripslashes($text); - } - return $text; - } - - function &oopsAddSlashes($text) - { - return $this->addSlashes($text); - } - - function &oopsHtmlSpecialChars($text) - { - return $this->htmlSpecialChars($text); - } - - function &oopsNl2Br($text) - { - return $this->nl2br($text); - } + function sanitizeForDisplay($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function sanitizeForPreview($text, $allowhtml = 0, $smiley = 1, $bbcode = 1) + { + $text = $this->oopsStripSlashesGPC($text); + if ( $allowhtml == 0 ) { + $text = $this->htmlSpecialChars($text); + } else { + //$config =& $GLOBALS['xoopsConfig']; + //$allowed = $config['allowed_html']; + //$text = strip_tags($text, $allowed); + $text = $this->makeClickable($text); + } + if ( $smiley == 1 ) { + $text = $this->smiley($text); + } + if ( $bbcode == 1 ) { + $text = $this->xoopsCodeDecode($text); + } + $text = $this->nl2Br($text); + return $text; + } + + function makeTboxData4Save($text) + { + //$text = $this->undoHtmlSpecialChars($text); + return $this->addSlashes($text); + } + + function makeTboxData4Show($text, $smiley=0) + { + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4Edit($text) + { + return $this->htmlSpecialChars($text); + } + + function makeTboxData4Preview($text, $smiley=0) + { + $text = $this->stripSlashesGPC($text); + $text = $this->htmlSpecialChars($text); + return $text; + } + + function makeTboxData4PreviewInForm($text) + { + $text = $this->stripSlashesGPC($text); + return $this->htmlSpecialChars($text); + } + + function makeTareaData4Save($text) + { + return $this->addSlashes($text); + } + + function &makeTareaData4Show(&$text, $html=1, $smiley=1, $xcode=1) + { + $ret = $this->displayTarea($text, $html, $smiley, $xcode); + return $ret; + } + + function makeTareaData4Edit($text) + { + return htmlSpecialChars($text, ENT_QUOTES); + } + + function &makeTareaData4Preview(&$text, $html=1, $smiley=1, $xcode=1) + { + $ret = $this->previewTarea($text, $html, $smiley, $xcode); + return $ret; + } + + function makeTareaData4PreviewInForm($text) + { + //if magic_quotes_gpc is on, do stipslashes + $text = $this->stripSlashesGPC($text); + return htmlSpecialChars($text, ENT_QUOTES); + } + + function makeTareaData4InsideQuotes($text) + { + return $this->htmlSpecialChars($text); + } + + function &oopsStripSlashesGPC($text) + { + $ret = $this->stripSlashesGPC($text); + return $ret; + } + + function &oopsStripSlashesRT($text) + { + if (get_magic_quotes_runtime()) { + $text = stripslashes($text); + } + return $text; + } + + function &oopsAddSlashes($text) + { + $ret = $this->addSlashes($text); + return $ret; + } + + function &oopsHtmlSpecialChars($text) + { + $ret = $this->htmlSpecialChars($text); + return $ret; + } + + function &oopsNl2Br($text) + { + $ret = $this->nl2br($text); + return $ret; + } } ?> \ No newline at end of file From onokazu @ users.sourceforge.jp Sat May 27 12:11:44 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Sat, 27 May 2006 12:11:44 +0900 Subject: [xoops-cvslog 3179] CVS update: xoops2jp/html/install/language/japanese Message-ID: <20060527031144.B18822AC073@users.sourceforge.jp> Index: xoops2jp/html/install/language/japanese/finish.php diff -u xoops2jp/html/install/language/japanese/finish.php:1.2 xoops2jp/html/install/language/japanese/finish.php:1.2.2.1 --- xoops2jp/html/install/language/japanese/finish.php:1.2 Mon May 1 11:37:27 2006 +++ xoops2jp/html/install/language/japanese/finish.php Sat May 27 12:11:44 2006 @@ -5,7 +5,7 @@ XOOPSの使い方について

    [未記述]

    サポート -

    XOOPSCube.orgXOOPS Cube公式サイト(英語)か、XOOPS Cube日本語公式サイトへとご訪問ください。 +

    XOOPSCube.org(英語)か、XOOPSCube.jp(日本語公式サイト)へとご訪問ください。

    "; ?> \ No newline at end of file From onokazu @ users.sourceforge.jp Sat May 27 12:17:54 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Sat, 27 May 2006 12:17:54 +0900 Subject: [xoops-cvslog 3180] CVS update: xoops2jp/html/class Message-ID: <20060527031754.6BDF82AC036@users.sourceforge.jp> Index: xoops2jp/html/class/module.textsanitizer.php diff -u xoops2jp/html/class/module.textsanitizer.php:1.7 xoops2jp/html/class/module.textsanitizer.php:1.7.2.1 --- xoops2jp/html/class/module.textsanitizer.php:1.7 Mon May 1 11:37:24 2006 +++ xoops2jp/html/class/module.textsanitizer.php Sat May 27 12:17:54 2006 @@ -1,5 +1,5 @@ nl2Br($text); } - $text =& $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) + $text = $this->codeConv($text, $xcode, $image); // Ryuji_edit(2003-11-18) return $text; } From onokazu @ users.sourceforge.jp Sat May 27 12:17:54 2006 From: onokazu @ users.sourceforge.jp (onokazu) Date: Sat, 27 May 2006 12:17:54 +0900 Subject: [xoops-cvslog 3181] CVS update: xoops2jp/html/kernel Message-ID: <20060527031754.90A542AC055@users.sourceforge.jp> Index: xoops2jp/html/kernel/object.php diff -u xoops2jp/html/kernel/object.php:1.5 xoops2jp/html/kernel/object.php:1.5.2.1 --- xoops2jp/html/kernel/object.php:1.5 Mon May 1 11:37:28 2006 +++ xoops2jp/html/kernel/object.php Sat May 27 12:17:54 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/system/admin/tplsets/main.php diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.5 xoops2jp/html/modules/system/admin/tplsets/main.php:1.5.6.1 --- xoops2jp/html/modules/system/admin/tplsets/main.php:1.5 Mon Sep 5 05:46:11 2005 +++ xoops2jp/html/modules/system/admin/tplsets/main.php Sat May 27 12:17:54 2006 @@ -1,5 +1,5 @@ getByDirname($ni); @@ -286,8 +286,8 @@ $tplfile =& $tpltpl_handler->get($id, true); if (is_object($tplfile)) { $tplset = $tplfile->getVar('tpl_tplset'); - $tplset4disp = htmlspecialchars($tplset, ENT_QUOTES); - $tplset4url = urlencode($tplset); + $tplset4disp = htmlspecialchars($tplset, ENT_QUOTES); + $tplset4url = urlencode($tplset); $tform = array('tpl_tplset' => $tplset, 'tpl_id' => $id, 'tpl_file' => $tplfile->getVar('tpl_file'), 'tpl_desc' => $tplfile->getVar('tpl_desc'), 'tpl_lastmodified' => $tplfile->getVar('tpl_lastmodified'), 'tpl_source' => $tplfile->getVar('tpl_source', 'E'), 'tpl_module' => $tplfile->getVar('tpl_module')); include_once XOOPS_ROOT_PATH.'/modules/system/admin/tplsets/tplform.php'; xoops_cp_header(); From minahito @ users.sourceforge.jp Sat May 27 22:05:42 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:05:42 +0900 Subject: [xoops-cvslog 3183] CVS update: xoops2jp/html/modules/user/templates Message-ID: <20060527130542.A2CA52AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/user/templates/user_userinfo.html diff -u xoops2jp/html/modules/user/templates/user_userinfo.html:1.1.2.9 xoops2jp/html/modules/user/templates/user_userinfo.html:1.1.2.10 --- xoops2jp/html/modules/user/templates/user_userinfo.html:1.1.2.9 Thu Apr 13 00:11:21 2006 +++ xoops2jp/html/modules/user/templates/user_userinfo.html Sat May 27 22:05:42 2006 @@ -146,8 +146,8 @@ <{/foreach}> - <{if $module.showall_link}> - <{$smarty.const._US_SHOWALL}> + <{if $module.has_more}> + <{$smarty.const._US_SHOWALL}> <{/if}>

    <{/foreach}> From minahito @ users.sourceforge.jp Sat May 27 22:06:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:06:13 +0900 Subject: [xoops-cvslog 3184] CVS update: xoops2jp/html/modules/base/.xml Message-ID: <20060527130613.0A3322AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/search_showall.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/search_showall.xml:1.1.2.1 --- /dev/null Sat May 27 22:06:12 2006 +++ xoops2jp/html/modules/base/.xml/search_showall.xml Sat May 27 22:06:12 2006 @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + Index: xoops2jp/html/modules/base/.xml/search_showallbyuser.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/search_showallbyuser.xml:1.1.2.1 --- /dev/null Sat May 27 22:06:12 2006 +++ xoops2jp/html/modules/base/.xml/search_showallbyuser.xml Sat May 27 22:06:12 2006 @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + Index: xoops2jp/html/modules/base/.xml/search_results.xml diff -u /dev/null xoops2jp/html/modules/base/.xml/search_results.xml:1.1.2.1 --- /dev/null Sat May 27 22:06:12 2006 +++ xoops2jp/html/modules/base/.xml/search_results.xml Sat May 27 22:06:12 2006 @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + From minahito @ users.sourceforge.jp Sat May 27 22:06:25 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:06:25 +0900 Subject: [xoops-cvslog 3185] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060527130625.68F482AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php Sat May 27 22:06:25 2006 @@ -0,0 +1,40 @@ +mActionForm =& new Legacy_SearchShowallbyuserForm(); + $this->mActionForm->prepare(); + } + + function _getTemplateName() + { + return "legacy_search_showallbyuser.html"; + } + + function _getSelectedMids() + { + $ret = array(); + $ret[] = $this->mActionForm->get('mid'); + + return $ret; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + parent::executeViewIndex($controller, $xoopsUser, $render); + + $handler =& xoops_gethandler('user'); + $user =& $handler->get($this->mActionForm->get('uid')); + + $render->setAttribute('targetUser', $user); + } +} + +?> Index: xoops2jp/html/modules/base/actions/SearchShowallAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchShowallAction.class.php Sat May 27 22:06:25 2006 @@ -0,0 +1,46 @@ +mActionForm =& new Legacy_SearchShowallForm(); + $this->mActionForm->prepare(); + } + + function _getTemplateName() + { + return "legacy_search_showall.html"; + } + + function _getSelectedMids() + { + $ret = array(); + $ret[] = $this->mActionForm->get('mid'); + + return $ret; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + parent::executeViewIndex($controller, $xoopsUser, $render); + + // + // TODO remove Magic number '20' + // + $prevStart = $this->mActionForm->get('start') - 20; + if ($prevStart < 0) { + $prevStart = 0; + } + + $render->setAttribute('prevStart', $prevStart); + $render->setAttribute('nextStart', $this->mActionForm->get('start') + 20); + } +} + +?> Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Sat May 27 22:06:25 2006 @@ -0,0 +1,110 @@ +mRoot; + $root->mLanguageManager->loadModuleLanguage('base'); + + $this->_setupActionForm(); + } + + function _setupActionForm() + { + $this->mActionForm =& new Legacy_SearchResultsForm(); + $this->mActionForm->prepare(); + } + + function getDefaultView(&$controller, &$xoopsUser) + { + $this->mActionForm->fetch(); + $this->mActionForm->validate(); + + // + // TODO ErrorHandling + // + + $root =& $controller->mRoot; + $service =& $root->mServiceManager->searchXCubeService("LegacySearch"); + if ($service) { + $client =& new XCube_ServiceClient($service); + + $parameters = array(); + $parameters['current_uid'] = is_object($xoopsUser) ? $xoopsUser->get('uid') : 0; + + $this->mActionForm->update($parameters); + + $this->mSearchResults = $client->call("getItems", $parameters); + } + else { + return LEGACY_FRAME_VIEW_ERROR; + } + + // + // Make the module list for search form. + // + $groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS; + $handler = & xoops_gethandler( 'groupperm' ); + $mids = $handler->getItemIds('module_read', $groups); + + $handler =& xoops_gethandler('module'); + foreach ($mids as $mid) { + $module =& $handler->get($mid); + if ($module->get('isactive') && $module->get('hassearch')) { + $this->mModules[] =& $module; + } + unset($module); + } + + return LEGACY_FRAME_VIEW_INDEX; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName($this->_getTemplateName()); + + $render->setAttribute('actionForm', $this->mActionForm); + + $render->setAttribute('searchResults', $this->mSearchResults); + $render->setAttribute('moduleArr', $this->mModules); + + // + // If the request include $mids, setAttribute it. If it don't include, + // setAttribute $mid or $this->mModules. + // + $render->setAttribute('selectedMidArr', $this->_getSelectedMids()); + } + + function _getTemplateName() + { + return "legacy_search_results.html"; + } + + function _getSelectedMids() + { + $ret = $this->mActionForm->get('mids'); + if (!count($ret)) { + foreach ($this->mModules as $module) { + $ret[] = $module->get('mid'); + } + } + + return $ret; + } + + function executeViewError(&$controller, &$xoopsUser, &$render) + { + // $controller->executeForward("./index.php?Action=ImageList"); + } +} + +?> From minahito @ users.sourceforge.jp Sat May 27 22:06:39 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:06:39 +0900 Subject: [xoops-cvslog 3186] CVS update: xoops2jp/html/modules/base/forms Message-ID: <20060527130639.44A132AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/forms/SearchShowallForm.class.php diff -u /dev/null xoops2jp/html/modules/base/forms/SearchShowallForm.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:39 2006 +++ xoops2jp/html/modules/base/forms/SearchShowallForm.class.php Sat May 27 22:06:39 2006 @@ -0,0 +1,43 @@ +mFormProperties['mid'] =& new XCube_IntProperty('mid'); + $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); + $this->mFormProperties['andor'] =& new XCube_StringProperty('andor'); + $this->mFormProperties['query'] =& new XCube_StringProperty('query'); + $this->mFormProperties['start'] =& new XCube_IntProperty('start'); + + // + // Set field properties + // + + $this->mFieldProperties['andor'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['andor']->setDependsByArray(array('mask')); + $this->mFieldProperties['andor']->addMessage('required', _MD_BASE_ERROR_MASK, _MD_BASE_LANG_ANDOR); + $this->mFieldProperties['andor']->addVar('mask', '/(AND|OR)/'); + } + + function update(&$params) + { + $params['mid'] = $this->get('mid'); + $params['queries'] = $this->mQueries; + $params['andor'] = $this->get('andor'); + $params['maxhit'] = 20; + $params['offset'] = $this->get('start') ? $this->get('start') : 0; + } +} + +?> Index: xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php diff -u /dev/null xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:39 2006 +++ xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php Sat May 27 22:06:39 2006 @@ -0,0 +1,29 @@ +mFormProperties['uid'] =& new XCube_IntProperty('uid'); + } + + function update(&$params) + { + parent::update($params); + $params['uid'] = $this->get('uid'); + } +} + +?> Index: xoops2jp/html/modules/base/forms/SearchResultsForm.class.php diff -u /dev/null xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.1 --- /dev/null Sat May 27 22:06:39 2006 +++ xoops2jp/html/modules/base/forms/SearchResultsForm.class.php Sat May 27 22:06:39 2006 @@ -0,0 +1,60 @@ +mFormProperties['mids'] =& new XCube_IntArrayProperty('mids'); + $this->mFormProperties['andor'] =& new XCube_StringProperty('andor'); + $this->mFormProperties['query'] =& new XCube_StringProperty('query'); + + // + // Set field properties + // + + $this->mFieldProperties['andor'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['andor']->setDependsByArray(array('mask')); + $this->mFieldProperties['andor']->addMessage('required', _MD_BASE_ERROR_MASK, _MD_BASE_LANG_ANDOR); + $this->mFieldProperties['andor']->addVar('mask', '/(AND|OR|exact)/'); + } + + function fetch() + { + parent::fetch(); + + $separator = '/[\s,]+/'; + if (defined('_MD_BASE_FORMAT_SEARCH_SEPARATOR')) { + $separator = _MD_BASE_FORMAT_SEARCH_SEPARATOR; + } + + $tmpArr = preg_split($separator, $this->get('query')); + $myts =& MyTextSanitizer::getInstance(); + foreach ($tmpArr as $tmp) { + $this->mQueries[] = $myts->addSlashes($tmp); + } + } + + function update(&$params) + { + $mids = $this->get('mids'); + if (count($mids) > 0) { + $params['mids'] = $mids; + } + + $params['queries'] = $this->mQueries; + $params['andor'] = $this->get('andor'); + $params['maxhit'] = 5; + } +} + +?> From minahito @ users.sourceforge.jp Sat May 27 22:06:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:06:58 +0900 Subject: [xoops-cvslog 3187] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060527130658.DFC322AC010@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.35 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.36 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.35 Fri May 26 18:53:14 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Sat May 27 22:06:58 2006 @@ -642,6 +642,7 @@ require_once XOOPS_ROOT_PATH . "/modules/base/kernel/Legacy_EventFunctions.class.php"; $manager->setAnchorDelegate("Legacypage.Imagemanager.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToImageManager")); $manager->setAnchorDelegate("Legacypage.Backend.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToBackend")); + $manager->setAnchorDelegate("Legacypage.Search.Access", new XCube_Delegate("Legacy_EventFunction", "AccessToSearch")); // // We write the following lines for test here. From minahito @ users.sourceforge.jp Sat May 27 22:07:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:07:24 +0900 Subject: [xoops-cvslog 3188] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060527130724.33EA12AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.3 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.4 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.3 Fri May 26 21:08:15 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Sat May 27 22:07:24 2006 @@ -1,6 +1,6 @@ executeView(); } + + function AccessToSearch(&$controller,$eventArgs) + { + require_once XOOPS_MODULE_PATH . "/base/class/ActionFrame.class.php"; + + $moduleRunner =& new Legacy_ActionFrame(false); + $moduleRunner->setActionName('Search' . ucfirst(xoops_getrequest('action'))); + + $controller->setActionStrategy($moduleRunner); + + $controller->executeAction(); + + $controller->executeView(); + } } ?> \ No newline at end of file From minahito @ users.sourceforge.jp Sat May 27 22:08:24 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:08:24 +0900 Subject: [xoops-cvslog 3189] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060527130824.622582AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/main.php diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.14 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.15 --- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.14 Thu May 25 18:29:22 2006 +++ xoops2jp/html/modules/base/language/japanese/main.php Sat May 27 22:08:24 2006 @@ -1,9 +1,12 @@ Index: xoops2jp/html/modules/base/language/english/main.php diff -u xoops2jp/html/modules/base/language/english/main.php:1.1.2.13 xoops2jp/html/modules/base/language/english/main.php:1.1.2.14 --- xoops2jp/html/modules/base/language/english/main.php:1.1.2.13 Thu May 25 18:29:22 2006 +++ xoops2jp/html/modules/base/language/english/main.php Sat May 27 22:08:24 2006 @@ -1,9 +1,12 @@ Index: xoops2jp/html/modules/base/templates/legacy_search_results.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_search_results.html:1.1.2.1 --- /dev/null Sat May 27 22:08:45 2006 +++ xoops2jp/html/modules/base/templates/legacy_search_results.html Sat May 27 22:08:44 2006 @@ -0,0 +1,21 @@ +<{foreach item=module from=$searchResults}> +

    <{$module.name}>

    + + + <{foreach item=result from=$module.results}> + <{$module.name}><{$result.title}>
    + + <{if $result.uid > 0}> + <{$result.uid|xoops_user:uname}> + <{/if}> + (<{$result.time|xoops_formattimestamp:l}>) + + <{/foreach}> + + + <{if $module.has_more}> + <{$smarty.const._MD_BASE_LANG_SHOW_ALL}> + <{/if}> +<{/foreach}> + +<{include file=db:legacy_search_form.html}> Index: xoops2jp/html/modules/base/templates/legacy_search_showallbyuser.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_search_showallbyuser.html:1.1.2.1 --- /dev/null Sat May 27 22:08:45 2006 +++ xoops2jp/html/modules/base/templates/legacy_search_showallbyuser.html Sat May 27 22:08:44 2006 @@ -0,0 +1,25 @@ +<{if $searchResults.0.name != null}> +

    <{$searchResults.0.name}>

    + + + <{foreach item=result from=$searchResults.0.results}> + <{$module.name}><{$result.title}>
    + + <{if $result.uid > 0}> + <{$result.uid|xoops_user:uname}> + <{/if}> + (<{$result.time|xoops_formattimestamp:l}>) + + <{/foreach}> + + + <{if $actionForm->get('start') > 0}> + <{$smarty.const._MD_BASE_LANG_PREV_PAGE}> + <{/if}> + + <{if $searchResults.0.has_more}> + <{$smarty.const._MD_BASE_LANG_PREV_PAGE}> + <{/if}> +<{/if}> + +<{include file=db:legacy_search_form.html}> Index: xoops2jp/html/modules/base/templates/legacy_search_showall.html diff -u /dev/null xoops2jp/html/modules/base/templates/legacy_search_showall.html:1.1.2.1 --- /dev/null Sat May 27 22:08:45 2006 +++ xoops2jp/html/modules/base/templates/legacy_search_showall.html Sat May 27 22:08:45 2006 @@ -0,0 +1,25 @@ +<{if $searchResults.0.name != null}> +

    <{$searchResults.0.name}>

    + + + <{foreach item=result from=$searchResults.0.results}> + <{$module.name}><{$result.title}>
    + + <{if $result.uid > 0}> + <{$result.uid|xoops_user:uname}> + <{/if}> + (<{$result.time|xoops_formattimestamp:l}>) + + <{/foreach}> + + + <{if $actionForm->get('start') > 0}> + <{$smarty.const._MD_BASE_LANG_PREV_PAGE}> + <{/if}> + + <{if $searchResults.0.has_more}> + <{$smarty.const._MD_BASE_LANG_PREV_PAGE}> + <{/if}> +<{/if}> + +<{include file=db:legacy_search_form.html}> From minahito @ users.sourceforge.jp Sat May 27 22:08:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:08:54 +0900 Subject: [xoops-cvslog 3192] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060527130854.69A7D2AC033@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_search_form.html diff -u xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.2 xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.3 --- xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.2 Thu Feb 2 17:40:48 2006 +++ xoops2jp/html/modules/base/templates/legacy_search_form.html Sat May 27 22:08:54 2006 @@ -1,26 +1,27 @@ -
    + + <{xoops_input type=hidden name=action value=results}> From minahito @ users.sourceforge.jp Sat May 27 22:09:09 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:09:09 +0900 Subject: [xoops-cvslog 3193] CVS update: xoops2jp/html/modules/base Message-ID: <20060527130909.1E2022AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/xoops_version.php diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.22 xoops2jp/html/modules/base/xoops_version.php:1.1.2.23 --- xoops2jp/html/modules/base/xoops_version.php:1.1.2.22 Fri May 26 13:22:46 2006 +++ xoops2jp/html/modules/base/xoops_version.php Sat May 27 22:09:08 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/base/service/LegacySearchService.class.php diff -u xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.3 xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.4 --- xoops2jp/html/modules/base/service/LegacySearchService.class.php:1.1.2.3 Tue Mar 28 22:30:34 2006 +++ xoops2jp/html/modules/base/service/LegacySearchService.class.php Sat May 27 22:09:41 2006 @@ -13,13 +13,21 @@ * @param $parameters['uid'] Target user's id * @param $parameters['current_uid'] Current user's id * @param $parameters['maxhit'] Max hit count of each modules. The default value is 5. + * @param $parameters['mid'] If this is specified, search only one module. */ function doGetItems(&$parameters) { $ret = array(); - $uid = $parameters['uid']; + $uid = isset($parameters['uid']) ? intval($parameters['uid']) : 0; + $queries = isset($parameters['queries']) ? $parameters['queries'] : null; + + $andor = isset($parameters['andor']) ? $parameters['andor'] : null; + if ($andor == null) { + $andor == "AND"; + } $maxhit = isset($parameters['maxhit']) ? intval($parameters['maxhit']) : 5; + $start = isset($parameters['offset']) ? intval($parameters['offset']) : null; $userHandler =& xoops_gethandler('user'); $currentUser =& $userHandler->get($parameters['current_uid']); @@ -31,10 +39,19 @@ // At first, get active module IDs. // $moduleHandler =& xoops_gethandler('module'); - $criteria =& new CriteriaCompo(new Criteria('hassearch', 1)); - $criteria->add(new Criteria('isactive', 1)); - $mids =& array_keys($moduleHandler->getList($criteria)); + $mids = array(); + if (isset($parameters['mids']) && is_array($parameters['mids'])) { + $mids = $parameters['mids']; + } + elseif (isset($parameters['mid'])) { + $mids[] = intval($parameters['mid']); + } + else { + $criteria =& new CriteriaCompo(new Criteria('hassearch', 1)); + $criteria->add(new Criteria('isactive', 1)); + $mids =& array_keys($moduleHandler->getList($criteria)); + } // // Next, fetch from $mids[], and check read permission. @@ -47,8 +64,13 @@ foreach ($mids as $mid) { if ($gpermHandler->checkRight('module_read', $mid, $groups)) { $module =& $moduleHandler->get($mid); - $results =& $module->search('', '', $maxhit, 0, $uid); + if (!is_object($module)) { + continue; + } + + $results =& $module->search($queries, $andor, $maxhit, $start, $uid); + $ret[$i]['mid'] = $mid; $ret[$i]['name'] = $module->get('name'); if (is_array($results) && count($results) > 0) { @@ -63,6 +85,7 @@ $item['link'] = XOOPS_URL . '/modules/' . $module->getVar('dirname') . '/' . $result['link']; $item['title'] = $result['title']; + $item['uid'] = $result['uid']; // // TODO If this service will come to web service, we should @@ -73,15 +96,7 @@ $ret[$i]['results'][] = $item; } - if (count($results) == 5) { - $link = @sprintf("%s/search.php?action=showallbyuser&mid=%d&uid=%d", - XOOPS_URL, - $module->get('mid'), - $uid - ); - - $ret[$i]['showall_link'] = $link; - } + $ret[$i]['has_more'] = (count($results) == $maxhit); } else { $ret[$i]['results'] = array(); From minahito @ users.sourceforge.jp Sat May 27 22:10:07 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:10:07 +0900 Subject: [xoops-cvslog 3195] CVS update: xoops2jp/html/modules/legacyRender/admin/actions Message-ID: <20060527131007.BECF42AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.10 xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.11 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php:1.1.2.10 Wed May 17 20:15:51 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileListAction.class.php Sat May 27 22:10:07 2006 @@ -63,6 +63,8 @@ function execute(&$controller, &$xoopsUser) { + require_once XOOPS_ROOT_PATH . "/class/template.php"; + $this->mActionForm->fetch(); $this->mActionForm->validate(); @@ -112,6 +114,10 @@ $successFlag &= $handler->insert($obj); + $xoopsTpl =& new XoopsTpl(); + $xoopsTpl->clear_cache('db:' . $obj->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $obj->get('tpl_file')); + unset($obj); unset($formFile); } Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.7 xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.8 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php:1.1.2.7 Wed May 17 18:43:27 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileEditAction.class.php Sat May 27 22:10:07 2006 @@ -47,6 +47,12 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { + require_once XOOPS_ROOT_PATH . "/class/template.php"; + + $xoopsTpl =& new XoopsTpl(); + $xoopsTpl->clear_cache('db:' . $this->mObject->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $this->mObject->get('tpl_file')); + $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); Index: xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php diff -u xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.3 xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.4 --- xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php:1.1.2.3 Wed May 17 18:43:27 2006 +++ xoops2jp/html/modules/legacyRender/admin/actions/TplfileDeleteAction.class.php Sat May 27 22:10:07 2006 @@ -42,6 +42,12 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { + require_once XOOPS_ROOT_PATH . "/class/template.php"; + + $xoopsTpl =& new XoopsTpl(); + $xoopsTpl->clear_cache('db:' . $this->mObject->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $this->mObject->get('tpl_file')); + $tplset = $this->mObject->get('tpl_tplset'); $module = $this->mObject->get('tpl_module'); $controller->executeForward("./index.php?action=TplfileList&tpl_tplset=${tplset}&tpl_module=${module}"); From minahito @ users.sourceforge.jp Sat May 27 22:11:01 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sat, 27 May 2006 22:11:01 +0900 Subject: [xoops-cvslog 3196] CVS update: xoops2jp/html Message-ID: <20060527131101.4CF5A2AC010@users.sourceforge.jp> Index: xoops2jp/html/search.php diff -u xoops2jp/html/search.php:1.2.8.1 xoops2jp/html/search.php:1.2.8.2 --- xoops2jp/html/search.php:1.2.8.1 Wed Oct 19 02:14:04 2005 +++ xoops2jp/html/search.php Sat May 27 22:11:01 2006 @@ -1,293 +1,19 @@ // -// ------------------------------------------------------------------------ // -// 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 // -// ------------------------------------------------------------------------ // +/** + * This file was full scratched in XOOPS Cube Legacy project. + * + * @version $Id: search.php,v 1.2.8.2 2006/05/27 13:11:01 minahito Exp $ + */ + +require_once "mainfile.php"; +require_once XOOPS_ROOT_PATH . "/header.php"; + +// +// This is old page controller in Xoops 2.0.x +// Raise event "Legacypage.Search.Access" +// +$root=&XCube_Root::getSingleton(); +$eventArgs = array(); +$root->mEventManager->raiseEvent("Legacypage.Search.Access", $root->mController, $eventArgs); -$xoopsOption['pagetype'] = "search"; - -include 'mainfile.php'; -$config_handler =& xoops_gethandler('config'); -$xoopsConfigSearch =& $config_handler->getConfigsByCat(XOOPS_CONF_SEARCH); - -if ($xoopsConfigSearch['enable_search'] != 1) { - header('Location: '.XOOPS_URL.'/index.php'); - exit(); -} -$action = "search"; -if (!empty($_GET['action'])) { - $action = $_GET['action']; -} elseif (!empty($_POST['action'])) { - $action = $_POST['action']; -} -$query = ""; -if (!empty($_GET['query'])) { - $query = trim($_GET['query']); -} elseif (!empty($_POST['query'])) { - $query = trim($_POST['query']); -} -$andor = "AND"; -if (!empty($_GET['andor'])) { - $andor = $_GET['andor']; -} elseif (!empty($_POST['andor'])) { - $andor = $_POST['andor']; -} -$mid = $uid = $start = 0; -if ( !empty($_GET['mid']) ) { - $mid = intval($_GET['mid']); -} elseif ( !empty($_POST['mid']) ) { - $mid = intval($_POST['mid']); -} -if (!empty($_GET['uid'])) { - $uid = intval($_GET['uid']); -} elseif (!empty($_POST['uid'])) { - $uid = intval($_POST['uid']); -} -if (!empty($_GET['start'])) { - $start = intval($_GET['start']); -} elseif (!empty($_POST['start'])) { - $start = intval($_POST['start']); -} -if (!empty($_GET['mids'])) { - $mids = $_GET['mids']; -} elseif (!empty($_POST['mids'])) { - $mids = $_POST['mids']; -} - -$queries = array(); - -if ($action == "results") { - if ($query == "") { - redirect_header("search.php",1,_SR_PLZENTER); - exit(); - } -} elseif ($action == "showall") { - if ($query == "" || empty($mid)) { - redirect_header("search.php",1,_SR_PLZENTER); - exit(); - } -} elseif ($action == "showallbyuser") { - if (empty($mid) || empty($uid)) { - redirect_header("search.php",1,_SR_PLZENTER); - exit(); - } -} - -$groups = is_object($xoopsUser) ? $xoopsUser -> getGroups() : XOOPS_GROUP_ANONYMOUS; -$gperm_handler = & xoops_gethandler( 'groupperm' ); -$available_modules = $gperm_handler->getItemIds('module_read', $groups); - -if ($action == 'search') { - include XOOPS_ROOT_PATH.'/header.php'; - include 'include/searchform.php'; - $search_form->display(); - include XOOPS_ROOT_PATH.'/footer.php'; - exit(); -} - -if ( $andor != "OR" && $andor != "exact" && $andor != "AND" ) { - $andor = "AND"; -} - -$myts =& MyTextSanitizer::getInstance(); -if ($action != 'showallbyuser') { - if ( $andor != "exact" ) { - $ignored_queries = array(); // holds kewords that are shorter than allowed minmum length - $temp_queries = preg_split('/[\s,]+/', $query); - foreach ($temp_queries as $q) { - $q = trim($q); - if (strlen($q) >= $xoopsConfigSearch['keyword_min']) { - $queries[] = $myts->addSlashes($q); - } else { - $ignored_queries[] = $myts->addSlashes($q); - } - } - if (count($queries) == 0) { - redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); - exit(); - } - } else { - $query = trim($query); - if (strlen($query) < $xoopsConfigSearch['keyword_min']) { - redirect_header('search.php', 2, sprintf(_SR_KEYTOOSHORT, $xoopsConfigSearch['keyword_min'])); - exit(); - } - $queries = array($myts->addSlashes($query)); - } -} -switch ($action) { - case "results": - $module_handler =& xoops_gethandler('module'); - $criteria = new CriteriaCompo(new Criteria('hassearch', 1)); - $criteria->add(new Criteria('isactive', 1)); - $criteria->add(new Criteria('mid', "(".implode(',', $available_modules).")", 'IN')); - $modules =& $module_handler->getObjects($criteria, true); - if (empty($mids) || !is_array($mids)) { - unset($mids); - $mids = array_keys($modules); - } - include XOOPS_ROOT_PATH."/header.php"; - echo "

    "._SR_SEARCHRESULTS."

    \n"; - echo _SR_KEYWORDS.':'; - if ($andor != 'exact') { - foreach ($queries as $q) { - echo ' '.htmlspecialchars(stripslashes($q)).''; - } - if (!empty($ignored_queries)) { - echo '
    '; - printf(_SR_IGNOREDWORDS, $xoopsConfigSearch['keyword_min']); - foreach ($ignored_queries as $q) { - echo ' '.htmlspecialchars(stripslashes($q)).''; - } - } - } else { - echo ' "'.htmlspecialchars(stripslashes($queries[0])).'"'; - } - echo '
    '; - foreach ($mids as $mid) { - $mid = intval($mid); - if ( in_array($mid, $available_modules) ) { - $module =& $modules[$mid]; - $results =& $module->search($queries, $andor, 5, 0); - echo "

    ".$myts->makeTboxData4Show($module->getVar('name'))."

    "; - $count = count($results); - if (!is_array($results) || $count == 0) { - echo "

    "._SR_NOMATCH."

    "; - } else { - for ($i = 0; $i < $count; $i++) { - if (isset($results[$i]['image']) && $results[$i]['image'] != "") { - echo "".$myts->makeTboxData4Show($module->getVar( "; - } else { - echo "".$myts->makeTboxData4Show($module->getVar( "; - } - echo "".$myts->makeTboxData4Show($results[$i]['title'])."
    \n"; - echo ""; - $results[$i]['uid'] = intval($results[$i]['uid']); - if ( !empty($results[$i]['uid']) ) { - $uname = XoopsUser::getUnameFromId($results[$i]['uid']); - echo "  ".$uname."\n"; - } - echo $results[$i]['time'] ? " (". formatTimestamp(intval($results[$i]['time'])).")" : ""; - echo "
    \n"; - } - if ( $count == 5 ) { - $search_url = XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' ', $queries))); - $search_url .= "&mid=$mid&action=showall&andor=$andor"; - echo '
    '._SR_SHOWALLR.'

    '; - } - } - } - unset($results); - unset($module); - } - include "include/searchform.php"; - $search_form->display(); - break; - case "showall": - case 'showallbyuser': - include XOOPS_ROOT_PATH."/header.php"; - $module_handler =& xoops_gethandler('module'); - $module =& $module_handler->get($mid); - $results =& $module->search($queries, $andor, 20, $start, $uid); - $count = count($results); - if (is_array($results) && $count > 0) { - $next_results =& $module->search($queries, $andor, 1, $start + 20, $uid); - $next_count = count($next_results); - $has_next = false; - if (is_array($next_results) && $next_count == 1) { - $has_next = true; - } - echo "

    "._SR_SEARCHRESULTS."

    \n"; - if ($action == 'showall') { - echo _SR_KEYWORDS.':'; - if ($andor != 'exact') { - foreach ($queries as $q) { - echo ' '.htmlspecialchars(stripslashes($q)).''; - } - } else { - echo ' "'.htmlspecialchars(stripslashes($queries[0])).'"'; - } - echo '
    '; - } - // printf(_SR_FOUND,$count); - // echo "
    "; - printf(_SR_SHOWING, $start+1, $start + $count); - echo "
    ".$myts->makeTboxData4Show($module->getVar('name'))."
    "; - for ($i = 0; $i < $count; $i++) { - if (isset($results[$i]['image']) && $results[$i]['image'] != '') { - echo "".$myts->makeTboxData4Show($module->getVar( "; - } else { - echo "".$myts->makeTboxData4Show($module->name())." "; - } - echo "".$myts->makeTboxData4Show($results[$i]['title'])."
    \n"; - echo ""; - $results[$i]['uid'] = intval($results[$i]['uid']); - if ( !empty($results[$i]['uid']) ) { - $uname = XoopsUser::getUnameFromId($results[$i]['uid']); - echo "  ".$uname."\n"; - } - echo $results[$i]['time'] ? " (". formatTimestamp(intval($results[$i]['time'])).")" : ""; - echo "
    \n"; - } - echo ' -
    <{$smarty.const._SR_KEYWORDS}> "> - <{xoops_input type=text name=query size=30 maxlength=255 value=$actionform->get('query')}> + <{xoops_input type=text name=query size=30 maxlength=255 value=$actionForm->get('query')}>
    <{$smarty.const._SR_TYPE}> ">
    <{$smarty.const._SR_SEARCHIN}> "> - <{foreach item=module from=$moduleList}> - getVar('mid'),$actionform->get('mids'))}>checked<{/if}>><{$module->getVar('name')|escape}> + <{foreach item=module from=$moduleArr}> + getVar('mid'), $selectedMidArr)}>checked<{/if}>><{$module->getVar('name')}> <{/foreach}>
    - - '; - $search_url = XOOPS_URL.'/search.php?query='.urlencode(stripslashes(implode(' ', $queries))); - $search_url .= "&mid=$mid&action=$action&andor=$andor"; - if ($action=='showallbyuser') { - $search_url .= "&uid=$uid"; - } - if ( $start > 0 ) { - $prev = $start - 20; - echo ' - '; - } - echo ' - '; - if (false != $has_next) { - $next = $start + 20; - $search_url_next = $search_url."&start=$next"; - echo ' - '; - } - echo ' - -
    - '; - $search_url_prev = $search_url."&start=$prev"; - echo ''._SR_PREVIOUS.'  '._SR_NEXT.'
    -

    - '; - } else { - echo '

    '._SR_NOMATCH.'

    '; - } - include "include/searchform.php"; - $search_form->display(); - echo '

    - '; - break; -} -include XOOPS_ROOT_PATH."/footer.php"; ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Sat May 27 23:06:23 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 23:06:23 +0900 Subject: [xoops-cvslog 3197] CVS update: xoops2jp/html Message-ID: <20060527140623.DD0EC2AC010@users.sourceforge.jp> Index: xoops2jp/html/admin.php diff -u xoops2jp/html/admin.php:1.2.8.3 xoops2jp/html/admin.php:1.2.8.4 --- xoops2jp/html/admin.php:1.2.8.3 Fri Feb 3 23:34:08 2006 +++ xoops2jp/html/admin.php Sat May 27 23:06:23 2006 @@ -1,6 +1,6 @@ -mEventManager->addProxyRegister(new DefaultSystemCheckProxyRegister()); -$eventArgs=array(); -$root->mEventManager->raiseEvent("Legacypage.Admin.SystemCheck",$root->mController,$eventArgs); -require_once XOOPS_ROOT_PATH . "/footer.php"; +$eventArgs=array(); +$root->mEventManager->raiseEvent("Legacypage.Admin.SystemCheck",$root->mController,$eventArgs); +require_once XOOPS_ROOT_PATH . "/footer.php"; ?> \ No newline at end of file From nobunobu @ users.sourceforge.jp Sat May 27 23:06:24 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 23:06:24 +0900 Subject: [xoops-cvslog 3198] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060527140624.0D0AF2AC053@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.5 xoops2jp/html/modules/base/language/english/global.php:1.1.2.6 --- xoops2jp/html/modules/base/language/english/global.php:1.1.2.5 Tue Apr 11 17:39:07 2006 +++ xoops2jp/html/modules/base/language/english/global.php Sat May 27 23:06:23 2006 @@ -1,5 +1,5 @@ here"); define("_WARNINSTALL2","WARNING: Directory %s exists on your server.
    Please remove this directory for security reasons."); define("_WARNINWRITEABLE","WARNING: File %s is writeable by the server.
    Please change the permission of this file for security reasons.
    in Unix (444), in Win32 (read-only)"); +define('_WARNPHPENV','WARNING: php.ini parameter "%s" is set to "%s". %s'); +define('_WARNSECURITY','(It may cause a security problem)'); //%%%%%% File Name themeuserpost.php %%%%% define("_PROFILE","Profile"); From nobunobu @ users.sourceforge.jp Sat May 27 23:06:24 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 23:06:24 +0900 Subject: [xoops-cvslog 3199] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060527140624.320312AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/global.php diff -u xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.5 xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.6 --- xoops2jp/html/modules/base/language/japanese/global.php:1.1.2.5 Tue Apr 11 17:39:07 2006 +++ xoops2jp/html/modules/base/language/japanese/global.php Sat May 27 23:06:24 2006 @@ -35,6 +35,8 @@ define('_IFNOTRELOAD','ページが自動的に更新されない場合はここをクリックしてください'); define('_WARNINSTALL2','注意:ファイル%sがサーバ上に存在します。インストール完了後は必ず削除してください。'); define('_WARNINWRITEABLE','注意:ファイル%sへの書き込みが可能となっています。このファイルのパーミッション設定を変更してください。'); +define('_WARNPHPENV','注意:PHPの設定環境の中で、"%s" が "%s"になっています。%s'); +define('_WARNSECURITY','(サイトの脆弱につながる危険性があります。)'); //%%%%%% File Name themeuserpost.php %%%%% define('_POSTEDBY','投稿者:'); // Posted date From nobunobu @ users.sourceforge.jp Sat May 27 23:07:41 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 23:07:41 +0900 Subject: [xoops-cvslog 3200] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060527140741.06A982AC010@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/BackendAction.class.php diff -u xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.3 xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.4 --- xoops2jp/html/modules/base/actions/BackendAction.class.php:1.1.2.3 Sat May 27 00:48:03 2006 +++ xoops2jp/html/modules/base/actions/BackendAction.class.php Sat May 27 23:07:40 2006 @@ -31,6 +31,8 @@ * $item['guid'] ... permanent link * $item['pubdate'] ... unixtime * $item['description'] ... not required. + * $item['category'] ... not required. + * $item['author'] ... not required. */ function _getRSSInformation() { @@ -89,11 +91,6 @@ // $controller->mRenderSystem->renderWithTarget($renderTarget); - // $count = $sarray; - // foreach ($sarray as $story) { - // $tpl->append('items', array('title' => xoops_utf8_encode(htmlspecialchars($story->title(), ENT_QUOTES)), 'link' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'guid' => XOOPS_URL.'/modules/news/article.php?storyid='.$story->storyid(), 'pubdate' => formatTimestamp($story->published(), 'rss'), 'description' => xoops_utf8_encode(htmlspecialchars($story->hometext(), ENT_QUOTES)))); - // } - if (function_exists('mb_http_output')) { mb_http_output('pass'); } From nobunobu @ users.sourceforge.jp Sat May 27 23:07:41 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sat, 27 May 2006 23:07:41 +0900 Subject: [xoops-cvslog 3201] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060527140741.2AE6A2AC053@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_rss.html diff -u xoops2jp/html/modules/base/templates/legacy_rss.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_rss.html:1.1.2.2 --- xoops2jp/html/modules/base/templates/legacy_rss.html:1.1.2.1 Fri May 26 13:23:06 2006 +++ xoops2jp/html/modules/base/templates/legacy_rss.html Sat May 27 23:07:41 2006 @@ -7,7 +7,6 @@ <{$channel_lastbuild|escape}> http://backend.userland.com/rss/ <{$channel_generator|escape}> - <{$channel_category|escape}> <{$channel_editor|escape}> <{$channel_webmaster|escape}> <{$channel_language|escape}> @@ -24,6 +23,12 @@ <{$item.title|escape}> <{$item.link|escape}> + <{if $item.author}> + <{$item.author|escape}> + <{/if}> + <{if $item.category}> + <{$item.category|escape}> + <{/if}> <{if $item.description}> <{$item.description|escape}> <{/if}> From minahito @ users.sourceforge.jp Sun May 28 14:02:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:02:55 +0900 Subject: [xoops-cvslog 3202] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060528050255.5FAF92AC09D@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.5 xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.6 --- xoops2jp/html/modules/base/class/ActionFrame.class.php:1.1.2.5 Tue Apr 11 19:21:09 2006 +++ xoops2jp/html/modules/base/class/ActionFrame.class.php Sun May 28 14:02:55 2006 @@ -62,6 +62,8 @@ die(); } + $this->mAction->prepare($controller, $controller->getXoopsUser()); + if (!$this->mAction->hasPerm($controller, $controller->getXoopsUser())) { if ($this->mAdminFlag) { $controller->executeForward(XOOPS_URL . "/admin.php"); @@ -71,8 +73,6 @@ } } - $this->mAction->prepare($controller, $controller->getXoopsUser()); - if (xoops_getenv("REQUEST_METHOD") == "POST") { $viewStatus = $this->mAction->execute($controller, $controller->getXoopsUser()); } From minahito @ users.sourceforge.jp Sun May 28 14:03:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:03:36 +0900 Subject: [xoops-cvslog 3203] CVS update: xoops2jp/html/modules/base/forms Message-ID: <20060528050336.2C29D2AC09D@users.sourceforge.jp> Index: xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php diff -u xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.1 xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php:1.1.2.1 Sat May 27 22:06:39 2006 +++ xoops2jp/html/modules/base/forms/SearchShowallbyuserForm.class.php Sun May 28 14:03:36 2006 @@ -9,7 +9,7 @@ class Legacy_SearchShowallbyuserForm extends Legacy_SearchShowallForm { - function prepare() + function prepare($keywordMin) { parent::prepare(); Index: xoops2jp/html/modules/base/forms/SearchResultsForm.class.php diff -u xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.1 xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/forms/SearchResultsForm.class.php:1.1.2.1 Sat May 27 22:06:39 2006 +++ xoops2jp/html/modules/base/forms/SearchResultsForm.class.php Sun May 28 14:03:36 2006 @@ -8,9 +8,17 @@ class Legacy_SearchResultsForm extends XCube_ActionForm { var $mQueries = array(); + var $_mKeywordMin = 0; + function Legacy_SearchResultsForm($keywordMin) + { + parent::XCube_ActionForm(); + $this->_mKeywordMin = intval($keywordMin); + } + function prepare() { + // // Set form properties // @@ -32,15 +40,35 @@ { parent::fetch(); - $separator = '/[\s,]+/'; - if (defined('_MD_BASE_FORMAT_SEARCH_SEPARATOR')) { - $separator = _MD_BASE_FORMAT_SEARCH_SEPARATOR; - } + $t_queries = array(); - $tmpArr = preg_split($separator, $this->get('query')); $myts =& MyTextSanitizer::getInstance(); - foreach ($tmpArr as $tmp) { - $this->mQueries[] = $myts->addSlashes($tmp); + if ($this->get('andor') == 'exact' && strlen($this->get('query')) >= $this->_mKeywordMin) { + $this->mQueries[] = $myts->addSlashes($this->get('query')); + } + else { + $separator = '/[\s,]+/'; + if (defined('_MD_BASE_FORMAT_SEARCH_SEPARATOR')) { + $separator = _MD_BASE_FORMAT_SEARCH_SEPARATOR; + } + + $tmpArr = preg_split($separator, $this->get('query')); + foreach ($tmpArr as $tmp) { + if (strlen($tmp) >= $this->_mKeywordMin) { + $this->mQueries[] = $myts->addSlashes($tmp); + } + } + } + + $this->set('query', implode(" ", $this->mQueries)); + } + + function validate() + { + parent::validate(); + + if (!count($this->mQueries)) { + $this->addErrorMessage(_MD_BASE_ERROR_SEARCH_QUERY_REQUIRED); } } From minahito @ users.sourceforge.jp Sun May 28 14:06:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:06:50 +0900 Subject: [xoops-cvslog 3204] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060528050650.AA8B52AC0C2@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/main.php diff -u xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.15 xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.16 --- xoops2jp/html/modules/base/language/japanese/main.php:1.1.2.15 Sat May 27 22:08:24 2006 +++ xoops2jp/html/modules/base/language/japanese/main.php Sun May 28 14:06:50 2006 @@ -1,11 +1,12 @@ Index: xoops2jp/html/modules/base/language/english/main.php diff -u xoops2jp/html/modules/base/language/english/main.php:1.1.2.14 xoops2jp/html/modules/base/language/english/main.php:1.1.2.15 --- xoops2jp/html/modules/base/language/english/main.php:1.1.2.14 Sat May 27 22:08:24 2006 +++ xoops2jp/html/modules/base/language/english/main.php Sun May 28 14:06:50 2006 @@ -1,10 +1,11 @@ Index: xoops2jp/html/modules/base/templates/legacy_search_form.html diff -u xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.3 xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.4 --- xoops2jp/html/modules/base/templates/legacy_search_form.html:1.1.2.3 Sat May 27 22:08:54 2006 +++ xoops2jp/html/modules/base/templates/legacy_search_form.html Sun May 28 14:07:16 2006 @@ -1,3 +1,10 @@ +<{if $actionForm->hasError()}> +
      + <{foreach item=message from=$actionForm->getErrorMessages()}> +
    • <{$message|escape}>
    • + <{/foreach}> +
    +<{/if}> <{xoops_input type=hidden name=action value=results}> From minahito @ users.sourceforge.jp Sun May 28 14:07:29 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:07:29 +0900 Subject: [xoops-cvslog 3207] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060528050729.8E6842AC091@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php diff -u xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php:1.1.2.1 Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchShowallbyuserAction.class.php Sun May 28 14:07:29 2006 @@ -9,7 +9,7 @@ { function _setupActionForm() { - $this->mActionForm =& new Legacy_SearchShowallbyuserForm(); + $this->mActionForm =& new Legacy_SearchShowallbyuserForm($this->mConfig['keyword_min']); $this->mActionForm->prepare(); } Index: xoops2jp/html/modules/base/actions/SearchShowallAction.class.php diff -u xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/SearchShowallAction.class.php:1.1.2.1 Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchShowallAction.class.php Sun May 28 14:07:29 2006 @@ -9,7 +9,7 @@ { function _setupActionForm() { - $this->mActionForm =& new Legacy_SearchShowallForm(); + $this->mActionForm =& new Legacy_SearchShowallForm($this->mConfig['keyword_min']); $this->mActionForm->prepare(); } Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php diff -u xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.1 Sat May 27 22:06:25 2006 +++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Sun May 28 14:07:29 2006 @@ -10,29 +10,46 @@ var $mSearchResults = array(); var $mModules = array(); + var $mConfig = array(); + function prepare(&$controller, &$xoopsUser) { $root =& $controller->mRoot; $root->mLanguageManager->loadModuleLanguage('base'); + $handler =& xoops_gethandler('config'); + $this->mConfig =& $handler->getConfigsByCat(XOOPS_CONF_SEARCH); + $this->_setupActionForm(); } function _setupActionForm() { - $this->mActionForm =& new Legacy_SearchResultsForm(); + $this->mActionForm =& new Legacy_SearchResultsForm($this->mConfig['keyword_min']); $this->mActionForm->prepare(); } + function hasPerm(&$controller, &$xoopsUser) + { + if ($this->mConfig['enable_search'] != 1) { + XCube_Utils::redirectHeader(XOOPS_URL, 3, _MD_BASE_ERROR_SEARCH_NOT_ENABLED); + return false; + } + return true; + } + function getDefaultView(&$controller, &$xoopsUser) { $this->mActionForm->fetch(); $this->mActionForm->validate(); + + if ($this->mActionForm->hasError()) { + return LEGACY_FRAME_VIEW_INDEX; + } // // TODO ErrorHandling // - $root =& $controller->mRoot; $service =& $root->mServiceManager->searchXCubeService("LegacySearch"); if ($service) { @@ -68,6 +85,11 @@ return LEGACY_FRAME_VIEW_INDEX; } + function execute(&$controller, &$xoopsUser) + { + return $this->getDefaultView($controller, $xoopsUser); + } + function executeViewIndex(&$controller, &$xoopsUser, &$render) { $render->setTemplateName($this->_getTemplateName()); @@ -82,6 +104,7 @@ // setAttribute $mid or $this->mModules. // $render->setAttribute('selectedMidArr', $this->_getSelectedMids()); + $render->setAttribute('searchRuleMessage', @sprintf(_SR_KEYTOOSHORT, $this->mConfig['keyword_min'])); } function _getTemplateName() @@ -103,7 +126,7 @@ function executeViewError(&$controller, &$xoopsUser, &$render) { - // $controller->executeForward("./index.php?Action=ImageList"); + $controller->executeForward(XOOPS_URL); } } From minahito @ users.sourceforge.jp Sun May 28 14:07:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:07:45 +0900 Subject: [xoops-cvslog 3208] CVS update: xoops2jp/html/modules/base/.xml Message-ID: <20060528050745.2E7B62AC091@users.sourceforge.jp> Index: xoops2jp/html/modules/base/.xml/search.xml diff -u xoops2jp/html/modules/base/.xml/search.xml:1.1.2.1 xoops2jp/html/modules/base/.xml/search.xml:removed --- xoops2jp/html/modules/base/.xml/search.xml:1.1.2.1 Fri May 26 21:01:05 2006 +++ xoops2jp/html/modules/base/.xml/search.xml Sun May 28 14:07:45 2006 @@ -1,8 +0,0 @@ - - - - - - - - From minahito @ users.sourceforge.jp Sun May 28 14:42:26 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:42:26 +0900 Subject: [xoops-cvslog 3209] CVS update: xoops2jp/html/modules/user/admin/templates Message-ID: <20060528054226.1615A2AC06A@users.sourceforge.jp> Index: xoops2jp/html/modules/user/admin/templates/user_list.html diff -u xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.10 xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.11 --- xoops2jp/html/modules/user/admin/templates/user_list.html:1.1.2.10 Thu Apr 13 00:31:39 2006 +++ xoops2jp/html/modules/user/admin/templates/user_list.html Sun May 28 14:42:25 2006 @@ -20,11 +20,11 @@ " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" />" alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> + " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> + " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" /> From minahito @ users.sourceforge.jp Sun May 28 14:42:40 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Sun, 28 May 2006 14:42:40 +0900 Subject: [xoops-cvslog 3210] CVS update: xoops2jp/html/modules/user/admin/forms Message-ID: <20060528054240.7D9D02AC091@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.3 xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.4 --- xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php:1.1.2.3 Tue Apr 11 18:55:25 2006 +++ xoops2jp/html/modules/user/admin/forms/UserFilterForm.class.php Sun May 28 14:42:40 2006 @@ -42,7 +42,7 @@ class User_UserFilterForm extends User_AbstractFilterForm { var $mSort = 0; - var $_mSortKeys = array( + var $mSortKeys = array( USER_SORT_KEY_UID => 'uid', USER_SORT_KEY_NAME => 'name', USER_SORT_KEY_UNAME => 'uname', @@ -200,6 +200,8 @@ if (isset($_REQUEST['user_mailok'])) { $this->_mCriteria->add(new Criteria('user_mailok', array(XOBJ_DTYPE_BOOL, xoops_getrequest('user_mailok')))); } + + $this->_mCriteria->addSort($this->getSort(), $this->getOrder()); } } From nobunobu @ users.sourceforge.jp Sun May 28 16:28:45 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 28 May 2006 16:28:45 +0900 Subject: [xoops-cvslog 3211] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060528072845.0F9582AC0DB@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/handler.php diff -u xoops2jp/html/modules/base/kernel/handler.php:1.1.2.14 xoops2jp/html/modules/base/kernel/handler.php:1.1.2.15 --- xoops2jp/html/modules/base/kernel/handler.php:1.1.2.14 Tue Apr 11 18:54:49 2006 +++ xoops2jp/html/modules/base/kernel/handler.php Sun May 28 16:28:44 2006 @@ -261,10 +261,10 @@ $queryString = ""; $maxCount = $criteria->getCountChildElements(); for ($i = 0; $i < $maxCount ; $i++) { - $queryString .= " " . $this->_makeCriteria4sql($criteria->getChildElement($i)); - if (($i + 1) != $maxCount) { + if ($i != 0) { $queryString .= " " . $criteria->getCondition($i); } + $queryString .= " " . $this->_makeCriteria4sql($criteria->getChildElement($i)); } return "(" . $queryString . ")"; @@ -295,8 +295,10 @@ break; default: - $value = $criteria->getValue(); + $value = $this->db->quoteString($value); } + } else { + $value = $this->db->quoteString($value); } if ($name != null) { From nobunobu @ users.sourceforge.jp Sun May 28 18:01:03 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 28 May 2006 18:01:03 +0900 Subject: [xoops-cvslog 3212] CVS update: xoops2jp/html/modules/stdCache/kernel Message-ID: <20060528090103.505BF2AC06A@users.sourceforge.jp> Index: xoops2jp/html/modules/stdCache/kernel/StdRenderCache.class.php diff -u xoops2jp/html/modules/stdCache/kernel/StdRenderCache.class.php:1.1.2.2 xoops2jp/html/modules/stdCache/kernel/StdRenderCache.class.php:1.1.2.3 --- xoops2jp/html/modules/stdCache/kernel/StdRenderCache.class.php:1.1.2.2 Fri Jan 6 12:05:01 2006 +++ xoops2jp/html/modules/stdCache/kernel/StdRenderCache.class.php Sun May 28 18:01:03 2006 @@ -1,5 +1,5 @@ mGroupIds) == 0 && ($this->mGroupIds[0] == XOOPS_GROUP_USERS || $this->mGroupIds[0] == XOOPS_GROUP_ANONYMOUS)); + return (count($this->mGroupIds) == 1 && ($this->mGroupIds[0] == XOOPS_GROUP_USERS || $this->mGroupIds[0] == XOOPS_GROUP_ANONYMOUS)); } function _setGroupIds($ids) From nobunobu @ users.sourceforge.jp Sun May 28 19:12:30 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 28 May 2006 19:12:30 +0900 Subject: [xoops-cvslog 3213] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060528101230.BCFAD2AC047@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.36 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.37 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.36 Sat May 27 22:06:58 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Sun May 28 19:12:30 2006 @@ -209,6 +209,7 @@ if ($cache->isCache($blockProcedure->getCacheTime())) { $content = $cache->load(); if ($content) { + $this->mRenderSystem->mBlockShowFlags[$blockProcedure->getEntryIndex()] = true; $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( 'title' => $blockProcedure->getTitle(), 'content' => $cache->load(), From nobunobu @ users.sourceforge.jp Sun May 28 19:48:43 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Sun, 28 May 2006 19:48:43 +0900 Subject: [xoops-cvslog 3214] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060528104843.35B7A2AC011@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.37 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.38 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.37 Sun May 28 19:12:30 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Sun May 28 19:48:43 2006 @@ -212,7 +212,7 @@ $this->mRenderSystem->mBlockShowFlags[$blockProcedure->getEntryIndex()] = true; $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( 'title' => $blockProcedure->getTitle(), - 'content' => $cache->load(), + 'content' => $content, 'weight' => $blockProcedure->getWeight() ); } @@ -246,7 +246,7 @@ $this->mRenderSystem->mBlockShowFlags[$blockProcedure->getEntryIndex()] = true; $this->mRenderSystem->mBlockContents[$blockProcedure->getEntryIndex()][] = array( 'title'=>$blockProcedure->getTitle(), - 'content'=>$blockTarget->getResult(), + 'content'=>$content, 'weight'=>$blockProcedure->getWeight() ); } From minahito @ users.sourceforge.jp Mon May 29 13:07:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:07:58 +0900 Subject: [xoops-cvslog 3215] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060529040758.90D122AC0B4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/help.html diff -u xoops2jp/html/modules/base/language/english/help.html:1.1.2.3 xoops2jp/html/modules/base/language/english/help.html:1.1.2.4 --- xoops2jp/html/modules/base/language/english/help.html:1.1.2.3 Sat Apr 15 14:25:35 2006 +++ xoops2jp/html/modules/base/language/english/help.html Mon May 29 13:07:58 2006 @@ -19,6 +19,11 @@
  • Otherwise, you can operate the administration menu just like XOOPS 2.0.x.
  • +

    Block administration / installation

    +
      +
    • Click here to understand this feature.
    • +
    +

    Migration guide (from XOOPS 2.0.x)

    • Please refer here.
    • From minahito @ users.sourceforge.jp Mon May 29 13:07:58 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:07:58 +0900 Subject: [xoops-cvslog 3216] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060529040758.B41732AC0CA@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/help.html diff -u xoops2jp/html/modules/base/language/japanese/help.html:1.1.2.5 xoops2jp/html/modules/base/language/japanese/help.html:1.1.2.6 --- xoops2jp/html/modules/base/language/japanese/help.html:1.1.2.5 Sat Apr 15 14:22:09 2006 +++ xoops2jp/html/modules/base/language/japanese/help.html Mon May 29 13:07:58 2006 @@ -22,6 +22,11 @@ 2.0.xのモジュール管理と同様の動作です。
    +

    ブロックの管理/インストール

    +
      +
    • 詳しくはこちらをご覧下さい。
    • +
    +

    XOOPS 2.0.x 操作移行リスト

    • こちらをご覧ください
    • From minahito @ users.sourceforge.jp Mon May 29 13:08:11 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:08:11 +0900 Subject: [xoops-cvslog 3216] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060529040811.D45702AC0A1@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/english/block.html diff -u /dev/null xoops2jp/html/modules/base/language/english/block.html:1.1.2.1 --- /dev/null Mon May 29 13:08:11 2006 +++ xoops2jp/html/modules/base/language/english/block.html Mon May 29 13:08:11 2006 @@ -0,0 +1,39 @@ +

      How to use Blocks

      +

      Blocks is small content that is displayed to modules you specified. +It is installed with modules that have blocks.

      + +
      Install Blocks
      +

      At first, you have to install blocks to use it. +Click here to start installing blocks. +In the form, you can change the name of the block and apply groups that can see the block. +Weight is order in the column that you specify.

      + +
      Column
      +

      Most themes have three panes. +The central panes has more two panes. +These panes are called Left column, Center-Left column, Center column, Center-right column and Right column. +You can display the block to the column that you specify of the module that you specify.

      + +

      Some themes don't have Left column or Right column. +In such case, one column might be inseted to another column. +You need to read the manual of those themes to understand the feature of them.

      + +
      Note
      +

      The special Render System may give special functions to you about blocks. +If you have installed it, read the manual of your RenderSystem.

      + +
      Block Managing
      +

      You can change the setting of the block anytime in Block Manage. +Click here. +The usage is based on other control functions. +Click the edit icon to change the setting.

      + +
      Uninstall Block
      +

      If you hope to lay off the display of the block, click the uninstall icon. +The block returns into the list of uninstall blocks. +The setting of the block is kept until you uninstall the module that has the block. +You can re-install the block anytime.

      + +
      FOR XOOPS2 USERS
      +

      XOOPS Cube Legacy 2.1 has separated the list of un-used blocks from Block Manage. +It is like Module Manage.

      From minahito @ users.sourceforge.jp Mon May 29 13:08:12 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:08:12 +0900 Subject: [xoops-cvslog 3217] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060529040812.0FF882AC0B4@users.sourceforge.jp> Index: xoops2jp/html/modules/base/language/japanese/block.html diff -u /dev/null xoops2jp/html/modules/base/language/japanese/block.html:1.1.2.1 --- /dev/null Mon May 29 13:08:12 2006 +++ xoops2jp/html/modules/base/language/japanese/block.html Mon May 29 13:08:11 2006 @@ -0,0 +1,38 @@ +

      ブロックの使い方

      +

      ブロックはあなたが指定したモジュールに表示される小さなコンテンツです。 +それはブロックを持つモジュールと一緒にインストールされます。

      + +
      ブロックのインストール
      +

      まずはじめに、あなたはブロックを使うためにブロックをインストールしなければなりません。 +ブロックのインストールを始めるために、ここをクリックしてください。 +入力フォームで、ブロックの名前やブロックにアクセス可能なグループを指定することが出来ます。 +優先度はあなたが指定したカラムにおける表示順序です。

      + +
      カラム
      +

      ほとんどのテーマは3ペイン方式をとっています。 +中央ペインはさらに2つのペインを持っています。 +これらのペインは、左カラム、中央左カラム、中央カラム、中央右カラム、右カラムと呼ばれています。 +あなたは指定モジュールの指定カラムにブロックを表示させることが出来ます。

      + +

      いくつかのテーマは左カラムか右カラムを持っていません。 +そのようなケースでは、片方のカラムはもう片方のカラムに挿入されています。 +そのようなテーマの特徴を理解するために、テーマのマニュアルを読んでください。

      + +
      +

      特別なレンダーシステムはブロックに関して特別な機能を付与するかもしれません。 +もしそのようなものをインストールしているのであれば、そのレンダーシステムのマニュアルを読んでください。

      + +
      ブロック管理
      +

      ブロック管理で、いつでもブロックの設定を変更できます。 +ここをクリックしてください。その使い方は、他の操作機能に基づいており、ほとんど違いはありません。 +設定を変更する場合は編集アイコンをクリックしてください。

      + +
      ブロックのアンインストール
      +

      ブロックの表示を一時停止したい場合は、アンインストールアイコンをクリックしてください。 +ブロックはアンインストールブロックのリストへ戻ります。 +ブロックの設定はあなたがそのブロックを含むモジュールをアンインストールするまで、保持されます。 +あなたはいつでもそのブロックを再インストールできます。

      + +
      FOR XOOPS2 USERS
      +

      XOOPS Cube Legacy 2.1 では、ブロック管理から未使用ブロックのリストを切り離しました。 +モジュール管理のようなコンセプトになっています。

      From minahito @ users.sourceforge.jp Mon May 29 13:51:51 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:51:51 +0900 Subject: [xoops-cvslog 3218] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060529045151.61D702AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/SearchAction.class.php diff -u /dev/null xoops2jp/html/modules/base/actions/SearchAction.class.php:1.1.2.1 --- /dev/null Mon May 29 13:51:51 2006 +++ xoops2jp/html/modules/base/actions/SearchAction.class.php Mon May 29 13:51:51 2006 @@ -0,0 +1,44 @@ +_makeModuleList($xoopsUser); + + return LEGACY_FRAME_VIEW_INDEX; + } + + function _getSelectedMids() + { + $ret = array(); + foreach(array_keys($this->mModules) as $key) { + $ret[] = $this->mModules[$key]->get('mid'); + } + + return $ret; + } + + function executeViewIndex(&$controller, &$xoopsUser, &$render) + { + $render->setTemplateName("legacy_search_form.html"); + + $render->setAttribute('actionForm', $this->mActionForm); + + $render->setAttribute('moduleArr', $this->mModules); + + // + // If the request include $mids, setAttribute it. If it don't include, + // setAttribute $mid or $this->mModules. + // + $render->setAttribute('selectedMidArr', $this->_getSelectedMids()); + $render->setAttribute('searchRuleMessage', @sprintf(_SR_KEYTOOSHORT, $this->mConfig['keyword_min'])); + } +} + +?> From minahito @ users.sourceforge.jp Mon May 29 13:52:12 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 13:52:12 +0900 Subject: [xoops-cvslog 3219] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060529045212.B625F2AC020@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/SearchResultsAction.class.php diff -u xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.2 xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/actions/SearchResultsAction.class.php:1.1.2.2 Sun May 28 14:07:29 2006 +++ xoops2jp/html/modules/base/actions/SearchResultsAction.class.php Mon May 29 13:52:12 2006 @@ -43,6 +43,8 @@ $this->mActionForm->fetch(); $this->mActionForm->validate(); + $this->_makeModuleList($xoopsUser); + if ($this->mActionForm->hasError()) { return LEGACY_FRAME_VIEW_INDEX; } @@ -65,7 +67,12 @@ else { return LEGACY_FRAME_VIEW_ERROR; } - + + return LEGACY_FRAME_VIEW_INDEX; + } + + function _makeModuleList(&$xoopsUser) + { // // Make the module list for search form. // @@ -81,8 +88,6 @@ } unset($module); } - - return LEGACY_FRAME_VIEW_INDEX; } function execute(&$controller, &$xoopsUser) From minahito @ users.sourceforge.jp Mon May 29 16:06:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 16:06:13 +0900 Subject: [xoops-cvslog 3220] CVS update: xoops2jp/html/modules/base/admin/forms Message-ID: <20060529070613.B9EC32AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php diff -u xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.5 xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.6 --- xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php:1.1.2.5 Thu May 25 18:30:34 2006 +++ xoops2jp/html/modules/base/admin/forms/ImageAdminEditForm.class.php Mon May 29 16:06:13 2006 @@ -8,9 +8,11 @@ class Legacy_ImageAdminEditForm extends Legacy_ImageUploadForm { + var $_mImgcatId = 0; + function getTokenName() { - return "module.base.ImageAdminEditForm.TOKEN" . $this->get('image_id'); + return "module.base.ImageAdminEditForm.TOKEN" . $this->getImgcatId(); } function prepare() @@ -36,16 +38,19 @@ $this->mFieldProperties['image_weight']->addMessage('required', _AD_BASE_ERROR_REQUIRED, _AD_BASE_LANG_IMAGE_WEIGHT); } - function validateImgcat_id() - { - } - function load(&$obj) { parent::load($obj); $this->set('image_id', $obj->get('image_id')); $this->set('image_display', $obj->get('image_display')); $this->set('image_weight', $obj->get('image_weight')); + + $this->_mImgcatId = $obj->get('imgcat_id'); + } + + function getImgcatId() + { + return $this->_mIsNew ? $this->get('imgcat_id') : $this->_mImgcatId; } function update(&$obj) From minahito @ users.sourceforge.jp Mon May 29 16:06:48 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 16:06:48 +0900 Subject: [xoops-cvslog 3221] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060529070648.492662AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/image_edit.html diff -u xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.4 xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.5 --- xoops2jp/html/modules/base/admin/templates/image_edit.html:1.1.2.4 Wed May 17 00:27:17 2006 +++ xoops2jp/html/modules/base/admin/templates/image_edit.html Mon May 29 16:06:47 2006 @@ -59,14 +59,18 @@ <{xoops_input type=text name=image_weight value=$actionForm->get('image_weight') size=5}>
    - - - - + <{if $object->isNew()}> + + + + + <{else}> + <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> + <{/if}> + <{elseif $obj->mOverride == null && $targetTplset != null && $targetTplset != 'default'}> + " alt="<{$smarty.const._CLONE}>" title="<{$smarty.const._CLONE}>" /> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> + <{else}> - " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + <{if $obj->getVar('tpl_tplset') == 'default'}> + " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_VIEW}>" /> + <{else}> + " alt="<{$smarty.const._EDIT}>" title="<{$smarty.const._EDIT}>" /> + <{/if}> " alt="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" title="<{$smarty.const._AD_LEGACYRENDER_LANG_TPLSET_DOWNLOAD}>" /> <{/if}> + <{/foreach}> From nobunobu @ users.sourceforge.jp Tue May 30 12:34:54 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 30 May 2006 12:34:54 +0900 Subject: [xoops-cvslog 3233] CVS update: xoops2jp/html/class Message-ID: <20060530033454.AE14F2AC031@users.sourceforge.jp> Index: xoops2jp/html/class/snoopy.php diff -u xoops2jp/html/class/snoopy.php:1.2 xoops2jp/html/class/snoopy.php:1.2.2.1 --- xoops2jp/html/class/snoopy.php:1.2 Mon May 1 11:37:24 2006 +++ xoops2jp/html/class/snoopy.php Tue May 30 12:34:54 2006 @@ -43,6 +43,7 @@ var $host = "www.php.net"; // host name we are connecting to var $port = 80; // port we are connecting to + var $host_port = ""; // port for Host Header var $proxy_host = ""; // proxy host to use var $proxy_port = ""; // proxy port to use var $proxy_user = ""; // proxy user to use @@ -144,8 +145,10 @@ { case "http": $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_connect($fp)) { if($this->_isproxy) @@ -208,8 +211,10 @@ if (!is_executable($this->curl_path)) return false; $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_isproxy) { // using proxy, send entire URI @@ -296,8 +301,10 @@ { case "http": $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_connect($fp)) { if($this->_isproxy) @@ -367,8 +374,10 @@ if (!is_executable($this->curl_path)) return false; $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_isproxy) { // using proxy, send entire URI @@ -807,8 +816,8 @@ $headers .= "User-Agent: ".$this->agent."\r\n"; if(!empty($this->host) && !isset($this->rawheaders['Host'])) { $headers .= "Host: ".$this->host; - if(!empty($this->port)) - $headers .= ":".$this->port; + if(!empty($this->host_port)) + $headers .= ":".$this->host_port; $headers .= "\r\n"; } if(!empty($this->accept)) @@ -884,7 +893,9 @@ if(!preg_match("|\:\/\/|",$matches[2])) { // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host; + if(!empty($this->host_port)) + $this->_redirectaddr .= ":".$this->host_port; // eliminate double slash if(!preg_match("|^/|",$matches[2])) $this->_redirectaddr .= "/".$matches[2]; @@ -971,8 +982,8 @@ if(!empty($this->agent)) $headers[] = "User-Agent: ".$this->agent; if(!empty($this->host)) - if(!empty($this->port)) - $headers[] = "Host: ".$this->host.":".$this->port; + if(!empty($this->host_port)) + $headers[] = "Host: ".$this->host.":".$this->host_port; else $headers[] = "Host: ".$this->host; if(!empty($this->accept)) @@ -1053,7 +1064,9 @@ if(!preg_match("|\:\/\/|",$matches[2])) { // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host; + if(!empty($this->host_port)) + $this->_redirectaddr .= ":".$this->host_port; // eliminate double slash if(!preg_match("|^/|",$matches[2])) $this->_redirectaddr .= "/".$matches[2]; From nobunobu @ users.sourceforge.jp Tue May 30 12:35:49 2006 From: nobunobu @ users.sourceforge.jp (NobuNobu) Date: Tue, 30 May 2006 12:35:49 +0900 Subject: [xoops-cvslog 3234] CVS update: xoops2jp/html/class Message-ID: <20060530033549.08BD52AC031@users.sourceforge.jp> Index: xoops2jp/html/class/snoopy.php diff -u xoops2jp/html/class/snoopy.php:1.1.8.1 xoops2jp/html/class/snoopy.php:1.1.8.2 --- xoops2jp/html/class/snoopy.php:1.1.8.1 Sun Nov 20 21:21:38 2005 +++ xoops2jp/html/class/snoopy.php Tue May 30 12:35:48 2006 @@ -43,6 +43,7 @@ var $host = "www.php.net"; // host name we are connecting to var $port = 80; // port we are connecting to + var $host_port = ""; // port for Host Header var $proxy_host = ""; // proxy host to use var $proxy_port = ""; // proxy port to use var $proxy_user = ""; // proxy user to use @@ -144,8 +145,10 @@ { case "http": $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_connect($fp)) { if($this->_isproxy) @@ -208,8 +211,10 @@ if (!is_executable($this->curl_path)) return false; $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_isproxy) { // using proxy, send entire URI @@ -296,8 +301,10 @@ { case "http": $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_connect($fp)) { if($this->_isproxy) @@ -367,8 +374,10 @@ if (!is_executable($this->curl_path)) return false; $this->host = $URI_PARTS["host"]; - if(!empty($URI_PARTS["port"])) + if(!empty($URI_PARTS["port"])) { $this->port = $URI_PARTS["port"]; + $this->host_port = $URI_PARTS["port"]; + } if($this->_isproxy) { // using proxy, send entire URI @@ -807,8 +816,8 @@ $headers .= "User-Agent: ".$this->agent."\r\n"; if(!empty($this->host) && !isset($this->rawheaders['Host'])) { $headers .= "Host: ".$this->host; - if(!empty($this->port)) - $headers .= ":".$this->port; + if(!empty($this->host_port)) + $headers .= ":".$this->host_port; $headers .= "\r\n"; } if(!empty($this->accept)) @@ -884,7 +893,9 @@ if(!preg_match("|\:\/\/|",$matches[2])) { // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host; + if(!empty($this->host_port)) + $this->_redirectaddr .= ":".$this->host_port; // eliminate double slash if(!preg_match("|^/|",$matches[2])) $this->_redirectaddr .= "/".$matches[2]; @@ -971,8 +982,8 @@ if(!empty($this->agent)) $headers[] = "User-Agent: ".$this->agent; if(!empty($this->host)) - if(!empty($this->port)) - $headers[] = "Host: ".$this->host.":".$this->port; + if(!empty($this->host_port)) + $headers[] = "Host: ".$this->host.":".$this->host_port; else $headers[] = "Host: ".$this->host; if(!empty($this->accept)) @@ -1053,7 +1064,9 @@ if(!preg_match("|\:\/\/|",$matches[2])) { // no host in the path, so prepend - $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host; + if(!empty($this->host_port)) + $this->_redirectaddr .= ":".$this->host_port; // eliminate double slash if(!preg_match("|^/|",$matches[2])) $this->_redirectaddr .= "/".$matches[2]; From minahito @ users.sourceforge.jp Tue May 30 12:54:19 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:54:19 +0900 Subject: [xoops-cvslog 3235] CVS update: xoops2jp/html/kernel Message-ID: <20060530035419.69F6F2AC031@users.sourceforge.jp> Index: xoops2jp/html/kernel/config.php diff -u xoops2jp/html/kernel/config.php:1.2.8.2 xoops2jp/html/kernel/config.php:1.2.8.3 --- xoops2jp/html/kernel/config.php:1.2.8.2 Sun Apr 23 00:53:00 2006 +++ xoops2jp/html/kernel/config.php Tue May 30 12:54:19 2006 @@ -1,5 +1,5 @@ getByDirname($dirname); + if (!is_object($module)) { + return $ret; + } + + $ret =& $this->getConfigsByCat($category, $module->get('mid')); + + return $ret; + } /** * Make a new {@link XoopsConfigOption} From minahito @ users.sourceforge.jp Tue May 30 12:54:54 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:54:54 +0900 Subject: [xoops-cvslog 3236] CVS update: xoops2jp/html/modules/base/actions Message-ID: <20060530035454.707992AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/base/actions/ImageListAction.class.php diff -u xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/ImageListAction.class.php:1.1.2.1 Thu May 25 18:28:50 2006 +++ xoops2jp/html/modules/base/actions/ImageListAction.class.php Tue May 30 12:54:54 2006 @@ -13,11 +13,14 @@ function prepare(&$controller, &$xoopsUser) { $controller->setDialogMode(true); + + $root =& $controller->mRoot; + $root->mLanguageManager->loadModuleLanguage('base'); } function &_getHandler() { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); return $handler; } @@ -29,7 +32,7 @@ function _getBaseUrl() { - return "./index.php?action=ImageList"; + return XOOPS_URL . "/imagemanager.php?op=list"; } function getDefaultView(&$contoller, &$xoopsUser) @@ -37,7 +40,7 @@ $result = parent::getDefaultView($controller, $xoopsUser); if ($result == LEGACY_FRAME_VIEW_INDEX) { $this->mImgcatId = xoops_getrequest('imgcat_id'); - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); $this->mCategory =& $handler->get($this->mImgcatId ); } @@ -57,7 +60,7 @@ $render->setAttribute('imgcatId', $this->mImgcatId); - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); if (is_object($xoopsUser)) { $groups =& $xoopsUser->getGroups(); Index: xoops2jp/html/modules/base/actions/ImageUploadAction.class.php diff -u xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.1 xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.2 --- xoops2jp/html/modules/base/actions/ImageUploadAction.class.php:1.1.2.1 Thu May 25 18:28:50 2006 +++ xoops2jp/html/modules/base/actions/ImageUploadAction.class.php Tue May 30 12:54:54 2006 @@ -13,11 +13,14 @@ { parent::prepare($controller, $xoopsUser); $controller->setDialogMode(true); + + $root =& $controller->mRoot; + $root->mLanguageManager->loadModuleLanguage('base'); } function &_getHandler() { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); return $handler; } @@ -44,7 +47,7 @@ $groups = array(XOOPS_GROUP_ANONYMOUS); } - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); $this->mCategory =& $handler->get(xoops_getrequest('imgcat_id')); if (!is_object($this->mCategory ) || (is_object($this->mCategory) && !$this->mCategory->hasUploadPerm($groups))) { return false; @@ -65,12 +68,12 @@ function executeViewSuccess(&$controller, &$xoopsUser, &$render) { - $controller->executeForward("./index.php?action=ImageList&imgcat_id=" . $this->mActionForm->get('imgcat_id') . "&target=" . xoops_getrequest('target')); + $controller->executeForward(XOOPS_URL . "/imagemanager.php?imgcat_id=" . $this->mActionForm->get('imgcat_id') . "&target=" . xoops_getrequest('target')); } function executeViewError(&$controller, &$xoopsUser, &$render) { - redirect_header("./index.php?action=ImageList", 1, _MD_BASE_ERROR_DBUPDATE_FAILED); + redirect_header(XOOPS_URL . "/imagemanager.php", 1, _MD_BASE_ERROR_DBUPDATE_FAILED); } } From minahito @ users.sourceforge.jp Tue May 30 12:55:02 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:55:02 +0900 Subject: [xoops-cvslog 3237] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060530035504.B6A962AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php:1.1.2.4 Wed May 17 12:09:19 2006 +++ xoops2jp/html/modules/base/admin/actions/ImageEditAction.class.php Tue May 30 12:55:02 2006 @@ -14,7 +14,7 @@ function &_getHandler() { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); return $handler; } @@ -26,7 +26,7 @@ function _doExecute() { - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); $category =& $handler->get($this->mActionForm->get('imgcat_id')); if ($category->get('imgcat_storetype') == 'file') { @@ -66,7 +66,7 @@ $render->setAttribute('actionForm', $this->mActionForm); $render->setAttribute('object', $this->mObject); - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); $categoryArr =& $handler->getObjects(); $render->setAttribute('categoryArr', $categoryArr); } From minahito @ users.sourceforge.jp Tue May 30 12:55:18 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:55:18 +0900 Subject: [xoops-cvslog 3238] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060530035518.30B4A2AC058@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.4 xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.5 --- xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php:1.1.2.4 Tue Mar 28 22:28:35 2006 +++ xoops2jp/html/modules/base/admin/actions/ModuleUpdateAction.class.php Tue May 30 12:55:18 2006 @@ -1,6 +1,6 @@ mEventManager->raiseEvent("Module.Legacy.ModuleUpdate.Success", $this, $this->mModuleObject); + $renderer->setTemplateName("module_update_success.html"); $renderer->setAttribute('log',$this->mLog->mMessages); } Index: xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php diff -u xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.7 xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.8 --- xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php:1.1.2.7 Sun Apr 16 11:10:50 2006 +++ xoops2jp/html/modules/base/admin/actions/ModuleInstallAction.class.php Tue May 30 12:55:18 2006 @@ -1,6 +1,6 @@ mEventManager->raiseEvent("Module.Legacy.ModuleInstall.Success", $this, $this->mModuleObject); + $renderer->setTemplateName("module_install_success.html"); $renderer->setAttribute('log', $this->mLog->mMessages); } From minahito @ users.sourceforge.jp Tue May 30 12:55:26 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:55:26 +0900 Subject: [xoops-cvslog 3239] CVS update: xoops2jp/html/modules/base/class Message-ID: <20060530035526.A51B12AC058@users.sourceforge.jp> Index: xoops2jp/html/modules/base/class/image.php diff -u xoops2jp/html/modules/base/class/image.php:1.1.2.3 xoops2jp/html/modules/base/class/image.php:1.1.2.4 --- xoops2jp/html/modules/base/class/image.php:1.1.2.3 Mon May 15 17:34:25 2006 +++ xoops2jp/html/modules/base/class/image.php Tue May 30 12:55:26 2006 @@ -24,7 +24,7 @@ function loadImagecategory() { if ($this->_mImageCategoryLoadedFlag == false) { - $handler =& xoops_getmodulehandler('imagecategory'); + $handler =& xoops_getmodulehandler('imagecategory', 'base'); $this->mImageCategory =& $handler->get($this->get('imgcat_id')); $this->_mImageCategoryLoadedFlag = true; } @@ -33,7 +33,7 @@ function loadImagebody() { if ($this->_mImageBodyLoadedFlag == false) { - $handler =& xoops_getmodulehandler('imagebody'); + $handler =& xoops_getmodulehandler('imagebody', 'base'); $this->mImageBody =& $handler->get($this->get('image_id')); $this->_mImageBodyLoadedFlag = true; } @@ -41,7 +41,7 @@ function &createImagebody() { - $handler =& xoops_getmodulehandler('imagebody'); + $handler =& xoops_getmodulehandler('imagebody', 'base'); $obj =& $handler->create(); $obj->set('image_id', $this->get('image_id')); return $obj; Index: xoops2jp/html/modules/base/class/imagebody.php diff -u xoops2jp/html/modules/base/class/imagebody.php:1.1.2.1 xoops2jp/html/modules/base/class/imagebody.php:1.1.2.2 --- xoops2jp/html/modules/base/class/imagebody.php:1.1.2.1 Mon May 15 17:34:32 2006 +++ xoops2jp/html/modules/base/class/imagebody.php Tue May 30 12:55:26 2006 @@ -16,7 +16,7 @@ function loadImagebody() { if ($this->_mImageBodyLoadedFlag == false) { - $handler =& xoops_getmodulehandler('imagebody'); + $handler =& xoops_getmodulehandler('imagebody', 'base'); $this->mImageBody =& $handler->get($this->get('image_id')); $this->_mImageBodyLoadedFlag = true; } @@ -24,7 +24,7 @@ function &createImagebody() { - $handler =& xoops_getmodulehandler('imagebody'); + $handler =& xoops_getmodulehandler('imagebody', 'base'); $obj =& $handler->create(); $obj->set('image_id', $this->get('image_id')); return $obj; @@ -49,7 +49,7 @@ function delete(&$obj, $force = false) { - $handler =& xoops_getmodulehandler('imagebody'); + $handler =& xoops_getmodulehandler('imagebody', 'base'); $handler->delete($obj->get('image_id')); unset($handler); Index: xoops2jp/html/modules/base/class/imagecategory.php diff -u xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.3 xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.4 --- xoops2jp/html/modules/base/class/imagecategory.php:1.1.2.3 Thu May 25 18:31:34 2006 +++ xoops2jp/html/modules/base/class/imagecategory.php Tue May 30 12:55:26 2006 @@ -36,7 +36,7 @@ function loadImage() { if ($this->_mImageLoadedFlag == false) { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); $this->mImage =& $handler->getObjects(new Criteria('imagecat_id', $this->get('imagecat_id'))); $this->_mImageLoadedFlag = true; } @@ -44,7 +44,7 @@ function &createImage() { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); $obj =& $handler->create(); $obj->set('imagecat_id', $this->get('imagecat_id')); return $obj; @@ -52,7 +52,7 @@ function getImageCount() { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); return $handler->getCount(new Criteria('imgcat_id', $this->get('imgcat_id'))); } @@ -224,7 +224,7 @@ function delete(&$obj, $force = false) { - $handler =& xoops_getmodulehandler('image'); + $handler =& xoops_getmodulehandler('image', 'base'); $handler->deleteAll(new Criteria('imagecat_id', $obj->get('imagecat_id'))); unset($handler); From minahito @ users.sourceforge.jp Tue May 30 12:58:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:58:04 +0900 Subject: [xoops-cvslog 3240] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060530035804.3EBEE2AC03E@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.6 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.7 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.6 Mon May 29 19:40:10 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Tue May 30 12:58:04 2006 @@ -1,6 +1,6 @@ executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList&target=" . xoops_getrequest('target')); + require_once XOOPS_MODULE_PATH . "/base/class/ActionFrame.class.php"; + + $moduleRunner =& new Legacy_ActionFrame(false); + + $action = isset($_REQUEST['op']) ? ucfirst(xoops_getrequest('op')) : "List"; + + $moduleRunner->setActionName('Image' . $action); + + $controller->setActionStrategy($moduleRunner); + + $controller->executeAction(); + + $controller->executeView(); } function AccessToBackend(&$controller,$eventArgs) From minahito @ users.sourceforge.jp Tue May 30 12:58:15 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:58:15 +0900 Subject: [xoops-cvslog 3241] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060530035815.6505A2AC058@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_image_upload.html diff -u xoops2jp/html/modules/base/templates/legacy_image_upload.html:1.1.2.1 xoops2jp/html/modules/base/templates/legacy_image_upload.html:1.1.2.2 --- xoops2jp/html/modules/base/templates/legacy_image_upload.html:1.1.2.1 Thu May 25 18:29:02 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_upload.html Tue May 30 12:58:15 2006 @@ -5,7 +5,7 @@ <{/foreach}> <{/if}> - + <{xoops_token form=$actionForm}> <{xoops_input type=hidden name=imgcat_id value=$actionForm->get('imgcat_id')}> <{xoops_input type=hidden name=target value=$target}> Index: xoops2jp/html/modules/base/templates/legacy_image_list.html diff -u xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.3 xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.4 --- xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.3 Mon May 29 23:55:06 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_list.html Tue May 30 12:58:15 2006 @@ -18,7 +18,7 @@ - <{xoops_optionsArray from=$categoryArr value=imgcat_id label=imgcat_name default=$imgcatId}> @@ -26,7 +26,7 @@ <{if $hasUploadPerm}> - [ <{$smarty.const._MD_BASE_LANG_IMAGE_UPLOAD}> ] + [ <{$smarty.const._MD_BASE_LANG_IMAGE_UPLOAD}> ] <{/if}>
    <{$smarty.const._AD_USER_LANG_REGDATE}>
    - " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
    <{$smarty.const._AD_USER_LANG_LASTLOGIN}>
    - " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> - " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
    <{$smarty.const._AD_USER_LANG_POSTS}>
    " alt="<{$smarty.const._ASCENDING}>" title="<{$smarty.const._ASCENDING}>" /> " alt="<{$smarty.const._DESCENDING}>" title="<{$smarty.const._DESCENDING}>" />
    <{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>"> - -
    <{$smarty.const._AD_BASE_LANG_IMGCAT_ID}>"> + +
    From minahito @ users.sourceforge.jp Mon May 29 16:07:06 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 16:07:06 +0900 Subject: [xoops-cvslog 3222] CVS update: xoops2jp/html/modules/base/forms Message-ID: <20060529070706.4AF112AC024@users.sourceforge.jp> Index: xoops2jp/html/modules/base/forms/ImageUploadForm.class.php diff -u xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.1 xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.2 --- xoops2jp/html/modules/base/forms/ImageUploadForm.class.php:1.1.2.1 Thu May 25 18:31:49 2006 +++ xoops2jp/html/modules/base/forms/ImageUploadForm.class.php Mon May 29 16:07:06 2006 @@ -4,7 +4,6 @@ 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/ImageAdminEditForm.class.php"; class Legacy_ImageUploadForm extends XCube_ActionForm { @@ -52,7 +51,7 @@ */ function validateImgcat_id() { - $imgcat_id = $this->get('imgcat_id'); + $imgcat_id = $this->getImgcatId(); if ($imgcat_id != null) { $root =& XCube_Root::getSingleton(); $xoopsUser =& $root->mController->getXoopsUser(); @@ -87,7 +86,7 @@ parent::validate(); $handler =& xoops_getmodulehandler('imagecategory', 'base'); - $category =& $handler->get($this->get('imgcat_id')); + $category =& $handler->get($this->getImgcatId()); $formFile = $this->get('image_name'); @@ -107,6 +106,11 @@ } } } + + function getImgcatId() + { + return $this->get('imgcat_id'); + } function load(&$obj) { @@ -121,10 +125,10 @@ { $obj->set('image_nicename', $this->get('image_nicename')); $obj->set('image_display', true); - $obj->set('imgcat_id', $this->get('imgcat_id')); + $obj->set('imgcat_id', $this->getImgcatId()); $handler =& xoops_getmodulehandler('imagecategory', 'base'); - $category =& $handler->get($this->get('imgcat_id')); + $category =& $handler->get($this->getImgcatId()); $this->mFormFile = $this->get('image_name'); From minahito @ users.sourceforge.jp Mon May 29 16:33:36 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 16:33:36 +0900 Subject: [xoops-cvslog 3223] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060529073336.E61102AC027@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.38 xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.39 --- xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php:1.1.2.38 Sun May 28 19:48:43 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_Controller.class.php Mon May 29 16:33:36 2006 @@ -836,9 +836,9 @@ } else { // - // If you does not have module_contoller, this request is to toppage. + // If you does not have module_contoller, this request is to toppage or other pages of toppage. // - $mid = -1; + $mid = preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) ? -1 : 0; } $blockHandler =& xoops_gethandler('block'); From minahito @ users.sourceforge.jp Mon May 29 16:34:45 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 16:34:45 +0900 Subject: [xoops-cvslog 3224] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060529073445.2C0162AC024@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.15 xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.16 --- xoops2jp/html/modules/base/language/japanese/modinfo.php:1.1.2.15 Fri May 12 19:16:48 2006 +++ xoops2jp/html/modules/base/language/japanese/modinfo.php Mon May 29 16:34:45 2006 @@ -1,48 +1,48 @@ - + From minahito @ users.sourceforge.jp Mon May 29 17:02:00 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 17:02:00 +0900 Subject: [xoops-cvslog 3225] CVS update: xoops2jp/html/modules/user/language/english Message-ID: <20060529080200.3E1BF2AC023@users.sourceforge.jp> Index: xoops2jp/html/modules/user/language/english/help.html diff -u xoops2jp/html/modules/user/language/english/help.html:1.1.2.1 xoops2jp/html/modules/user/language/english/help.html:1.1.2.2 --- xoops2jp/html/modules/user/language/english/help.html:1.1.2.1 Sat Feb 4 01:36:07 2006 +++ xoops2jp/html/modules/user/language/english/help.html Mon May 29 17:02:00 2006 @@ -37,6 +37,16 @@

    Mail Users

    • Administrators can send mass email or newsletter to registered users. You may narrow down recipient of emails by registered date, last login date and so on. It may be useful to send welcome messages to new users, to send email notification to persons who has not accessed to your website for a certain period.
    • +
        +
      • At first, list up target users by User Search. +
      • Check the list and click "Send mail by this condition". +
      • Input the subject and the content of the mail. +
      • Choose the mailjob in the list of mailjobs. +
      • Follow the guide message and click the submit button. +
      +
    • You can edit the mailjob anytime until you finish sending it. +
    • You can include names of the target user into the subject and the message by the special format. +
    • And, that function can be extended by custom files or custom modules. If you hope more functions, find such modules.

    Preferences

    From minahito @ users.sourceforge.jp Mon May 29 17:51:08 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 17:51:08 +0900 Subject: [xoops-cvslog 3226] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060529085108.7E4842AC023@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.2 xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php:1.1.2.3 --- xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php:1.1.2.2 Tue Apr 11 10:50:59 2006 +++ xoops2jp/html/modules/base/admin/actions/CustomBlockEditAction.class.php Mon May 29 17:51:08 2006 @@ -42,11 +42,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 Mon May 29 18:12:13 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 18:12:13 +0900 Subject: [xoops-cvslog 3227] CVS update: xoops2jp/html/modules/base/admin/actions Message-ID: <20060529091213.E56B12AC026@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.6 xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.7 --- xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php:1.1.2.6 Tue Apr 11 12:19:29 2006 +++ xoops2jp/html/modules/base/admin/actions/BlockEditAction.class.php Mon May 29 18:12:13 2006 @@ -81,6 +81,10 @@ $handler =& xoops_getmodulehandler('block_module_link', 'base'); $handler->deleteAll(new Criteria('block_id', $this->mObject->get('bid'))); foreach ($this->mObject->mBmodule as $bmodule) { + // + // If object is new, $bmodule isn't set bid yet. + // + $bmodule->set('block_id', $this->mObject->get('bid')); $handler->insert($bmodule); } From minahito @ users.sourceforge.jp Mon May 29 19:25:43 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 19:25:43 +0900 Subject: [xoops-cvslog 3228] CVS update: xoops2jp/html/modules/base/admin/templates/blocks Message-ID: <20060529102543.E4C702AC022@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/blocks/legacy_admin_block_sidemenu.html diff -u xoops2jp/html/modules/base/admin/templates/blocks/legacy_admin_block_sidemenu.html:1.1.2.11 xoops2jp/html/modules/base/admin/templates/blocks/legacy_admin_block_sidemenu.html:1.1.2.12 --- xoops2jp/html/modules/base/admin/templates/blocks/legacy_admin_block_sidemenu.html:1.1.2.11 Sat Feb 4 15:24:11 2006 +++ xoops2jp/html/modules/base/admin/templates/blocks/legacy_admin_block_sidemenu.html Mon May 29 19:25:43 2006 @@ -15,7 +15,7 @@ <{/if}> <{/foreach}> <{else}> -
  • 設定はありません
  • +
  • * No setting*
  • <{/if}>
    From minahito @ users.sourceforge.jp Mon May 29 19:39:50 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 19:39:50 +0900 Subject: [xoops-cvslog 3229] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060529103950.5F53F2AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.4 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.5 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.4 Sat May 27 22:07:24 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Mon May 29 19:39:50 2006 @@ -1,6 +1,6 @@ executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList"); + // + // This forward is temp. + // + $controller->executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList&target=" . xoops_gethandler('target')); } function AccessToBackend(&$controller,$eventArgs) From minahito @ users.sourceforge.jp Mon May 29 19:40:10 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Mon, 29 May 2006 19:40:10 +0900 Subject: [xoops-cvslog 3230] CVS update: xoops2jp/html/modules/base/kernel Message-ID: <20060529104010.370092AC02B@users.sourceforge.jp> Index: xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php diff -u xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.5 xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.6 --- xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php:1.1.2.5 Mon May 29 19:39:50 2006 +++ xoops2jp/html/modules/base/kernel/Legacy_EventFunctions.class.php Mon May 29 19:40:10 2006 @@ -1,6 +1,6 @@ executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList&target=" . xoops_gethandler('target')); + $controller->executeForward(XOOPS_MODULE_URL . "/base/index.php?action=ImageList&target=" . xoops_getrequest('target')); } function AccessToBackend(&$controller,$eventArgs) From tom_g3x @ users.sourceforge.jp Mon May 29 23:55:06 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Mon, 29 May 2006 23:55:06 +0900 Subject: [xoops-cvslog 3231] CVS update: xoops2jp/html/modules/base/templates Message-ID: <20060529145506.AA0A22AC02A@users.sourceforge.jp> Index: xoops2jp/html/modules/base/templates/legacy_image_list.html diff -u xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.2 xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.3 --- xoops2jp/html/modules/base/templates/legacy_image_list.html:1.1.2.2 Thu May 25 23:41:28 2006 +++ xoops2jp/html/modules/base/templates/legacy_image_list.html Mon May 29 23:55:06 2006 @@ -1,6 +1,24 @@ + - <{xoops_optionsArray from=$categoryArr value=imgcat_id label=imgcat_name default=$imgcatId}> @@ -50,5 +68,4 @@ - + \ No newline at end of file From tom_g3x @ users.sourceforge.jp Tue May 30 00:20:41 2006 From: tom_g3x @ users.sourceforge.jp (Tom Hayakawa) Date: Tue, 30 May 2006 00:20:41 +0900 Subject: [xoops-cvslog 3232] CVS update: xoops2jp/html/modules/legacyRender/admin/templates Message-ID: <20060529152041.340EE2AC029@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html diff -u xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.10 xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.11 --- xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html:1.1.2.10 Sat May 27 01:12:32 2006 +++ xoops2jp/html/modules/legacyRender/admin/templates/tplfile_list.html Tue May 30 00:20:41 2006 @@ -141,10 +141,19 @@
    <{xoops_input type=file name=upload key=$obj->mOverride->getVar('tpl_id')}>  
    From minahito @ users.sourceforge.jp Tue May 30 12:58:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:58:32 +0900 Subject: [xoops-cvslog 3242] CVS update: xoops2jp/html/modules/legacyRender/class Message-ID: <20060530035832.77B3B2AC058@users.sourceforge.jp> Index: xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php diff -u /dev/null xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php:1.1.2.1 --- /dev/null Tue May 30 12:58:32 2006 +++ xoops2jp/html/modules/legacyRender/class/modulePreloadCacheclear.class.php Tue May 30 12:58:32 2006 @@ -0,0 +1,26 @@ +mController->mRoot->mEventManager->add('Module.Legacy.ModuleInstall.Success', new XCube_Delegate("legacyRenderModulePreloadCacheclear", "callback")); + $this->mController->mRoot->mEventManager->add('Module.Legacy.ModuleUpdate.Success', new XCube_Delegate("legacyRenderModulePreloadCacheclear", "callback")); + } + + function callback(&$action, &$module) + { + $handler =& xoops_getmodulehandler('tplfile', 'legacyRender'); + + $criteria =& new Criteria('tpl_module', $module->get('dirname')); + $tplfileArr = $handler->getObjects($criteria); + + $xoopsTpl =& new XoopsTpl(); + foreach (array_keys($tplfileArr) as $key) { + $xoopsTpl->clear_cache('db:' . $tplfileArr[$key]->get('tpl_file')); + $xoopsTpl->clear_compiled_tpl('db:' . $tplfileArr[$key]->get('tpl_file')); + } + } +} +?> From minahito @ users.sourceforge.jp Tue May 30 12:59:01 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:59:01 +0900 Subject: [xoops-cvslog 3243] CVS update: xoops2jp/html/modules/user/blocks Message-ID: <20060530035901.9B13A2AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/user/blocks/user_login.php diff -u xoops2jp/html/modules/user/blocks/user_login.php:1.1.2.1 xoops2jp/html/modules/user/blocks/user_login.php:1.1.2.2 --- xoops2jp/html/modules/user/blocks/user_login.php:1.1.2.1 Fri Mar 24 22:04:25 2006 +++ xoops2jp/html/modules/user/blocks/user_login.php Tue May 30 12:59:01 2006 @@ -9,9 +9,9 @@ $block['unamevalue'] = ''; } - //ToDo: Still Use System Module Config $config_handler =& xoops_gethandler('config'); - $xoopsConfigUser =& $config_handler->getConfigsByCat(XOOPS_CONF_USER); + $xoopsConfigUser =& $config_handler->getConfigsByDirname('user'); + $block['allow_register'] = $xoopsConfigUser['allow_register']; $block['use_ssl'] = $xoopsConfig['use_ssl']; From minahito @ users.sourceforge.jp Tue May 30 12:59:32 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 12:59:32 +0900 Subject: [xoops-cvslog 3244] CVS update: xoops2jp/html Message-ID: <20060530035932.86D012AC03E@users.sourceforge.jp> Index: xoops2jp/html/imagemanager.php diff -u xoops2jp/html/imagemanager.php:1.2.8.2 xoops2jp/html/imagemanager.php:1.2.8.3 --- xoops2jp/html/imagemanager.php:1.2.8.2 Thu May 25 18:27:40 2006 +++ xoops2jp/html/imagemanager.php Tue May 30 12:59:32 2006 @@ -2,10 +2,11 @@ /** * This file was full scratched in XOOPS Cube Legacy project. * - * @version $Id: imagemanager.php,v 1.2.8.2 2006/05/25 09:27:40 minahito Exp $ + * @version $Id: imagemanager.php,v 1.2.8.3 2006/05/30 03:59:32 minahito Exp $ */ require_once "mainfile.php"; +require_once "./header.php"; // // This is old page controller in Xoops 2.0.x From minahito @ users.sourceforge.jp Tue May 30 13:08:55 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 13:08:55 +0900 Subject: [xoops-cvslog 3245] CVS update: xoops2jp/html/modules/base Message-ID: <20060530040855.6AAB42AC031@users.sourceforge.jp> Index: xoops2jp/html/modules/base/xoops_version.php diff -u xoops2jp/html/modules/base/xoops_version.php:1.1.2.23 xoops2jp/html/modules/base/xoops_version.php:1.1.2.24 --- xoops2jp/html/modules/base/xoops_version.php:1.1.2.23 Sat May 27 22:09:08 2006 +++ xoops2jp/html/modules/base/xoops_version.php Tue May 30 13:08:55 2006 @@ -1,5 +1,5 @@ Index: xoops2jp/html/modules/base/admin/templates/preference_list.html diff -u xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.5 xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.6 --- xoops2jp/html/modules/base/admin/templates/preference_list.html:1.1.2.5 Wed May 17 00:27:17 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_list.html Tue May 30 17:16:54 2006 @@ -14,7 +14,7 @@ <{foreach item=obj from=$objects}> - + From minahito @ users.sourceforge.jp Tue May 30 17:17:04 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 17:17:04 +0900 Subject: [xoops-cvslog 3247] CVS update: xoops2jp/html/modules/base/admin/templates Message-ID: <20060530081704.CA1A82AC019@users.sourceforge.jp> Index: xoops2jp/html/modules/base/admin/templates/preference_edit.html diff -u xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.6 xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.7 --- xoops2jp/html/modules/base/admin/templates/preference_edit.html:1.1.2.6 Mon May 22 15:46:11 2006 +++ xoops2jp/html/modules/base/admin/templates/preference_edit.html Tue May 30 17:17:04 2006 @@ -3,20 +3,20 @@ <{$module->getVar('name')}> <{if $category != null}> »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> - »» <{$category->getVar('confcat_name')}> + »» <{$category->getName()|escape}> <{else}> »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> <{/if}> <{else}> <{$smarty.const._MI_BASE_NAME}> »» <{$smarty.const._MI_BASE_MENU_PREFERENCE}> - »» <{$category->getVar('confcat_name')}> + »» <{$category->getName()|escape}> <{/if}>

    <{if $category != null}> - <{$category->getVar('confcat_name')}> + <{$category->getName()|escape}> <{else}> <{$smarty.const._MI_BASE_MENU_PREFERENCE}> <{/if}> From minahito @ users.sourceforge.jp Tue May 30 17:17:26 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 17:17:26 +0900 Subject: [xoops-cvslog 3248] CVS update: xoops2jp/html/modules/base/language/japanese Message-ID: <20060530081726.B24982AC019@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.38 xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.39 --- xoops2jp/html/modules/base/language/japanese/admin.php:1.1.2.38 Wed May 17 12:10:02 2006 +++ xoops2jp/html/modules/base/language/japanese/admin.php Tue May 30 17:17:26 2006 @@ -46,6 +46,8 @@ define('_AD_BASE_LANG_COMMENT_EDIT', "コメント編集"); define('_AD_BASE_LANG_COMMENT_NEW', "コメント新規追加"); define('_AD_BASE_LANG_COMMENT_VIEW', "コメント閲覧"); +define('_AD_BASE_LANG_CONFCAT_ID', "コンフィグカテゴリ ID"); +define('_AD_BASE_LANG_CONFCAT_NAME', "コンフィグカテゴリ名"); define('_AD_BASE_LANG_CONTENT', "コンテンツ"); define('_AD_BASE_LANG_CONTROL', "操作"); define('_AD_BASE_LANG_CREATE_NEW', "新規作成"); @@ -231,185 +233,172 @@ define('_MD_A_BASE_LANG_UPDATE', "アップデート"); define('_MD_A_BASE_LANG_VERSION', "バージョン"); define('_MD_A_BASE_LANG_WEIGHT', "表示順"); - -define("_MD_AM_SITEPREF","サイト一般設定"); -define("_MD_AM_SITENAME","サイト名"); -define("_MD_AM_SLOGAN","サイト副題"); -define("_MD_AM_ADMINML","管理者メールアドレス"); -define("_MD_AM_LANGUAGE","使用言語"); -define("_MD_AM_STARTPAGE","開始モジュール"); -define("_MD_AM_NONE","なし"); -define("_MD_AM_SERVERTZ","サーバのタイムゾーン"); -define("_MD_AM_DEFAULTTZ","デフォルト・タイムゾーン"); -define("_MD_AM_DTHEME","デフォルト・サイトテーマ"); -define("_MD_AM_THEMESET","テーマ・セット"); -define("_MD_AM_ANONNAME","未登録ユーザの表示名"); -define("_MD_AM_ANONPOST","未登録ユーザの投稿を許可する"); -define("_MD_AM_MINPASS","パスワードの最低文字数"); -define("_MD_AM_NEWUNOTIFY","新規ユーザ登録の際にメールにて知らせを受け取る"); -define("_MD_AM_SELFDELETE","ユーザが自分自身のアカウントを削除できる"); -define("_MD_AM_LOADINGIMG","「loading..」画像を表示させる"); -define("_MD_AM_USEGZIP","gzip圧縮を使用する"); -define("_MD_AM_UNAMELVL","ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。"); -define("_MD_AM_STRICT","強(アルファベットおよび数字のみ)←推奨"); -define("_MD_AM_MEDIUM","中"); -define("_MD_AM_LIGHT","弱(漢字・平仮名も使用可)"); -define("_MD_AM_USERCOOKIE","ユーザ名の保存に使用するクッキーの名称"); -define("_MD_AM_USERCOOKIEDSC","このクッキーにはユーザ名のみが保存され、ユーザのPCのハードディスク中に1年間保管されます。このクッキーを使用するかしないかはユーザ自身が選択できます。");//This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box."); -define("_MD_AM_USEMYSESS","セッションの設定をカスタマイズする"); -define("_MD_AM_USEMYSESSDSC","セッションの設定のカスタマイズ(セッションがタイムアウトするまでの時間の設定や、セッション名の変更)を行えます"); - -define("_MD_AM_SESSNAME","セッションIDの保存に使用するクッキーの名称"); -define("_MD_AM_SESSNAMEDSC","このクッキーに保存されるセッションIDは、セッションがタイムアウトするか、ユーザがログアウトするまでの間有効です。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); -define("_MD_AM_SESSEXPIRE","セッションがタイムアウトするまでの時間(単位:分)"); -define("_MD_AM_SESSEXPIREDSC","セッションがタイムアウトするまでの時間を分単位で指定してください。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); -define("_MD_AM_BANNERS","バナー広告を有効にする"); -//define("_MD_AM_ADMINGRAPHIC","管理者メニューにおいて画像メニューを使用しますか?"); -define("_MD_AM_MYIP","あなたのIPアドレスを入力してください。"); -define("_MD_AM_MYIPDSC","このIPは、バナーのインプレッションおよびサイト統計においてカウントされません。"); -define("_MD_AM_ALWDHTML","投稿文の中で使用可能なHTMLタグ"); -define("_MD_AM_INVLDMINPASS","パスワードの最低文字数が正しくありません。"); -define("_MD_AM_INVLDUCOOK","ユーザクッキーの名称が正しくありません。"); -define("_MD_AM_INVLDSCOOK","セッションIDクッキーの名称が正しくありません。"); -define("_MD_AM_INVLDSEXP","セッションのタイムアウト時間が正しくありません。"); -define("_MD_AM_ADMNOTSET","管理者のメールアドレスが設定されていません。"); -define("_MD_AM_YES","はい"); -define("_MD_AM_NO","いいえ"); -define("_MD_AM_DONTCHNG","以下は絶対に変更しないで下さい"); -define("_MD_AM_REMEMBER","このファイルをウェブ上の管理者画面から編集できるようにするには、このファイルのアクセス権限を666(chmod 666)に設定する必要があります。"); -define("_MD_AM_IFUCANT","もしファイルのアクセス権限を変更できない場合は、このファイルを直接編集してください。"); - -define("_MD_AM_COMMODE","デフォルトのコメント表示モード"); -define("_MD_AM_COMORDER","デフォルトのコメント表示順"); -//define("_MD_AM_ALLOWSIG","コメント文において署名の使用を許可する"); -define("_MD_AM_ALLOWHTML","コメント文においてHTMLタグの使用を許可する"); -define("_MD_AM_DEBUGMODE","デバッグモードを有効にする"); -define("_MD_AM_DEBUGMODEDSC","(デバッグ用に使用してください。実際のサイト運営時には解除してください。)"); - -define("_MD_AM_AVATARALLOW","アバター画像のアップロードを許可する"); -define('_MD_AM_AVATARMP','アバターアップロード権を得るための発言数'); -define('_MD_AM_AVATARMPDSC','ユーザが自分で作成したアバターをアップロードするために必要な最低投稿数を設定してください。'); -define("_MD_AM_AVATARW","アバター画像の最大幅(ピクセル)"); -define("_MD_AM_AVATARH","アバター画像の最大高さ(ピクセル)"); -define("_MD_AM_AVATARMAX","アバター画像の最大ファイルサイズ(バイト)"); -define("_MD_AM_AVATARCONF","ユーザ独自のアバター画像に関する設定"); -define("_MD_AM_CHNGUTHEME","全てのユーザのテーマを変更する"); -define("_MD_AM_NOTIFYTO","通知先グループ"); -define("_MD_AM_ALLOWTHEME","サイトテーマの選択を許可する"); - -define("_MD_AM_ALLOWIMAGE","投稿への画像ファイルの表示を許可する"); - -define("_MD_AM_USERACTV","ユーザ自身の確認が必要(推奨)"); -define("_MD_AM_AUTOACTV","自動的にアカウントを有効にする"); -define("_MD_AM_ADMINACTV","管理者が確認してアカウントを有効にする"); -define("_MD_AM_ACTVTYPE","新規登録ユーザアカウントの有効化の方法"); -define("_MD_AM_ACTVGROUP","アカウント有効化依頼のメールの送信先グループ"); -define("_MD_AM_ACTVGROUPDSC","「管理者が確認してアカウントを有効にする」設定になっている場合のみ有効です"); -define('_MD_AM_USESSL', 'ログインにSSLを使用する'); -define('_MD_AM_SSLPOST', 'SSLログイン時に使用するPOST変数の名称'); -define('_MD_AM_DEBUGMODE0','オフ'); -define('_MD_AM_DEBUGMODE1','PHPデバグ'); -define('_MD_AM_DEBUGMODE2','MySQL/Blocksデバグ'); -define('_MD_AM_DEBUGMODE3','Smartyテンプレート・デバグ'); -define('_MD_AM_MINUNAME', 'ユーザ名の最低文字数(byte)'); -define('_MD_AM_MAXUNAME', 'ユーザ名の最大文字数(byte)'); -define('_MD_AM_GENERAL', '一般設定'); -define('_MD_AM_USERSETTINGS', 'ユーザ情報設定'); -define('_MD_AM_ALLWCHGMAIL', 'ユーザ自身のEmailアドレス変更を許可する'); -define('_MD_AM_ALLWCHGMAILDSC', ''); -define('_MD_AM_IPBAN', 'IP Banning'); //[MADA] -define('_MD_AM_BADEMAILS', 'ユーザのemailアドレスとして使用できない文字列'); -define('_MD_AM_BADEMAILSDSC', 'それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); -define('_MD_AM_BADUNAMES', 'ユーザ名として使用できない文字列'); -define('_MD_AM_BADUNAMESDSC', 'それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); -define('_MD_AM_DOBADIPS', 'IPアクセス拒否を有効にしますか?'); -define('_MD_AM_DOBADIPSDSC', 'アクセス拒否IPからのユーザはあなたのサイトには入れません。'); -define('_MD_AM_BADIPS', 'このサイトへのアクセス拒否IPを入れてください。
    IPとIPの間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。'); -define('_MD_AM_BADIPSDSC', '^aaa.bbb.ccc は それで始まる IPアドレスからのアクセスを拒否します。
    aaa.bbb.ccc$ は それで終わる IPアドレスからのアクセスを拒否します。
    aaa.bbb.ccc はその IPアドレスを含むアドレスからのアクセスを拒否します。'); -define('_MD_AM_PREFMAIN', 'システム設定メイン'); -define('_MD_AM_METAKEY', 'METAタグ(キーワード)'); -define('_MD_AM_METAKEYDSC', 'METAキーワードはあなたのサイトの内容を表すものです。キーワードはカンマで区切って記述してください。(例: XOOPS, PHP, mySQL, ポータル)'); -define('_MD_AM_METARATING', 'METAタグ(RATING)'); -define('_MD_AM_METARATINGDSC', '閲覧対象年齢層の指定'); -define('_MD_AM_METAOGEN', 'General'); //[MADA] -define('_MD_AM_METAO14YRS', '14 years'); //[MADA] -define('_MD_AM_METAOREST', 'Restricted'); //[MADA] -define('_MD_AM_METAOMAT', 'Mature'); //[MADA] -define('_MD_AM_METAROBOTS', 'METAタグ(ROBOTS)'); -define('_MD_AM_METAROBOTSDSC', 'ロボット型検索エンジンへの対応'); -define('_MD_AM_INDEXFOLLOW', 'Index, Follow'); //[MADA] -define('_MD_AM_NOINDEXFOLLOW', 'No Index, Follow'); //[MADA] -define('_MD_AM_INDEXNOFOLLOW', 'Index, No Follow'); //[MADA] -define('_MD_AM_NOINDEXNOFOLLOW', 'No Index, No Follow'); //[MADA] -define('_MD_AM_METAAUTHOR', 'METAタグ(作成者)'); -define('_MD_AM_METAAUTHORDSC', '作成者METAタグは、サイト文書の作成者情報を定義します。名前、WebmasterのEMailアドレス、会社名、URLなどを記述します。'); -define('_MD_AM_METACOPYR', 'METAタグ(コピーライト)'); -define('_MD_AM_METACOPYRDSC', 'METAコピーライトタグは、あなたのサイト上の情報に対するの著作権情報を定義します。'); -define('_MD_AM_METADESC', 'METAタグ(Description)'); -define('_MD_AM_METADESCDSC', 'METAタグ(Description) は、あなたのサイトの内容を説明する一般的なタグです。'); -define('_MD_AM_METAFOOTER', 'METAタグ/フッタ設定'); -define('_MD_AM_FOOTER', 'フッタ'); -define('_MD_AM_FOOTERDSC', 'リンクを記入する場合は必ずフルパス(http://〜)で入力してください。フルパスで入力しなかった場合、モジュール内ページでうまく表示されないことがあります。'); -define('_MD_AM_CENSOR', '禁止用語設定'); -define('_MD_AM_DOCENSOR', '禁止用語処理を有効にする'); -define('_MD_AM_DOCENSORDSC', 'このオプションを有効にすると禁止用語のチェックを行うようになります。このオプションを無効にすることでサイトの処理速度が向上するかもしれません。'); -define('_MD_AM_CENSORWRD', '禁止用語'); -define('_MD_AM_CENSORWRDDSC', 'ユーザが投稿する際に使用を禁止sする文字列を入力してください。文字列と文字列の間は
    | で区切り、大文字小文字は区別しません。'); -define('_MD_AM_CENSORRPLC', '禁止用語を置き換える文字列:'); -define('_MD_AM_CENSORRPLCDSC', '禁止用語がこのテキストボックスで指定した文字列に置き換えられます。'); - -define('_MD_AM_SEARCH', '検索オプション'); -define('_MD_AM_DOSEARCH', 'グローバルサーチを有効にする'); -define('_MD_AM_DOSEARCHDSC', 'サイト内の投稿/記事の全検索を行います。'); -define('_MD_AM_MINSEARCH', 'キーワード最低文字数'); -define('_MD_AM_MINSEARCHDSC', 'ユーザが検索を行う際に必要なキーワードの最低文字数を指定してください。'); -define('_MD_AM_MODCONFIG', 'モジュール設定オプション'); -define('_MD_AM_DSPDSCLMR', '利用許諾文を表示する'); -define('_MD_AM_DSPDSCLMRDSC', '「はい」にするとユーザの新規登録ページに利用許諾の文章を表示します。'); -define('_MD_AM_REGDSCLMR', '利用許諾文'); -define('_MD_AM_REGDSCLMRDSC', 'ユーザの新規登録ページに表示する利用許諾文を入力してください。'); -define('_MD_AM_ALLOWREG', '新規ユーザの登録を許可する'); -define('_MD_AM_ALLOWREGDSC', '「はい」を選択すると新規ユーザの登録を許可します。'); -define('_MD_AM_THEMEFILE', 'themes/ ディレクトリからの自動アップデートを有効にする'); -define('_MD_AM_THEMEFILEDSC', '現在使用中のテーマよりも更新日時が新しいファイルが themes/ディレクトリ下にある場合に、自動的にデータベース内のデータを更新します。サイト公開時には無効にする事をお勧めします。'); -define('_MD_AM_CLOSESITE', 'サイトを閉鎖する'); -define('_MD_AM_CLOSESITEDSC', '特定グループ以外はサイトにアクセスすることができないようにします。'); -define('_MD_AM_CLOSESITEOK', 'サイト閉鎖時でもアクセスが認められているグループ'); -define('_MD_AM_CLOSESITEOKDSC', 'デフォルトの管理者グループは常にアクセスできます'); -define('_MD_AM_CLOSESITETXT', 'サイト閉鎖の理由'); -define('_MD_AM_CLOSESITETXTDSC', 'サイト閉鎖時に表示します'); -define('_MD_AM_SITECACHE', 'サイト・キャッシュ'); -define('_MD_AM_SITECACHEDSC', 'サイト内のコンテンツをモジュール別にキャッシュします。サイト・キャッシュは、モジュール独自のキャッシュ機能(ある場合)よりも優先されます。'); //[MADA] -define('_MD_AM_MODCACHE', 'モジュール・キャッシュ'); -define('_MD_AM_MODCACHEDSC', '各モジュールのコンテンツをキャッシュしておく時間の長さを指定してください。モジュールに既にキャッシュ機能がある場合は「キャッシュしない」を選択することをお勧めします。ブロック・キャッシュは含まれません。'); -define('_MD_AM_NOMODULE', 'キャッシュ可能なモジュールはありません。'); -define('_MD_AM_DTPLSET', 'デフォルトのテンプレート・セット'); -define('_MD_AM_SSLLINK', 'SSLログインページへのURL'); - -// added for mailer -define("_MD_AM_MAILER","メール設定"); -define("_MD_AM_MAILER_MAIL",""); -define("_MD_AM_MAILER_SENDMAIL",""); -define("_MD_AM_MAILER_",""); -define("_MD_AM_MAILFROM","送信者メールアドレス"); -define("_MD_AM_MAILFROMDESC",""); -define("_MD_AM_MAILFROMNAME","送信者"); -define("_MD_AM_MAILFROMNAMEDESC","メール送信の際に送信者として表示される名前を入力してください"); -// RMV-NOTIFY -define("_MD_AM_MAILFROMUID","PM送信者"); -define("_MD_AM_MAILFROMUIDDESC","プライベートメッセージ送信の際に送信者としてデフォルト表示されるユーザを選択してください"); -define("_MD_AM_MAILERMETHOD","メール送信方法"); -define("_MD_AM_MAILERMETHODDESC","メールを送信する方法を選択してください。デフォルトではPHPのmail()関数を使用します。"); -define("_MD_AM_SMTPHOST","SMTPサーバアドレス"); -define("_MD_AM_SMTPHOSTDESC","SMTPサーバのアドレスの一覧を記入してください。"); -define("_MD_AM_SMTPUSER","SMTPAuthユーザ名"); -define("_MD_AM_SMTPUSERDESC","SMTPAuthを使用してSMTPサーバにアクセスするためのユーザ名"); -define("_MD_AM_SMTPPASS","SMTPAuthパスワード"); -define("_MD_AM_SMTPPASSDESC","SMTPAuthを使用してSMTPサーバにアクセスするためのパスワード"); -define("_MD_AM_SENDMAILPATH","sendmailへのパス"); -define("_MD_AM_SENDMAILPATHDESC","sendmailへのフルパスを記入してください"); -define("_MD_AM_THEMEOK","選択可能なテーマ"); -define("_MD_AM_THEMEOKDSC","ユーザが選択することのできるテーマファイルを指定してください"); - +define('_MD_AM_ACTVGROUP', "アカウント有効化依頼のメールの送信先グループ"); +define('_MD_AM_ACTVGROUPDSC', "「管理者が確認してアカウントを有効にする」設定になっている場合のみ有効です"); +define('_MD_AM_ACTVTYPE', "新規登録ユーザアカウントの有効化の方法"); +define('_MD_AM_ADMINACTV', "管理者が確認してアカウントを有効にする"); +define('_MD_AM_ADMINML', "管理者メールアドレス"); +define('_MD_AM_ADMNOTSET', "管理者のメールアドレスが設定されていません。"); +define('_MD_AM_ALLOWHTML', "コメント文においてHTMLタグの使用を許可する"); +define('_MD_AM_ALLOWIMAGE', "投稿への画像ファイルの表示を許可する"); +define('_MD_AM_ALLOWREG', "新規ユーザの登録を許可する"); +define('_MD_AM_ALLOWREGDSC', "「はい」を選択すると新規ユーザの登録を許可します。"); +define('_MD_AM_ALLOWTHEME', "サイトテーマの選択を許可する"); +define('_MD_AM_ALLWCHGMAIL', "ユーザ自身のEmailアドレス変更を許可する"); +define('_MD_AM_ALLWCHGMAILDSC', ""); +define('_MD_AM_ALWDHTML', "投稿文の中で使用可能なHTMLタグ"); +define('_MD_AM_ANONNAME', "未登録ユーザの表示名"); +define('_MD_AM_ANONPOST', "未登録ユーザの投稿を許可する"); +define('_MD_AM_AUTOACTV', "自動的にアカウントを有効にする"); +define('_MD_AM_AVATARALLOW', "アバター画像のアップロードを許可する"); +define('_MD_AM_AVATARCONF', "ユーザ独自のアバター画像に関する設定"); +define('_MD_AM_AVATARH', "アバター画像の最大高さ(ピクセル)"); +define('_MD_AM_AVATARMAX', "アバター画像の最大ファイルサイズ(バイト)"); +define('_MD_AM_AVATARMP', "アバターアップロード権を得るための発言数"); +define('_MD_AM_AVATARMPDSC', "ユーザが自分で作成したアバターをアップロードするために必要な最低投稿数を設定してください。"); +define('_MD_AM_AVATARW', "アバター画像の最大幅(ピクセル)"); +define('_MD_AM_BADEMAILS', "ユーザのemailアドレスとして使用できない文字列"); +define('_MD_AM_BADEMAILSDSC', "それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。"); +define('_MD_AM_BADIPS', "このサイトへのアクセス拒否IPを入れてください。
    IPとIPの間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。"); +define('_MD_AM_BADIPSDSC', "^aaa.bbb.ccc は それで始まる IPアドレスからのアクセスを拒否します。
    aaa.bbb.ccc$ は それで終わる IPアドレスからのアクセスを拒否します。
    aaa.bbb.ccc はその IPアドレスを含むアドレスからのアクセスを拒否します。"); +define('_MD_AM_BADUNAMES', "ユーザ名として使用できない文字列"); +define('_MD_AM_BADUNAMESDSC', "それぞれの文字列の間は|で区切ってください。大文字小文字は区別しません。正規表現が使用可能です。"); +define('_MD_AM_BANNERS', "バナー広告を有効にする"); +define('_MD_AM_CENSOR', "禁止用語設定"); +define('_MD_AM_CENSORRPLC', "禁止用語を置き換える文字列:"); +define('_MD_AM_CENSORRPLCDSC', "禁止用語がこのテキストボックスで指定した文字列に置き換えられます。"); +define('_MD_AM_CENSORWRD', "禁止用語"); +define('_MD_AM_CENSORWRDDSC', "ユーザが投稿する際に使用を禁止sする文字列を入力してください。文字列と文字列の間は
    | で区切り、大文字小文字は区別しません。"); +define('_MD_AM_CHNGUTHEME', "全てのユーザのテーマを変更する"); +define('_MD_AM_CLOSESITE', "サイトを閉鎖する"); +define('_MD_AM_CLOSESITEDSC', "特定グループ以外はサイトにアクセスすることができないようにします。"); +define('_MD_AM_CLOSESITEOK', "サイト閉鎖時でもアクセスが認められているグループ"); +define('_MD_AM_CLOSESITEOKDSC', "デフォルトの管理者グループは常にアクセスできます"); +define('_MD_AM_CLOSESITETXT', "サイト閉鎖の理由"); +define('_MD_AM_CLOSESITETXTDSC', "サイト閉鎖時に表示します"); +define('_MD_AM_COMMODE', "デフォルトのコメント表示モード"); +define('_MD_AM_COMORDER', "デフォルトのコメント表示順"); +define('_MD_AM_DEBUGMODE', "デバッグモードを有効にする"); +define('_MD_AM_DEBUGMODE0', "オフ"); +define('_MD_AM_DEBUGMODE1', "PHPデバグ"); +define('_MD_AM_DEBUGMODE2', "MySQL/Blocksデバグ"); +define('_MD_AM_DEBUGMODE3', "Smartyテンプレート・デバグ"); +define('_MD_AM_DEBUGMODEDSC', "(デバッグ用に使用してください。実際のサイト運営時には解除してください。)"); +define('_MD_AM_DEFAULTTZ', "デフォルト・タイムゾーン"); +define('_MD_AM_DOBADIPS', "IPアクセス拒否を有効にしますか?"); +define('_MD_AM_DOBADIPSDSC', "アクセス拒否IPからのユーザはあなたのサイトには入れません。"); +define('_MD_AM_DOCENSOR', "禁止用語処理を有効にする"); +define('_MD_AM_DOCENSORDSC', "このオプションを有効にすると禁止用語のチェックを行うようになります。このオプションを無効にすることでサイトの処理速度が向上するかもしれません。"); +define('_MD_AM_DONTCHNG', "以下は絶対に変更しないで下さい"); +define('_MD_AM_DOSEARCH', "グローバルサーチを有効にする"); +define('_MD_AM_DOSEARCHDSC', "サイト内の投稿/記事の全検索を行います。"); +define('_MD_AM_DSPDSCLMR', "利用許諾文を表示する"); +define('_MD_AM_DSPDSCLMRDSC', "「はい」にするとユーザの新規登録ページに利用許諾の文章を表示します。"); +define('_MD_AM_DTHEME', "デフォルト・サイトテーマ"); +define('_MD_AM_DTPLSET', "デフォルトのテンプレート・セット"); +define('_MD_AM_FOOTER', "フッタ"); +define('_MD_AM_FOOTERDSC', "リンクを記入する場合は必ずフルパス(http://〜)で入力してください。フルパスで入力しなかった場合、モジュール内ページでうまく表示されないことがあります。"); +define('_MD_AM_GENERAL', "一般設定"); +define('_MD_AM_IFUCANT', "もしファイルのアクセス権限を変更できない場合は、このファイルを直接編集してください。"); +define('_MD_AM_INDEXFOLLOW', "Index, Follow"); +define('_MD_AM_INDEXNOFOLLOW', "Index, No Follow"); +define('_MD_AM_INVLDMINPASS', "パスワードの最低文字数が正しくありません。"); +define('_MD_AM_INVLDSCOOK', "セッションIDクッキーの名称が正しくありません。"); +define('_MD_AM_INVLDSEXP', "セッションのタイムアウト時間が正しくありません。"); +define('_MD_AM_INVLDUCOOK', "ユーザクッキーの名称が正しくありません。"); +define('_MD_AM_IPBAN', "IP Banning"); +define('_MD_AM_LANGUAGE', "使用言語"); +define('_MD_AM_LIGHT', "弱(漢字・平仮名も使用可)"); +define('_MD_AM_LOADINGIMG', "「loading..」画像を表示させる"); +define('_MD_AM_MAILER', "メール設定"); +define('_MD_AM_MAILER_', ""); +define('_MD_AM_MAILER_MAIL', ""); +define('_MD_AM_MAILER_SENDMAIL', ""); +define('_MD_AM_MAILERMETHOD', "メール送信方法"); +define('_MD_AM_MAILERMETHODDESC', "メールを送信する方法を選択してください。デフォルトではPHPのmail()関数を使用します。"); +define('_MD_AM_MAILFROM', "送信者メールアドレス"); +define('_MD_AM_MAILFROMDESC', ""); +define('_MD_AM_MAILFROMNAME', "送信者"); +define('_MD_AM_MAILFROMNAMEDESC', "メール送信の際に送信者として表示される名前を入力してください"); +define('_MD_AM_MAILFROMUID', "PM送信者"); +define('_MD_AM_MAILFROMUIDDESC', "プライベートメッセージ送信の際に送信者としてデフォルト表示されるユーザを選択してください"); +define('_MD_AM_MAXUNAME', "ユーザ名の最大文字数(byte)"); +define('_MD_AM_MEDIUM', "中"); +define('_MD_AM_METAAUTHOR', "METAタグ(作成者)"); +define('_MD_AM_METAAUTHORDSC', "作成者METAタグは、サイト文書の作成者情報を定義します。名前、WebmasterのEMailアドレス、会社名、URLなどを記述します。"); +define('_MD_AM_METACOPYR', "METAタグ(コピーライト)"); +define('_MD_AM_METACOPYRDSC', "METAコピーライトタグは、あなたのサイト上の情報に対するの著作権情報を定義します。"); +define('_MD_AM_METADESC', "METAタグ(Description)"); +define('_MD_AM_METADESCDSC', "METAタグ(Description) は、あなたのサイトの内容を説明する一般的なタグです。"); +define('_MD_AM_METAFOOTER', "METAタグ/フッタ設定"); +define('_MD_AM_METAKEY', "METAタグ(キーワード)"); +define('_MD_AM_METAKEYDSC', "METAキーワードはあなたのサイトの内容を表すものです。キーワードはカンマで区切って記述してください。(例: XOOPS, PHP, mySQL, ポータル)"); +define('_MD_AM_METAO14YRS', "14 years"); +define('_MD_AM_METAOGEN', "General"); +define('_MD_AM_METAOMAT', "Mature"); +define('_MD_AM_METAOREST', "Restricted"); +define('_MD_AM_METARATING', "METAタグ(RATING)"); +define('_MD_AM_METARATINGDSC', "閲覧対象年齢層の指定"); +define('_MD_AM_METAROBOTS', "METAタグ(ROBOTS)"); +define('_MD_AM_METAROBOTSDSC', "ロボット型検索エンジンへの対応"); +define('_MD_AM_MINPASS', "パスワードの最低文字数"); +define('_MD_AM_MINSEARCH', "キーワード最低文字数"); +define('_MD_AM_MINSEARCHDSC', "ユーザが検索を行う際に必要なキーワードの最低文字数を指定してください。"); +define('_MD_AM_MINUNAME', "ユーザ名の最低文字数(byte)"); +define('_MD_AM_MODCACHE', "モジュール・キャッシュ"); +define('_MD_AM_MODCACHEDSC', "各モジュールのコンテンツをキャッシュしておく時間の長さを指定してください。モジュールに既にキャッシュ機能がある場合は「キャッシュしない」を選択することをお勧めします。ブロック・キャッシュは含まれません。"); +define('_MD_AM_MODCONFIG', "モジュール設定オプション"); +define('_MD_AM_MYIP', "あなたのIPアドレスを入力してください。"); +define('_MD_AM_MYIPDSC', "このIPは、バナーのインプレッションおよびサイト統計においてカウントされません。"); +define('_MD_AM_NEWUNOTIFY', "新規ユーザ登録の際にメールにて知らせを受け取る"); +define('_MD_AM_NO', "いいえ"); +define('_MD_AM_NOINDEXFOLLOW', "No Index, Follow"); +define('_MD_AM_NOINDEXNOFOLLOW', "No Index, No Follow"); +define('_MD_AM_NOMODULE', "キャッシュ可能なモジュールはありません。"); +define('_MD_AM_NONE', "なし"); +define('_MD_AM_NOTIFYTO', "通知先グループ"); +define('_MD_AM_PREFMAIN', "システム設定メイン"); +define('_MD_AM_REGDSCLMR', "利用許諾文"); +define('_MD_AM_REGDSCLMRDSC', "ユーザの新規登録ページに表示する利用許諾文を入力してください。"); +define('_MD_AM_REMEMBER', "このファイルをウェブ上の管理者画面から編集できるようにするには、このファイルのアクセス権限を666(chmod 666)に設定する必要があります。"); +define('_MD_AM_SEARCH', "検索オプション"); +define('_MD_AM_SELFDELETE', "ユーザが自分自身のアカウントを削除できる"); +define('_MD_AM_SENDMAILPATH', "sendmailへのパス"); +define('_MD_AM_SENDMAILPATHDESC', "sendmailへのフルパスを記入してください"); +define('_MD_AM_SERVERTZ', "サーバのタイムゾーン"); +define('_MD_AM_SESSEXPIRE', "セッションがタイムアウトするまでの時間(単位:分)"); +define('_MD_AM_SESSEXPIREDSC', "セッションがタイムアウトするまでの時間を分単位で指定してください。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); +define('_MD_AM_SESSNAME', "セッションIDの保存に使用するクッキーの名称"); +define('_MD_AM_SESSNAMEDSC', "このクッキーに保存されるセッションIDは、セッションがタイムアウトするか、ユーザがログアウトするまでの間有効です。(「セッションの設定をカスタマイズする」が有効の場合のみ)"); +define('_MD_AM_SITECACHE', "サイト・キャッシュ"); +define('_MD_AM_SITECACHEDSC', "サイト内のコンテンツをモジュール別にキャッシュします。サイト・キャッシュは、モジュール独自のキャッシュ機能(ある場合)よりも優先されます。"); +define('_MD_AM_SITENAME', "サイト名"); +define('_MD_AM_SITEPREF', "サイト一般設定"); +define('_MD_AM_SLOGAN', "サイト副題"); +define('_MD_AM_SMTPHOST', "SMTPサーバアドレス"); +define('_MD_AM_SMTPHOSTDESC', "SMTPサーバのアドレスの一覧を記入してください。"); +define('_MD_AM_SMTPPASS', "SMTPAuthパスワード"); +define('_MD_AM_SMTPPASSDESC', "SMTPAuthを使用してSMTPサーバにアクセスするためのパスワード"); +define('_MD_AM_SMTPUSER', "SMTPAuthユーザ名"); +define('_MD_AM_SMTPUSERDESC', "SMTPAuthを使用してSMTPサーバにアクセスするためのユーザ名"); +define('_MD_AM_SSLLINK', "SSLログインページへのURL"); +define('_MD_AM_SSLPOST', "SSLログイン時に使用するPOST変数の名称"); +define('_MD_AM_STARTPAGE', "開始モジュール"); +define('_MD_AM_STRICT', "強(アルファベットおよび数字のみ)←推奨"); +define('_MD_AM_THEMEFILE', "themes/ ディレクトリからの自動アップデートを有効にする"); +define('_MD_AM_THEMEFILEDSC', "現在使用中のテーマよりも更新日時が新しいファイルが themes/ディレクトリ下にある場合に、自動的にデータベース内のデータを更新します。サイト公開時には無効にする事をお勧めします。"); +define('_MD_AM_THEMEOK', "選択可能なテーマ"); +define('_MD_AM_THEMEOKDSC', "ユーザが選択することのできるテーマファイルを指定してください"); +define('_MD_AM_THEMESET', "テーマ・セット"); +define('_MD_AM_UNAMELVL', "ユーザ名として使用可能な文字の設定を行います。文字制限の程度を選択してください。"); +define('_MD_AM_USEGZIP', "gzip圧縮を使用する"); +define('_MD_AM_USEMYSESS', "セッションの設定をカスタマイズする"); +define('_MD_AM_USEMYSESSDSC', "セッションの設定のカスタマイズ(セッションがタイムアウトするまでの時間の設定や、セッション名の変更)を行えます"); +define('_MD_AM_USERACTV', "ユーザ自身の確認が必要(推奨)"); +define('_MD_AM_USERCOOKIE', "ユーザ名の保存に使用するクッキーの名称"); +define('_MD_AM_USERCOOKIEDSC', "このクッキーにはユーザ名のみが保存され、ユーザのPCのハードディスク中に1年間保管されます。このクッキーを使用するかしないかはユーザ自身が選択できます。"); +define('_MD_AM_USERSETTINGS', "ユーザ情報設定"); +define('_MD_AM_USESSL', "ログインにSSLを使用する"); +define('_MD_AM_YES', "はい"); ?> From minahito @ users.sourceforge.jp Tue May 30 17:17:26 2006 From: minahito @ users.sourceforge.jp (Minahito) Date: Tue, 30 May 2006 17:17:26 +0900 Subject: [xoops-cvslog 3249] CVS update: xoops2jp/html/modules/base/language/english Message-ID: <20060530081726.D86122AC062@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.31 xoops2jp/html/modules/base/language/english/admin.php:1.1.2.32 --- xoops2jp/html/modules/base/language/english/admin.php:1.1.2.31 Mon May 15 15:59:34 2006 +++ xoops2jp/html/modules/base/language/english/admin.php Tue May 30 17:17:26 2006 @@ -46,6 +46,8 @@ define('_AD_BASE_LANG_COMMENT_EDIT', "Edit a comment"); define('_AD_BASE_LANG_COMMENT_NEW', "Add a new comment"); define('_AD_BASE_LANG_COMMENT_VIEW', "Comment view"); +define('_AD_BASE_LANG_CONFCAT_ID', "Config Category ID"); +define('_AD_BASE_LANG_CONFCAT_NAME', "Confing Category Name"); define('_AD_BASE_LANG_CONTENT', "Content"); define('_AD_BASE_LANG_CONTROL', "Control"); define('_AD_BASE_LANG_CREATE_NEW', "Add a new"); @@ -231,180 +233,172 @@ define('_MD_A_BASE_LANG_UPDATE', "Update"); define('_MD_A_BASE_LANG_VERSION', "Version"); define('_MD_A_BASE_LANG_WEIGHT', "Weight"); - -define("_MD_AM_SITEPREF","Site Preferences"); -define("_MD_AM_SITENAME","Site name"); -define("_MD_AM_SLOGAN","Slogan for your site"); -define("_MD_AM_ADMINML","Admin mail address"); -define("_MD_AM_LANGUAGE","Default language"); -define("_MD_AM_STARTPAGE","Module for your start page"); -define("_MD_AM_NONE","None"); -define("_MD_AM_SERVERTZ","Server timezone"); -define("_MD_AM_DEFAULTTZ","Default timezone"); -define("_MD_AM_DTHEME","Default theme"); -define("_MD_AM_THEMESET","Theme Set"); -define("_MD_AM_ANONNAME","Username for anonymous users"); -define("_MD_AM_MINPASS","Minimum length of password required"); -define("_MD_AM_NEWUNOTIFY","Notify by mail when a new user is registered?"); -define("_MD_AM_SELFDELETE","Allow users to delete own account?"); -define("_MD_AM_LOADINGIMG","Display loading... image?"); -define("_MD_AM_USEGZIP","Use gzip compression?"); -define("_MD_AM_UNAMELVL","Select the level of strictness for username filtering"); -define("_MD_AM_STRICT","Strict (only alphabets and numbers)"); -define("_MD_AM_MEDIUM","Medium"); -define("_MD_AM_LIGHT","Light (recommended for multi-byte chars)"); -define("_MD_AM_USERCOOKIE","Name for user cookies."); -define("_MD_AM_USERCOOKIEDSC","This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box."); -define("_MD_AM_USEMYSESS","Use custom session"); -define("_MD_AM_USEMYSESSDSC","Select yes to customise session related values."); -define("_MD_AM_SESSNAME","Session name"); -define("_MD_AM_SESSNAMEDSC","The name of session (Valid only when 'use custom session' is enabled)"); -define("_MD_AM_SESSEXPIRE","Session expiration"); -define("_MD_AM_SESSEXPIREDSC","Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled. Works only when you are using PHP4.2.0 or later.)"); -define("_MD_AM_BANNERS","Activate banner ads?"); -define("_MD_AM_MYIP","Your IP address"); -define("_MD_AM_MYIPDSC","This IP will not counted as impression for banners"); -define("_MD_AM_ALWDHTML","HTML tags allowed in all posts."); -define("_MD_AM_INVLDMINPASS","Invalid value for minimum length of password."); -define("_MD_AM_INVLDUCOOK","Invalid value for usercookie name."); -define("_MD_AM_INVLDSCOOK","Invalid value for sessioncookie name."); -define("_MD_AM_INVLDSEXP","Invalid value for session expiration time."); -define("_MD_AM_ADMNOTSET","Admin mail is not set."); -define("_MD_AM_YES","Yes"); -define("_MD_AM_NO","No"); -define("_MD_AM_DONTCHNG","Don't change!"); -define("_MD_AM_REMEMBER","Remember to chmod 666 this file in order to let the system write to it properly."); -define("_MD_AM_IFUCANT","If you can't change the permissions you can edit the rest of this file by hand."); - - -define("_MD_AM_COMMODE","Default Comment Display Mode"); -define("_MD_AM_COMORDER","Default Comments Display Order"); -define("_MD_AM_ALLOWHTML","Allow HTML tags in user comments?"); -define("_MD_AM_DEBUGMODE","Debug mode"); -define("_MD_AM_DEBUGMODEDSC","Several debug options. A running website should have this turned off."); -define("_MD_AM_AVATARALLOW","Allow custom avatar upload?"); -define('_MD_AM_AVATARMP','Minimum posts required'); -define('_MD_AM_AVATARMPDSC','Enter the minimum number of posts required to upload a custom avatar'); -define("_MD_AM_AVATARW","Avatar image max width (pixel)"); -define("_MD_AM_AVATARH","Avatar image max height (pixel)"); -define("_MD_AM_AVATARMAX","Avatar image max filesize (byte)"); -define("_MD_AM_AVATARCONF","Custom avatar settings"); -define("_MD_AM_CHNGUTHEME","Change all users' theme"); -define("_MD_AM_NOTIFYTO","Select group to which new user notification mail will be sent"); -define("_MD_AM_ALLOWTHEME","Allow users to select theme?"); -define("_MD_AM_ALLOWIMAGE","Allow users to display image files in posts?"); - -define("_MD_AM_USERACTV","Requires activation by user (recommended)"); -define("_MD_AM_AUTOACTV","Activate automatically"); -define("_MD_AM_ADMINACTV","Activation by administrators"); -define("_MD_AM_ACTVTYPE","Select activation type of newly registered users"); -define("_MD_AM_ACTVGROUP","Select group to which activation mail will be sent"); -define("_MD_AM_ACTVGROUPDSC","Valid only when 'Activation by administrators' is selected"); -define('_MD_AM_USESSL', 'Use SSL for login?'); -define('_MD_AM_SSLPOST', 'SSL Post variable name'); -define('_MD_AM_SSLPOSTDSC', 'The name of variable used to transfer session value via POST. If you are unsure, set any name that is hard to guess.'); -define('_MD_AM_DEBUGMODE0','Off'); -define('_MD_AM_DEBUGMODE1','PHP Debug'); -define('_MD_AM_DEBUGMODE2','MySQL/Blocks Debug'); -define('_MD_AM_DEBUGMODE3','Smarty Templates Debug'); -define('_MD_AM_MINUNAME', 'Minimum length of username required'); -define('_MD_AM_MAXUNAME', 'Maximum length of username'); -define('_MD_AM_GENERAL', 'General Settings'); -define('_MD_AM_USERSETTINGS', 'User Info Settings'); -define('_MD_AM_ALLWCHGMAIL', 'Allow users to change email address?'); -define('_MD_AM_ALLWCHGMAILDSC', ''); -define('_MD_AM_IPBAN', 'IP Banning'); -define('_MD_AM_BADEMAILS', 'Enter emails that should not be used in user profile'); -define('_MD_AM_BADEMAILSDSC', 'Separate each with a |, case insensitive, regex enabled.'); -define('_MD_AM_BADUNAMES', 'Enter names that should not be selected as username'); -define('_MD_AM_BADUNAMESDSC', 'Separate each with a |, case insensitive, regex enabled.'); -define('_MD_AM_DOBADIPS', 'Enable IP bans?'); -define('_MD_AM_DOBADIPSDSC', 'Users from specified IP addresses will not be able to view your site'); -define('_MD_AM_BADIPS', 'Enter IP addresses that should be banned from the site.
    Separate each with a |, case insensitive, regex enabled.'); -define('_MD_AM_BADIPSDSC', '^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc
    aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc
    aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc'); -define('_MD_AM_PREFMAIN', 'Preferences Main'); -define('_MD_AM_METAKEY', 'Meta Keywords'); -define('_MD_AM_METAKEYDSC', 'The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)'); -define('_MD_AM_METARATING', 'Meta Rating'); -define('_MD_AM_METARATINGDSC', 'The rating meta tag defines your site age and content rating'); -define('_MD_AM_METAOGEN', 'General'); -define('_MD_AM_METAO14YRS', '14 years'); -define('_MD_AM_METAOREST', 'Restricted'); -define('_MD_AM_METAOMAT', 'Mature'); -define('_MD_AM_METAROBOTS', 'Meta Robots'); -define('_MD_AM_METAROBOTSDSC', 'The Robots Tag declares to search engines what content to index and spider'); -define('_MD_AM_INDEXFOLLOW', 'Index, Follow'); -define('_MD_AM_NOINDEXFOLLOW', 'No Index, Follow'); -define('_MD_AM_INDEXNOFOLLOW', 'Index, No Follow'); -define('_MD_AM_NOINDEXNOFOLLOW', 'No Index, No Follow'); -define('_MD_AM_METAAUTHOR', 'Meta Author'); -define('_MD_AM_METAAUTHORDSC', 'The author meta tag defines the name of the author of the document being read. Supported data formats include the name, email address of the webmaster, company name or URL.'); -define('_MD_AM_METACOPYR', 'Meta Copyright'); -define('_MD_AM_METACOPYRDSC', 'The copyright meta tag defines any copyright statements you wish to disclose about your web page documents.'); -define('_MD_AM_METADESC', 'Meta Description'); -define('_MD_AM_METADESCDSC', 'The description meta tag is a general description of what is contained in your web page'); -define('_MD_AM_METAFOOTER', 'Meta Tags and Footer'); -define('_MD_AM_FOOTER', 'Footer'); -define('_MD_AM_FOOTERDSC', 'Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages.'); -define('_MD_AM_CENSOR', 'Word Censoring Options'); -define('_MD_AM_DOCENSOR', 'Enable censoring of unwanted words?'); -define('_MD_AM_DOCENSORDSC', 'Words will be censored if this option is enabled. This option may be turned off for enhanced site speed.'); -define('_MD_AM_CENSORWRD', 'Words to censor'); -define('_MD_AM_CENSORWRDDSC', 'Enter words that should be censored in user posts.
    Separate each with a |, case insensitive.'); -define('_MD_AM_CENSORRPLC', 'Bad words will be replaced with:'); -define('_MD_AM_CENSORRPLCDSC', 'Censored words will be replaced with the characters entered in this textbox'); - -define('_MD_AM_SEARCH', 'Search Options'); -define('_MD_AM_DOSEARCH', 'Enable global searches?'); -define('_MD_AM_DOSEARCHDSC', 'Allow searching for posts/items within your site.'); -define('_MD_AM_MINSEARCH', 'Minimum keyword length'); -define('_MD_AM_MINSEARCHDSC', 'Enter the minimum keyword length that users are required to enter to perform search'); -define('_MD_AM_MODCONFIG', 'Module Config Options'); -define('_MD_AM_DSPDSCLMR', 'Display disclaimer?'); -define('_MD_AM_DSPDSCLMRDSC', 'Select yes to display disclaimer in registration page'); -define('_MD_AM_REGDSCLMR', 'Registration disclaimer'); -define('_MD_AM_REGDSCLMRDSC', 'Enter text to be displayed as registration disclaimer'); -define('_MD_AM_ALLOWREG', 'Allow new user registration?'); -define('_MD_AM_ALLOWREGDSC', 'Select yes to accept new user registration'); -define('_MD_AM_THEMEFILE', 'Update module template .html files from themes/your theme/templates directory?'); -define('_MD_AM_THEMEFILEDSC', 'If this option is enabled, module template .html files will be updated automatically if there are newer files under the themes/your theme/templates directory for the current theme. This should be turned off once the site goes public.'); -define('_MD_AM_CLOSESITE', 'Turn your site off?'); -define('_MD_AM_CLOSESITEDSC', 'Select yes to turn your site off so that only users in selected groups have access to the site. '); -define('_MD_AM_CLOSESITEOK', 'Select groups that are allowed to access while the site is turned off.'); -define('_MD_AM_CLOSESITEOKDSC', 'Users in the default webmasters group are always granted access.'); -define('_MD_AM_CLOSESITETXT', 'Reason for turning off the site'); -define('_MD_AM_CLOSESITETXTDSC', 'The text that is presented when the site is closed.'); -define('_MD_AM_SITECACHE', 'Site-wide Cache'); -define('_MD_AM_SITECACHEDSC', 'Caches whole contents of the site for a specified amount of time to enhance performance. Setting site-wide cache will override module-level cache, block-level cache, and module item level cache if any.'); -define('_MD_AM_MODCACHE', 'Module-wide Cache'); -define('_MD_AM_MODCACHEDSC', 'Caches module contents for a specified amount of time to enhance performance. Setting module-wide cache will override module item level cache if any.'); -define('_MD_AM_NOMODULE', 'There is no module that can be cached.'); -define('_MD_AM_DTPLSET', 'Default template set'); -define('_MD_AM_SSLLINK', 'URL where SSL login page is located'); - -// added for mailer -define("_MD_AM_MAILER","Mail Setup"); -define("_MD_AM_MAILER_MAIL",""); -define("_MD_AM_MAILER_SENDMAIL",""); -define("_MD_AM_MAILER_",""); -define("_MD_AM_MAILFROM","FROM address"); -define("_MD_AM_MAILFROMDESC",""); -define("_MD_AM_MAILFROMNAME","FROM name"); -define("_MD_AM_MAILFROMNAMEDESC",""); -// RMV-NOTIFY -define("_MD_AM_MAILFROMUID","FROM user"); -define("_MD_AM_MAILFROMUIDDESC","When the system sends a private message, which user should appear to have sent it?"); -define("_MD_AM_MAILERMETHOD","Mail delivery method"); -define("_MD_AM_MAILERMETHODDESC","Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); -define("_MD_AM_SMTPHOST","SMTP host(s)"); -define("_MD_AM_SMTPHOSTDESC","List of SMTP servers to try to connect to."); -define("_MD_AM_SMTPUSER","SMTPAuth username"); -define("_MD_AM_SMTPUSERDESC","Username to connect to an SMTP host with SMTPAuth."); -define("_MD_AM_SMTPPASS","SMTPAuth password"); -define("_MD_AM_SMTPPASSDESC","Password to connect to an SMTP host with SMTPAuth."); -define("_MD_AM_SENDMAILPATH","Path to sendmail"); -define("_MD_AM_SENDMAILPATHDESC","Path to the sendmail program (or substitute) on the webserver."); -define("_MD_AM_THEMEOK","Selectable themes"); -define("_MD_AM_THEMEOKDSC","Choose themes that users can select as the default theme"); +define('_MD_AM_ACTVGROUP', "Select group to which activation mail will be sent"); +define('_MD_AM_ACTVGROUPDSC', "Valid only when 'Activation by administrators' is selected"); +define('_MD_AM_ACTVTYPE', "Select activation type of newly registered users"); +define('_MD_AM_ADMINACTV', "Activation by administrators"); +define('_MD_AM_ADMINML', "Admin mail address"); +define('_MD_AM_ADMNOTSET', "Admin mail is not set."); +define('_MD_AM_ALLOWHTML', "Allow HTML tags in user comments?"); +define('_MD_AM_ALLOWIMAGE', "Allow users to display image files in posts?"); +define('_MD_AM_ALLOWREG', "Allow new user registration?"); +define('_MD_AM_ALLOWREGDSC', "Select yes to accept new user registration"); +define('_MD_AM_ALLOWTHEME', "Allow users to select theme?"); +define('_MD_AM_ALLWCHGMAIL', "Allow users to change email address?"); +define('_MD_AM_ALLWCHGMAILDSC', ""); +define('_MD_AM_ALWDHTML', "HTML tags allowed in all posts."); +define('_MD_AM_ANONNAME', "Username for anonymous users"); +define('_MD_AM_AUTOACTV', "Activate automatically"); +define('_MD_AM_AVATARALLOW', "Allow custom avatar upload?"); +define('_MD_AM_AVATARCONF', "Custom avatar settings"); +define('_MD_AM_AVATARH', "Avatar image max height (pixel)"); +define('_MD_AM_AVATARMAX', "Avatar image max filesize (byte)"); +define('_MD_AM_AVATARMP', "Minimum posts required"); +define('_MD_AM_AVATARMPDSC', "Enter the minimum number of posts required to upload a custom avatar"); +define('_MD_AM_AVATARW', "Avatar image max width (pixel)"); +define('_MD_AM_BADEMAILS', "Enter emails that should not be used in user profile"); +define('_MD_AM_BADEMAILSDSC', "Separate each with a |, case insensitive, regex enabled."); +define('_MD_AM_BADIPS', "Enter IP addresses that should be banned from the site.
    Separate each with a |, case insensitive, regex enabled."); +define('_MD_AM_BADIPSDSC', "^aaa.bbb.ccc will disallow visitors with an IP that starts with aaa.bbb.ccc
    aaa.bbb.ccc$ will disallow visitors with an IP that ends with aaa.bbb.ccc
    aaa.bbb.ccc will disallow visitors with an IP that contains aaa.bbb.ccc"); +define('_MD_AM_BADUNAMES', "Enter names that should not be selected as username"); +define('_MD_AM_BADUNAMESDSC', "Separate each with a |, case insensitive, regex enabled."); +define('_MD_AM_BANNERS', "Activate banner ads?"); +define('_MD_AM_CENSOR', "Word Censoring Options"); +define('_MD_AM_CENSORRPLC', "Bad words will be replaced with:"); +define('_MD_AM_CENSORRPLCDSC', "Censored words will be replaced with the characters entered in this textbox"); +define('_MD_AM_CENSORWRD', "Words to censor"); +define('_MD_AM_CENSORWRDDSC', "Enter words that should be censored in user posts.
    Separate each with a |, case insensitive."); +define('_MD_AM_CHNGUTHEME', "Change all users' theme"); +define('_MD_AM_CLOSESITE', "Turn your site off?"); +define('_MD_AM_CLOSESITEDSC', "Select yes to turn your site off so that only users in selected groups have access to the site. "); +define('_MD_AM_CLOSESITEOK', "Select groups that are allowed to access while the site is turned off."); +define('_MD_AM_CLOSESITEOKDSC', "Users in the default webmasters group are always granted access."); +define('_MD_AM_CLOSESITETXT', "Reason for turning off the site"); +define('_MD_AM_CLOSESITETXTDSC', "The text that is presented when the site is closed."); +define('_MD_AM_COMMODE', "Default Comment Display Mode"); +define('_MD_AM_COMORDER', "Default Comments Display Order"); +define('_MD_AM_DEBUGMODE', "Debug mode"); +define('_MD_AM_DEBUGMODE0', "Off"); +define('_MD_AM_DEBUGMODE1', "PHP Debug"); +define('_MD_AM_DEBUGMODE2', "MySQL/Blocks Debug"); +define('_MD_AM_DEBUGMODE3', "Smarty Templates Debug"); +define('_MD_AM_DEBUGMODEDSC', "Several debug options. A running website should have this turned off."); +define('_MD_AM_DEFAULTTZ', "Default timezone"); +define('_MD_AM_DOBADIPS', "Enable IP bans?"); +define('_MD_AM_DOBADIPSDSC', "Users from specified IP addresses will not be able to view your site"); +define('_MD_AM_DOCENSOR', "Enable censoring of unwanted words?"); +define('_MD_AM_DOCENSORDSC', "Words will be censored if this option is enabled. This option may be turned off for enhanced site speed."); +define('_MD_AM_DONTCHNG', "Don't change!"); +define('_MD_AM_DOSEARCH', "Enable global searches?"); +define('_MD_AM_DOSEARCHDSC', "Allow searching for posts/items within your site."); +define('_MD_AM_DSPDSCLMR', "Display disclaimer?"); +define('_MD_AM_DSPDSCLMRDSC', "Select yes to display disclaimer in registration page"); +define('_MD_AM_DTHEME', "Default theme"); +define('_MD_AM_DTPLSET', "Default template set"); +define('_MD_AM_FOOTER', "Footer"); +define('_MD_AM_FOOTERDSC', "Be sure to type links in full path starting from http://, otherwise the links will not work correctly in modules pages."); +define('_MD_AM_GENERAL', "General Settings"); +define('_MD_AM_IFUCANT', "If you can't change the permissions you can edit the rest of this file by hand."); +define('_MD_AM_INDEXFOLLOW', "Index, Follow"); +define('_MD_AM_INDEXNOFOLLOW', "Index, No Follow"); +define('_MD_AM_INVLDMINPASS', "Invalid value for minimum length of password."); +define('_MD_AM_INVLDSCOOK', "Invalid value for sessioncookie name."); +define('_MD_AM_INVLDSEXP', "Invalid value for session expiration time."); +define('_MD_AM_INVLDUCOOK', "Invalid value for usercookie name."); +define('_MD_AM_IPBAN', "IP Banning"); +define('_MD_AM_LANGUAGE', "Default language"); +define('_MD_AM_LIGHT', "Light (recommended for multi-byte chars)"); +define('_MD_AM_LOADINGIMG', "Display loading... image?"); +define('_MD_AM_MAILER', "Mail Setup"); +define('_MD_AM_MAILER_', ""); +define('_MD_AM_MAILER_MAIL', ""); +define('_MD_AM_MAILER_SENDMAIL', ""); +define('_MD_AM_MAILERMETHOD', "Mail delivery method"); +define('_MD_AM_MAILERMETHODDESC', "Method used to deliver mail. Default is \"mail\", use others only if that makes trouble."); +define('_MD_AM_MAILFROM', "FROM address"); +define('_MD_AM_MAILFROMDESC', ""); +define('_MD_AM_MAILFROMNAME', "FROM name"); +define('_MD_AM_MAILFROMNAMEDESC', ""); +define('_MD_AM_MAILFROMUID', "FROM user"); +define('_MD_AM_MAILFROMUIDDESC', "When the system sends a private message, which user should appear to have sent it?"); +define('_MD_AM_MAXUNAME', "Maximum length of username"); +define('_MD_AM_MEDIUM', "Medium"); +define('_MD_AM_METAAUTHOR', "Meta Author"); +define('_MD_AM_METAAUTHORDSC', "The author meta tag defines the name of the author of the document being read. Supported data formats include the name, email address of the webmaster, company name or URL."); +define('_MD_AM_METACOPYR', "Meta Copyright"); +define('_MD_AM_METACOPYRDSC', "The copyright meta tag defines any copyright statements you wish to disclose about your web page documents."); +define('_MD_AM_METADESC', "Meta Description"); +define('_MD_AM_METADESCDSC', "The description meta tag is a general description of what is contained in your web page"); +define('_MD_AM_METAFOOTER', "Meta Tags and Footer"); +define('_MD_AM_METAKEY', "Meta Keywords"); +define('_MD_AM_METAKEYDSC', "The keywords meta tag is a series of keywords that represents the content of your site. Type in keywords with each separated by a comma or a space in between. (Ex. XOOPS, PHP, mySQL, portal system)"); +define('_MD_AM_METAO14YRS', "14 years"); +define('_MD_AM_METAOGEN', "General"); +define('_MD_AM_METAOMAT', "Mature"); +define('_MD_AM_METAOREST', "Restricted"); +define('_MD_AM_METARATING', "Meta Rating"); +define('_MD_AM_METARATINGDSC', "The rating meta tag defines your site age and content rating"); +define('_MD_AM_METAROBOTS', "Meta Robots"); +define('_MD_AM_METAROBOTSDSC', "The Robots Tag declares to search engines what content to index and spider"); +define('_MD_AM_MINPASS', "Minimum length of password required"); +define('_MD_AM_MINSEARCH', "Minimum keyword length"); +define('_MD_AM_MINSEARCHDSC', "Enter the minimum keyword length that users are required to enter to perform search"); +define('_MD_AM_MINUNAME', "Minimum length of username required"); +define('_MD_AM_MODCACHE', "Module-wide Cache"); +define('_MD_AM_MODCACHEDSC', "Caches module contents for a specified amount of time to enhance performance. Setting module-wide cache will override module item level cache if any."); +define('_MD_AM_MODCONFIG', "Module Config Options"); +define('_MD_AM_MYIP', "Your IP address"); +define('_MD_AM_MYIPDSC', "This IP will not counted as impression for banners"); +define('_MD_AM_NEWUNOTIFY', "Notify by mail when a new user is registered?"); +define('_MD_AM_NO', "No"); +define('_MD_AM_NOINDEXFOLLOW', "No Index, Follow"); +define('_MD_AM_NOINDEXNOFOLLOW', "No Index, No Follow"); +define('_MD_AM_NOMODULE', "There is no module that can be cached."); +define('_MD_AM_NONE', "None"); +define('_MD_AM_NOTIFYTO', "Select group to which new user notification mail will be sent"); +define('_MD_AM_PREFMAIN', "Preferences Main"); +define('_MD_AM_REGDSCLMR', "Registration disclaimer"); +define('_MD_AM_REGDSCLMRDSC', "Enter text to be displayed as registration disclaimer"); +define('_MD_AM_REMEMBER', "Remember to chmod 666 this file in order to let the system write to it properly."); +define('_MD_AM_SEARCH', "Search Options"); +define('_MD_AM_SELFDELETE', "Allow users to delete own account?"); +define('_MD_AM_SENDMAILPATH', "Path to sendmail"); +define('_MD_AM_SENDMAILPATHDESC', "Path to the sendmail program (or substitute) on the webserver."); +define('_MD_AM_SERVERTZ', "Server timezone"); +define('_MD_AM_SESSEXPIRE', "Session expiration"); +define('_MD_AM_SESSEXPIREDSC', "Maximum duration of session idle time in minutes (Valid only when 'use custom session' is enabled. Works only when you are using PHP4.2.0 or later.)"); +define('_MD_AM_SESSNAME', "Session name"); +define('_MD_AM_SESSNAMEDSC', "The name of session (Valid only when 'use custom session' is enabled)"); +define('_MD_AM_SITECACHE', "Site-wide Cache"); +define('_MD_AM_SITECACHEDSC', "Caches whole contents of the site for a specified amount of time to enhance performance. Setting site-wide cache will override module-level cache, block-level cache, and module item level cache if any."); +define('_MD_AM_SITENAME', "Site name"); +define('_MD_AM_SITEPREF', "Site Preferences"); +define('_MD_AM_SLOGAN', "Slogan for your site"); +define('_MD_AM_SMTPHOST', "SMTP host(s)"); +define('_MD_AM_SMTPHOSTDESC', "List of SMTP servers to try to connect to."); +define('_MD_AM_SMTPPASS', "SMTPAuth password"); +define('_MD_AM_SMTPPASSDESC', "Password to connect to an SMTP host with SMTPAuth."); +define('_MD_AM_SMTPUSER', "SMTPAuth username"); +define('_MD_AM_SMTPUSERDESC', "Username to connect to an SMTP host with SMTPAuth."); +define('_MD_AM_SSLLINK', "URL where SSL login page is located"); +define('_MD_AM_SSLPOST', "SSL Post variable name"); +define('_MD_AM_SSLPOSTDSC', "The name of variable used to transfer session value via POST. If you are unsure, set any name that is hard to guess."); +define('_MD_AM_STARTPAGE', "Module for your start page"); +define('_MD_AM_STRICT', "Strict (only alphabets and numbers)"); +define('_MD_AM_THEMEFILE', "Update module template .html files from themes/your theme/templates directory?"); +define('_MD_AM_THEMEFILEDSC', "If this option is enabled, module template .html files will be updated automatically if there are newer files under the themes/your theme/templates directory for the current theme. This should be turned off once the site goes public."); +define('_MD_AM_THEMEOK', "Selectable themes"); +define('_MD_AM_THEMEOKDSC', "Choose themes that users can select as the default theme"); +define('_MD_AM_THEMESET', "Theme Set"); +define('_MD_AM_UNAMELVL', "Select the level of strictness for username filtering"); +define('_MD_AM_USEGZIP', "Use gzip compression?"); +define('_MD_AM_USEMYSESS', "Use custom session"); +define('_MD_AM_USEMYSESSDSC', "Select yes to customise session related values."); +define('_MD_AM_USERACTV', "Requires activation by user (recommended)"); +define('_MD_AM_USERCOOKIE', "Name for user cookies."); +define('_MD_AM_USERCOOKIEDSC', "This cookie contains only a user name and is saved in a user pc for a year (if the user wishes). If a user have this cookie, username will be automatically inserted in the login box."); +define('_MD_AM_USERSETTINGS', "User Info Settings"); +define('_MD_AM_USESSL', "Use SSL for login?"); +define('_MD_AM_YES', "Yes"); ?>

    <{$obj->getVar('confcat_id')}><{$obj->getName()}><{$obj->getName()|escape}> " alt="<{$smarty.const._EDIT}> title="<{$smarty.const._EDIT}>" />