|
From: <zy...@us...> - 2013-05-15 20:47:36
|
Revision: 11547
http://sourceforge.net/p/xoops/svn/11547
Author: zyspec
Date: 2013-05-15 20:47:32 +0000 (Wed, 15 May 2013)
Log Message:
-----------
* moved hard coded language strings to language files
* added Userlog plugin for poll_id from pollresults.php and index.php
* fixed module uninstall to remove poll information from newbb forum topic
* minor code cleanup
Modified Paths:
--------------
XoopsModules/xoopspoll/branches/zyspec/admin/admin_footer.php
XoopsModules/xoopspoll/branches/zyspec/admin/admin_header.php
XoopsModules/xoopspoll/branches/zyspec/admin/main.php
XoopsModules/xoopspoll/branches/zyspec/admin/utility.php
XoopsModules/xoopspoll/branches/zyspec/blocks/multipoll.php
XoopsModules/xoopspoll/branches/zyspec/blocks/singlepoll.php
XoopsModules/xoopspoll/branches/zyspec/class/constants.php
XoopsModules/xoopspoll/branches/zyspec/class/formdatetimepicker.php
XoopsModules/xoopspoll/branches/zyspec/class/log.php
XoopsModules/xoopspoll/branches/zyspec/class/option.php
XoopsModules/xoopspoll/branches/zyspec/class/poll.php
XoopsModules/xoopspoll/branches/zyspec/class/renderer.php
XoopsModules/xoopspoll/branches/zyspec/docs/changelog.txt
XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/irmtfan/viewtopic.php
XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/trunk_4_00/viewtopic.php
XoopsModules/xoopspoll/branches/zyspec/include/onuninstall.inc.php
XoopsModules/xoopspoll/branches/zyspec/include/onupdate.inc.php
XoopsModules/xoopspoll/branches/zyspec/include/search.inc.php
XoopsModules/xoopspoll/branches/zyspec/index.php
XoopsModules/xoopspoll/branches/zyspec/language/english/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/french_iso/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/french_utf8/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/nederlands/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/persian/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/spanish/admin.php
XoopsModules/xoopspoll/branches/zyspec/language/swedish/admin.php
XoopsModules/xoopspoll/branches/zyspec/pollresults.php
XoopsModules/xoopspoll/branches/zyspec/xoops_version.php
Added Paths:
-----------
XoopsModules/xoopspoll/branches/zyspec/class/index.html
XoopsModules/xoopspoll/branches/zyspec/class/plugin/
XoopsModules/xoopspoll/branches/zyspec/class/plugin/index.html
XoopsModules/xoopspoll/branches/zyspec/class/plugin/userlog.php
Modified: XoopsModules/xoopspoll/branches/zyspec/admin/admin_footer.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/admin/admin_footer.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/admin/admin_footer.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -30,7 +30,7 @@
$moduleHandler =& xoops_gethandler('module');
$moduleInfo =& $moduleHandler->get($GLOBALS['xoopsModule']->getVar('mid'));
-//$moduleInfo =& $moduleHandler->get($xoopsModule->getVar('mid'));
+
$pathImageAdmin = '..' . DIRECTORY_SEPARATOR . $moduleInfo->getInfo('icons32');
echo "<div class='adminfooter'>\n"
Modified: XoopsModules/xoopspoll/branches/zyspec/admin/admin_header.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/admin/admin_header.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/admin/admin_header.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -14,7 +14,7 @@
* @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
* @package:: xoopspoll
* @subpackage:: admin
- * @since:: 3.11
+ * @since:: 1.32
* @author:: XOOPS Module Team
* @version:: $Id $
*
@@ -29,31 +29,13 @@
/** {@internal the following 2 file includes aren't
* required as they are done by cp_header.php}
*/
-//require_once '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'mainfile.php';
-//require_once $GLOBALS['xoops']->path( 'include' . DIRECTORY_SEPARATOR . 'cp_functions.php' );
$path = dirname(dirname(dirname(dirname(__FILE__))));
require_once $path . DIRECTORY_SEPARATOR . 'include'
. DIRECTORY_SEPARATOR . 'cp_header.php';
-/*
-require_once '..' . DIRECTORY_SEPARATOR
- . '..' . DIRECTORY_SEPARATOR
- . '..' . DIRECTORY_SEPARATOR
- . 'include' . DIRECTORY_SEPARATOR
- . 'cp_header.php';
-if (!$GLOBALS['xoopsModule'] instanceof XoopsModule) {
- $GLOBALS['xoopsModule'] =& XoopsModule::getByDirname('xoopspoll');
-}
-
-$moduleHandler =& xoops_gethandler('module');
-*/
-
/** Load language files
- * {@internal the following load is not needed,
- * it's done in ./include/cp_header.php although
- * it may change in future versions of XOOPS}
- */
+ * {@internal the following load is not needed, it's done in ./include/cp_header.php */
//xoops_loadLanguage('admin', 'xoopspoll');
xoops_loadLanguage('modinfo', 'xoopspoll');
xoops_loadLanguage('main', 'xoopspoll');
@@ -64,15 +46,14 @@
$pathModuleAdmin = $GLOBALS['xoopsModule']->getInfo('dirmoduleadmin');
// technically this isn't needed if only supporting XOOPS >= 2.5.5+
-if ( file_exists($GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php")) ){
+if (file_exists($GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php"))) {
include_once $GLOBALS['xoops']->path($pathModuleAdmin . DIRECTORY_SEPARATOR . "moduleadmin.php");
} else {
redirect_header($GLOBALS['xoops']->path('admin.php'), XoopspollConstants::REDIRECT_DELAY_LONG, _AM_XOOPSPOLL_ADMIN_MISSING, false);
}
-/*
-$admin_class = new ModuleAdmin();
-*/
+
$myts =& MyTextSanitizer::getInstance();
+
/*
if (!isset($GLOBALS['xoopsTpl']) || !$GLOBALS['xoopsTpl'] instanceof XoopsTpl) {
include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "template.php");
Modified: XoopsModules/xoopspoll/branches/zyspec/admin/main.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/admin/main.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/admin/main.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -50,14 +50,14 @@
*/
require_once 'admin_header.php';
-//include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "xoopsblock.php");
+include_once $GLOBALS['xoops']->path("class" . DIRECTORY_SEPARATOR . "xoopsblock.php");
+
xoops_load('xoopsformloader');
xoops_load('xoopslists');
xoops_load('renderer', 'xoopspoll');
xoops_load('pollUtility', 'xoopspoll');
xoops_load('request', 'xoopspoll');
-//xoops_load('constants', 'xoopspoll');
$op = XoopspollRequest::getString('op', 'list');
switch ($op) {
@@ -82,7 +82,6 @@
$xoopsTpl->assign('navigation', $admin_class->addNavigation('main.php'));
$admin_class->addItemButton(_AM_XOOPSPOLL_CREATENEWPOLL, 'main.php' . '?op=add', $icon = 'add');
-// $body = $admin_class->renderButton();
$xoopsTpl->assign('addPollButton', $admin_class->renderButton());
$renderedNav = "";
Modified: XoopsModules/xoopspoll/branches/zyspec/admin/utility.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/admin/utility.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/admin/utility.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -29,7 +29,7 @@
* @license:: {@link http://www.fsf.org/copyleft/gpl.html GNU public license}
* @package:: xoopspoll
* @subpackage:: admin
- * @since:: 2.5.0
+ * @since:: 1.40
* @author:: XOOPS Module Team
* @version:: $Id: $
*/
@@ -67,8 +67,7 @@
/* Import data from umfrage */
case 'umfrage':
- //@todo: change zero (0) constant to use XoopspollConstants::
- $ok = XoopspollRequest::getString('ok', 0, 'POST');
+ $ok = XoopspollRequest::getString('ok', XoopspollConstants::CONFIRM_NOT_OK, 'POST');
if ($ok) {
if (!$GLOBALS['xoopsSecurity']->check()) {
redirect_header($_SERVER['PHP_SELF'], XoopspollConstants::REDIRECT_DELAY_MEDIUM, implode('<br />', $GLOBALS['xoopsSecurity']->getErrors()));
@@ -88,7 +87,6 @@
if (!$s) {
throw new Exception("Could not find the umfrage db table ({$umTable})");
}
- // $success = $success && $s;
}
//setup poll objects for both umfrage and xoopspoll
@@ -159,7 +157,6 @@
$newXpId = $xpHandler->insert($xpObj);
if ($newXpId) {
-// $newXpId = $newXpObj->getVar('poll_id');
$optionIdMap = array();
/* get the options for this poll and insert them */
$umOptObjs = $umOptContainer->getAllByPollId($umPollObj->getVar('poll_id'));
@@ -182,7 +179,7 @@
$oldOptId = $umOptObj->getVar('option_id');
$optionIdMap[$oldOptId] = $newOptId;
} else{
- throw new Exception("Could not create the '" . $umOptObj->getVar('option_text') . "' option for the '" . $umPollObj->getVar('question') . "' poll.<br />" . $xpOptObj->getHtmlErrors());
+ throw new Exception(sprintf(_AM_XOOPSPOLL_OPTION_FAILED, $umOptObj->getVar('option_text'), $umPollObj->getVar('question'), "<br />" . $xpOptObj->getHtmlErrors()));
}
}
// now update the log for this poll
@@ -199,52 +196,36 @@
$xpLogObj->setVars($logValues);
$newLogId = $xpLogHandler->insert($xpLogObj);
if (!$newLogId) {
- throw new Exception("There was an error updating the logs for the '" . $umPollObj->getVar('question') . "' poll.<br />" . $xpLogObj->getHtmlErrors());
+ throw new Exception(sprintf(_AM_XOOPSPOLL_LOG_FAILED, $umPollObj->getVar('question') . "<br />" . $xpLogObj->getHtmlErrors()));
}
}
unset($optionIdMap, $umOptObjs, $allUmfrageLogObjs);
} else {
- throw new Exception("Failed to create the '" . $umPollObj->getVar('question') . "' poll in the database.<br />" . $xpObj->getHtmlErrors());
- // $err[] = "Failed to create poll in the database.";
+ throw new Exception(sprintf(_AM_XOOPSPOLL_QUESTION_FAILED, $umPollObj->getVar('question'), "<br />" . $xpObj->getHtmlErrors()));
}
} else {
- throw new Exception("The '{$umPollObj->getVar('question')}' poll was not imported.<br />" . $umPollObj->getHtmlErrors());
- //$err[] = "The '{$umPollObj->getVar('question')}' poll was not imported.";
+ throw new Exception(sprintf(_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED, $umPollObj->getVar('question'), "<br />" . $umPollObj->getHtmlErrors()));
}
unset($criteria, $umOptObjs);
}
- redirect_header('index.php', XoopspollConstants::REDIRECT_DELAY_MEDIUM, "(" . count($allUmfragePollObjs) . ") polls successfully imported from Umfrage.");
+ redirect_header('index.php', XoopspollConstants::REDIRECT_DELAY_MEDIUM, sprintf(_AM_XOOPSPOLL_IMPORT_SUCCESS, intval(count($allUmfragePollObjs))));
} else {
- throw new Exception('Please make sure umfrage is installed and active.');
- // redirect_header('index.php', XoopspollConstants::REDIRECT_DELAY_MEDIUM, 'Please make sure umfrage is installed and active.');
+ throw new Exception(_AM_XOOPSPOLL_UMFRAGE_FAILED);
}
} catch (Exception $e) {
xoops_cp_header();
$admin_class = new ModuleAdmin();
echo $admin_class->addNavigation('utility.php');
- echo "<div class='floatcenter1'>" . xoops_error($e->getMessage(), "Import Error(s)") . "</div>\n";
+ echo "<div class='floatcenter1'>" . xoops_error($e->getMessage(), _AM_XOOPSPOLL_IMPORT_FAILED) . "</div>\n";
include 'admin_footer.php';
exit();
}
-/*
- if (empty($err)) {
- redirect_header("index.php", XoopspollConstants::REDIRECT_DELAY_MEDIUM, count($allUmfragePollObjs) . " were successfully imported into Xoopspoll.");
- } else {
- xoops_cp_header();
- $admin_class = new ModuleAdmin();
- echo $admin_class->addNavigation('utility.php');
- xoops_error($err, "Import Error(s)");
- include 'admin_footer.php';
- exit();
- }
-*/
} else {
xoops_cp_header();
$admin_class = new ModuleAdmin();
echo $admin_class->addNavigation('utility.php');
xoops_confirm(array('op' => 'umfrage', 'ok' => 1), $_SERVER['PHP_SELF'], _AM_XOOPSPOLL_RUSUREUMFRAGE);
include 'admin_footer.php';
-// xoops_cp_footer();
exit();
}
break;
Modified: XoopsModules/xoopspoll/branches/zyspec/blocks/multipoll.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/blocks/multipoll.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/blocks/multipoll.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -45,7 +45,6 @@
*/
xoops_load('pollUtility', 'xoopspoll');
xoops_load('constants', 'xoopspoll');
-//xoops_load('log', 'xoopspoll');
/**
*
@@ -212,7 +211,7 @@
* @param array options contains settings for block display (init in xoopsversion.php and saved in db)
* @return string HTML form for display by block admin
*/
-function xoopspollBlockMultiEdit( $options )
+function xoopspollBlockMultiEdit($options)
{
/**
* Options[]
Modified: XoopsModules/xoopspoll/branches/zyspec/blocks/singlepoll.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/blocks/singlepoll.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/blocks/singlepoll.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -89,7 +89,7 @@
return $block;
}
} else {
- $pollObj = $pollHandler->get( (int)($options[1]));
+ $pollObj = $pollHandler->get((int)($options[1]));
}
if ($pollObj instanceof XoopspollPoll) {
@@ -202,7 +202,7 @@
* @param array options contains settings for block display (init in xoopsversion.php and saved in db)
* @return string HTML form for display by block admin
*/
-function xoopspollBlockSinglepollEdit( $options )
+function xoopspollBlockSinglepollEdit($options)
{
/**
* Options[]
Modified: XoopsModules/xoopspoll/branches/zyspec/class/constants.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/constants.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/constants.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -175,5 +175,13 @@
* look up host
*/
const LOOK_UP_HOST = 1;
+ /**
+ * confirm not ok to take action
+ */
+ const CONFIRM_NOT_OK = 0;
+ /**
+ * confirm ok to take action
+ */
+ const CONFIRM_OK = 1;
/**#@-*/
}
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/class/formdatetimepicker.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/formdatetimepicker.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/formdatetimepicker.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -77,12 +77,12 @@
$moduleConfig =& $config_handler->getConfigsByCat(0, $sys_module->getVar('mid'));
$jq_theme_dir = $moduleConfig['jquery_theme'];
- $GLOBALS['xoTheme']->addStylesheet( $GLOBALS['xoops']->url("modules/system/css/ui/{$jq_theme_dir}/ui.all.css") );
+ $GLOBALS['xoTheme']->addStylesheet($GLOBALS['xoops']->url("modules/system/css/ui/{$jq_theme_dir}/ui.all.css"));
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/jquery.js');
$GLOBALS['xoTheme']->addScript('browse.php?Frameworks/jquery/plugins/jquery.ui.js');
$GLOBALS['xoTheme']->addScript('browse.php?modules/xoopspoll/js/jquery-ui-timepicker-addon.js');
$GLOBALS['xoTheme']->addScript('browse.php?modules/xoopspoll/js/jquery-ui-sliderAccess.js');
- $GLOBALS['xoTheme']->addStylesheet( $GLOBALS['xoops']->url('modules/xoopspoll/css/datetimepicker.css'));
+ $GLOBALS['xoTheme']->addStylesheet($GLOBALS['xoops']->url('modules/xoopspoll/css/datetimepicker.css'));
if (!$included) {
$included = true;
Added: XoopsModules/xoopspoll/branches/zyspec/class/index.html
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/index.html (rev 0)
+++ XoopsModules/xoopspoll/branches/zyspec/class/index.html 2013-05-15 20:47:32 UTC (rev 11547)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/class/log.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/log.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/log.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -59,7 +59,7 @@
$this->initVar('ip', XOBJ_DTYPE_OTHER, null);
$this->initVar('user_id', XOBJ_DTYPE_INT, 0);
$this->initVar('time', XOBJ_DTYPE_INT, null);
- if (!empty($id) && is_array($id) ) {
+ if (!empty($id) && is_array($id)) {
$this->assignVars($id);
}
}
Modified: XoopsModules/xoopspoll/branches/zyspec/class/option.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/option.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/option.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -274,7 +274,7 @@
$GLOBALS['xoops']->path( "modules" . DIRECTORY_SEPARATOR
. "xoopspoll" . DIRECTORY_SEPARATOR
. "images" . DIRECTORY_SEPARATOR
- . "colorbars" . DIRECTORY_SEPARATOR )
+ . "colorbars" . DIRECTORY_SEPARATOR)
);
/**
@@ -294,7 +294,7 @@
unset($thisBarColorArray[$currentBar]);
$thisObj->setVar('option_color', $currentBar);
$optionObjs[] = $thisObj;
- if ( empty($thisBarColorArray) ) {
+ if (empty($thisBarColorArray)) {
$thisBarColorArray = $barcolor_array;
unset($thisBarColorArray['blank.gif']);
}
Added: XoopsModules/xoopspoll/branches/zyspec/class/plugin/index.html
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/plugin/index.html (rev 0)
+++ XoopsModules/xoopspoll/branches/zyspec/class/plugin/index.html 2013-05-15 20:47:32 UTC (rev 11547)
@@ -0,0 +1 @@
+ <script>history.go(-1);</script>
\ No newline at end of file
Added: XoopsModules/xoopspoll/branches/zyspec/class/plugin/userlog.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/plugin/userlog.php (rev 0)
+++ XoopsModules/xoopspoll/branches/zyspec/class/plugin/userlog.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -0,0 +1,51 @@
+<?php
+/*
+ You may not change or alter any portion of this comment or credits
+ of supporting developers from this source code or any supporting source code
+ which is considered copyrighted (c) material of the original comment or credit authors.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+*/
+/**
+ * userlog module
+ *
+ * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/
+ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html)
+ * @package newbb class plugin
+ * @since 4.31
+ * @author irmtfan (ir...@ya...)
+ * @author The XOOPS Project <www.xoops.org> <www.xoops.ir>
+ * @version $Id: userlog.php 4.31 2013/05/08 16:25:04Z irmtfan $
+ */
+
+defined('XOOPS_ROOT_PATH') or die('Restricted access');
+
+class XoopspollUserlogPlugin extends Userlog_Module_Plugin_Abstract implements UserlogPluginInterface
+{
+ /**
+ * @param string $subscribe_from Name of the script
+ *
+ * 'name' => 'thread';
+ * 'title' => _MI_NEWBB_THREAD_NOTIFY;
+ * 'description' => _MI_NEWBB_THREAD_NOTIFYDSC;
+ * 'subscribe_from' => 'viewtopic.php';
+ * 'item_name' => 'topic_id';
+ * 'allow_bookmark' => 1;
+ *
+ * @return array $item["item_name"] name of the item, $item["item_id"] id of the item
+ */
+ public function item($subscribe_from)
+ {
+ xoops_load('request', 'xoopspoll');
+ $poll_id = XoopspollRequest::getInt('poll_id', 0);
+ switch ($subscribe_from) {
+ case "index.php":
+ case "pollresults.php":
+ return array("item_name"=>"poll_id", "item_id"=>$poll_id);
+ break;
+ }
+ return false;
+ }
+}
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/class/poll.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/poll.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/poll.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -263,7 +263,7 @@
$author = new XoopsUser($this->getVar('user_id'));
/* setup time variables */
- $timeTray = new XoopsFormElementTray( _AM_XOOPSPOLL_POLL_TIMES, " ", "time_tray" );
+ $timeTray = new XoopsFormElementTray( _AM_XOOPSPOLL_POLL_TIMES, " ", "time_tray");
$xuCurrentTimestamp = xoops_getUserTimestamp(time());
$xuCurrentFormatted = ucfirst(date(_MEDIUMDATESTRING, $xuCurrentTimestamp));
@@ -333,7 +333,7 @@
$pollForm->addElement(new XoopsFormHidden('poll_id', $this->getVar('poll_id')));
$pollForm->addElement(new XoopsFormHidden('user_id', $this->getVar('user_id')));
$pollForm->addElement(new XoopsFormButtonTray('submit', _SUBMIT, null, null, true));
-// $pollForm->addElement(new XoopsFormButtonTray( "form_submit", _SUBMIT, "submit", "", true ));
+// $pollForm->addElement(new XoopsFormButtonTray( "form_submit", _SUBMIT, "submit", "", true));
return $pollForm->display();
}
/**
@@ -551,20 +551,20 @@
xoops_load('constants', 'xoopspoll');
$criteria = new CriteriaCompo();
- $criteria->add( new Criteria('end_time', time(), '<')); // expired polls
- $criteria->add( new Criteria('mail_status', XoopspollConstants::POLL_NOT_MAILED, '=') ); // email not previously sent
+ $criteria->add(new Criteria('end_time', time(), '<')); // expired polls
+ $criteria->add(new Criteria('mail_status', XoopspollConstants::POLL_NOT_MAILED, '=')); // email not previously sent
if (!empty($pollObj) && ($pollObj instanceof XoopspollPoll)) {
- $criteria->add( new Criteria('poll_id', $pollObj->getVar('poll_id'), '='));
+ $criteria->add(new Criteria('poll_id', $pollObj->getVar('poll_id'), '='));
$criteria->setLimit(1);
}
$pollObjs = $this->getAll($criteria);
$tplFile = 'mail_results.tpl';
- if (file_exists($GLOBALS['xoops']->path( "modules" . DIRECTORY_SEPARATOR
- . "xoopspoll" . DIRECTORY_SEPARATOR
- . "language" . DIRECTORY_SEPARATOR
- . $GLOBALS['xoopsConfig']['language'] . DIRECTORY_SEPARATOR
- . "mail_template" . DIRECTORY_SEPARATOR
- . $tplFile )))
+ if (file_exists($GLOBALS['xoops']->path("modules" . DIRECTORY_SEPARATOR
+ . "xoopspoll" . DIRECTORY_SEPARATOR
+ . "language" . DIRECTORY_SEPARATOR
+ . $GLOBALS['xoopsConfig']['language'] . DIRECTORY_SEPARATOR
+ . "mail_template" . DIRECTORY_SEPARATOR
+ . $tplFile)))
{
$lang = $GLOBALS['xoopsConfig']['language'];
} else {
@@ -577,11 +577,11 @@
// setup mailer
$xoopsMailer = xoops_getMailer();
$xoopsMailer->useMail();
- $xoopsMailer->setTemplateDir($GLOBALS['xoops']->path( "modules" . DIRECTORY_SEPARATOR
- . "xoopspoll" . DIRECTORY_SEPARATOR
- . "language" . DIRECTORY_SEPARATOR
- . $lang . DIRECTORY_SEPARATOR
- . "mail_template" . DIRECTORY_SEPARATOR)
+ $xoopsMailer->setTemplateDir($GLOBALS['xoops']->path("modules" . DIRECTORY_SEPARATOR
+ . "xoopspoll" . DIRECTORY_SEPARATOR
+ . "language" . DIRECTORY_SEPARATOR
+ . $lang . DIRECTORY_SEPARATOR
+ . "mail_template" . DIRECTORY_SEPARATOR)
);
$xoopsMailer->setTemplate($tplFile);
Modified: XoopsModules/xoopspoll/branches/zyspec/class/renderer.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/class/renderer.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/class/renderer.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -181,7 +181,7 @@
$optObjsArray = $this->oHandler->getAll($criteria);
$total = $this->pollObj->getVar('votes');
$i = 0;
- foreach ($optObjsArray as $optObj ) {
+ foreach ($optObjsArray as $optObj) {
$optionVars = $optObj->getValues();
$percent = ($total > 0) ? (100 * $optionVars['option_count'] / $total) : 0;
if ($percent > 0) {
Modified: XoopsModules/xoopspoll/branches/zyspec/docs/changelog.txt
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/docs/changelog.txt 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/docs/changelog.txt 2013-05-15 20:47:32 UTC (rev 11547)
@@ -1,4 +1,4 @@
-v1.40 ALPHA (ZySpec) 2013/04/30
+v1.40 ALPHA (ZySpec) 2013/05/15
=================================
+ added ability to change poll results visibility
++ results always visible
@@ -23,6 +23,7 @@
+ added ability to select XoopsEditors to enable HTML in poll descriptions
+ added ability to hide polls created with forum (newbb) from frontside of polls module
+ added obscured graphic to hide votes/voters polls that don't have visible results
++ added Userlog plugin for poll_id from pollresults.php and index.php
+ fixed sorting bug when displaying log in admin
+ fixed bug where users could vote on expired polls
+ fixed bug where 'anonymous' table column wasn't created on module update
Modified: XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/irmtfan/viewtopic.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/irmtfan/viewtopic.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/irmtfan/viewtopic.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -455,18 +455,15 @@
&& $topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "vote"))
|| ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll")))
{
- /*@TODO: Need to check to see if poll actually exists. Several error conditions
- * could exist:
- * - It may have been deleted via poll module interface
- * - The poll module may have been uninstalled and re-installed
- */
if ('xoopspoll' == $pollmodules) {
+/*
xoops_load('poll', 'xoopspoll');
xoops_load('option', 'xoopspoll');
-// xoops_load('log', 'xoopspoll');
- xoops_load('renderer', 'xoopspoll');
+ xoops_load('log', 'xoopspoll');
xoops_load('pollUtility', 'xoopspoll');
xoops_load('constants', 'xoopspoll');
+*/
+ xoops_load('renderer', 'xoopspoll');
xoops_loadLanguage('main', 'xoopspoll');
} else {
@include_once $GLOBALS['xoops']->path("modules/umfrage/class/umfrage.php");
@@ -477,6 +474,7 @@
}
if ($topic_obj->getVar('topic_haspoll')
+ && (0 != $topic_obj->getVar('poll_id')) // double check to make sure it's a non-zero poll
&& $topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "vote"))
{
$GLOBALS['xoopsTpl']->assign('topic_poll', 1);
@@ -486,51 +484,52 @@
$xpollHandler =& xoops_getmodulehandler('poll', 'xoopspoll');
$poll_obj = $xpollHandler->get($topic_obj->getVar('poll_id'));
+ if (!empty($poll_obj) && $poll_obj instanceof XoopspollPoll) {
- /* check to see if user has rights to view the results */
- $vis_return = $poll_obj->isResultVisible();
- $isVisible = (true === $vis_return) ? true : false;
- $visibleMsg = ($isVisible) ? "" : $vis_return;
+ /* check to see if user has rights to view the results */
+ $vis_return = $poll_obj->isResultVisible();
+ $isVisible = (true === $vis_return) ? true : false;
+ $visibleMsg = ($isVisible) ? "" : $vis_return;
- /* setup the module config handler */
- $config_handler =& xoops_gethandler("config");
- $xp_config =& $config_handler->getConfigsByCat(0, $xoopspoll->getVar("mid"));
+ /* setup the module config handler */
+ $config_handler =& xoops_gethandler("config");
+ $xp_config =& $config_handler->getConfigsByCat(0, $xoopspoll->getVar("mid"));
- $GLOBALS['xoopsTpl']->assign(array(
- 'is_visible' => $isVisible,
- 'visible_message' => $visibleMsg,
- 'disp_votes' => $xp_config['disp_vote_nums'],
- 'lang_vote' => _MD_XOOPSPOLL_VOTE,
- 'lang_results' => _MD_XOOPSPOLL_RESULTS,
- 'back_link' => "")
- );
- $renderer = new XoopspollRenderer($poll_obj);
-// $renderer->assignResults($GLOBALS['xoopsTpl']);
- //check to see if user has voted, show form if not, otherwise get results for form
+ $GLOBALS['xoopsTpl']->assign(array(
+ 'is_visible' => $isVisible,
+ 'visible_message' => $visibleMsg,
+ 'disp_votes' => $xp_config['disp_vote_nums'],
+ 'lang_vote' => _MD_XOOPSPOLL_VOTE,
+ 'lang_results' => _MD_XOOPSPOLL_RESULTS,
+ 'back_link' => "")
+ );
+ $renderer = new XoopspollRenderer($poll_obj);
+// $renderer->assignResults($GLOBALS['xoopsTpl']);
+ // check to see if user has voted, show form if not, otherwise get results for form
- $logHandler =& xoops_getmodulehandler('log', 'xoopspoll');
- if ($poll_obj->isAllowedToVote() && (!$logHandler->hasVoted($poll_obj->getVar('poll_id'), xoops_getenv('REMOTE_ADDR'), $uid))) {
+ $logHandler =& xoops_getmodulehandler('log', 'xoopspoll');
+ if ($poll_obj->isAllowedToVote() && (!$logHandler->hasVoted($poll_obj->getVar('poll_id'), xoops_getenv('REMOTE_ADDR'), $uid))) {
/*
- $renderer->assignForm($GLOBALS['xoopsTpl']);
- $GLOBALS['xoopsTpl']->assign('topic_pollresult', null);
+ $renderer->assignForm($GLOBALS['xoopsTpl']);
+ $GLOBALS['xoopsTpl']->assign('topic_pollresult', null);
*/
-// $GLOBALS['xoopsTpl']->assign('can_vote', true);
-// $GLOBALS['xoopsTpl']->assign('topic_pollform', $renderer->renderForm());
- $myTpl = new XoopsTpl();
- $renderer->assignForm($myTpl);
- $myTpl->assign('action', $GLOBALS['xoops']->url("modules/newbb/votepolls.php?topic_id={$topic_id}&poll_id={$poll_id}"));
- $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR
- . 'xoopspoll' . DIRECTORY_SEPARATOR
- . 'templates' . DIRECTORY_SEPARATOR
- . 'xoopspoll_view.html')
- );
- $GLOBALS['xoopsTpl']->assign('topic_pollform', $topic_pollform);
- } else {
-// $renderer->assignResults($GLOBALS['xoopsTpl']);
- $GLOBALS['xoopsTpl']->assign('can_vote', false);
- $GLOBALS['xoopsTpl']->assign('topic_pollresult', $renderer->renderResults());
+// $GLOBALS['xoopsTpl']->assign('can_vote', true);
+// $GLOBALS['xoopsTpl']->assign('topic_pollform', $renderer->renderForm());
+ $myTpl = new XoopsTpl();
+ $renderer->assignForm($myTpl);
+ $myTpl->assign('action', $GLOBALS['xoops']->url("modules/newbb/votepolls.php?topic_id={$topic_id}&poll_id={$poll_id}"));
+ $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR
+ . 'xoopspoll' . DIRECTORY_SEPARATOR
+ . 'templates' . DIRECTORY_SEPARATOR
+ . 'xoopspoll_view.html')
+ );
+ $GLOBALS['xoopsTpl']->assign('topic_pollform', $topic_pollform);
+ } else {
+// $renderer->assignResults($GLOBALS['xoopsTpl']);
+ $GLOBALS['xoopsTpl']->assign('can_vote', false);
+ $GLOBALS['xoopsTpl']->assign('topic_pollresult', $renderer->renderResults());
+ }
}
- /************************************************/
} else { //Umfrage
$poll_obj = new Umfrage($topic_obj->getVar('poll_id'));
Modified: XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/trunk_4_00/viewtopic.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/trunk_4_00/viewtopic.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/extras/newbb_4x/trunk_4_00/viewtopic.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -353,20 +353,19 @@
&& $topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "vote"))
|| ($topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "addpoll")))
{
- /*@TODO: Need to check to see if poll actually exists. Several error conditions
- * could exist:
- * - The poll module may have been uninstalled and re-installed
- */
+/*
xoops_load('poll', 'xoopspoll');
xoops_load('option', 'xoopspoll');
-// xoops_load('log', 'xoopspoll');
- xoops_load('renderer', 'xoopspoll');
+ xoops_load('log', 'xoopspoll');
xoops_load('pollUtility', 'xoopspoll');
xoops_load('constants', 'xoopspoll');
+*/
+ xoops_load('renderer', 'xoopspoll');
xoops_loadLanguage('main', 'xoopspoll');
}
if ($topic_obj->getVar('topic_haspoll')
+ && (0 != $topic_obj->getVar('poll_id')) // double check to make sure it's a non-zero poll
&& $topic_handler->getPermission($forum_obj, $topic_obj->getVar('topic_status'), "vote"))
{
$GLOBALS['xoopsTpl']->assign('topic_poll', 1);
@@ -375,40 +374,42 @@
$xpollHandler =& xoops_getmodulehandler('poll', 'xoopspoll');
$poll_obj = $xpollHandler->get($topic_obj->getVar('poll_id'));
+ if (!empty($poll_obj) && $poll_obj instanceof XoopspollPoll) {
- /* check to see if user has rights to view the results */
- $vis_return = $poll_obj->isResultVisible();
- $isVisible = (true === $vis_return) ? true : false;
- $visibleMsg = ($isVisible) ? "" : $vis_return;
+ /* check to see if user has rights to view the results */
+ $vis_return = $poll_obj->isResultVisible();
+ $isVisible = (true === $vis_return) ? true : false;
+ $visibleMsg = ($isVisible) ? "" : $vis_return;
- /* setup the module config handler */
- $config_handler =& xoops_gethandler("config");
- $xp_config =& $config_handler->getConfigsByCat(0, $xoopspoll->getVar("mid"));
+ /* setup the module config handler */
+ $config_handler =& xoops_gethandler("config");
+ $xp_config =& $config_handler->getConfigsByCat(0, $xoopspoll->getVar("mid"));
- $GLOBALS['xoopsTpl']->assign(array(
- 'is_visible' => $isVisible,
- 'visible_message' => $visibleMsg,
- 'disp_votes' => $xp_config['disp_vote_nums'],
- 'lang_vote' => _MD_XOOPSPOLL_VOTE,
- 'lang_results' => _MD_XOOPSPOLL_RESULTS,
- 'back_link' => "")
- );
- $renderer = new XoopspollRenderer($poll_obj);
- //check to see if user has voted, show form if not, otherwise get results for form
- $logHandler =& xoops_getmodulehandler('log', 'xoopspoll');
- if ($poll_obj->isAllowedToVote() && (!$logHandler->hasVoted($poll_obj->getVar('poll_id'), xoops_getenv('REMOTE_ADDR'), $uid))) {
- $myTpl = new XoopsTpl();
- $renderer->assignForm($myTpl);
- $myTpl->assign('action', $GLOBALS['xoops']->url("modules/newbb/votepolls.php?topic_id={$topic_id}&poll_id={$poll_id}"));
- $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR
- . 'xoopspoll' . DIRECTORY_SEPARATOR
- . 'templates' . DIRECTORY_SEPARATOR
- . 'xoopspoll_view.html')
+ $GLOBALS['xoopsTpl']->assign(array(
+ 'is_visible' => $isVisible,
+ 'visible_message' => $visibleMsg,
+ 'disp_votes' => $xp_config['disp_vote_nums'],
+ 'lang_vote' => _MD_XOOPSPOLL_VOTE,
+ 'lang_results' => _MD_XOOPSPOLL_RESULTS,
+ 'back_link' => "")
);
- $GLOBALS['xoopsTpl']->assign('topic_pollform', $topic_pollform);
- } else {
- $GLOBALS['xoopsTpl']->assign('can_vote', false);
- $GLOBALS['xoopsTpl']->assign('topic_pollresult', $renderer->renderResults());
+ $renderer = new XoopspollRenderer($poll_obj);
+ //check to see if user has voted, show form if not, otherwise get results for form
+ $logHandler =& xoops_getmodulehandler('log', 'xoopspoll');
+ if ($poll_obj->isAllowedToVote() && (!$logHandler->hasVoted($poll_obj->getVar('poll_id'), xoops_getenv('REMOTE_ADDR'), $uid))) {
+ $myTpl = new XoopsTpl();
+ $renderer->assignForm($myTpl);
+ $myTpl->assign('action', $GLOBALS['xoops']->url("modules/newbb/votepolls.php?topic_id={$topic_id}&poll_id={$poll_id}"));
+ $topic_pollform = $myTpl->fetch($GLOBALS['xoops']->path('modules' . DIRECTORY_SEPARATOR
+ . 'xoopspoll' . DIRECTORY_SEPARATOR
+ . 'templates' . DIRECTORY_SEPARATOR
+ . 'xoopspoll_view.html')
+ );
+ $GLOBALS['xoopsTpl']->assign('topic_pollform', $topic_pollform);
+ } else {
+ $GLOBALS['xoopsTpl']->assign('can_vote', false);
+ $GLOBALS['xoopsTpl']->assign('topic_pollresult', $renderer->renderResults());
+ }
}
}
Modified: XoopsModules/xoopspoll/branches/zyspec/include/onuninstall.inc.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/include/onuninstall.inc.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/include/onuninstall.inc.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -20,8 +20,23 @@
* @version:: $Id: $
*/
-/* clear the voted cookie(s) for the admin user's machine when module is uninstalled */
+function xoops_module_pre_uninstall_xoopspoll(&$module) {
+ /* make sure that any polls associated with xoopspoll are cleared from newbb */
+ $module_handler = &xoops_gethandler('module');
+ $newbbModule = &$module_handler->getByDirname('newbb');
+ $success = true;
+ if (is_object($newbbModule) && $newbbModule->getVar('isactive')) {
+ $topic_handler = xoops_getmodulehandler('topic', 'newbb');
+ $criteria = new Criteria('topic_haspoll', 0, '>');
+ $s1 = $topic_handler->updateAll('poll_id', 0, $criteria); // clear any polls associated with forum topic
+ $s2 = $topic_handler->updateAll('topic_haspoll', 0, $criteria); // clear haspoll indicator in forum
+ $success = $s1 && $s2;
+ }
+ return $success;
+}
+
function xoops_module_uninstall_xoopspoll(&$module) {
+ /* clear the voted cookie(s) for the admin user's machine when module is uninstalled */
xoops_load('pollUtility', 'xoopspoll');
$success = XoopspollPollUtility::setVoteCookie("", null, (time() - 3600));
return $success;
Modified: XoopsModules/xoopspoll/branches/zyspec/include/onupdate.inc.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/include/onupdate.inc.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/include/onupdate.inc.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -36,7 +36,7 @@
if (!$success) {
$modHandler =& xoops_getmodulehandler("module");
$xoopspollModule =& $modHandler->getByDirname("xoopspoll");
- $xoopspollModule->setErrors(sprintf(_AM_XOOPSPOLL_UPGRADEFAILED, $fromTable));
+ $xoopspollModule->setErrors(sprintf(_AM_XOOPSPOLL_UPGRADE_FAILED, $fromTable));
}
}
return $success;
@@ -47,7 +47,7 @@
// referer check
$success = false;
$ref = xoops_getenv('HTTP_REFERER');
- if ( ('' == $ref) || 0 === mb_strpos( $ref , $GLOBALS['xoops']->url('modules/system/admin.php')) ) {
+ if (('' == $ref) || 0 === mb_strpos($ref , $GLOBALS['xoops']->url('modules/system/admin.php'))) {
/* module specific part */
require_once $GLOBALS['xoops']->path("modules" . DIRECTORY_SEPARATOR
. "xoopspoll" . DIRECTORY_SEPARATOR
Modified: XoopsModules/xoopspoll/branches/zyspec/include/search.inc.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/include/search.inc.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/include/search.inc.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -73,7 +73,7 @@
$criteria->setLimit(intval($limit));
$criteria->setStart(intval($offset));
- if ( (is_array($queryArray)) && !empty($queryArray)) {
+ if ((is_array($queryArray)) && !empty($queryArray)) {
$criteria->add(new Criteria('question', "%{$queryArray[0]}%", 'LIKE'));
$criteria->add(new Criteria('description', "%{$queryArray[0]}%", 'LIKE'), 'OR');
array_shift($queryArray); //get rid of first element
Modified: XoopsModules/xoopspoll/branches/zyspec/index.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/index.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/index.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -59,7 +59,7 @@
if (empty($pollId)) {
$GLOBALS['xoopsOption']['template_main'] = 'xoopspoll_index.html';
- include $GLOBALS['xoops']->path( 'header.php' );
+ include $GLOBALS['xoops']->path('header.php');
$GLOBALS['xoopsTpl']->assign(array(
'lang_pollslist' => _MD_XOOPSPOLL_POLLSLIST,
'lang_pollquestion' => _MD_XOOPSPOLL_POLLQUESTION,
@@ -246,5 +246,5 @@
'can_vote' => $canVote,
'lang_multi' => $lang_multi)
);
- include $GLOBALS['xoops']->path( 'footer.php' );
+ include $GLOBALS['xoops']->path('footer.php');
}
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/english/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/english/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/english/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -124,4 +124,11 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
\ No newline at end of file
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/french_iso/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/french_iso/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/french_iso/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -135,5 +135,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/french_utf8/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/french_utf8/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/french_utf8/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -132,5 +132,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/nederlands/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/nederlands/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/nederlands/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -129,5 +129,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/persian/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/persian/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/persian/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -152,5 +152,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/spanish/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/spanish/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/spanish/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -128,5 +128,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/language/swedish/admin.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/language/swedish/admin.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/language/swedish/admin.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -128,5 +128,12 @@
define('_AM_XOOPSPOLL_MAINTAINTED_TEXT', "XOOPS Community");
//install/upgrade
-define('_AM_XOOPSPOLL_UPGRADEFAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_UPGRADE_FAILED', "Database %s table update failed.");
+define('_AM_XOOPSPOLL_LOG_FAILED', "There was an error updating the logs for the '%s' poll.");
+define('_AM_XOOPSPOLL_OPTION_FAILED', "Could not create the '%s' option for the '%s' poll. %s");
+define('_AM_XOOPSPOLL_QUESTION_FAILED', "Failed to create the '%s' poll in the database. %s");
+define('_AM_XOOPSPOLL_QUESTION_IMPORT_FAILED', "The '%s' poll was not imported. %s");
+define('_AM_XOOPSPOLL_UMFRAGE_FAILED', "Please make sure umfrage is installed and active.");
+define('_AM_XOOPSPOLL_IMPORT_FAILED', "Import Error(s)");
+define('_AM_XOOPSPOLL_IMPORT_SUCCESS', "(%d) polls successfully imported from Umfrage.");
/**#@-*/
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/pollresults.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/pollresults.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/pollresults.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -67,7 +67,7 @@
exit();
}
$GLOBALS['xoopsOption']['template_main'] = 'xoopspoll_results.html';
-include $GLOBALS['xoops']->path( "header.php" );
+include $GLOBALS['xoops']->path("header.php");
$pollHandler =& xoops_getmodulehandler('poll', 'xoopspoll');
$pollObj = $pollHandler->get($pollId);
@@ -96,5 +96,5 @@
} else {
redirect_header('index.php', XoopspollConstants::REDIRECT_DELAY_MEDIUM, _MD_XOOPSPOLL_ERROR_INVALID_POLLID);
}
-include $GLOBALS['xoops']->path( 'include' . DIRECTORY_SEPARATOR . 'comment_view.php' );
-include $GLOBALS['xoops']->path( 'footer.php' );
\ No newline at end of file
+include $GLOBALS['xoops']->path('include' . DIRECTORY_SEPARATOR . 'comment_view.php');
+include $GLOBALS['xoops']->path('footer.php');
\ No newline at end of file
Modified: XoopsModules/xoopspoll/branches/zyspec/xoops_version.php
===================================================================
--- XoopsModules/xoopspoll/branches/zyspec/xoops_version.php 2013-05-15 05:40:22 UTC (rev 11546)
+++ XoopsModules/xoopspoll/branches/zyspec/xoops_version.php 2013-05-15 20:47:32 UTC (rev 11547)
@@ -38,7 +38,7 @@
* @version:: $Id$
**/
-defined( 'XOOPS_ROOT_PATH' ) or die( 'Restricted access' );
+defined ('XOOPS_ROOT_PATH') or die('Restricted access');
$modversion['name'] = _MI_XOOPSPOLL_NAME;
$modversion['description'] = _MI_XOOPSPOLL_DESC;
@@ -82,7 +82,7 @@
$modversion['demo_site_name'] = '';
$modversion['module_website_url'] = 'xoops.org';
$modversion['module_website_name'] = 'XOOPS';
-$modversion['release_date'] = '2013/04/30';
+$modversion['release_date'] = '2013/05/15';
$modversion['module_status'] = 'ALPHA 5';
$modversion["author_website_url"] = 'http://www.myweb.ne.jp';
$modversion["author_website_name"] = 'Kazumi Ono';
|