[xc-tokai-svnlog] SF.net SVN: xc-tokai:[361]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-08 14:22:00
|
Revision: 361 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=361&view=rev Author: kilica Date: 2008-12-08 14:21:58 +0000 (Mon, 08 Dec 2008) Log Message: ----------- [0.11] RSS Output Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Added Paths: ----------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/FeedGenerator.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_rss.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-06 00:29:08 UTC (rev 360) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-08 14:21:58 UTC (rev 361) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.11(2008.12.08) +\x81ERSS\x92lj\xC1 + 0.10(2008.10.25) \x81E\x8C\xF6\x8AJ Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php 2008-12-08 14:21:58 UTC (rev 361) @@ -0,0 +1,125 @@ +<?php +/** + * @file + * @package bizforum + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit; +} + +require_once BIZPOLL_TRUST_PATH . '/class/AbstractListAction.class.php'; +require_once BIZPOLL_TRUST_PATH . '/class/FeedGenerator.class.php'; + +/** + * Bizpoll_PostListAction +**/ +class Bizpoll_EnqRssAction extends Bizpoll_AbstractListAction +{ + var $mFeed = null; + + var $mCatTitle = ""; + var $mCatPath = array(); + + /** + * &_getHandler + * + * @param void + * + * @return Bizpoll_EnqHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'enq'); + return $handler; + } + + /** + * &_getFilterForm + * + * @param void + * + * @return Bizpoll_EnqFilterForm + **/ + protected function &_getFilterForm() + { + $filter =& $this->mAsset->getObject('filter', 'enq', false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } + + function prepare() + { + if($this->mModule->getModuleConfig('show_rss')!=1){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } + } + + /** + * _getBaseUrl + * + * @param void + * + * @return string + **/ + protected function _getBaseUrl() + { + return './rss.php?action=EnqRss'; + } + + /** + * @public + */ + function getDefaultView() + { + /*----------------------------------------------------------- + create Enq RSS Feed + -----------------------------------------------------------*/ + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + + $handler =& $this->_getHandler(); + $criteria=$this->mFilter->getCriteria(); + $criteria->setSort('pub_unixtime', "DESC"); + + $this->mObjects =& $handler->getObjects($criteria); + $userHandler =& xoops_gethandler('member'); + foreach(array_keys($this->mObjects) as $key) + { + $enqRssArr['title'][$key] = $this->mObjects[$key]->getShow('title'); + $enqRssArr['link'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqList&enq_id='. $this->mObjects[$key]->getShow('enq_id'); + $enqRssArr['guid'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqList&enq_id='. $this->mObjects[$key]->getShow('enq_id'); + $enqRssArr['pubDate'][$key] = $this->mObjects[$key]->getShow('pub_unixtime'); + if($this->mObjects[$key]->getShow('uid')>0){ + $user = $userHandler->getUser($this->mObjects[$key]->getShow('uid')); + $enqRssArr['author'][$key] = $user->getShow('uname'); + } + else{ + $enqRssArr['author'][$key] = $this->mObjects[$key]->getShow('guest_name'); + } + $enqRssArr['category'][$key] = ''; + $enqRssArr['description'][$key] = htmlspecialchars($this->mObjects[$key]->get('description'), ENT_QUOTES); + } + $this->mFeed = new Bizpoll_FeedGenerator($this->mAsset->mDirname, 20); + $this->mFeed->addItems($enqRssArr); + + return BIZPOLL_FRAME_VIEW_INDEX; + } + + /** + * executeViewIndex + * + * @param XCube_RenderTarget &$render + * + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + //RSS Data create + $this->mFeed->display("enq"); + } +} + +?> Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/FeedGenerator.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/FeedGenerator.class.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/FeedGenerator.class.php 2008-12-08 14:21:58 UTC (rev 361) @@ -0,0 +1,116 @@ +<?php + +if (!defined('XOOPS_ROOT_PATH')) exit(); + +class Bizpoll_FeedGenerator +{ + var $mDirname = ''; + var $mLimit = 10; + var $mLastBuild = 0; + var $mTpl = null; + var $mItemArr = array(); + + function Bizpoll_FeedGenerator($dirname, $limit=10) + { + if (function_exists('mb_http_output')) { + mb_http_output('pass'); + } + $this->mDirname = $dirname; + $this->setChannel(); + $this->_setLimit($limit); + } + + function setChannel() + { + $this->mTpl = new XoopsTpl(); + + if (!$this->mTpl->is_cached("db:". $this->mDirname ."_rss.html")) { + $this->mTpl->assign('channel_title', xoops_utf8_encode($this->_getChannelTitle())); + $this->mTpl->assign('channel_subtitle', xoops_utf8_encode($this->_getChannelSubtitle())); + $this->mTpl->assign('channel_link', XOOPS_URL.'/modules/'. $this->mDirname .'/'); + $this->mTpl->assign('channel_desc', $this->mDirname); + $this->mTpl->assign('channel_webmaster', XOOPS_URL); + $this->mTpl->assign('channel_editor', ''); + $this->mTpl->assign('channel_category', 'rss, feeds'); + $this->mTpl->assign('channel_generator', 'XOOPS Cube Legacy/'. $this->mDirname); + $this->mTpl->assign('channel_language', _LANGCODE); + } + } + + function _getChannelTitle() + { + $root =& XCube_Root::getSingleton(); + return htmlspecialchars($root->mContext->getXoopsConfig('sitename'), ENT_QUOTES); + } + + function _getChannelSubtitle() + { + $handler =& Bizpoll_Utils::getXoopsHandler('module'); + $module =& $handler->getByDirname($this->mDirname); + return htmlspecialchars($module->get('name'), ENT_QUOTES); + } + + function _setLimit($limit) + { + $this->mLimit = intval($limit); + } + + function _getLimit() + { + return $this->mLimit; + } + + function setLastBuildDate($unixtime) + { + $this->mTpl->assign('channel_lastbuild', formatTimestamp($unixtime, 'rss')); + } + + function addItems($rssArr) + { + $oldArr = $this->mItemArr; + $this->mItemArr = array_merge_recursive($oldArr, $rssArr); + } + + function _createItem() + { + if (is_array($this->mItemArr['title'])) { + //reg_unixtime \xA4\xC7\xCA¤\xD9\xC2ؤ\xA8\xA4\xEB + if(! array_multisort( + $this->mItemArr['pubDate'], SORT_DESC, + $this->mItemArr['title'], + $this->mItemArr['link'], + $this->mItemArr['guid'], + $this->mItemArr['author'], + $this->mItemArr['category'], + $this->mItemArr['description'] + )){ + print "error";die(); + } + } + $m = 0; + for($m = 0; $m<count($this->mItemArr['title']) && $m<$this->_getLimit(); $m++) { + $this->mTpl->append('items', array( + 'title' => xoops_utf8_encode($this->mItemArr['title'][$m]), + 'link' => $this->mItemArr['link'][$m], + 'guid' => $this->mItemArr['guid'][$m], + 'pubdate' => formatTimestamp($this->mItemArr['pubDate'][$m], 'rss'), + 'author' => xoops_utf8_encode($this->mItemArr['author'][$m]), + 'category' => xoops_utf8_encode($this->mItemArr['category'][$m]), + 'description' => xoops_utf8_encode($this->mItemArr['description'][$m])) + ); + if($this->mItemArr['pubDate'][$m] > $this->mLastBuild){ + $this->mLastBuild = $this->mItemArr['pubDate'][$m]; + } + } + } + + function display($table) + { + $this->_createItem(); + header ('Content-Type:text/xml; charset=utf-8'); + $this->mTpl->display("db:". $this->mDirname ."_". $table . "_rss.html"); + } + +} + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2008-12-06 00:29:08 UTC (rev 360) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2008-12-08 14:21:58 UTC (rev 361) @@ -56,6 +56,7 @@ define('_MI_BIZPOLL_TPL_ENQ_EDIT', "ENQ_EDIT"); define('_MI_BIZPOLL_TPL_ENQ_DELETE', "ENQ_DELETE"); define('_MI_BIZPOLL_TPL_ENQ_VIEW', "ENQ_VIEW"); +define('_MI_BIZPOLL_TPL_ENQ_RSS', "RSS一覧"); define('_MI_BIZPOLL_TPL_POLL_LIST', "投票一覧"); define('_MI_BIZPOLL_TPL_POLL_EDIT', "POLL_EDIT"); define('_MI_BIZPOLL_TPL_POLL_DELETE', "POLL_DELETE"); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2008-12-06 00:29:08 UTC (rev 360) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2008-12-08 14:21:58 UTC (rev 361) @@ -56,6 +56,7 @@ define('_MI_BIZPOLL_TPL_ENQ_EDIT', "ENQ_EDIT"); define('_MI_BIZPOLL_TPL_ENQ_DELETE', "ENQ_DELETE"); define('_MI_BIZPOLL_TPL_ENQ_VIEW', "ENQ_VIEW"); +define('_MI_BIZPOLL_TPL_RSS_VIEW', "RSS\xB0\xEC\xCD\xF7"); define('_MI_BIZPOLL_TPL_POLL_LIST', "\xC5\xEAɼ\xB0\xEC\xCD\xF7"); define('_MI_BIZPOLL_TPL_POLL_EDIT', "POLL_EDIT"); define('_MI_BIZPOLL_TPL_POLL_DELETE', "POLL_DELETE"); Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_rss.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_rss.html (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_rss.html 2008-12-08 14:21:58 UTC (rev 361) @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0"> + <channel> + <title><{$channel_title}><{if $channel_subtitle}> - <{$channel_subtitle}><{/if}></title> + <link><{$channel_link}></link> + <description><{$channel_desc}></description> + <lastBuildDate><{$channel_lastbuild}></lastBuildDate> + <docs>http://backend.userland.com/rss/</docs> + <generator><{$channel_generator}></generator> + <category><{$channel_category}></category> + <managingEditor><{$channel_editor}></managingEditor> + <webMaster><{$channel_webmaster}></webMaster> + <language><{$channel_language}></language> + <{if $image_url != ""}> + <image> + <title><{$channel_title}></title> + <url><{$image_url}></url> + <link><{$channel_link}></link> + <width><{$image_width}></width> + <height><{$image_height}></height> + </image> + <{/if}> + <{foreach item=item from=$items}> + <item> + <title><{$item.title}></title> + <link><{$item.link}></link> + <description><![CDATA[ +<{$item.description}> +]]> + </description> + <pubDate><{$item.pubdate}></pubDate> + <guid><{$item.guid}></guid> + <author><{$item.author}></author> + <category><{$item.category}></category> + </item> + <{/foreach}> + </channel> +</rss> \ No newline at end of file Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-06 00:29:08 UTC (rev 360) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-08 14:21:58 UTC (rev 361) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.1; +$modversion['version'] = 0.11; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -85,6 +85,7 @@ array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), + array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), ##[/cubson:templates] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[368]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-13 03:16:14
|
Revision: 368 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=368&view=rev Author: kilica Date: 2008-12-13 03:16:10 +0000 (Sat, 13 Dec 2008) Log Message: ----------- [0.12] BugFix: choice_id field type in poll table [0.12] Google Chart API Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Choice.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/sql/mysql.sql modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_view.html modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-13 03:16:10 UTC (rev 368) @@ -18,6 +18,11 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.12(2008.12.11) +\x81\xA60.11\x88ȑO\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Eg\x82\xED\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x82́AMySQL \x82̃e\x81[\x83u\x83\x8B\x82\xCC bizpoll_poll \x82\xCC "choice_id" \x82\xCC type \x82\xF0 text \x82ɕύX\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B +\x81EChoice \x82̍ĕҏW\x8B@\x94\\x82\xF0\x92lj\xC1 +\x81E\x95\xA1\x90\x94\x89̏ꍇ\x82̃o\x83O\x82\xF0\x8FC\x90\xB3\x81B + 0.11(2008.12.08) \x81ERSS\x92lj\xC1 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqRssAction.class.php 2008-12-13 03:16:10 UTC (rev 368) @@ -89,8 +89,8 @@ foreach(array_keys($this->mObjects) as $key) { $enqRssArr['title'][$key] = $this->mObjects[$key]->getShow('title'); - $enqRssArr['link'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqList&enq_id='. $this->mObjects[$key]->getShow('enq_id'); - $enqRssArr['guid'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqList&enq_id='. $this->mObjects[$key]->getShow('enq_id'); + $enqRssArr['link'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqView&enq_id='. $this->mObjects[$key]->getShow('enq_id'); + $enqRssArr['guid'][$key] = XOOPS_URL. '/modules/'. $this->mAsset->mDirname .'/index.php?action=EnqView&enq_id='. $this->mObjects[$key]->getShow('enq_id'); $enqRssArr['pubDate'][$key] = $this->mObjects[$key]->getShow('pub_unixtime'); if($this->mObjects[$key]->getShow('uid')>0){ $user = $userHandler->getUser($this->mObjects[$key]->getShow('uid')); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2008-12-13 03:16:10 UTC (rev 368) @@ -109,6 +109,7 @@ foreach(array_keys($this->mObject->mChoice) as $key){ $this->mObject->mChoice[$key]->loadPolled($this->mAsset->mDirname); $this->mObject->mChoice[$key]->countPoll($this->mAsset->mDirname); + $this->mObject->mChoice[$key]->checkEditor($this->mAsset->mDirname); } //load Poll of this User Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-13 03:16:10 UTC (rev 368) @@ -19,6 +19,7 @@ class Bizpoll_PollDetailAction extends Bizpoll_AbstractListAction { var $mEnq = null; + var $mChart = array(); /** * _getId @@ -109,9 +110,19 @@ $this->mObjects =& $handler->getObjects($criteria); //loadChoice + $this->mChart['count'] = array(); + $this->mChart['title'] = array(); + $this->mChart['total'] = array(); foreach(array_keys($this->mObjects) as $key){ $this->mObjects[$key]->loadChoice($this->mAsset->mDirname); + //for Google Chart API + $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); + foreach(array_keys($choiceArr) as $keyC){ + $this->mChart['count'][$choiceArr[$keyC]]++; + $this->mChart['title'][$choiceArr[$keyC]] = '('. $this->mChart['count'][$choiceArr[$keyC]] .')+'. strtr($this->mObjects[$key]->mChoice[$keyC]->getShow('title'), ' ', '+'); + } } + $this->mChart['total'] = count($this->mChart['title']); return BIZPOLL_FRAME_VIEW_INDEX; } @@ -126,6 +137,7 @@ $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); $render->setAttribute('objects', $this->mObjects); $render->setAttribute('enq', $this->mEnq); + $render->setAttribute('chart', $this->mChart); $render->setAttribute('pageNavi', $this->mFilter->mNavi); } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Choice.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Choice.class.php 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Choice.class.php 2008-12-13 03:16:10 UTC (rev 368) @@ -9,6 +9,7 @@ { exit; } +require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; /** * Bizpoll_ChoiceObject @@ -22,6 +23,7 @@ var $mPollCount = 0; var $_mPollCountFlag = false; var $mIsPolled = false; + var $mAllowEdit = false; /** * __construct @@ -71,7 +73,7 @@ } elseif($this->mEnq->get('type')==1){ //checkbox $pollArr = & $handler->getObjects(new Criteria('enq_id', $this->get('enq_id'))); - foreach(array_keys($choiceArr) as $key){ + foreach(array_keys($pollArr) as $key){ $choices = explode(',', $pollArr[$key]->get('choice_id')); if(in_array($this->get('choice_id'), $choices)){ $this->mPoll[] = $pollArr[$key]; @@ -114,6 +116,28 @@ } } + public function checkEditor($dirname) + { + $root = XCube_Root::getSingleton(); + $this->loadEnq($dirname); + if(! $root->mContext->mXoopsUser){ + return; + } + + //this user added this choice ? + if($this->get('uid')==$root->mContext->mXoopsUser->get('uid')){ + $this->mAllowEdit = true; + } + //this user added this enq ? + //this user has Editor Permission + else{ + $xcatHandler = new Bizpoll_XcatHandler($dirname); + if($xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'editor', $this->mEnq->get('uid'))==true){ + $this->mAllowEdit = true; + } + } + } + protected function &_getHandler($dirname, $tablename) { $asset = null; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2008-12-13 03:16:10 UTC (rev 368) @@ -47,7 +47,7 @@ $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); $this->mFormProperties['name'] =& new XCube_StringProperty('name'); - $this->mFormProperties['choice_id'] =& new XCube_IntProperty('choice_id'); + $this->mFormProperties['choice_id'] =& new XCube_TextProperty('choice_id'); $this->mFormProperties['ip'] =& new XCube_StringProperty('ip'); $this->mFormProperties['comment'] =& new XCube_TextProperty('comment'); $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/sql/mysql.sql =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/sql/mysql.sql 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/sql/mysql.sql 2008-12-13 03:16:10 UTC (rev 368) @@ -29,7 +29,7 @@ `enq_id` mediumint(8) unsigned NOT NULL, `uid` mediumint(8) unsigned NOT NULL, `name` varchar(32) NOT NULL, - `choice_id` int(11) unsigned NOT NULL, + `choice_id` text NOT NULL, `ip` varchar(255) NOT NULL, `comment` text NOT NULL, `reg_unixtime` int(11) unsigned NOT NULL, Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_view.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_view.html 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_view.html 2008-12-13 03:16:10 UTC (rev 368) @@ -73,6 +73,9 @@ <dt><label> <input type="radio" name="choice_id" id="legacy_xoopsform_choice_id" value="<{$choiceR->getShow('choice_id')}>"<{if $choiceR->mIsPolled==true}> checked="checked"<{/if}>> <{$choiceR->getShow('title')}><{if $allowShowResult==true}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$choiceR->mPollCount}>)<{/if}></label> + <{if $choiceR->mAllowEdit==true}> + <a href="./index.php?action=ChoiceEdit&choice_id=<{$choiceR->getShow('choice_id')}>"><img src="<{$xoops_url}>/images/icons/edit.gif" alt="<{$smarty.const._EDIT}>" /></a> + <{/if}> </dt> <dd><{$choiceR->getShow('description')}></dd> <{/foreach}> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-12 10:45:10 UTC (rev 367) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 03:16:10 UTC (rev 368) @@ -1,6 +1,8 @@ <div class="bizpoll"> <h1><{$enq->getShow('title')}></h1> +<img src="http://chart.apis.google.com/chart?chs=400x<{$chart.total*35}>&chd=t:<{foreach item=pCount from=$chart.count name=pCount}><{$pCount}><{if ! $smarty.foreach.pCount.last}>,<{/if}><{/foreach}>&cht=bhg&chm=<{foreach item=pTitle from=$chart.title name=pTitle}>t<{$pTitle}>,000000,<{$smarty.foreach.pTitle.iteration-1}>,0,13<{if ! $smarty.foreach.pTitle.last}>|<{/if}><{/foreach}>" alt="result graph"> + <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> <hr /> <dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[369]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-13 03:54:36
|
Revision: 369 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=369&view=rev Author: kilica Date: 2008-12-13 03:54:32 +0000 (Sat, 13 Dec 2008) Log Message: ----------- [0.12] Use Div bar graph instead of Google Chart Api Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-13 03:16:10 UTC (rev 368) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-13 03:54:32 UTC (rev 369) @@ -119,7 +119,7 @@ $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); foreach(array_keys($choiceArr) as $keyC){ $this->mChart['count'][$choiceArr[$keyC]]++; - $this->mChart['title'][$choiceArr[$keyC]] = '('. $this->mChart['count'][$choiceArr[$keyC]] .')+'. strtr($this->mObjects[$key]->mChoice[$keyC]->getShow('title'), ' ', '+'); + $this->mChart['title'][$choiceArr[$keyC]] = '('. $this->mChart['count'][$choiceArr[$keyC]] .') '. $this->mObjects[$key]->mChoice[$keyC]->getShow('title'); } } $this->mChart['total'] = count($this->mChart['title']); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 03:16:10 UTC (rev 368) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 03:54:32 UTC (rev 369) @@ -1,8 +1,11 @@ <div class="bizpoll"> <h1><{$enq->getShow('title')}></h1> -<img src="http://chart.apis.google.com/chart?chs=400x<{$chart.total*35}>&chd=t:<{foreach item=pCount from=$chart.count name=pCount}><{$pCount}><{if ! $smarty.foreach.pCount.last}>,<{/if}><{/foreach}>&cht=bhg&chm=<{foreach item=pTitle from=$chart.title name=pTitle}>t<{$pTitle}>,000000,<{$smarty.foreach.pTitle.iteration-1}>,0,13<{if ! $smarty.foreach.pTitle.last}>|<{/if}><{/foreach}>" alt="result graph"> +<{foreach item=pCount from=$chart.count key=pKey}> + <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:5px;"></div>"<{$chart.title[$pKey]}><br style="clear:left;" /> +<{/foreach}> + <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> <hr /> <dl> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[370]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-13 06:25:47
|
Revision: 370 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=370&view=rev Author: kilica Date: 2008-12-13 06:25:44 +0000 (Sat, 13 Dec 2008) Log Message: ----------- [0.12] adjust templates/bizpoll_poll_detail.html Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-13 03:54:32 UTC (rev 369) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2008-12-13 06:25:44 UTC (rev 370) @@ -19,6 +19,7 @@ class Bizpoll_PollDetailAction extends Bizpoll_AbstractListAction { var $mEnq = null; + var $mEnqId = 0; var $mChart = array(); /** @@ -29,7 +30,7 @@ protected function _getId() { if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ - return $this->mRoot->mContext->mRequest->getRequest('enq_id'); + return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); } else{ $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); @@ -98,7 +99,7 @@ //getDefaultView $this->mFilter =& $this->_getFilterForm(); $this->mFilter->fetch(); - $this->mEnqId = intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); + $this->mEnqId = $this->_getId(); $handler =& $this->_getHandler(); $criteria=$this->mFilter->getCriteria(); @@ -119,7 +120,7 @@ $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); foreach(array_keys($choiceArr) as $keyC){ $this->mChart['count'][$choiceArr[$keyC]]++; - $this->mChart['title'][$choiceArr[$keyC]] = '('. $this->mChart['count'][$choiceArr[$keyC]] .') '. $this->mObjects[$key]->mChoice[$keyC]->getShow('title'); + $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title'); } } $this->mChart['total'] = count($this->mChart['title']); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php 2008-12-13 03:54:32 UTC (rev 369) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php 2008-12-13 06:25:44 UTC (rev 370) @@ -45,6 +45,7 @@ define('_MD_BIZPOLL_ERROR_CONTENT_IS_NOT_FOUND', "CONTENT_IS_NOT_FOUND"); define('_MD_BIZPOLL_LANG_ADD_A_NEW_POLL', "投票する"); define('_MD_BIZPOLL_LANG_POLL', "投票"); +define('_MD_BIZPOLL_LANG_VOTE', "票"); define('_MD_BIZPOLL_LANG_POLL_ID', "POLL_ID"); define('_MD_BIZPOLL_LANG_NAME', "ゲスト名"); define('_MD_BIZPOLL_LANG_CHOICE', "選択肢"); @@ -68,5 +69,6 @@ define('_MD_BIZPOLL_LANG_DISPLAY_END_DATETIME', "終了日時を設定する"); define('_MD_BIZPOLL_LANG_REMOVE_END_DATETIME', "終了日時の設定をやめる"); define('_MD_BIZPOLL_LANG_WEIGHT', "並び順"); +define('_MD_BIZPOLL_LANG_RETURN_POLL', "投票画面に戻る"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php 2008-12-13 03:54:32 UTC (rev 369) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php 2008-12-13 06:25:44 UTC (rev 370) @@ -45,6 +45,7 @@ define('_MD_BIZPOLL_ERROR_CONTENT_IS_NOT_FOUND', "CONTENT_IS_NOT_FOUND"); define('_MD_BIZPOLL_LANG_ADD_A_NEW_POLL', "\xC5\xEAɼ\xA4\xB9\xA4\xEB"); define('_MD_BIZPOLL_LANG_POLL', "\xC5\xEAɼ"); +define('_MD_BIZPOLL_LANG_VOTE', "ɼ"); define('_MD_BIZPOLL_LANG_POLL_ID', "POLL_ID"); define('_MD_BIZPOLL_LANG_NAME', "\xA5\xB2\xA5\xB9\xA5\xC8̾"); define('_MD_BIZPOLL_LANG_CHOICE', "\xC1\xAA\xC2\xF2\xBB\xE8"); @@ -68,5 +69,6 @@ define('_MD_BIZPOLL_LANG_DISPLAY_END_DATETIME', "\xBD\xAAλ\xC6\xFC\xBB\xFE\xA4\xF2\xC0\xDF\xC4ꤹ\xA4\xEB"); define('_MD_BIZPOLL_LANG_REMOVE_END_DATETIME', "\xBD\xAAλ\xC6\xFC\xBB\xFE\xA4\xCE\xC0\xDF\xC4\xEA\xA4\xF2\xA4\xE4\xA4\xE1\xA4\xEB"); define('_MD_BIZPOLL_LANG_WEIGHT', "\xCA¤ӽ\xE7"); +define('_MD_BIZPOLL_LANG_RETURN_POLL', "\xC5\xEAɼ\xB2\xE8\xCC̤\xCB\xCC\xE1\xA4\xEB"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 03:54:32 UTC (rev 369) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 06:25:44 UTC (rev 370) @@ -1,8 +1,9 @@ <div class="bizpoll"> +<a href="./index.php?action=EnqView&enq_id=<{$enq->getShow('enq_id')}>"><{$smarty.const._MD_BIZPOLL_LANG_RETURN_POLL}></a> <h1><{$enq->getShow('title')}></h1> <{foreach item=pCount from=$chart.count key=pKey}> - <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:5px;"></div>"<{$chart.title[$pKey]}><br style="clear:left;" /> + <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:10px 30px 10px 5px;"></div><{$chart.title[$pKey]}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$pCount}>)<br style="clear:left;" /> <{/foreach}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[372]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-13 06:38:31
|
Revision: 372 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=372&view=rev Author: kilica Date: 2008-12-13 06:38:28 +0000 (Sat, 13 Dec 2008) Log Message: ----------- [0.12] adjust templates/bizpoll_poll_detail.html Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-13 06:35:19 UTC (rev 371) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-13 06:38:28 UTC (rev 372) @@ -18,10 +18,11 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- -0.12(2008.12.11) +0.12(2008.12.13) \x81\xA60.11\x88ȑO\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Eg\x82\xED\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x82́AMySQL \x82̃e\x81[\x83u\x83\x8B\x82\xCC bizpoll_poll \x82\xCC "choice_id" \x82\xCC type \x82\xF0 text \x82ɕύX\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B \x81EChoice \x82̍ĕҏW\x8B@\x94\\x82\xF0\x92lj\xC1 \x81E\x95\xA1\x90\x94\x89̏ꍇ\x82̃o\x83O\x82\xF0\x8FC\x90\xB3\x81B +\x81E\x93\x8A\x95[\x8C\x8B\x89ʏڍ\xE6\x96ʂɖ_\x83O\x83\x89\x83t\x82\xF0\x95\\x8E\xA6 0.11(2008.12.08) \x81ERSS\x92lj\xC1 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 06:35:19 UTC (rev 371) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2008-12-13 06:38:28 UTC (rev 372) @@ -6,7 +6,7 @@ <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:10px 30px 10px 5px;"></div><{$chart.title[$pKey]}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$pCount}>)<br style="clear:left;" /> <{/foreach}> - +<h2><{$smarty.const._MD_BIZPOLL_LANG_POLL_RESULT}></h2> <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> <hr /> <dl> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-13 06:35:19 UTC (rev 371) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-13 06:38:28 UTC (rev 372) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.11; +$modversion['version'] = 0.12; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[380]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-23 12:41:41
|
Revision: 380 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=380&view=rev Author: kilica Date: 2008-12-23 12:41:37 +0000 (Tue, 23 Dec 2008) Log Message: ----------- [0.13] Add Enq Block Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Added Paths: ----------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_enq.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-23 12:41:37 UTC (rev 380) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.13(2008.12.23) +\x81E\x81u\x8Dŋ߂̃A\x83\x93\x83P\x81[\x83g\x81v\x83u\x83\x8D\x83b\x83N\x82\xF0\x92lj\xC1 + 0.12(2008.12.13) \x81\xA60.11\x88ȑO\x82̃o\x81[\x83W\x83\x87\x83\x93\x82\xF0\x8Eg\x82\xED\x82\xEA\x82Ă\xA2\x82\xE9\x8Fꍇ\x82́AMySQL \x82̃e\x81[\x83u\x83\x8B\x82\xCC bizpoll_poll \x82\xCC "choice_id" \x82\xCC type \x82\xF0 text \x82ɕύX\x82\xB5\x82Ă\xAD\x82\xBE\x82\xB3\x82\xA2\x81B \x81EChoice \x82̍ĕҏW\x8B@\x94\\x82\xF0\x92lj\xC1 Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php 2008-12-23 12:41:37 UTC (rev 380) @@ -0,0 +1,195 @@ +<?php +/** + * @file + * @package sdoc + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit(); +} + +/** + * Sdoc_ContentBlock +**/ +class Bizpoll_EnqBlock extends Legacy_BlockProcedure +{ + /** + * @var Sdoc_ItemsHandler + * + * @private + **/ + var $_mHandler = null; + + /** + * @var Sdoc_ItmesObject + * + * @private + **/ + var $_mOject = null; + + /** + * @var string[] + * + * @private + **/ + var $_mOptions = array(); + + /** + * prepare + * + * @param void + * + * @return bool + * + * @public + **/ + function prepare() + { + return parent::prepare() && $this->_parseOptions() && $this->_setupObject(); + } + + /** + * _parseOptions + * + * @param void + * + * @return bool + * + * @private + **/ + function _parseOptions() + { + $opts = explode('|',$this->_mBlock->get('options')); + $this->_mOptions = array( + 'limit' => (intval($opts[0])>0 ? intval($opts[0]) : 5), + 'catIds' => $opts[1] + ); + return true; + } + + /** + * getBlockOption + * + * @param string $key + * + * @return string + * + * @public + **/ + function getBlockOption($key) + { + return isset($this->_mOptions[$key]) ? $this->_mOptions[$key] : null; + } + + /** + * getOptionForm + * + * @param void + * + * @return string + * + * @public + **/ + function getOptionForm() + { + if(!$this->prepare()) + { + return null; + } + $form = "<label for='". $this->_mBlock->get('dirname') ."block_dispNum'>"._AD_BIZPOLL_LANG_DISPLAY_NUMBER."</label> : + <input type='text' size='5' name='options[0]' id='". $this->_mBlock->get('dirname') ."block_dispNum' value='".$this->getBlockOption('limit')."' /><br />\n + <label for='". $this->_mBlock->get('dirname') ."block_showCat'>"._AD_BIZPOLL_LANG_SHOW_CAT."</label> : + <input type='text' size='64' name='options[1]' id='". $this->_mBlock->get('dirname') ."block_enq' value='".$this->getBlockOption('catIds')."' />\n" ; + return $form; + } + + /** + * _setupObject + * + * @param void + * + * @return bool + * + * @private + **/ + function _setupObject() + { + $objects = array(); + $catIdArr = array(); + + //get block options + $limit = $this->getBlockOption('limit'); + if($this->getBlockOption('catIds')){ + $catIdArr = explode(',', $this->getBlockOption('catIds')); + } + + //get module asset for handlers + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $this->_mBlock->get('dirname') + ); + + $this->_mHandler =& $asset->getObject('handler','enq'); + $criteria = new CriteriaCompo('1', '1'); + $criteria->addSort('reg_unixtime', 'DESC'); + $criteria->setLimit($limit); + + //use subcriteria for permitted ids + require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; + $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); + $catCriteria = new CriteriaCompo('1', '1'); + if($catIdArr){ //get requested categories and check permission + foreach(array_keys($catIdArr) as $key){ + if($xcatHandler->checkPermit($catIdArr[$key], 'viewer')){ + $catCriteria->add(new Criteria('cat_id', $catIdArr[$key])); + } + } + if($catCriteria->getCountChildElements()==0){ + return true; + } + } + else{ //get all permit categories + $ids = $xcatHandler->getPermitCatIds(0, 'viewer'); + foreach(array_keys($ids) as $key){ + $catCriteria->add(new Criteria('cat_id', $ids[$key]), 'OR'); + } + } + $criteria->add($catCriteria); + + $objects = $this->_mHandler->getObjects($criteria); + foreach(array_keys($objects) as $keyC){ + $objects[$keyC]->countPoll($this->_mBlock->get('dirname')); + } + + $this->_mObject = $objects; + return true; + } + + /** + * execute + * + * @param void + * + * @return void + * + * @public + **/ + function execute() + { + $root =& XCube_Root::getSingleton(); + + $render =& $this->getRenderTarget(); + $render->setTemplateName($this->_mBlock->get('template')); + $render->setAttribute('block', $this->_mObject); + $render->setAttribute('dirname', $this->_mBlock->get('dirname')); + $renderSystem =& $root->getRenderSystem($this->getRenderSystemName()); + //var_dump($renderSystem);die(); + $renderSystem->renderBlock($render); + } +} + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2008-12-23 12:41:37 UTC (rev 380) @@ -5,4 +5,6 @@ * @version $Id$ **/ +define('_AD_BIZPOLL_LANG_DISPLAY_NUMBER', "表示件数"); +define('_AD_BIZPOLL_LANG_SHOW_CAT', "表示対象カテゴリ"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2008-12-23 12:41:37 UTC (rev 380) @@ -78,5 +78,6 @@ define('_MI_BIZPOLL_LANG_NOEDITOR', "エディタを使わない"); define('_MI_BIZPOLL_TITLE_IP_PERIOD', "同一IP投票禁止期間(時間)"); define('_MI_BIZPOLL_DESC_IP_PERIOD', "同一IPアドレスからのゲスト投票を禁止する時間を指定"); - +define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "最近のアンケート"); +define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "最近のアンケート"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php 2008-12-23 12:41:37 UTC (rev 380) @@ -1,8 +1,10 @@ -<?php -/** - * @file - * @package bizpoll - * @version $Id$ -**/ - -?> +<?php +/** + * @file + * @package bizpoll + * @version $Id$ +**/ + +define('_AD_BIZPOLL_LANG_DISPLAY_NUMBER', "ɽ\xBC\xA8\xB7\xEF\xBF\xF4"); +define('_AD_BIZPOLL_LANG_SHOW_CAT', "ɽ\xBC\xA8\xC2оݥ\xAB\xA5ƥ\xB4\xA5\xEA"); +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2008-12-23 12:41:37 UTC (rev 380) @@ -78,5 +78,7 @@ define('_MI_BIZPOLL_LANG_NOEDITOR', "\xA5\xA8\xA5ǥ\xA3\xA5\xBF\xA4\xF2\xBBȤ\xEF\xA4ʤ\xA4"); define('_MI_BIZPOLL_TITLE_IP_PERIOD', "Ʊ\xB0\xECIP\xC5\xEAɼ\xB6ػߴ\xFC\xB4֡ʻ\xFE\xB4֡\xCB"); define('_MI_BIZPOLL_DESC_IP_PERIOD', "Ʊ\xB0\xECIP\xA5\xA2\xA5ɥ쥹\xA4\xAB\xA4\xE9\xA4Υ\xB2\xA5\xB9\xA5\xC8\xC5\xEAɼ\xA4\xF2\xB6ػߤ\xB9\xA4\xEB\xBB\xFE\xB4֤\xF2\xBB\xD8\xC4\xEA"); +define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); +define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html 2008-12-23 12:41:37 UTC (rev 380) @@ -2,7 +2,7 @@ <li><a href="index.php?action=EnqEdit"><{$smarty.const._MD_BIZPOLL_LANG_ADD_A_NEW_ENQ}></a></li> </ul> -<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> +<div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div><div class="fix"></div> <table class="outer"> <thead> <tr> Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_enq.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_enq.html (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_enq.html 2008-12-23 12:41:37 UTC (rev 380) @@ -0,0 +1,6 @@ +<ul> + <{foreach item=obj from=$block}> + <li><a href="<{$xoops_url}>/modules/<{$dirname}>/index.php?action=EnqView&enq_id=<{$obj->getShow('enq_id')}>"><{$obj->getShow('title')|truncate:100:"..."}></a> (<{$obj->mPollCount}>) <{$obj->getShow('reg_unixtime')|date_format:"%Y.%m.%d"}> + </li> + <{/foreach}> +</ul> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-18 13:23:22 UTC (rev 379) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-23 12:41:37 UTC (rev 380) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.12; +$modversion['version'] = 0.13; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -201,19 +201,18 @@ // Block setting // $modversion['blocks'] = array( -/* - x => array( - 'func_num' => x, - 'file' => 'xxxBlock.class.php', - 'class' => 'xxx', - 'name' => _MI_BIZPOLL_BLOCK_NAME_xxx, - 'description' => _MI_BIZPOLL_BLOCK_DESC_xxx, - 'options' => '', - 'template' => '{dirname}_block_xxx.html', + 1 => array( + 'func_num' => 1, + 'file' => 'EnqBlock.class.php', + 'class' => 'EnqBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, + 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, + 'options' => '5|', + 'template' => '{dirname}_block_enq.html', 'show_all_module' => true, - 'visible_any' => true + 'can_clone' => true, + 'visible_any' => false ), -*/ ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[381]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2008-12-23 14:47:04
|
Revision: 381 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=381&view=rev Author: kilica Date: 2008-12-23 14:46:58 +0000 (Tue, 23 Dec 2008) Log Message: ----------- [0.14] display poll count on EnqListAction.class.php Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2008-12-23 14:46:58 UTC (rev 381) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.14(2008.12.23) +\x81E\x83A\x83\x93\x83P\x81[\x83g\x88ꗗ\x82ɓ\x8A\x95[\x8C\x8F\x90\x94\x82\xF0\x92lj\xC1 + 0.13(2008.12.23) \x81E\x81u\x8Dŋ߂̃A\x83\x93\x83P\x81[\x83g\x81v\x83u\x83\x8D\x83b\x83N\x82\xF0\x92lj\xC1 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2008-12-23 14:46:58 UTC (rev 381) @@ -108,6 +108,9 @@ $criteria->setSort('pub_unixtime', 'DESC'); $this->mObjects =& $handler->getObjects($criteria); + foreach(array_keys($this->mObjects) as $key){ + $this->mObjects[$key]->countPoll($this->mAsset->mDirname); + } return BIZPOLL_FRAME_VIEW_INDEX; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/main.php 2008-12-23 14:46:58 UTC (rev 381) @@ -70,6 +70,7 @@ define('_MD_BIZPOLL_LANG_DISPLAY_END_DATETIME', "終了日時を設定する"); define('_MD_BIZPOLL_LANG_REMOVE_END_DATETIME', "終了日時の設定をやめる"); define('_MD_BIZPOLL_LANG_WEIGHT', "並び順"); +define('_MD_BIZPOLL_LANG_COUNT', "件"); define('_MD_BIZPOLL_LANG_RETURN_POLL', "投票画面に戻る"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/main.php 2008-12-23 14:46:58 UTC (rev 381) @@ -70,6 +70,7 @@ define('_MD_BIZPOLL_LANG_DISPLAY_END_DATETIME', "\xBD\xAAλ\xC6\xFC\xBB\xFE\xA4\xF2\xC0\xDF\xC4ꤹ\xA4\xEB"); define('_MD_BIZPOLL_LANG_REMOVE_END_DATETIME', "\xBD\xAAλ\xC6\xFC\xBB\xFE\xA4\xCE\xC0\xDF\xC4\xEA\xA4\xF2\xA4\xE4\xA4\xE1\xA4\xEB"); define('_MD_BIZPOLL_LANG_WEIGHT', "\xCA¤ӽ\xE7"); +define('_MD_BIZPOLL_LANG_COUNT', "\xB7\xEF"); define('_MD_BIZPOLL_LANG_RETURN_POLL', "\xC5\xEAɼ\xB2\xE8\xCC̤\xCB\xCC\xE1\xA4\xEB"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_enq_list.html 2008-12-23 14:46:58 UTC (rev 381) @@ -38,7 +38,7 @@ <tbody> <{foreach item=obj from=$objects}> <tr class="<{cycle values='odd,even'}>"> - <td><a href="./index.php?action=EnqView&enq_id=<{$obj->getShow('enq_id')}>"><{$obj->getShow('title')}></a> + <td><a href="./index.php?action=EnqView&enq_id=<{$obj->getShow('enq_id')}>"><{$obj->getShow('title')}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL}>: <{$obj->mPollCount}><{$smarty.const._MD_BIZPOLL_LANG_COUNT}>)</a> </td> <{if $useCat==true}> <{assign var=catId value=$obj->getShow('cat_id')}> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-23 12:41:37 UTC (rev 380) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2008-12-23 14:46:58 UTC (rev 381) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.13; +$modversion['version'] = 0.14; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[396]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-02-11 01:05:16
|
Revision: 396 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=396&view=rev Author: kilica Date: 2009-02-11 01:05:12 +0000 (Wed, 11 Feb 2009) Log Message: ----------- [0.15] language/japanese/modinfo.php Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-02-08 07:21:32 UTC (rev 395) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-02-11 01:05:12 UTC (rev 396) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.15(2009.02.11) +\x81Elanguages/japanese/modinfo.php \x82Ɍ\xBE\x8C\xEA\x92萔\x82\xF0\x92lj\xC1(thanks \x91\xBE\x98Y) + 0.14(2008.12.23) \x81E\x83A\x83\x93\x83P\x81[\x83g\x88ꗗ\x82ɓ\x8A\x95[\x8C\x8F\x90\x94\x82\xF0\x92lj\xC1 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-02-08 07:21:32 UTC (rev 395) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-02-11 01:05:12 UTC (rev 396) @@ -56,7 +56,7 @@ define('_MI_BIZPOLL_TPL_ENQ_EDIT', "ENQ_EDIT"); define('_MI_BIZPOLL_TPL_ENQ_DELETE', "ENQ_DELETE"); define('_MI_BIZPOLL_TPL_ENQ_VIEW', "ENQ_VIEW"); -define('_MI_BIZPOLL_TPL_RSS_VIEW', "RSS\xB0\xEC\xCD\xF7"); +define('_MI_BIZPOLL_TPL_ENQ_RSS', "RSS\xB0\xEC\xCD\xF7"); define('_MI_BIZPOLL_TPL_POLL_LIST', "\xC5\xEAɼ\xB0\xEC\xCD\xF7"); define('_MI_BIZPOLL_TPL_POLL_EDIT', "POLL_EDIT"); define('_MI_BIZPOLL_TPL_POLL_DELETE', "POLL_DELETE"); @@ -80,5 +80,4 @@ define('_MI_BIZPOLL_DESC_IP_PERIOD', "Ʊ\xB0\xECIP\xA5\xA2\xA5ɥ쥹\xA4\xAB\xA4\xE9\xA4Υ\xB2\xA5\xB9\xA5\xC8\xC5\xEAɼ\xA4\xF2\xB6ػߤ\xB9\xA4\xEB\xBB\xFE\xB4֤\xF2\xBB\xD8\xC4\xEA"); define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); - ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-02-08 07:21:32 UTC (rev 395) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-02-11 01:05:12 UTC (rev 396) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.14; +$modversion['version'] = 0.15; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[403]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-03-28 07:11:33
|
Revision: 403 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=403&view=rev Author: kilica Date: 2009-03-28 07:11:21 +0000 (Sat, 28 Mar 2009) Log Message: ----------- [0.15] BugFix:display block when gr_id is not set. Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-03-27 08:40:47 UTC (rev 402) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-03-28 07:11:21 UTC (rev 403) @@ -18,8 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- -0.15(2009.02.11) +0.15(2009.03.28) \x81Elanguages/japanese/modinfo.php \x82Ɍ\xBE\x8C\xEA\x92萔\x82\xF0\x92lj\xC1(thanks \x91\xBE\x98Y) +\x81E\x83J\x83e\x83S\x83\x8A\x83O\x83\x8B\x81[\x83v\x82\xF0\x8Eg\x82\xED\x82Ȃ\xA2\x8Fꍇ\x82Ƀu\x83\x8D\x83b\x83N\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA9\x82\xC1\x82\xBD\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks \x82\xB3\x82\xA2\x82\xB3\x82\xA2\x81j 0.14(2008.12.23) \x81E\x83A\x83\x93\x83P\x81[\x83g\x88ꗗ\x82ɓ\x8A\x95[\x8C\x8F\x90\x94\x82\xF0\x92lj\xC1 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php 2009-03-27 08:40:47 UTC (rev 402) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php 2009-03-28 07:11:21 UTC (rev 403) @@ -132,33 +132,37 @@ new XCube_Ref($asset), $this->_mBlock->get('dirname') ); - + + $configHandler =& xoops_gethandler('config'); + $configArr =& $configHandler->getConfigsByDirname($this->mDirname); $this->_mHandler =& $asset->getObject('handler','enq'); $criteria = new CriteriaCompo('1', '1'); $criteria->addSort('reg_unixtime', 'DESC'); $criteria->setLimit($limit); - //use subcriteria for permitted ids - require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; - $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); - $catCriteria = new CriteriaCompo('1', '1'); - if($catIdArr){ //get requested categories and check permission - foreach(array_keys($catIdArr) as $key){ - if($xcatHandler->checkPermit($catIdArr[$key], 'viewer')){ - $catCriteria->add(new Criteria('cat_id', $catIdArr[$key])); - } - } - if($catCriteria->getCountChildElements()==0){ - return true; - } + if($configArr['gr_id']){ + //use subcriteria for permitted ids + require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; + $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); + $catCriteria = new CriteriaCompo('1', '1'); + if($catIdArr){ //get requested categories and check permission + foreach(array_keys($catIdArr) as $key){ + if($xcatHandler->checkPermit($catIdArr[$key], 'viewer')){ + $catCriteria->add(new Criteria('cat_id', $catIdArr[$key])); + } + } + if($catCriteria->getCountChildElements()==0){ + return true; + } + } + else{ //get all permit categories + $ids = $xcatHandler->getPermitCatIds(0, 'viewer'); + foreach(array_keys($ids) as $key){ + $catCriteria->add(new Criteria('cat_id', $ids[$key]), 'OR'); + } + } + $criteria->add($catCriteria); } - else{ //get all permit categories - $ids = $xcatHandler->getPermitCatIds(0, 'viewer'); - foreach(array_keys($ids) as $key){ - $catCriteria->add(new Criteria('cat_id', $ids[$key]), 'OR'); - } - } - $criteria->add($catCriteria); $objects = $this->_mHandler->getObjects($criteria); foreach(array_keys($objects) as $keyC){ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[404]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-04-04 01:05:51
|
Revision: 404 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=404&view=rev Author: kilica Date: 2009-04-04 01:05:38 +0000 (Sat, 04 Apr 2009) Log Message: ----------- [0.16] Add PollOneBlock.class.php Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Added Paths: ----------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollone.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-04-04 01:05:38 UTC (rev 404) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.16(2009.04.04) +\x81EPollOne\x83u\x83\x8D\x83b\x83N\x82\xF0\x92lj\xC1\x81B\x8Ew\x92肳\x82ꂽ\x83A\x83\x93\x83P\x81[\x83g\x82̓\x8A\x95[\x82\xAA\x8Fo\x97\x88\x82\xE9\x83u\x83\x8D\x83b\x83N + 0.15(2009.03.28) \x81Elanguages/japanese/modinfo.php \x82Ɍ\xBE\x8C\xEA\x92萔\x82\xF0\x92lj\xC1(thanks \x91\xBE\x98Y) \x81E\x83J\x83e\x83S\x83\x8A\x83O\x83\x8B\x81[\x83v\x82\xF0\x8Eg\x82\xED\x82Ȃ\xA2\x8Fꍇ\x82Ƀu\x83\x8D\x83b\x83N\x82\xAA\x95\\x8E\xA6\x82\xB3\x82\xEA\x82Ȃ\xA9\x82\xC1\x82\xBD\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks \x82\xB3\x82\xA2\x82\xB3\x82\xA2\x81j Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2009-04-04 01:05:38 UTC (rev 404) @@ -153,7 +153,7 @@ **/ public function executeViewError(/*** XCube_RenderTarget ***/ &$render) { - $this->mRoot->mController->executeRedirect('./index.php?action=PollList', 1, _MD_BIZPOLL_ERROR_DBUPDATE_FAILED); + $this->mRoot->mController->executeRedirect('./index.php?action=PollView&enq_id='. $this->mObject->get('enq_id'), 1, _MD_BIZPOLL_ERROR_DBUPDATE_FAILED); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/EnqBlock.class.php 2009-04-04 01:05:38 UTC (rev 404) @@ -134,7 +134,7 @@ ); $configHandler =& xoops_gethandler('config'); - $configArr =& $configHandler->getConfigsByDirname($this->mDirname); + $configArr =& $configHandler->getConfigsByDirname($this->_mBlock->get('dirname')); $this->_mHandler =& $asset->getObject('handler','enq'); $criteria = new CriteriaCompo('1', '1'); $criteria->addSort('reg_unixtime', 'DESC'); Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-04-04 01:05:38 UTC (rev 404) @@ -0,0 +1,188 @@ +<?php +/** + * @file + * @package sdoc + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit(); +} + +/** + * Sdoc_ContentBlock +**/ +class Bizpoll_PollOneBlock extends Legacy_BlockProcedure +{ + /** + * @var Sdoc_ItemsHandler + * + * @private + **/ + var $_mHandler = null; + + /** + * @var Sdoc_ItmesObject + * + * @private + **/ + var $_mObject = null; + + /** + * @var string[] + * + * @private + **/ + var $_mOptions = array(); + + var $mActionForm = null; + + /** + * prepare + * + * @param void + * + * @return bool + * + * @public + **/ + function prepare() + { + return parent::prepare() && $this->_parseOptions() && $this->_setupObject(); + } + + /** + * _parseOptions + * + * @param void + * + * @return bool + * + * @private + **/ + function _parseOptions() + { + $opts = explode('|',$this->_mBlock->get('options')); + $this->_mOptions = array( + 'enq_id' => (intval($opts[0])>0 ? intval($opts[0]) : 0), + ); + return true; + } + + /** + * getBlockOption + * + * @param string $key + * + * @return string + * + * @public + **/ + function getBlockOption($key) + { + return isset($this->_mOptions[$key]) ? $this->_mOptions[$key] : null; + } + + /** + * getOptionForm + * + * @param void + * + * @return string + * + * @public + **/ + function getOptionForm() + { + if(!$this->prepare()) + { + return null; + } + $form = "<label for='". $this->_mBlock->get('dirname') ."block_enqId'>"._AD_BIZPOLL_LANG_ENQ_ID."</label> : + <input type='text' size='5' name='options[0]' id='". $this->_mBlock->get('dirname') ."block_enqId' value='".$this->getBlockOption('enq_id')."' />" ; + return $form; + } + + /** + * _setupObject + * + * @param void + * + * @return bool + * + * @private + **/ + function _setupObject() + { + $objects = array(); + + //get block options + $enqId = $this->getBlockOption('enq_id'); + + //get module asset for handlers + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $this->_mBlock->get('dirname') + ); + + $configHandler =& xoops_gethandler('config'); + $configArr =& $configHandler->getConfigsByDirname($this->_mBlock->get('dirname')); + $this->_mHandler =& $asset->getObject('handler','enq'); + + $object = $this->_mHandler->get($enqId); + + //check permission + require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; + $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); + if(! $xcatHandler->checkPermit($object->get('cat_id'), 'viewer')){ + return true; + } + + $object->loadMyPoll($this->_mBlock->get('dirname')); + if($object->mMyPoll->get('poll_id')>0){ + return true; + } + + $object->countPoll($this->_mBlock->get('dirname')); + $object->loadChoice($this->_mBlock->get('dirname')); + + $this->_mObject = $object; + + //setup action form + $this->mActionForm =& $asset->getObject('form', 'poll', false, 'edit'); + $this->mActionForm->prepare(); + $this->mActionForm->load($this->_mObject->mMyPoll); + + return true; + } + + /** + * execute + * + * @param void + * + * @return void + * + * @public + **/ + function execute() + { + if($this->_mObject){ + $root =& XCube_Root::getSingleton(); + + $render =& $this->getRenderTarget(); + $render->setTemplateName($this->_mBlock->get('template')); + $render->setAttribute('block', $this->_mObject); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('bizpollBlockDirname', $this->_mBlock->get('dirname')); + $renderSystem =& $root->getRenderSystem($this->getRenderSystemName()); + //var_dump($this->_mObject);die(); + $renderSystem->renderBlock($render); + } + } +} + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2009-04-04 01:05:38 UTC (rev 404) @@ -7,4 +7,6 @@ define('_AD_BIZPOLL_LANG_DISPLAY_NUMBER', "表示件数"); define('_AD_BIZPOLL_LANG_SHOW_CAT', "表示対象カテゴリ"); +define('_AD_BIZPOLL_LANG_ENQ_ID', "アンケートID"); + ?> Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php 2009-04-04 01:05:38 UTC (rev 404) @@ -0,0 +1,11 @@ +<?php +/** + * @file + * @package DBKMARKEN + * @version $Id$ + */ + +define('_MB_BIZPOLL_LANG_POLL_COUNT', "投票数"); +define('_MB_BIZPOLL_LANG_UID', "お名前"); + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-04-04 01:05:38 UTC (rev 404) @@ -80,4 +80,6 @@ define('_MI_BIZPOLL_DESC_IP_PERIOD', "同一IPアドレスからのゲスト投票を禁止する時間を指定"); define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "最近のアンケート"); define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "最近のアンケート"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "投票"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', "複数の投票ブロックを同じページに表示させると投票できなくなります(^ ^;"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/admin.php 2009-04-04 01:05:38 UTC (rev 404) @@ -7,4 +7,5 @@ define('_AD_BIZPOLL_LANG_DISPLAY_NUMBER', "ɽ\xBC\xA8\xB7\xEF\xBF\xF4"); define('_AD_BIZPOLL_LANG_SHOW_CAT', "ɽ\xBC\xA8\xC2оݥ\xAB\xA5ƥ\xB4\xA5\xEA"); +define('_AD_BIZPOLL_LANG_ENQ_ID', "\xA5\xA2\xA5\xBC\xA5\xC8ID"); ?> Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php 2009-04-04 01:05:38 UTC (rev 404) @@ -0,0 +1,10 @@ +<?php +/** + * @file + * @package DBKMARKEN + * @version $Id$ + */ +define('_MB_BIZPOLL_LANG_POLL_COUNT', "\xC5\xEAɼ\xBF\xF4"); +define('_MB_BIZPOLL_LANG_UID', "\xA4\xAA̾\xC1\xB0"); + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-04-04 01:05:38 UTC (rev 404) @@ -80,4 +80,6 @@ define('_MI_BIZPOLL_DESC_IP_PERIOD', "Ʊ\xB0\xECIP\xA5\xA2\xA5ɥ쥹\xA4\xAB\xA4\xE9\xA4Υ\xB2\xA5\xB9\xA5\xC8\xC5\xEAɼ\xA4\xF2\xB6ػߤ\xB9\xA4\xEB\xBB\xFE\xB4֤\xF2\xBB\xD8\xC4\xEA"); define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "\xC5\xEAɼ"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', "ʣ\xBF\xF4\xA4\xCE\xC5\xEAɼ\xA5֥\xED\xA5å\xAF\xA4\xF2Ʊ\xA4\xB8\xA5ڡ\xBC\xA5\xB8\xA4\xCBɽ\xBC\xA8\xA4\xB5\xA4\xBB\xA4\xEB\xA4\xC8\xC5\xEAɼ\xA4Ǥ\xAD\xA4ʤ\xAF\xA4ʤ\xEA\xA4ޤ\xB9(^ ^;"); ?> Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollone.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollone.html (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollone.html 2009-04-04 01:05:38 UTC (rev 404) @@ -0,0 +1,54 @@ +<div class="bizpoll"> + <!-- Main --> + <a href="<{$xoops_url}>/moduels/<{$bizpollBlockDirname}>/index.php?action=EnqView&enq_id=<{$block->getShow('enq_id')}>"><{$block->getShow('title')}></a> + <{$block->get('end_unixtime')|xoops_formattimestamp:"l"}> + <p> + <{if $useEditor=="fckeditor"}> + <{$block->get('description')}> + <{else}> + <{$block->getShow('description')}> + <{/if}> + </p> + <div class="bizpollPoll"> + <!-- Choices List --> + <{if $block->checkEnd()==true}> + <form action="<{$xoops_url}>/modules/<{$bizpollBlockDirname}>/index.php?action=PollEdit" method="post"> + <{xoops_token form=$actionForm}> + <{xoops_input type=hidden name=poll_id value=0}> + <{xoops_input type=hidden name=enq_id value=$actionForm->get('enq_id')}> + <ul class="bizpollChoice"> + <{if $block->get('type')==0}> + <{foreach item=choiceR from=$block->mChoice}> + <li><label> + <input type="radio" name="choice_id" id="legacy_xoopsform_choice_id" value="<{$choiceR->getShow('choice_id')}>"<{if $choiceR->mIsPolled==true}> checked="checked"<{/if}>> + <{$choiceR->getShow('title')}><{if $allowShowResult==true}> (<{$smarty.const._MB_BIZPOLL_LANG_POLL_COUNT}>: <{$choiceR->mPollCount}>)<{/if}></label> + </li> + <{/foreach}> + + <{elseif $block->get('type')==1}> + <{foreach item=choiceC from=$block->mChoice}> + <li><label> + <input type="checkbox" name="choice_id[]" id="legacy_xoopsform_choice_id[]" value="<{$choiceC->getShow('choice_id')}>"<{if $choiceC->mIsPolled==true}> checked="checked"<{/if}>> + <{$choiceC->getShow('title')}><{if $allowShowResult==true}> (<{$smarty.const._MB_BIZPOLL_LANG_POLL_COUNT}>: <{$choiceR->mPollCount}>)<{/if}></label> + </li> + <{/foreach}> + <{/if}> + </ul> + <{if ! $xoops_userid}> + <{$smarty.const._MB_BIZPOLL_LANG_UID}><br /> + <{xoops_input type=text name=name value=$actionForm->get('name') size=30 maxlength=16}><br /> + <{/if}> + <{xoops_textarea type=text name=comment value=$actionForm->get('comment')}> + <input type="submit" value="<{$smarty.const._SUBMIT}>" /> + </form> + <{else}> + <ul> + <{foreach item=choice from=$block->mChoice}> + <li> + <{$choice->getShow('title')}> + </li> + <{/foreach}> + </ul> + <{/if}> + </div> +</div> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-03-28 07:11:21 UTC (rev 403) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-04-04 01:05:38 UTC (rev 404) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.15; +$modversion['version'] = 0.16; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -213,6 +213,18 @@ 'can_clone' => true, 'visible_any' => false ), + 2 => array( + 'func_num' => 1, + 'file' => 'PollOneBlock.class.php', + 'class' => 'PollOneBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, + 'options' => '0|', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[405]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-04-04 04:40:59
|
Revision: 405 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=405&view=rev Author: kilica Date: 2009-04-04 04:40:51 +0000 (Sat, 04 Apr 2009) Log Message: ----------- [0.16] add PollNewBlock.class.php Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Added Paths: ----------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php Added: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php (rev 0) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php 2009-04-04 04:40:51 UTC (rev 405) @@ -0,0 +1,218 @@ +<?php +/** + * @file + * @package sdoc + * @version $Id$ +**/ + +if(!defined('XOOPS_ROOT_PATH')) +{ + exit(); +} + +/** + * Sdoc_ContentBlock +**/ +class Bizpoll_PollNewBlock extends Legacy_BlockProcedure +{ + /** + * @var Sdoc_ItemsHandler + * + * @private + **/ + var $_mHandler = null; + + /** + * @var Sdoc_ItmesObject + * + * @private + **/ + var $_mObject = null; + + /** + * @var string[] + * + * @private + **/ + var $_mOptions = array(); + + var $mActionForm = null; + + /** + * prepare + * + * @param void + * + * @return bool + * + * @public + **/ + function prepare() + { + return parent::prepare() && $this->_parseOptions() && $this->_setupObject(); + } + + /** + * _parseOptions + * + * @param void + * + * @return bool + * + * @private + **/ + function _parseOptions() + { + $opts = explode('|',$this->_mBlock->get('options')); + $this->_mOptions = array( + 'catIds' => $opts[0] + ); + return true; + } + + /** + * getBlockOption + * + * @param string $key + * + * @return string + * + * @public + **/ + function getBlockOption($key) + { + return isset($this->_mOptions[$key]) ? $this->_mOptions[$key] : null; + } + + /** + * getOptionForm + * + * @param void + * + * @return string + * + * @public + **/ + function getOptionForm() + { + if(!$this->prepare()) + { + return null; + } + $form = "<label for='". $this->_mBlock->get('dirname') ."block_showCat'>"._AD_BIZPOLL_LANG_SHOW_CAT."</label> : + <input type='text' size='64' name='options[0]' id='". $this->_mBlock->get('dirname') ."block_enq' value='".$this->getBlockOption('catIds')."' />\n" ; + return $form; + } + + /** + * _setupObject + * + * @param void + * + * @return bool + * + * @private + **/ + function _setupObject() + { + $objects = array(); + + //get block options + if($this->getBlockOption('catIds')){ + $catIdArr = explode(',', $this->getBlockOption('catIds')); + } + + //get module asset for handlers + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $this->_mBlock->get('dirname') + ); + + $configHandler =& xoops_gethandler('config'); + $configArr =& $configHandler->getConfigsByDirname($this->_mBlock->get('dirname')); + + $this->_mHandler =& $asset->getObject('handler','enq'); + + $criteria = new CriteriaCompo('1', '1'); + $criteria->setSort('reg_unixtime', "DESC"); + + if($configArr['gr_id']){ + //use subcriteria for permitted ids + require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; + $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); + $catCriteria = new CriteriaCompo('1', '1'); + if($catIdArr){ //get requested categories and check permission + foreach(array_keys($catIdArr) as $key){ + if($xcatHandler->checkPermit($catIdArr[$key], 'poller')){ + $catCriteria->add(new Criteria('cat_id', $catIdArr[$key])); + } + } + if($catCriteria->getCountChildElements()==0){ + return true; + } + } + else{ //get all permit categories + $ids = $xcatHandler->getPermitCatIds(0, 'poller'); + foreach(array_keys($ids) as $key){ + $catCriteria->add(new Criteria('cat_id', $ids[$key]), 'OR'); + } + } + $criteria->add($catCriteria); + } + + $objects = $this->_mHandler->getObjects($criteria); + if(count($objects)==0){ + return true; + } + + foreach(array_keys($objects) as $key){ + //check the user already poll this enquete ? + $objects[$key]->loadMyPoll($this->_mBlock->get('dirname')); + if(intval($objects[$key]->mMyPoll->get('poll_id'))==0 && ($objects[$key]->get('end_unixtime')>time() || $objects[$key]->get('end_unxitime')==0)){ + $objects[$key]->loadChoice($this->_mBlock->get('dirname')); + $this->_mObject = $objects[$key]; + break; + } + } + + if(! $this->_mObject){ + return true; + } + + //setup action form + $this->mActionForm =& $asset->getObject('form', 'poll', false, 'edit'); + $this->mActionForm->prepare(); + $this->mActionForm->load($this->_mObject->mMyPoll); + + return true; + } + + /** + * execute + * + * @param void + * + * @return void + * + * @public + **/ + function execute() + { + if($this->_mObject){ + $root =& XCube_Root::getSingleton(); + + $render =& $this->getRenderTarget(); + $render->setTemplateName($this->_mBlock->get('template')); + $render->setAttribute('block', $this->_mObject); + $render->setAttribute('actionForm', $this->mActionForm); + $render->setAttribute('bizpollBlockDirname', $this->_mBlock->get('dirname')); + $renderSystem =& $root->getRenderSystem($this->getRenderSystemName()); + //var_dump($this->_mObject);die(); + $renderSystem->renderBlock($render); + } + } +} + +?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-04-04 01:05:38 UTC (rev 404) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-04-04 04:40:51 UTC (rev 405) @@ -115,7 +115,7 @@ **/ function _setupObject() { - $objects = array(); + $object = null; //get block options $enqId = $this->getBlockOption('enq_id'); @@ -133,14 +133,23 @@ $this->_mHandler =& $asset->getObject('handler','enq'); $object = $this->_mHandler->get($enqId); + if(! $object){ + return true; + } + //check the enquete end ? + if($object->get('end_unixtime')<time() && $object->get('end_unixtime')!=0){ + return true; + } + //check permission require_once BIZPOLL_TRUST_PATH . '/class/XcatHandler.class.php'; $xcatHandler = new Bizpoll_XcatHandler($this->_mBlock->get('dirname')); - if(! $xcatHandler->checkPermit($object->get('cat_id'), 'viewer')){ + if(! $xcatHandler->checkPermit($object->get('cat_id'), 'poller')){ return true; } + //check the user already poll this enquete ? $object->loadMyPoll($this->_mBlock->get('dirname')); if($object->mMyPoll->get('poll_id')>0){ return true; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2009-04-04 01:05:38 UTC (rev 404) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/admin.php 2009-04-04 04:40:51 UTC (rev 405) @@ -8,5 +8,6 @@ define('_AD_BIZPOLL_LANG_DISPLAY_NUMBER', "表示件数"); define('_AD_BIZPOLL_LANG_SHOW_CAT', "表示対象カテゴリ"); define('_AD_BIZPOLL_LANG_ENQ_ID', "アンケートID"); - +define('_AD_BIZPOLL_LANG_POLLONE_TYPE_NEW', "最新アンケート"); +define('_AD_BIZPOLL_LANG_POLLONE_TYPE_ID', "アンケートID指定"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-04-04 01:05:38 UTC (rev 404) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-04-04 04:40:51 UTC (rev 405) @@ -78,8 +78,10 @@ define('_MI_BIZPOLL_LANG_NOEDITOR', "エディタを使わない"); define('_MI_BIZPOLL_TITLE_IP_PERIOD', "同一IP投票禁止期間(時間)"); define('_MI_BIZPOLL_DESC_IP_PERIOD', "同一IPアドレスからのゲスト投票を禁止する時間を指定"); -define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "最近のアンケート"); -define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "最近のアンケート"); -define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "投票"); +define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "アンケート一覧"); +define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "アンケート一覧"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "アンケート"); define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', "複数の投票ブロックを同じページに表示させると投票できなくなります(^ ^;"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "最新のアンケート"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', "複数の投票ブロックを同じページに表示させると投票できなくなります(^ ^;"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-04-04 01:05:38 UTC (rev 404) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/modinfo.php 2009-04-04 04:40:51 UTC (rev 405) @@ -78,8 +78,10 @@ define('_MI_BIZPOLL_LANG_NOEDITOR', "\xA5\xA8\xA5ǥ\xA3\xA5\xBF\xA4\xF2\xBBȤ\xEF\xA4ʤ\xA4"); define('_MI_BIZPOLL_TITLE_IP_PERIOD', "Ʊ\xB0\xECIP\xC5\xEAɼ\xB6ػߴ\xFC\xB4֡ʻ\xFE\xB4֡\xCB"); define('_MI_BIZPOLL_DESC_IP_PERIOD', "Ʊ\xB0\xECIP\xA5\xA2\xA5ɥ쥹\xA4\xAB\xA4\xE9\xA4Υ\xB2\xA5\xB9\xA5\xC8\xC5\xEAɼ\xA4\xF2\xB6ػߤ\xB9\xA4\xEB\xBB\xFE\xB4֤\xF2\xBB\xD8\xC4\xEA"); -define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); -define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "\xBAǶ\xE1\xA4Υ\xA2\xA5\xBC\xA5\xC8"); -define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "\xC5\xEAɼ"); +define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "\xA5\xA2\xA5\xBC\xA5Ȱ\xEC\xCD\xF7"); +define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "\xA5\xA2\xA5\xBC\xA5Ȱ\xEC\xCD\xF7"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "\xA5\xA2\xA5\xBC\xA5\xC8"); define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', "ʣ\xBF\xF4\xA4\xCE\xC5\xEAɼ\xA5֥\xED\xA5å\xAF\xA4\xF2Ʊ\xA4\xB8\xA5ڡ\xBC\xA5\xB8\xA4\xCBɽ\xBC\xA8\xA4\xB5\xA4\xBB\xA4\xEB\xA4\xC8\xC5\xEAɼ\xA4Ǥ\xAD\xA4ʤ\xAF\xA4ʤ\xEA\xA4ޤ\xB9(^ ^;"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "\xBAǿ\xB7\xA4Υ\xA2\xA5\xBC\xA5\xC8"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', "ʣ\xBF\xF4\xA4\xCE\xC5\xEAɼ\xA5֥\xED\xA5å\xAF\xA4\xF2Ʊ\xA4\xB8\xA5ڡ\xBC\xA5\xB8\xA4\xCBɽ\xBC\xA8\xA4\xB5\xA4\xBB\xA4\xEB\xA4\xC8\xC5\xEAɼ\xA4Ǥ\xAD\xA4ʤ\xAF\xA4ʤ\xEA\xA4ޤ\xB9(^ ^;"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-04-04 01:05:38 UTC (rev 404) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-04-04 04:40:51 UTC (rev 405) @@ -214,7 +214,7 @@ 'visible_any' => false ), 2 => array( - 'func_num' => 1, + 'func_num' => 2, 'file' => 'PollOneBlock.class.php', 'class' => 'PollOneBlock', 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, @@ -225,6 +225,18 @@ 'can_clone' => true, 'visible_any' => false ), + 3 => array( + 'func_num' => 3, + 'file' => 'PollNewBlock.class.php', + 'class' => 'PollNewBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, + 'options' => '', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[406]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-04-04 04:45:05
|
Revision: 406 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=406&view=rev Author: kilica Date: 2009-04-04 04:45:03 +0000 (Sat, 04 Apr 2009) Log Message: ----------- [0.16] change PollNewBlock.class.php Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-04-04 04:40:51 UTC (rev 405) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2009-04-04 04:45:03 UTC (rev 406) @@ -20,6 +20,7 @@ -------- 0.16(2009.04.04) \x81EPollOne\x83u\x83\x8D\x83b\x83N\x82\xF0\x92lj\xC1\x81B\x8Ew\x92肳\x82ꂽ\x83A\x83\x93\x83P\x81[\x83g\x82̓\x8A\x95[\x82\xAA\x8Fo\x97\x88\x82\xE9\x83u\x83\x8D\x83b\x83N +\x81EPollNew\x83u\x83\x8D\x83b\x83N\x82\xF0\x92lj\xC1\x81B\x8DŐV\x82̖\xA2\x93\x8A\x95[\x83A\x83\x93\x83P\x81[\x83g\x82̓\x8A\x95[\x82\xAA\x8Fo\x97\x88\x82\xE9\x83u\x83\x8D\x83b\x83N 0.15(2009.03.28) \x81Elanguages/japanese/modinfo.php \x82Ɍ\xBE\x8C\xEA\x92萔\x82\xF0\x92lj\xC1(thanks \x91\xBE\x98Y) Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php 2009-04-04 04:40:51 UTC (rev 405) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php 2009-04-04 04:45:03 UTC (rev 406) @@ -116,6 +116,7 @@ function _setupObject() { $objects = array(); + $catIdArr = array(); //get block options if($this->getBlockOption('catIds')){ @@ -170,7 +171,7 @@ foreach(array_keys($objects) as $key){ //check the user already poll this enquete ? $objects[$key]->loadMyPoll($this->_mBlock->get('dirname')); - if(intval($objects[$key]->mMyPoll->get('poll_id'))==0 && ($objects[$key]->get('end_unixtime')>time() || $objects[$key]->get('end_unxitime')==0)){ + if(intval($objects[$key]->mMyPoll->get('poll_id'))==0 && ($objects[$key]->get('end_unixtime')>time() || $objects[$key]->get('end_unixtime')==0)){ $objects[$key]->loadChoice($this->_mBlock->get('dirname')); $this->_mObject = $objects[$key]; break; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-04-04 04:40:51 UTC (rev 405) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-04-04 04:45:03 UTC (rev 406) @@ -232,7 +232,7 @@ 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, 'options' => '', - 'template' => '{dirname}_block_pollone.html', + 'template' => '{dirname}_block_pollnew.html', 'show_all_module' => true, 'can_clone' => true, 'visible_any' => false This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[408]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-04-04 05:29:11
|
Revision: 408 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=408&view=rev Author: kilica Date: 2009-04-04 05:29:04 +0000 (Sat, 04 Apr 2009) Log Message: ----------- [0.16] fix templates/blocks/bizpoll_block_pollnew.html Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollnew.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php 2009-04-04 05:05:34 UTC (rev 407) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php 2009-04-04 05:29:04 UTC (rev 408) @@ -7,5 +7,6 @@ define('_MB_BIZPOLL_LANG_POLL_COUNT', "投票数"); define('_MB_BIZPOLL_LANG_UID', "お名前"); +define('_MB_BIZPOLL_LANG_END_UNIXTIME', "締め切り"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php 2009-04-04 05:05:34 UTC (rev 407) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/japanese/blocks.php 2009-04-04 05:29:04 UTC (rev 408) @@ -6,5 +6,6 @@ */ define('_MB_BIZPOLL_LANG_POLL_COUNT', "\xC5\xEAɼ\xBF\xF4"); define('_MB_BIZPOLL_LANG_UID', "\xA4\xAA̾\xC1\xB0"); +define('_MB_BIZPOLL_LANG_END_UNIXTIME', "\xC4\xF9\xA4\xE1\xC0ڤ\xEA"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollnew.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollnew.html 2009-04-04 05:05:34 UTC (rev 407) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/blocks/bizpoll_block_pollnew.html 2009-04-04 05:29:04 UTC (rev 408) @@ -1,7 +1,7 @@ <div class="bizpoll"> <!-- Main --> - <a href="<{$xoops_url}>/moduels/<{$bizpollBlockDirname}>/index.php?action=EnqView&enq_id=<{$block->getShow('enq_id')}>"><{$block->getShow('title')}></a> - <{$block->get('end_unixtime')|xoops_formattimestamp:"l"}> + <a href="<{$xoops_url}>/moduels/<{$bizpollBlockDirname}>/index.php?action=EnqView&enq_id=<{$block->getShow('enq_id')}>"><{$block->getShow('title')}></a><br /> + <{$smarty.const._MB_BIZPOLL_LANG_END_UNIXTIME}> : <{$block->get('end_unixtime')|xoops_formattimestamp:"l"}> <p> <{if $useEditor=="fckeditor"}> <{$block->get('description')}> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[412]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-04-04 09:13:03
|
Revision: 412 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=412&view=rev Author: kilica Date: 2009-04-04 09:13:01 +0000 (Sat, 04 Apr 2009) Log Message: ----------- [0.16] load block language files Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php 2009-04-04 08:59:45 UTC (rev 411) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollNewBlock.class.php 2009-04-04 09:13:01 UTC (rev 412) @@ -99,6 +99,7 @@ { return null; } + $form = "<label for='". $this->_mBlock->get('dirname') ."block_showCat'>"._AD_BIZPOLL_LANG_SHOW_CAT."</label> : <input type='text' size='64' name='options[0]' id='". $this->_mBlock->get('dirname') ."block_enq' value='".$this->getBlockOption('catIds')."' />\n" ; return $form; @@ -118,6 +119,11 @@ $objects = array(); $catIdArr = array(); + //load language file + $root =& XCube_Root::getSingleton(); + $langManager =& $root->getLanguageManager(); + $langManager->loadBlockMessageCatalog($this->_mBlock->get('dirname')); + //get block options if($this->getBlockOption('catIds')){ $catIdArr = explode(',', $this->getBlockOption('catIds')); @@ -203,7 +209,7 @@ { if($this->_mObject){ $root =& XCube_Root::getSingleton(); - + $render =& $this->getRenderTarget(); $render->setTemplateName($this->_mBlock->get('template')); $render->setAttribute('block', $this->_mObject); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-04-04 08:59:45 UTC (rev 411) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-04-04 09:13:01 UTC (rev 412) @@ -99,6 +99,7 @@ { return null; } + $form = "<label for='". $this->_mBlock->get('dirname') ."block_enqId'>"._AD_BIZPOLL_LANG_ENQ_ID."</label> : <input type='text' size='5' name='options[0]' id='". $this->_mBlock->get('dirname') ."block_enqId' value='".$this->getBlockOption('enq_id')."' />" ; return $form; @@ -120,6 +121,11 @@ //get block options $enqId = $this->getBlockOption('enq_id'); + //load language file + $root =& XCube_Root::getSingleton(); + $langManager =& $root->getLanguageManager(); + $langManager->loadBlockMessageCatalog($this->_mBlock->get('dirname')); + //get module asset for handlers $asset = null; XCube_DelegateUtils::call( Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php 2009-04-04 08:59:45 UTC (rev 411) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/blocks.php 2009-04-04 09:13:01 UTC (rev 412) @@ -1,7 +1,7 @@ <?php /** * @file - * @package DBKMARKEN + * @package BIZPOLL * @version $Id$ */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[434]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-10-12 02:46:19
|
Revision: 434 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=434&view=rev Author: kilica Date: 2009-10-12 02:46:12 +0000 (Mon, 12 Oct 2009) Log Message: ----------- update for google chart api Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-12 02:46:12 UTC (rev 434) @@ -119,8 +119,8 @@ //for Google Chart API $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); foreach(array_keys($choiceArr) as $keyC){ - $this->mChart['count'][$choiceArr[$keyC]]++; - $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title'); + @$this->mChart['count'][$choiceArr[$keyC]]++; + $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title') . ' ('. $this->mChart['count'][$choiceArr[$keyC]] .')'; } } $this->mChart['total'] = count($this->mChart['title']); @@ -140,6 +140,7 @@ $render->setAttribute('enq', $this->mEnq); $render->setAttribute('chart', $this->mChart); $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/blocks/PollOneBlock.class.php 2009-10-12 02:46:12 UTC (rev 434) @@ -49,6 +49,8 @@ **/ function prepare() { + $root = XCube_Root::getSingleton(); + $root->mLanguageManager->loadModuleMessageCatalog($this->_mBlock->get('dirname')); return parent::prepare() && $this->_parseOptions() && $this->_setupObject(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractAction.class.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractAction.class.php 2009-10-12 02:46:12 UTC (rev 434) @@ -165,7 +165,7 @@ function getConfig($config) { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $configArr =& $configHandler->getConfigsByDirname($this->mDirname); + $configArr =& $configHandler->getConfigsByDirname($this->mAsset->mDirname); return $configArr[$config]; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2009-10-12 02:46:12 UTC (rev 434) @@ -64,5 +64,26 @@ define('_MI_BIZPOLL_TPL_CHOICE_EDIT', "CHOICE_EDIT"); define('_MI_BIZPOLL_TPL_CHOICE_DELETE', "CHOICE_DELETE"); define('_MI_BIZPOLL_TPL_CHOICE_VIEW', "CHOICE_VIEW"); +define('_MI_BIZPOLL_TITLE_GR_ID', "XCat Group ID"); +define('_MI_BIZPOLL_DESC_GR_ID', "Set 0 if you won't use XCat category"); +define('_MI_BIZPOLL_TITLE_CSS_FILE', "css file"); +define('_MI_BIZPOLL_DESC_CSS_FILE', "css file location"); +define('_MI_BIZPOLL_TITLE_PERMIT', "permission titles"); +define('_MI_BIZPOLL_DESC_PERMIT', "set permission title if you use xcat in order viewer|poster|editor|poller, separated with '|'. default value:viewer|poster|editor|viewer"); +define('_MI_BIZPOLL_TITLE_SHOW_RSS', "RSS Output"); +define('_MI_BIZPOLL_DESC_SHOW_RSS', "RSS output"); +define('_MI_BIZPOLL_TITLE_EDITOR', "Editor"); +define('_MI_BIZPOLL_DESC_EDITOR', "Select Editor"); +define('_MI_BIZPOLL_LANG_NOEDITOR', "No Editor Use"); +define('_MI_BIZPOLL_TITLE_IP_PERIOD', "Poll Interval from the same IP address(hour)"); +define('_MI_BIZPOLL_DESC_IP_PERIOD', "Poll Interval from the same IP address(hour)"); +define('_MI_BIZPOLL_BLOCK_NAME_ENQ', "Enquete List"); +define('_MI_BIZPOLL_BLOCK_DESC_ENQ', "Enquete List"); +define('_MI_BIZPOLL_BLOCK_NAME_POLLONE', "Enquete Poll"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', ""); +define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "Latest Enquete"); +define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', ""); +define('_MI_BIZPOLL_TITLE_CHART', "Google Chart API Setting"); +define('_MI_BIZPOLL_DESC_CHART', "Set Chart Type, Width(px), Height(px), separated with ','. Default Value:"p,400,100". 'Type' is bhs(Horizontal Bar), bvs(Vertical Bar), p(Pie) or p3(3D Pie)"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/ja_utf8/modinfo.php 2009-10-12 02:46:12 UTC (rev 434) @@ -84,4 +84,7 @@ define('_MI_BIZPOLL_BLOCK_DESC_POLLONE', "複数の投票ブロックを同じページに表示させると投票できなくなります(^ ^;"); define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "最新のアンケート"); define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', "複数の投票ブロックを同じページに表示させると投票できなくなります(^ ^;"); +define('_MI_BIZPOLL_TITLE_CHART', "Google Chart API 設定"); +define('_MI_BIZPOLL_DESC_CHART', "チャートの種類、幅(px)、高さ(px)をカンマ区切り(,)で指定します。初期値は、p,400,100。種類は、bhs(横棒グラフ)、bvs(縦棒グラフ)、p(円グラフ)、p3(立体円グラフ)が指定できます"); + ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-12 02:46:12 UTC (rev 434) @@ -5,6 +5,7 @@ <{foreach item=pCount from=$chart.count key=pKey}> <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:10px 30px 10px 5px;"></div><{$chart.title[$pKey]}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$pCount}>)<br style="clear:left;" /> <{/foreach}> +<img src="http://chart.apis.google.com/chart?cht=<{$chartSetting[0]}>&chd=t:<{','|implode:$chart.count}>&chs=<{$chartSetting[1]}>x<{$chartSetting[2]}>&chl=<{'|'|implode:$chart.title|escape:'url'}>" alt="chart" width="<{$chartSetting[1]}>" height="<{$chartSetting[2]}>" /> <h2><{$smarty.const._MD_BIZPOLL_LANG_POLL_RESULT}></h2> <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-10-02 09:54:07 UTC (rev 433) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2009-10-12 02:46:12 UTC (rev 434) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.16; +$modversion['version'] = 0.20; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -182,6 +182,15 @@ 'options' => array(), 'default' => '24' ), + array( + 'name' => 'chart', + 'title' => "_MI_BIZPOLL_TITLE_CHART", + 'description' => "_MI_BIZPOLL_DESC_CHART", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'p,400,100' + ), /* array( 'name' => 'xxxx', This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[436]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2009-10-12 03:36:34
|
Revision: 436 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=436&view=rev Author: kilica Date: 2009-10-12 03:36:26 +0000 (Mon, 12 Oct 2009) Log Message: ----------- add label to Google Chart Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-12 02:50:21 UTC (rev 435) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2009-10-12 03:36:26 UTC (rev 436) @@ -141,6 +141,8 @@ $render->setAttribute('chart', $this->mChart); $render->setAttribute('pageNavi', $this->mFilter->mNavi); $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-12 02:50:21 UTC (rev 435) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/templates/bizpoll_poll_detail.html 2009-10-12 03:36:26 UTC (rev 436) @@ -5,8 +5,12 @@ <{foreach item=pCount from=$chart.count key=pKey}> <div style="float:left;width:<{$pCount*10}>px;height:10px;background-color:#000000;margin:10px 30px 10px 5px;"></div><{$chart.title[$pKey]}> (<{$smarty.const._MD_BIZPOLL_LANG_POLL_COUNT}>: <{$pCount}>)<br style="clear:left;" /> <{/foreach}> -<img src="http://chart.apis.google.com/chart?cht=<{$chartSetting[0]}>&chd=t:<{','|implode:$chart.count}>&chs=<{$chartSetting[1]}>x<{$chartSetting[2]}>&chl=<{'|'|implode:$chart.title|escape:'url'}>" alt="chart" width="<{$chartSetting[1]}>" height="<{$chartSetting[2]}>" /> +<!-- Google Chart API --> +<{if count($chartSetting)>2}> +<img src="http://chart.apis.google.com/chart?cht=<{$chartSetting[0]}>&chd=t:<{','|implode:$chart.count}>&chds=0,<{$chartMax}>&chs=<{$chartSetting[1]}>x<{$chartSetting[2]}>&<{if $chartSetting[0]=='bhs'}>chxt=y,x&chxl=0:|<{'|'|implode:$chart.title|escape:'url'}>|<{elseif $chartSetting[0]=='bvs'}>chxt=x,y&chxl=0:|<{'|'|implode:$chart.title|escape:'url'}>|<{elseif $chartSetting[0]=='p'||$chartSetting[0]=='p3'}>chl=<{'|'|implode:$chart.title|escape:'url'}><{/if}>" alt="chart" width="<{$chartSetting[1]}>" height="<{$chartSetting[2]}>" /> +<{/if}> + <h2><{$smarty.const._MD_BIZPOLL_LANG_POLL_RESULT}></h2> <div class="pagenavi"><{xoops_pagenavi pagenavi=$pageNavi}></div> <hr /> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[455]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2010-01-15 14:48:52
|
Revision: 455 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=455&view=rev Author: kilica Date: 2010-01-15 14:48:46 +0000 (Fri, 15 Jan 2010) Log Message: ----------- update doc Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-01-15 14:45:34 UTC (rev 454) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-01-15 14:48:46 UTC (rev 455) @@ -18,7 +18,10 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- -0.20(2009.10.011) +0.21(2010.01.15) +\x81E\x89p\x8C\xEA\x82̌\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF5 + +0.20(2009.10.11) \x81EGoogle Chart API \x82ɑΉ\x9E 0.16(2009.04.04) Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-01-15 14:45:34 UTC (rev 454) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-01-15 14:48:46 UTC (rev 455) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.20; +$modversion['version'] = 0.21; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[522]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2010-06-02 13:17:20
|
Revision: 522 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=522&view=rev Author: kilica Date: 2010-06-02 13:17:12 +0000 (Wed, 02 Jun 2010) Log Message: ----------- Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2010-06-02 13:17:12 UTC (rev 522) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.22(2010.06.02) +\x81E\x83o\x83O\x8FC\x90\xB3\x81iThanks chipy\x81j + 0.21(2010.01.15) \x81E\x89p\x8C\xEA\x82̌\xBE\x8C\xEA\x83t\x83@\x83C\x83\x8B\x82\xF5 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2010-06-02 13:17:12 UTC (rev 522) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZPOLL_TRUST_PATH . '/class/AbstractListAction.class.php'; @@ -22,56 +22,56 @@ var $mEnqId = 0; var $mChart = array(); - /** - * _getId - * @param void - * @return int - **/ - protected function _getId() - { - if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ - return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); - } - else{ + /** + * _getId + * @param void + * @return int + **/ + protected function _getId() + { + if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ + return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); + } + else{ $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); - } - } + } + } - /** - * &_getHandler - * @param void - * @return Bizpoll_PollHandler - **/ - protected function &_getHandler() - { - $handler =& $this->mAsset->getObject('handler', 'poll'); - return $handler; - } + /** + * &_getHandler + * @param void + * @return Bizpoll_PollHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'poll'); + return $handler; + } - /** - * &_getFilterForm - * - * @param void - * - * @return Bizpoll_PollFilterForm - **/ - protected function &_getFilterForm() - { - // $filter =& new Bizpoll_PollFilterForm(); - $filter =& $this->mAsset->getObject('filter', 'poll',false); - $filter->prepare($this->_getPageNavi(), $this->_getHandler()); - return $filter; - } + /** + * &_getFilterForm + * + * @param void + * + * @return Bizpoll_PollFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Bizpoll_PollFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'poll',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } - /** - * _getBaseUrl - * @param void - * @return string - **/ - protected function _getBaseUrl() - { - return './index.php?action=PollList'; - } + /** + * _getBaseUrl + * @param void + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=PollDetail'; + } /** * @public @@ -128,22 +128,22 @@ return BIZPOLL_FRAME_VIEW_INDEX; } - /** - * executeViewIndex - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) - { - $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); - $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('enq', $this->mEnq); - $render->setAttribute('chart', $this->mChart); - $render->setAttribute('pageNavi', $this->mFilter->mNavi); - $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); - rsort($this->mChart['count']); - $render->setAttribute('chartMax', array_shift($this->mChart['count'])); - } + /** + * executeViewIndex + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('enq', $this->mEnq); + $render->setAttribute('chart', $this->mChart); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); + } } ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-05-30 13:00:44 UTC (rev 521) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2010-06-02 13:17:12 UTC (rev 522) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('BIZPOLL_TRUST_PATH')) { - define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); + define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); } require_once BIZPOLL_TRUST_PATH . '/class/BizpollUtils.class.php'; @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.21; +$modversion['version'] = 0.22; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -34,27 +34,27 @@ $modversion['cube_style'] = true; $modversion['legacy_installer'] = array( - 'installer' => array( - 'class' => 'Installer', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' - ), - 'uninstaller' => array( - 'class' => 'Uninstaller', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' - ), - 'updater' => array( - 'class' => 'Updater', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' - ) + 'installer' => array( + 'class' => 'Installer', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' + ), + 'uninstaller' => array( + 'class' => 'Uninstaller', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' + ), + 'updater' => array( + 'class' => 'Updater', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' + ) ); $modversion['disable_legacy_2nd_installer'] = false; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'] = array( -// '{prefix}_{dirname}_xxxx', +// '{prefix}_{dirname}_xxxx', ##[cubson:tables] '{prefix}_{dirname}_enq', '{prefix}_{dirname}_choice', @@ -67,25 +67,25 @@ // $modversion['templates'] = array( /* - array( - 'file' => '{dirname}_xxx.html', - 'description' => _MI_BIZPOLL_TPL_XXX - ), + array( + 'file' => '{dirname}_xxx.html', + 'description' => _MI_BIZPOLL_TPL_XXX + ), */ ##[cubson:templates] - array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), - array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), - array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), - array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), - array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), - array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), - array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), - array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), - array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), - array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), - array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), - array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), - array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), + array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), + array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), + array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), + array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), + array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), + array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), + array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), + array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), + array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), + array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), + array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), + array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), + array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), ##[/cubson:templates] ); @@ -96,13 +96,13 @@ $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = array( /* - array( - 'title' => _MI_BIZPOLL_LANG_XXXX, - 'link' => 'admin/index.php?action=xxx', - 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, - 'show' => true, - 'absolute' => false - ), + array( + 'title' => _MI_BIZPOLL_LANG_XXXX, + 'link' => 'admin/index.php?action=xxx', + 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, + 'show' => true, + 'absolute' => false + ), */ ##[cubson:adminmenu] ##[/cubson:adminmenu] @@ -115,10 +115,10 @@ $modversion['hasSearch'] = 0; $modversion['sub'] = array( /* - array( - 'name' => _MI_BIZPOLL_LANG_SUB_XXX, - 'url' => 'index.php?action=XXX' - ), + array( + 'name' => _MI_BIZPOLL_LANG_SUB_XXX, + 'url' => 'index.php?action=XXX' + ), */ ##[cubson:submenu] ##[/cubson:submenu] @@ -128,79 +128,79 @@ // Config setting // $modversion['config'] = array( - array( - 'name' => 'gr_id', - 'title' => "_MI_BIZPOLL_TITLE_GR_ID", - 'description' => "_MI_BIZPOLL_DESC_GR_ID", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => 0 - ), - array( - 'name' => 'css_file', - 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", - 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => '/modules/'. $myDirName. '/bizpoll.css' - ), - array( - 'name' => 'permit_title', - 'title' => "_MI_BIZPOLL_TITLE_PERMIT", - 'description' => "_MI_BIZPOLL_DESC_PERMIT", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'viewer|poster|editor|viewer' - ), - array( - 'name' => 'show_rss', - 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", - 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '1' - ), - array( - 'name' => 'editor', - 'title' => "_MI_BIZPOLL_TITLE_EDITOR", - 'description' => "_MI_BIZPOLL_DESC_EDITOR", - 'formtype' => 'select', - 'valuetype' => 'text', - 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), - 'default' => 'bbcode' - ), - array( - 'name' => 'ip_period', - 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", - 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '24' - ), - array( - 'name' => 'chart', - 'title' => "_MI_BIZPOLL_TITLE_CHART", - 'description' => "_MI_BIZPOLL_DESC_CHART", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'p,400,100' - ), + array( + 'name' => 'gr_id', + 'title' => "_MI_BIZPOLL_TITLE_GR_ID", + 'description' => "_MI_BIZPOLL_DESC_GR_ID", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => 0 + ), + array( + 'name' => 'css_file', + 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", + 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => '/modules/'. $myDirName. '/bizpoll.css' + ), + array( + 'name' => 'permit_title', + 'title' => "_MI_BIZPOLL_TITLE_PERMIT", + 'description' => "_MI_BIZPOLL_DESC_PERMIT", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'viewer|poster|editor|viewer' + ), + array( + 'name' => 'show_rss', + 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", + 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '1' + ), + array( + 'name' => 'editor', + 'title' => "_MI_BIZPOLL_TITLE_EDITOR", + 'description' => "_MI_BIZPOLL_DESC_EDITOR", + 'formtype' => 'select', + 'valuetype' => 'text', + 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), + 'default' => 'bbcode' + ), + array( + 'name' => 'ip_period', + 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", + 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '24' + ), + array( + 'name' => 'chart', + 'title' => "_MI_BIZPOLL_TITLE_CHART", + 'description' => "_MI_BIZPOLL_DESC_CHART", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'p,400,100' + ), /* - array( - 'name' => 'xxxx', - 'title' => '_MI_BIZPOLL_TITLE_XXXX', - 'description' => '_MI_BIZPOLL_DESC_XXXX', - 'formtype' => 'xxxx', - 'valuetype' => 'xxx', - 'options' => array(xxx => xxx,xxx => xxx), - 'default' => 0 - ), + array( + 'name' => 'xxxx', + 'title' => '_MI_BIZPOLL_TITLE_XXXX', + 'description' => '_MI_BIZPOLL_DESC_XXXX', + 'formtype' => 'xxxx', + 'valuetype' => 'xxx', + 'options' => array(xxx => xxx,xxx => xxx), + 'default' => 0 + ), */ ##[cubson:config] ##[/cubson:config] @@ -210,42 +210,42 @@ // Block setting // $modversion['blocks'] = array( - 1 => array( - 'func_num' => 1, - 'file' => 'EnqBlock.class.php', - 'class' => 'EnqBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, - 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, - 'options' => '5|', - 'template' => '{dirname}_block_enq.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 2 => array( - 'func_num' => 2, - 'file' => 'PollOneBlock.class.php', - 'class' => 'PollOneBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, - 'options' => '0|', - 'template' => '{dirname}_block_pollone.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 3 => array( - 'func_num' => 3, - 'file' => 'PollNewBlock.class.php', - 'class' => 'PollNewBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, - 'options' => '', - 'template' => '{dirname}_block_pollnew.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), + 1 => array( + 'func_num' => 1, + 'file' => 'EnqBlock.class.php', + 'class' => 'EnqBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, + 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, + 'options' => '5|', + 'template' => '{dirname}_block_enq.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 2 => array( + 'func_num' => 2, + 'file' => 'PollOneBlock.class.php', + 'class' => 'PollOneBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, + 'options' => '0|', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 3 => array( + 'func_num' => 3, + 'file' => 'PollNewBlock.class.php', + 'class' => 'PollNewBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, + 'options' => '', + 'template' => '{dirname}_block_pollnew.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[530]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2011-03-17 09:45:35
|
Revision: 530 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=530&view=rev Author: kilica Date: 2011-03-17 09:45:28 +0000 (Thu, 17 Mar 2011) Log Message: ----------- Fix Bug: allow show result Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-03-17 09:45:28 UTC (rev 530) @@ -18,6 +18,9 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.23(2011.03.17) +\x81E\x81u\x8C\x8B\x89ʂ\xF0\x8AJ\x8E\xA6\x82\xB5\x82Ȃ\xA2\x81v\x82ɂ\xB5\x82\xBD\x8Fꍇ\x82ɊǗ\x9D\x8Eҁieditor\x81j\x82\xE0\x8C\xA9\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xB5\x82܂\xA4\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks chipy\x81j + 0.22(2010.06.02) \x81E\x83o\x83O\x8FC\x90\xB3\x81iThanks chipy\x81j Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-03-17 09:45:28 UTC (rev 530) @@ -7,7 +7,7 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } require_once BIZPOLL_TRUST_PATH . '/class/AbstractListAction.class.php'; @@ -18,132 +18,133 @@ **/ class Bizpoll_PollDetailAction extends Bizpoll_AbstractListAction { - var $mEnq = null; - var $mEnqId = 0; - var $mChart = array(); + var $mEnq = null; + var $mEnqId = 0; + var $mChart = array(); - /** - * _getId - * @param void - * @return int - **/ - protected function _getId() - { - if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ - return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); - } - else{ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); - } - } + /** + * _getId + * @param void + * @return int + **/ + protected function _getId() + { + if($this->mRoot->mContext->mRequest->getRequest('enq_id')){ + return intval($this->mRoot->mContext->mRequest->getRequest('enq_id')); + } + else{ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_ENQ_ID_REQUIRED); + } + } - /** - * &_getHandler - * @param void - * @return Bizpoll_PollHandler - **/ - protected function &_getHandler() - { - $handler =& $this->mAsset->getObject('handler', 'poll'); - return $handler; - } + /** + * &_getHandler + * @param void + * @return Bizpoll_PollHandler + **/ + protected function &_getHandler() + { + $handler =& $this->mAsset->getObject('handler', 'poll'); + return $handler; + } - /** - * &_getFilterForm - * - * @param void - * - * @return Bizpoll_PollFilterForm - **/ - protected function &_getFilterForm() - { - // $filter =& new Bizpoll_PollFilterForm(); - $filter =& $this->mAsset->getObject('filter', 'poll',false); - $filter->prepare($this->_getPageNavi(), $this->_getHandler()); - return $filter; - } + /** + * &_getFilterForm + * + * @param void + * + * @return Bizpoll_PollFilterForm + **/ + protected function &_getFilterForm() + { + // $filter =& new Bizpoll_PollFilterForm(); + $filter =& $this->mAsset->getObject('filter', 'poll',false); + $filter->prepare($this->_getPageNavi(), $this->_getHandler()); + return $filter; + } - /** - * _getBaseUrl - * @param void - * @return string - **/ - protected function _getBaseUrl() - { - return './index.php?action=PollDetail'; - } + /** + * _getBaseUrl + * @param void + * @return string + **/ + protected function _getBaseUrl() + { + return './index.php?action=PollDetail'; + } - /** - * @public - */ - function getDefaultView() - { - $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; - - //get Enq object - $enqHandler =& $this->mAsset->getObject('handler', 'enq'); - $this->mEnq =& $enqHandler->get($this->_getId()); - if(! $this->mEnq->allowShowResult($this->mAsset->mDirname)){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_MESSAGE_HIDE_RESULT); - } - - //check permissions - if($this->mUseCat){ - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); - - if(! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'viewer')){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); - } - } - - //getDefaultView - $this->mFilter =& $this->_getFilterForm(); - $this->mFilter->fetch(); - $this->mEnqId = $this->_getId(); - - $handler =& $this->_getHandler(); - $criteria=$this->mFilter->getCriteria(); - - //set enq_id request - $criteria->add(new Criteria('enq_id', $this->_getId())); - - $criteria->addSort('reg_unixtime', 'DESC'); - $this->mObjects =& $handler->getObjects($criteria); - - //loadChoice - $this->mChart['count'] = array(); - $this->mChart['title'] = array(); - $this->mChart['total'] = array(); - foreach(array_keys($this->mObjects) as $key){ - $this->mObjects[$key]->loadChoice($this->mAsset->mDirname); - //for Google Chart API - $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); - foreach(array_keys($choiceArr) as $keyC){ - @$this->mChart['count'][$choiceArr[$keyC]]++; - $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title') . ' ('. $this->mChart['count'][$choiceArr[$keyC]] .')'; - } - } - $this->mChart['total'] = count($this->mChart['title']); - - return BIZPOLL_FRAME_VIEW_INDEX; - } + /** + * @public + */ + function getDefaultView() + { + $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; + + //get Enq object + $enqHandler =& $this->mAsset->getObject('handler', 'enq'); + $this->mEnq =& $enqHandler->get($this->_getId()); + + //check permissions + if($this->mUseCat){ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + + if(! $this->mEnq->allowShowResult($this->mAsset->mDirname) && ! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'editor')){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_MESSAGE_HIDE_RESULT); + } + + if(! $xcatHandler->checkPermit($this->mEnq->get('cat_id'), 'viewer')){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } + } + + //getDefaultView + $this->mFilter =& $this->_getFilterForm(); + $this->mFilter->fetch(); + $this->mEnqId = $this->_getId(); + + $handler =& $this->_getHandler(); + $criteria=$this->mFilter->getCriteria(); + + //set enq_id request + $criteria->add(new Criteria('enq_id', $this->_getId())); + + $criteria->addSort('reg_unixtime', 'DESC'); + $this->mObjects =& $handler->getObjects($criteria); + + //loadChoice + $this->mChart['count'] = array(); + $this->mChart['title'] = array(); + $this->mChart['total'] = array(); + foreach(array_keys($this->mObjects) as $key){ + $this->mObjects[$key]->loadChoice($this->mAsset->mDirname); + //for Google Chart API + $choiceArr = explode(',', $this->mObjects[$key]->get('choice_id')); + foreach(array_keys($choiceArr) as $keyC){ + @$this->mChart['count'][$choiceArr[$keyC]]++; + $this->mChart['title'][$choiceArr[$keyC]] = $this->mObjects[$key]->mChoice[$keyC]->getShow('title') . ' ('. $this->mChart['count'][$choiceArr[$keyC]] .')'; + } + } + $this->mChart['total'] = count($this->mChart['title']); + + return BIZPOLL_FRAME_VIEW_INDEX; + } - /** - * executeViewIndex - * @param XCube_RenderTarget &$render - * @return void - **/ - public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) - { - $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); - $render->setAttribute('objects', $this->mObjects); - $render->setAttribute('enq', $this->mEnq); - $render->setAttribute('chart', $this->mChart); - $render->setAttribute('pageNavi', $this->mFilter->mNavi); - $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); - rsort($this->mChart['count']); - $render->setAttribute('chartMax', array_shift($this->mChart['count'])); - } + /** + * executeViewIndex + * @param XCube_RenderTarget &$render + * @return void + **/ + public function executeViewIndex(/*** XCube_RenderTarget ***/ &$render) + { + $render->setTemplateName($this->mAsset->mDirname . '_poll_detail.html'); + $render->setAttribute('objects', $this->mObjects); + $render->setAttribute('enq', $this->mEnq); + $render->setAttribute('chart', $this->mChart); + $render->setAttribute('pageNavi', $this->mFilter->mNavi); + $render->setAttribute('chartSetting', explode(',', $this->getConfig('chart'))); + rsort($this->mChart['count']); + $render->setAttribute('chartMax', array_shift($this->mChart['count'])); + } } ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/handler/Enq.class.php 2011-03-17 09:45:28 UTC (rev 530) @@ -15,14 +15,14 @@ **/ class Bizpoll_EnqObject extends XoopsSimpleObject { - var $mPoll = array(); - var $_mPollLoadedFlag = false; - var $mMyPoll = array(); - var $_mMyPollLoadedFlag = false; - var $mChoice = array(); - var $_mChoiceLoadedFlag = false; - var $mPollCount = 0; - var $_mPollCountFlag = false; + var $mPoll = array(); + var $_mPollLoadedFlag = false; + var $mMyPoll = array(); + var $_mMyPollLoadedFlag = false; + var $mChoice = array(); + var $_mChoiceLoadedFlag = false; + var $mPollCount = 0; + var $_mPollCountFlag = false; /** * __construct @@ -47,171 +47,171 @@ $this->initVar('reg_unixtime', XOBJ_DTYPE_INT, time(), false); } - public function checkEnd() - { - if($this->get('end_unixtime')>86400 && $this->get('end_unixtime')<time()){ - return false; //expired - } - return true; - } + public function checkEnd() + { + if($this->get('end_unixtime')>86400 && $this->get('end_unixtime')<time()){ + return false; //expired + } + return true; + } - public function countPoll($dirname) - { - if ($this->_mPollCountFlag == false) { - $this->loadPoll($dirname); - $this->mPollCount = count($this->mPoll); - $this->_mPollCountFlag = true; - } - } + public function countPoll($dirname) + { + if ($this->_mPollCountFlag == false) { + $this->loadPoll($dirname); + $this->mPollCount = count($this->mPoll); + $this->_mPollCountFlag = true; + } + } - public function allowAddChoice() - { - $root = XCube_Root::getSingleton(); - //if the poster is guest, anyone can add choices. - if($this->get('uid')==0){ - return true; - } - //if 'allowAddChoice' option is true, anyone can add choices. - $optionArr = unserialize($this->get('option')); - if($optionArr['add_choice']==1){ - return true; - } - else{ - //otherwise, only the enq poster can add choices. - $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; - if($uid==$this->get('uid')){ - return true; - } - else{ - return false; - } - } - } + public function allowAddChoice() + { + $root = XCube_Root::getSingleton(); + //if the poster is guest, anyone can add choices. + if($this->get('uid')==0){ + return true; + } + //if 'allowAddChoice' option is true, anyone can add choices. + $optionArr = unserialize($this->get('option')); + if($optionArr['add_choice']==1){ + return true; + } + else{ + //otherwise, only the enq poster can add choices. + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + if($uid==$this->get('uid')){ + return true; + } + else{ + return false; + } + } + } - public function allowShowResult($dirname) - { - $root = XCube_Root::getSingleton(); - $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; - $xcatHandler = new Bizpoll_XcatHandler($dirname); - $optionArr = unserialize($this->get('option')); - - if(intval($optionArr['show_result']==0)){ //show result before poll - return true; - } - elseif(intval($optionArr['show_result']==1)){ //show result after he polled or end of the poll - if($this->checkEnd()==false){ //when the poll is end - return true; - } - - if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$uid){ - return true; - } - - $this->loadMyPoll($dirname); - return ($this->mMyPoll) ? true : false; - } - elseif(intval($optionArr['opt_show_result']==2)){ //show result only editors - if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$root->mContext->mXoopsUser->get('uid')){ - return true; - } - return false; - } - } + public function allowShowResult($dirname) + { + $root = XCube_Root::getSingleton(); + $uid = ($root->mContext->mXoopsUser) ? $root->mContext->mXoopsUser->get('uid') : 0; + $xcatHandler = new Bizpoll_XcatHandler($dirname); + $optionArr = unserialize($this->get('option')); + + if(intval($optionArr['show_result']==0)){ //show result before poll + return true; + } + elseif(intval($optionArr['show_result']==1)){ //show result after he polled or end of the poll + if($this->checkEnd()==false){ //when the poll is end + return true; + } + + if($xcatHandler->checkPermit($this->get('cat_id'), 'poster') || $this->get('uid')==$uid){ + return true; + } + + $this->loadMyPoll($dirname); + return ($this->mMyPoll) ? true : false; + } + elseif(intval($optionArr['show_result']==2)){ //show result only editors + if($xcatHandler->checkPermit($this->get('cat_id'), 'editor') || $this->get('uid')==$root->mContext->mXoopsUser->get('uid')){ + return true; + } + return false; + } + } - public function loadPoll($dirname, $criteria = null) - { - if ($this->_mPollLoadedFlag == false) { - $handler =& $this->_getHandler($dirname, 'poll'); - - if($criteria){ - $this->mPoll =& $handler->getObjects($criteria); - unset($criteria); - }else{ - $this->mPoll =& $handler->getObjects(new Criteria('enq_id', $this->get('enq_id'))); - } - $this->_mPollLoadedFlag = true; - } - } + public function loadPoll($dirname, $criteria = null) + { + if ($this->_mPollLoadedFlag == false) { + $handler =& $this->_getHandler($dirname, 'poll'); + + if($criteria){ + $this->mPoll =& $handler->getObjects($criteria); + unset($criteria); + }else{ + $this->mPoll =& $handler->getObjects(new Criteria('enq_id', $this->get('enq_id'))); + } + $this->_mPollLoadedFlag = true; + } + } - public function loadMyPoll($dirname) - { - if ($this->_mMyPollLoadedFlag == false) { - $root = XCube_Root::getSingleton(); - $handler =& $this->_getHandler($dirname, 'poll'); - if($root->mContext->mXoopsUser){ - $criteria = new CriteriaCompo('1', '1'); - $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); - $criteria->add(new Criteria('uid', $root->mContext->mXoopsUser->get('uid'))); - $poll =& $handler->getObjects($criteria); - unset($criteria); - - if(count($poll)>0){ - $this->mMyPoll = $poll[0]; - } - else{ - $this->mMyPoll = $handler->create(); - $this->mMyPoll->set('enq_id', $this->get('enq_id')); - $this->mMyPoll->set('uid', $root->mContext->mXoopsUser->get('uid')); - } - } - else{ - $this->mMyPoll = $handler->create(); - $this->mMyPoll->set('enq_id', $this->get('enq_id')); - $this->mMyPoll->set('uid', 0); - } - $this->_mMyPollLoadedFlag = true; - } - } + public function loadMyPoll($dirname) + { + if ($this->_mMyPollLoadedFlag == false) { + $root = XCube_Root::getSingleton(); + $handler =& $this->_getHandler($dirname, 'poll'); + if($root->mContext->mXoopsUser){ + $criteria = new CriteriaCompo('1', '1'); + $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); + $criteria->add(new Criteria('uid', $root->mContext->mXoopsUser->get('uid'))); + $poll =& $handler->getObjects($criteria); + unset($criteria); + + if(count($poll)>0){ + $this->mMyPoll = $poll[0]; + } + else{ + $this->mMyPoll = $handler->create(); + $this->mMyPoll->set('enq_id', $this->get('enq_id')); + $this->mMyPoll->set('uid', $root->mContext->mXoopsUser->get('uid')); + } + } + else{ + $this->mMyPoll = $handler->create(); + $this->mMyPoll->set('enq_id', $this->get('enq_id')); + $this->mMyPoll->set('uid', 0); + } + $this->_mMyPollLoadedFlag = true; + } + } - public function &createPoll($dirname) - { - $handler =& $this->_getHandler($dirname, 'poll'); - - $obj =& $handler->create(); - $obj->set('enq_id', $this->get('enq_id')); - return $obj; - } + public function &createPoll($dirname) + { + $handler =& $this->_getHandler($dirname, 'poll'); + + $obj =& $handler->create(); + $obj->set('enq_id', $this->get('enq_id')); + return $obj; + } - public function loadChoice($dirname, $criteria = null) - { - if ($this->_mChoiceLoadedFlag == false) { - $handler =& $this->_getHandler($dirname, 'choice'); - - if($criteria){ - $this->mChoice =& $handler->getObjects($criteria); - unset($criteria); - }else{ - $criteria = new CriteriaCompo('1', '1'); - $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); - $criteria->setSort('weight'); - $this->mChoice =& $handler->getObjects($criteria); - } - $this->_mChoiceLoadedFlag = true; - } - } + public function loadChoice($dirname, $criteria = null) + { + if ($this->_mChoiceLoadedFlag == false) { + $handler =& $this->_getHandler($dirname, 'choice'); + + if($criteria){ + $this->mChoice =& $handler->getObjects($criteria); + unset($criteria); + }else{ + $criteria = new CriteriaCompo('1', '1'); + $criteria->add(new Criteria('enq_id', $this->get('enq_id'))); + $criteria->setSort('weight'); + $this->mChoice =& $handler->getObjects($criteria); + } + $this->_mChoiceLoadedFlag = true; + } + } - public function &createChoice($dirname) - { - $handler =& $this->_getHandler($dirname, 'choice'); - - $obj =& $handler->create(); - $obj->set('enq_id', $this->get('enq_id')); - return $obj; - } + public function &createChoice($dirname) + { + $handler =& $this->_getHandler($dirname, 'choice'); + + $obj =& $handler->create(); + $obj->set('enq_id', $this->get('enq_id')); + return $obj; + } - protected function &_getHandler($dirname, $tablename) - { - $asset = null; - XCube_DelegateUtils::call( - 'Module.bizpoll.Global.Event.GetAssetManager', - new XCube_Ref($asset), - $dirname - ); - if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) - { - return $asset->getObject('handler',$tablename); - } - } + protected function &_getHandler($dirname, $tablename) + { + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $dirname + ); + if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) + { + return $asset->getObject('handler',$tablename); + } + } } @@ -249,29 +249,29 @@ parent::XoopsObjectGenericHandler($db); } - function &_getHandler($dirname, $tablename) - { - $asset = null; - XCube_DelegateUtils::call( - 'Module.bizpoll.Global.Event.GetAssetManager', - new XCube_Ref($asset), - $dirname - ); - if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) - { - return $asset->getObject('handler',$tablename); - } - } + function &_getHandler($dirname, $tablename) + { + $asset = null; + XCube_DelegateUtils::call( + 'Module.bizpoll.Global.Event.GetAssetManager', + new XCube_Ref($asset), + $dirname + ); + if(is_object($asset) && is_a($asset, 'Bizpoll_AssetManager')) + { + return $asset->getObject('handler',$tablename); + } + } - function delete(&$obj) - { - $dirnameArr = explode('_', $this->mTable); - $handler =& $this->_getHandler($dirnameArr[1], 'poll'); - $handler->deleteAll(new Criteria('enq_id', $obj->get('enq_id'))); - unset($handler); - - return parent::delete($obj); - } + function delete(&$obj) + { + $dirnameArr = explode('_', $this->mTable); + $handler =& $this->_getHandler($dirnameArr[1], 'poll'); + $handler->deleteAll(new Criteria('enq_id', $obj->get('enq_id'))); + unset($handler); + + return parent::delete($obj); + } } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-03-03 10:50:45 UTC (rev 529) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-03-17 09:45:28 UTC (rev 530) @@ -7,12 +7,12 @@ if(!defined('XOOPS_ROOT_PATH')) { - exit; + exit; } if(!defined('BIZPOLL_TRUST_PATH')) { - define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); + define('BIZPOLL_TRUST_PATH',XOOPS_TRUST_PATH . '/modules/bizpoll'); } require_once BIZPOLL_TRUST_PATH . '/class/BizpollUtils.class.php'; @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.22; +$modversion['version'] = 0.23; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; @@ -34,27 +34,27 @@ $modversion['cube_style'] = true; $modversion['legacy_installer'] = array( - 'installer' => array( - 'class' => 'Installer', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' - ), - 'uninstaller' => array( - 'class' => 'Uninstaller', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' - ), - 'updater' => array( - 'class' => 'Updater', - 'namespace' => 'Bizpoll', - 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' - ) + 'installer' => array( + 'class' => 'Installer', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollInstaller.class.php' + ), + 'uninstaller' => array( + 'class' => 'Uninstaller', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUninstaller.class.php' + ), + 'updater' => array( + 'class' => 'Updater', + 'namespace' => 'Bizpoll', + 'filepath' => BIZPOLL_TRUST_PATH . '/admin/class/installer/BizpollUpdater.class.php' + ) ); $modversion['disable_legacy_2nd_installer'] = false; $modversion['sqlfile']['mysql'] = 'sql/mysql.sql'; $modversion['tables'] = array( -// '{prefix}_{dirname}_xxxx', +// '{prefix}_{dirname}_xxxx', ##[cubson:tables] '{prefix}_{dirname}_enq', '{prefix}_{dirname}_choice', @@ -67,25 +67,25 @@ // $modversion['templates'] = array( /* - array( - 'file' => '{dirname}_xxx.html', - 'description' => _MI_BIZPOLL_TPL_XXX - ), + array( + 'file' => '{dirname}_xxx.html', + 'description' => _MI_BIZPOLL_TPL_XXX + ), */ ##[cubson:templates] - array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), - array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), - array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), - array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), - array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), - array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), - array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), - array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), - array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), - array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), - array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), - array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), - array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), + array('file' => '{dirname}_enq_list.html','description' => _MI_BIZPOLL_TPL_ENQ_LIST), + array('file' => '{dirname}_enq_edit.html','description' => _MI_BIZPOLL_TPL_ENQ_EDIT), + array('file' => '{dirname}_enq_delete.html','description' => _MI_BIZPOLL_TPL_ENQ_DELETE), + array('file' => '{dirname}_enq_view.html','description' => _MI_BIZPOLL_TPL_ENQ_VIEW), + array('file' => '{dirname}_poll_list.html','description' => _MI_BIZPOLL_TPL_POLL_LIST), + array('file' => '{dirname}_poll_edit.html','description' => _MI_BIZPOLL_TPL_POLL_EDIT), + array('file' => '{dirname}_poll_delete.html','description' => _MI_BIZPOLL_TPL_POLL_DELETE), + array('file' => '{dirname}_poll_detail.html','description' => _MI_BIZPOLL_TPL_POLL_VIEW), + array('file' => '{dirname}_choice_list.html','description' => _MI_BIZPOLL_TPL_CHOICE_LIST), + array('file' => '{dirname}_choice_edit.html','description' => _MI_BIZPOLL_TPL_CHOICE_EDIT), + array('file' => '{dirname}_choice_delete.html','description' => _MI_BIZPOLL_TPL_CHOICE_DELETE), + array('file' => '{dirname}_choice_view.html','description' => _MI_BIZPOLL_TPL_CHOICE_VIEW), + array('file' => '{dirname}_enq_rss.html','description' => _MI_BIZPOLL_TPL_ENQ_RSS), ##[/cubson:templates] ); @@ -96,13 +96,13 @@ $modversion['adminindex'] = 'admin/index.php'; $modversion['adminmenu'] = array( /* - array( - 'title' => _MI_BIZPOLL_LANG_XXXX, - 'link' => 'admin/index.php?action=xxx', - 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, - 'show' => true, - 'absolute' => false - ), + array( + 'title' => _MI_BIZPOLL_LANG_XXXX, + 'link' => 'admin/index.php?action=xxx', + 'keywords' => _MI_BIZPOLL_KEYWORD_XXX, + 'show' => true, + 'absolute' => false + ), */ ##[cubson:adminmenu] ##[/cubson:adminmenu] @@ -115,10 +115,10 @@ $modversion['hasSearch'] = 0; $modversion['sub'] = array( /* - array( - 'name' => _MI_BIZPOLL_LANG_SUB_XXX, - 'url' => 'index.php?action=XXX' - ), + array( + 'name' => _MI_BIZPOLL_LANG_SUB_XXX, + 'url' => 'index.php?action=XXX' + ), */ ##[cubson:submenu] ##[/cubson:submenu] @@ -128,79 +128,79 @@ // Config setting // $modversion['config'] = array( - array( - 'name' => 'gr_id', - 'title' => "_MI_BIZPOLL_TITLE_GR_ID", - 'description' => "_MI_BIZPOLL_DESC_GR_ID", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => 0 - ), - array( - 'name' => 'css_file', - 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", - 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => '/modules/'. $myDirName. '/bizpoll.css' - ), - array( - 'name' => 'permit_title', - 'title' => "_MI_BIZPOLL_TITLE_PERMIT", - 'description' => "_MI_BIZPOLL_DESC_PERMIT", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'viewer|poster|editor|viewer' - ), - array( - 'name' => 'show_rss', - 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", - 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", - 'formtype' => 'yesno', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '1' - ), - array( - 'name' => 'editor', - 'title' => "_MI_BIZPOLL_TITLE_EDITOR", - 'description' => "_MI_BIZPOLL_DESC_EDITOR", - 'formtype' => 'select', - 'valuetype' => 'text', - 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), - 'default' => 'bbcode' - ), - array( - 'name' => 'ip_period', - 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", - 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", - 'formtype' => 'textbox', - 'valuetype' => 'int', - 'options' => array(), - 'default' => '24' - ), - array( - 'name' => 'chart', - 'title' => "_MI_BIZPOLL_TITLE_CHART", - 'description' => "_MI_BIZPOLL_DESC_CHART", - 'formtype' => 'textbox', - 'valuetype' => 'text', - 'options' => array(), - 'default' => 'p,400,100' - ), + array( + 'name' => 'gr_id', + 'title' => "_MI_BIZPOLL_TITLE_GR_ID", + 'description' => "_MI_BIZPOLL_DESC_GR_ID", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => 0 + ), + array( + 'name' => 'css_file', + 'title' => "_MI_BIZPOLL_TITLE_CSS_FILE", + 'description' => "_MI_BIZPOLL_DESC_CSS_FILE", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => '/modules/'. $myDirName. '/bizpoll.css' + ), + array( + 'name' => 'permit_title', + 'title' => "_MI_BIZPOLL_TITLE_PERMIT", + 'description' => "_MI_BIZPOLL_DESC_PERMIT", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'viewer|poster|editor|viewer' + ), + array( + 'name' => 'show_rss', + 'title' => "_MI_BIZPOLL_TITLE_SHOW_RSS", + 'description' => "_MI_BIZPOLL_DESC_SHOW_RSS", + 'formtype' => 'yesno', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '1' + ), + array( + 'name' => 'editor', + 'title' => "_MI_BIZPOLL_TITLE_EDITOR", + 'description' => "_MI_BIZPOLL_DESC_EDITOR", + 'formtype' => 'select', + 'valuetype' => 'text', + 'options' => array("bbcode"=>"bbcode", "fckeditor"=>"fckeditor"), + 'default' => 'bbcode' + ), + array( + 'name' => 'ip_period', + 'title' => "_MI_BIZPOLL_TITLE_IP_PERIOD", + 'description' => "_MI_BIZPOLL_DESC_IP_PERIOD", + 'formtype' => 'textbox', + 'valuetype' => 'int', + 'options' => array(), + 'default' => '24' + ), + array( + 'name' => 'chart', + 'title' => "_MI_BIZPOLL_TITLE_CHART", + 'description' => "_MI_BIZPOLL_DESC_CHART", + 'formtype' => 'textbox', + 'valuetype' => 'text', + 'options' => array(), + 'default' => 'p,400,100' + ), /* - array( - 'name' => 'xxxx', - 'title' => '_MI_BIZPOLL_TITLE_XXXX', - 'description' => '_MI_BIZPOLL_DESC_XXXX', - 'formtype' => 'xxxx', - 'valuetype' => 'xxx', - 'options' => array(xxx => xxx,xxx => xxx), - 'default' => 0 - ), + array( + 'name' => 'xxxx', + 'title' => '_MI_BIZPOLL_TITLE_XXXX', + 'description' => '_MI_BIZPOLL_DESC_XXXX', + 'formtype' => 'xxxx', + 'valuetype' => 'xxx', + 'options' => array(xxx => xxx,xxx => xxx), + 'default' => 0 + ), */ ##[cubson:config] ##[/cubson:config] @@ -210,42 +210,42 @@ // Block setting // $modversion['blocks'] = array( - 1 => array( - 'func_num' => 1, - 'file' => 'EnqBlock.class.php', - 'class' => 'EnqBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, - 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, - 'options' => '5|', - 'template' => '{dirname}_block_enq.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 2 => array( - 'func_num' => 2, - 'file' => 'PollOneBlock.class.php', - 'class' => 'PollOneBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, - 'options' => '0|', - 'template' => '{dirname}_block_pollone.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), - 3 => array( - 'func_num' => 3, - 'file' => 'PollNewBlock.class.php', - 'class' => 'PollNewBlock', - 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, - 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, - 'options' => '', - 'template' => '{dirname}_block_pollnew.html', - 'show_all_module' => true, - 'can_clone' => true, - 'visible_any' => false - ), + 1 => array( + 'func_num' => 1, + 'file' => 'EnqBlock.class.php', + 'class' => 'EnqBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_ENQ, + 'description' => _MI_BIZPOLL_BLOCK_DESC_ENQ, + 'options' => '5|', + 'template' => '{dirname}_block_enq.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 2 => array( + 'func_num' => 2, + 'file' => 'PollOneBlock.class.php', + 'class' => 'PollOneBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLONE, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLONE, + 'options' => '0|', + 'template' => '{dirname}_block_pollone.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), + 3 => array( + 'func_num' => 3, + 'file' => 'PollNewBlock.class.php', + 'class' => 'PollNewBlock', + 'name' => _MI_BIZPOLL_BLOCK_NAME_POLLNEW, + 'description' => _MI_BIZPOLL_BLOCK_DESC_POLLNEW, + 'options' => '', + 'template' => '{dirname}_block_pollnew.html', + 'show_all_module' => true, + 'can_clone' => true, + 'visible_any' => false + ), ##[cubson:block] ##[/cubson:block] ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[532]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2011-04-26 14:50:32
|
Revision: 532 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=532&view=rev Author: kilica Date: 2011-04-26 14:50:25 +0000 (Tue, 26 Apr 2011) Log Message: ----------- PHP5.3 ready Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Removed Paths: ------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/.xml/ Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-04-26 14:50:25 UTC (rev 532) @@ -18,6 +18,10 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.24(2011.04.21) +\x81E\x83J\x83e\x83S\x83\x8A\x96\xA2\x90ݒ莞\x82ɃA\x83\x93\x83P\x81[\x83g\x82\xF0\x8D쐬\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƃG\x83\x89\x81[\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82̂\xF0\x8FC\x90\xB3 +\x81EPHP5.3\x82ŏo\x82\xE9 & new \x82\xCC Warning \x82\xF0\x8FC\x90\xB3 + 0.23(2011.03.17) \x81E\x81u\x8C\x8B\x89ʂ\xF0\x8AJ\x8E\xA6\x82\xB5\x82Ȃ\xA2\x81v\x82ɂ\xB5\x82\xBD\x8Fꍇ\x82ɊǗ\x9D\x8Eҁieditor\x81j\x82\xE0\x8C\xA9\x82\xEA\x82Ȃ\xAD\x82Ȃ\xC1\x82Ă\xB5\x82܂\xA4\x83o\x83O\x82\xF0\x8FC\x90\xB3\x81iThanks chipy\x81j Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_ChoiceDeleteForm(); + // $this->mActionForm = new Bizpoll_ChoiceDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'choice',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -70,7 +70,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_ChoiceEditForm(); + // $this->mActionForm = new Bizpoll_ChoiceEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'choice',false,'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/ChoiceListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -39,7 +39,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_ChoiceFilterForm(); + // $filter = new Bizpoll_ChoiceFilterForm(); $filter =& $this->mAsset->getObject('filter', 'choice',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_EnqDeleteForm(); + // $this->mActionForm = new Bizpoll_EnqDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'enq',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -70,7 +70,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_EnqEditForm(); + // $this->mActionForm = new Bizpoll_EnqEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'enq', false, 'edit'); $this->mActionForm->prepare(); } @@ -80,7 +80,6 @@ */ public function prepare() { - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); $this->mUseCat = ($this->mModule->getModuleConfig('gr_id')>0) ? true : false; @@ -99,8 +98,11 @@ } } else{ - if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + if($this->mUseCat){ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } } } } @@ -228,10 +230,17 @@ **/ public function execute() { - $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); - if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ - $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + if(! $this->mUseCat){ + if(! $this->mRoot->mContext->mXoopsUser){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } } + else{ + $xcatHandler = new Bizpoll_XcatHandler($this->mAsset->mDirname); + if(! $xcatHandler->checkPermit($this->mObject->get('cat_id'), 'editor', $this->mObject->get('uid'))){ + $this->mRoot->mController->executeRedirect('./index.php?action=EnqList', 1, _MD_BIZPOLL_ERROR_NOT_PERMITTED); + } + } if ($this->mObject == null) { Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -44,7 +44,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_EnqFilterForm(); + // $filter = new Bizpoll_EnqFilterForm(); $filter =& $this->mAsset->getObject('filter', 'enq',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/EnqViewAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -52,7 +52,7 @@ **/ protected function _setupPollActionForm() { - // $this->mActionForm =& new Bizpoll_PollEditForm(); + // $this->mActionForm = new Bizpoll_PollEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll', false, 'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDeleteAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -51,7 +51,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_PollDeleteForm(); + // $this->mActionForm = new Bizpoll_PollDeleteForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll',false,'delete'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -57,7 +57,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_PollFilterForm(); + // $filter = new Bizpoll_PollFilterForm(); $filter =& $this->mAsset->getObject('filter', 'poll',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollEditAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -57,7 +57,7 @@ **/ protected function _setupActionForm() { - // $this->mActionForm =& new Bizpoll_PollEditForm(); + // $this->mActionForm = new Bizpoll_PollEditForm(); $this->mActionForm =& $this->mAsset->getObject('form', 'poll', false, 'edit'); $this->mActionForm->prepare(); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -37,7 +37,7 @@ **/ protected function &_getFilterForm() { - // $filter =& new Bizpoll_PollFilterForm(); + // $filter = new Bizpoll_PollFilterForm(); $filter =& $this->mAsset->getObject('filter', 'poll',false); $filter->prepare($this->_getPageNavi(), $this->_getHandler()); return $filter; Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/BizpollAdminRenderSystem.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -30,7 +30,7 @@ { $this->mController =& $controller; - $this->mSmarty =& new Legacy_AdminSmarty(); // TODO will be use other class? + $this->mSmarty = new Legacy_AdminSmarty(); // TODO will be use other class? $this->mSmarty->register_modifier('theme',array($this,'modifierTheme')); $this->mSmarty->register_function('stylesheet',array($this,'functionStylesheet')); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstallUtils.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -50,7 +50,7 @@ } require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? - $scanner =& new Legacy_SQLScanner(); + $scanner = new Legacy_SQLScanner(); $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); $scanner->setDirname($dirname); if(!$scanner->loadFile($sqlFilePath)) @@ -92,7 +92,7 @@ public static function DBquery(/*** string ***/ $query,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { require_once XOOPS_MODULE_PATH . '/legacy/admin/class/Legacy_SQLScanner.class.php'; // TODO will be use other class? - $scanner =& new Legacy_SQLScanner(); + $scanner = new Legacy_SQLScanner(); $scanner->setDB_PREFIX(XOOPS_DB_PREFIX); $scanner->setDirname($module->get('dirname')); $scanner->setBuffer($query); @@ -286,7 +286,7 @@ if(is_array($delTemplates) && count($delTemplates) > 0) { - $xoopsTpl =& new XoopsTpl(); + $xoopsTpl = new XoopsTpl(); $xoopsTpl->clear_cache(null,'mod_' . $module->get('dirname')); foreach($delTemplates as $tpl) { @@ -492,7 +492,7 @@ ); $tplHandler =& Bizpoll_Utils::getXoopsHandler('tplfile'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('tpl_type','block')); $cri->add(new Criteria('tpl_tplset','default')); $cri->add(new Criteria('tpl_module',$module->get('dirname'))); @@ -559,7 +559,7 @@ $blockHandler =& Bizpoll_Utils::getXoopsHandler('block'); $gpermHandler =& Bizpoll_Utils::getXoopsHandler('groupperm'); - $cri =& new Criteria('mid',$module->get('mid')); + $cri = new Criteria('mid',$module->get('mid')); $blocks =& $blockHandler->getObjectsDirectly($cri); foreach($blocks as $block) @@ -584,7 +584,7 @@ $successFlag = false; } - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('gperm_name','block_read')); $cri->add(new Criteria('gperm_itemid',$block->get('bid'))); $cri->add(new Criteria('gperm_modid',1)); @@ -615,8 +615,8 @@ { $dirname = $module->get('dirname'); - $fileReader =& new Legacy_ModinfoX2FileReader($dirname); - $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + $fileReader = new Legacy_ModinfoX2FileReader($dirname); + $dbReader = new Legacy_ModinfoX2DBReader($dirname); $blocks =& $dbReader->loadBlockInformations(); $blocks->update($fileReader->loadBlockInformations()); @@ -655,7 +655,7 @@ public static function updateBlockTemplateByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$info->mFuncNum)); $blocks =& $blockHandler->getObjects($cri); @@ -679,7 +679,7 @@ public static function updateBlockByInfo(/*** Legacy_BlockInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$info->mFuncNum)); $blocks =& $blockHandler->getObjects($cri); @@ -787,7 +787,7 @@ public static function uninstallBlockByFuncNum(/*** int ***/ $func_num,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $blockHandler =& Bizpoll_Utils::getModuleHandler('newblocks','legacy'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('dirname',$module->get('dirname'))); $cri->add(new Criteria('func_num',$func_num)); $blocks =& $blockHandler->getObjects($cri); @@ -870,7 +870,7 @@ { $successFlag = true; $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $fileReader =& new Legacy_ModinfoX2FileReader($module->get('dirname')); // TODO will be use other class? + $fileReader = new Legacy_ModinfoX2FileReader($module->get('dirname')); // TODO will be use other class? $preferences =& $fileReader->loadPreferenceInformations(); foreach($preferences->mPreferences as $info) @@ -1040,7 +1040,7 @@ { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_order',$order)); @@ -1081,8 +1081,8 @@ { $dirname = $module->get('dirname'); - $fileReader =& new Legacy_ModinfoX2FileReader($dirname); - $dbReader =& new Legacy_ModinfoX2DBReader($dirname); + $fileReader = new Legacy_ModinfoX2FileReader($dirname); + $dbReader = new Legacy_ModinfoX2DBReader($dirname); $configs =& $dbReader->loadPreferenceInformations(); $configs->update($fileReader->loadPreferenceInformations()); @@ -1121,7 +1121,7 @@ public static function updateConfigByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_name',$info->mName)); @@ -1203,7 +1203,7 @@ public static function updateConfigOrderByInfo(/*** Legacy_PreferenceInformation ***/ &$info,/*** XoopsModule ***/ &$module,/*** Legacy_ModuleInstallLog ***/ &$log) { $configHandler =& Bizpoll_Utils::getXoopsHandler('config'); - $cri =& new CriteriaCompo(); + $cri = new CriteriaCompo(); $cri->add(new Criteria('conf_modid',$module->get('mid'))); $cri->add(new Criteria('conf_catid',0)); $cri->add(new Criteria('conf_name',$info->mName)); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollInstaller.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -41,7 +41,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUninstaller.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -41,7 +41,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** @@ -160,7 +160,7 @@ Bizpoll_InstallUtils::uninstallAllOfBlocks($this->_mXoopsModule,$this->mLog); $tplHandler =& Bizpoll_Utils::getXoopsHandler('tplfile'); - $cri =& new Criteria('tpl_module',$this->_mXoopsModule->get('dirname')); + $cri = new Criteria('tpl_module',$this->_mXoopsModule->get('dirname')); if(!$tplHandler->deleteAll($cri)) { $this->mLog->addError( Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/admin/class/installer/BizpollUpdater.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -61,7 +61,7 @@ **/ public function __construct() { - $this->mLog =& new Legacy_ModuleInstallLog(); + $this->mLog = new Legacy_ModuleInstallLog(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractFilterForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -71,7 +71,7 @@ **/ public function __construct() { - $this->_mCriteria =& new CriteriaCompo(); + $this->_mCriteria = new CriteriaCompo(); } /** Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AbstractListAction.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -69,7 +69,7 @@ **/ protected function &_getPageNavi() { - $navi =& new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); + $navi = new XCube_PageNavigator($this->_getBaseUrl(), XCUBE_PAGENAVI_START); return $navi; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/AssetManager.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -174,11 +174,11 @@ if($type == 'handler') { $root =& XCube_Root::getSingleton(); - $instance =& new $className($root->mController->getDB(),$this->mDirname); + $instance = new $className($root->mController->getDB(),$this->mDirname); } else { - $instance =& new $className(); + $instance = new $className(); } return $instance; } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/class/Module.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -360,7 +360,7 @@ . ucfirst($this->mActionName) . 'Action'; if(class_exists($className)) { - $this->mAction =& new $className(); + $this->mAction = new $className(); } if(!$this->mAction instanceof Bizpoll_AbstractAction) { Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['choice_id'] =& new XCube_IntProperty('choice_id'); + $this->mFormProperties['choice_id'] = new XCube_IntProperty('choice_id'); // // Set field properties // - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/ChoiceEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,31 +42,31 @@ // // Set form properties // - $this->mFormProperties['choice_id'] =& new XCube_IntProperty('choice_id'); - $this->mFormProperties['title'] =& new XCube_StringProperty('title'); - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['weight'] =& new XCube_IntProperty('weight'); - $this->mFormProperties['description'] =& new XCube_TextProperty('description'); + $this->mFormProperties['choice_id'] = new XCube_IntProperty('choice_id'); + $this->mFormProperties['title'] = new XCube_StringProperty('title'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['weight'] = new XCube_IntProperty('weight'); + $this->mFormProperties['description'] = new XCube_TextProperty('description'); // // Set field properties // - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); - $this->mFieldProperties['title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['title'] = new XCube_FieldProperty($this); $this->mFieldProperties['title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['title']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addMessage('maxlength', _MD_BIZPOLL_ERROR_MAXLENGTH, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addVar('maxlength', '255'); - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); - $this->mFieldProperties['weight'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['weight'] = new XCube_FieldProperty($this); $this->mFieldProperties['weight']->setDependsByArray(array('required')); $this->mFieldProperties['weight']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_WEIGHT); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); // // Set field properties // - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/EnqEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,40 +42,40 @@ // // Set form properties // - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['title'] =& new XCube_StringProperty('title'); - $this->mFormProperties['cat_id'] =& new XCube_IntProperty('cat_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['type'] =& new XCube_IntProperty('type'); - $this->mFormProperties['pub_unixtime'] =& new XCube_IntProperty('pub_unixtime'); - $this->mFormProperties['pub_date'] =& new XCube_StringProperty('pub_date'); - $this->mFormProperties['pub_Hour'] =& new XCube_StringProperty('pub_Hour'); - $this->mFormProperties['pub_Minute'] =& new XCube_StringProperty('pub_Minute'); - $this->mFormProperties['end_unixtime'] =& new XCube_IntProperty('end_unixtime'); - $this->mFormProperties['end_date'] =& new XCube_TextProperty('end_date'); - $this->mFormProperties['end_Hour'] =& new XCube_StringProperty('end_Hour'); - $this->mFormProperties['end_Minute'] =& new XCube_StringProperty('end_Minute'); - $this->mFormProperties['choices'] =& new XCube_TextProperty('choices'); - $this->mFormProperties['description'] =& new XCube_TextProperty('description'); - $this->mFormProperties['option'] =& new XCube_TextProperty('option'); - $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); - $this->mFormProperties['opt_show_result'] =& new XCube_IntProperty('opt_show_result'); - $this->mFormProperties['opt_add_choice'] =& new XCube_IntProperty('opt_add_choice'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['title'] = new XCube_StringProperty('title'); + $this->mFormProperties['cat_id'] = new XCube_IntProperty('cat_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['type'] = new XCube_IntProperty('type'); + $this->mFormProperties['pub_unixtime'] = new XCube_IntProperty('pub_unixtime'); + $this->mFormProperties['pub_date'] = new XCube_StringProperty('pub_date'); + $this->mFormProperties['pub_Hour'] = new XCube_StringProperty('pub_Hour'); + $this->mFormProperties['pub_Minute'] = new XCube_StringProperty('pub_Minute'); + $this->mFormProperties['end_unixtime'] = new XCube_IntProperty('end_unixtime'); + $this->mFormProperties['end_date'] = new XCube_TextProperty('end_date'); + $this->mFormProperties['end_Hour'] = new XCube_StringProperty('end_Hour'); + $this->mFormProperties['end_Minute'] = new XCube_StringProperty('end_Minute'); + $this->mFormProperties['choices'] = new XCube_TextProperty('choices'); + $this->mFormProperties['description'] = new XCube_TextProperty('description'); + $this->mFormProperties['option'] = new XCube_TextProperty('option'); + $this->mFormProperties['reg_unixtime'] = new XCube_IntProperty('reg_unixtime'); + $this->mFormProperties['opt_show_result'] = new XCube_IntProperty('opt_show_result'); + $this->mFormProperties['opt_add_choice'] = new XCube_IntProperty('opt_add_choice'); // // Set field properties // - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); - $this->mFieldProperties['title'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['title'] = new XCube_FieldProperty($this); $this->mFieldProperties['title']->setDependsByArray(array('required','maxlength')); $this->mFieldProperties['title']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addMessage('maxlength', _MD_BIZPOLL_ERROR_MAXLENGTH, _MD_BIZPOLL_LANG_TITLE, '255'); $this->mFieldProperties['title']->addVar('maxlength', '255'); - $this->mFieldProperties['type'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['type'] = new XCube_FieldProperty($this); $this->mFieldProperties['type']->setDependsByArray(array('required')); $this->mFieldProperties['type']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_TYPE); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollDeleteForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -42,12 +42,12 @@ // // Set form properties // - $this->mFormProperties['poll_id'] =& new XCube_IntProperty('poll_id'); + $this->mFormProperties['poll_id'] = new XCube_IntProperty('poll_id'); // // Set field properties // - $this->mFieldProperties['poll_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['poll_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['poll_id']->setDependsByArray(array('required')); $this->mFieldProperties['poll_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_POLL_ID); } Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/forms/PollEditForm.class.php 2011-04-26 14:50:25 UTC (rev 532) @@ -43,33 +43,33 @@ // // Set form properties // - $this->mFormProperties['poll_id'] =& new XCube_IntProperty('poll_id'); - $this->mFormProperties['enq_id'] =& new XCube_IntProperty('enq_id'); - $this->mFormProperties['uid'] =& new XCube_IntProperty('uid'); - $this->mFormProperties['name'] =& new XCube_StringProperty('name'); - $this->mFormProperties['choice_id'] =& new XCube_TextProperty('choice_id'); - $this->mFormProperties['ip'] =& new XCube_StringProperty('ip'); - $this->mFormProperties['comment'] =& new XCube_TextProperty('comment'); - $this->mFormProperties['reg_unixtime'] =& new XCube_IntProperty('reg_unixtime'); + $this->mFormProperties['poll_id'] = new XCube_IntProperty('poll_id'); + $this->mFormProperties['enq_id'] = new XCube_IntProperty('enq_id'); + $this->mFormProperties['uid'] = new XCube_IntProperty('uid'); + $this->mFormProperties['name'] = new XCube_StringProperty('name'); + $this->mFormProperties['choice_id'] = new XCube_TextProperty('choice_id'); + $this->mFormProperties['ip'] = new XCube_StringProperty('ip'); + $this->mFormProperties['comment'] = new XCube_TextProperty('comment'); + $this->mFormProperties['reg_unixtime'] = new XCube_IntProperty('reg_unixtime'); // // Set field properties // - $this->mFieldProperties['poll_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['poll_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['poll_id']->setDependsByArray(array('required')); $this->mFieldProperties['poll_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_POLL_ID); - $this->mFieldProperties['enq_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['enq_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['enq_id']->setDependsByArray(array('required')); $this->mFieldProperties['enq_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_ENQ_ID); if(! $root->mContext->mXoopsUser){ - $this->mFieldProperties['name'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['name'] = new XCube_FieldProperty($this); $this->mFieldProperties['name']->setDependsByArray(array('required')); $this->mFieldProperties['name']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_NAME); } - $this->mFieldProperties['choice_id'] =& new XCube_FieldProperty($this); + $this->mFieldProperties['choice_id'] = new XCube_FieldProperty($this); $this->mFieldProperties['choice_id']->setDependsByArray(array('required')); $this->mFieldProperties['choice_id']->addMessage('required', _MD_BIZPOLL_ERROR_REQUIRED, _MD_BIZPOLL_LANG_CHOICE_ID); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-04-26 14:27:13 UTC (rev 531) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-04-26 14:50:25 UTC (rev 532) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.23; +$modversion['version'] = 0.24; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[xc-tokai-svnlog] SF.net SVN: xc-tokai:[536]
modules_bizpoll/trunk/xoops_trust_path/modules/ bizpoll
From: <ki...@us...> - 2012-02-08 06:52:05
|
Revision: 536 http://xc-tokai.svn.sourceforge.net/xc-tokai/?rev=536&view=rev Author: kilica Date: 2012-02-08 06:51:59 +0000 (Wed, 08 Feb 2012) Log Message: ----------- Fix Bug : get all Detail data, not 20 data. Fix Bug : english language file Modified Paths: -------------- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/README.txt 2012-02-08 06:51:59 UTC (rev 536) @@ -18,6 +18,10 @@ \x8DX\x90V\x97\x9A\x97\xF0 -------- +0.25(2012.02.08) +\x81E\x83o\x83O\x8FC\x90\xB3\x81i\x89p\x8Cꌾ\x8C\xEA\x83t\x83@\x83C\x83\x8B\x81j +\x81E\x83o\x83O\x8FC\x90\xB3\x81i\x8FW\x8Cv\x83f\x81[\x83^\x82\xF020\x8C\x8F\x82\xB5\x82\xA9\x8E擾\x82\xB5\x82Ă\xA2\x82Ȃ\xA9\x82\xC1\x82\xBD\x81j + 0.24(2011.04.21) \x81E\x83J\x83e\x83S\x83\x8A\x96\xA2\x90ݒ莞\x82ɃA\x83\x93\x83P\x81[\x83g\x82\xF0\x8D쐬\x82\xB5\x82悤\x82Ƃ\xB7\x82\xE9\x82ƃG\x83\x89\x81[\x82ɂȂ\xC1\x82Ă\xA2\x82\xBD\x82̂\xF0\x8FC\x90\xB3 \x81EPHP5.3\x82ŏo\x82\xE9 & new \x82\xCC Warning \x82\xF0\x8FC\x90\xB3 Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/actions/PollDetailAction.class.php 2012-02-08 06:51:59 UTC (rev 536) @@ -103,7 +103,7 @@ $this->mEnqId = $this->_getId(); $handler =& $this->_getHandler(); - $criteria=$this->mFilter->getCriteria(); + $criteria=$this->mFilter->getCriteria(0, 0); //set enq_id request $criteria->add(new Criteria('enq_id', $this->_getId())); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/main.php 2012-02-08 06:51:59 UTC (rev 536) @@ -8,7 +8,7 @@ define('_MD_BIZPOLL_ERROR_REQUIRED', '{0} is required.'); define('_MD_BIZPOLL_ERROR_MINLENGTH', 'Input {0} with {1} or more characters.'); define('_MD_BIZPOLL_ERROR_MAXLENGTH', 'Input {0} with {1} or less characters.'); -define('_MD_BIZPOLL_ERROR_EXTENSION', 'Uploaded file's extension does not match any entry in the allowed list.'); +define('_MD_BIZPOLL_ERROR_EXTENSION', 'Uploaded file\'s extension does not match any entry in the allowed list.'); define('_MD_BIZPOLL_ERROR_INTRANGE', 'Incorrect input on {0}.'); define('_MD_BIZPOLL_ERROR_MIN', 'Input {0} with {1} or more numeric value.'); define('_MD_BIZPOLL_ERROR_MAX', 'Input {0} with {1} or less numeric value.'); Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/language/english/modinfo.php 2012-02-08 06:51:59 UTC (rev 536) @@ -84,6 +84,6 @@ define('_MI_BIZPOLL_BLOCK_NAME_POLLNEW', "Latest Enquete"); define('_MI_BIZPOLL_BLOCK_DESC_POLLNEW', ""); define('_MI_BIZPOLL_TITLE_CHART', "Google Chart API Setting"); -define('_MI_BIZPOLL_DESC_CHART', "Set Chart Type, Width(px), Height(px), separated with ','. Default Value:"p,400,100". 'Type' is bhs(Horizontal Bar), bvs(Vertical Bar), p(Pie) or p3(3D Pie)"); +define('_MI_BIZPOLL_DESC_CHART', "Set Chart Type, Width(px), Height(px), separated with ','. Default Value:\"p,400,100\". 'Type' is bhs(Horizontal Bar), bvs(Vertical Bar), p(Pie) or p3(3D Pie)"); ?> Modified: modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php =================================================================== --- modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2011-08-01 04:14:40 UTC (rev 535) +++ modules_bizpoll/trunk/xoops_trust_path/modules/bizpoll/xoops_version.php 2012-02-08 06:51:59 UTC (rev 536) @@ -21,7 +21,7 @@ // Define a basic manifesto. // $modversion['name'] = _MI_BIZPOLL_LANG_BIZPOLL; -$modversion['version'] = 0.24; +$modversion['version'] = 0.25; $modversion['description'] = _MI_BIZPOLL_DESC_BIZPOLL; $modversion['author'] = _MI_BIZPOLL_LANG_AUTHOR; $modversion['credits'] = _MI_BIZPOLL_LANG_CREDITS; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |