|
From: <luc...@us...> - 2014-01-03 22:42:55
|
Revision: 12253
http://sourceforge.net/p/xoops/svn/12253
Author: luciorota
Date: 2014-01-03 22:42:52 +0000 (Fri, 03 Jan 2014)
Log Message:
-----------
improved admin modifications manager IN PROGRESS
added: confirmation when ignore/delete modification
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/header.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/admin_header.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -19,61 +19,22 @@
* @version svn:$id$
*/
include_once dirname(dirname(dirname(dirname(__FILE__)))) . '/mainfile.php';
+include_once dirname(dirname(__FILE__)) . '/include/common.php';
// Include xoops admin header
include_once XOOPS_ROOT_PATH . '/include/cp_header.php';
-include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
-include_once XOOPS_ROOT_PATH . '/class/tree.php';
-include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
-xoops_load ('XoopsUserUtility');
-$myts = &MyTextSanitizer::getInstance();
-$module_handler =& xoops_gethandler('module');
-$xoopsModule =& $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
-
-$pathIcon16 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons16');
-$pathIcon32 = XOOPS_URL . '/' . $xoopsModule->getInfo('icons32');
-$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $xoopsModule->getInfo('dirmoduleadmin');
+$pathIcon16 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons16');
+$pathIcon32 = XOOPS_URL . '/' . $wfdownloads->getModule()->getInfo('icons32');
+$pathModuleAdmin = XOOPS_ROOT_PATH . '/' . $wfdownloads->getModule()->getInfo('dirmoduleadmin');
require_once $pathModuleAdmin . '/moduleadmin/moduleadmin.php';
-include_once dirname(dirname(__FILE__)) . '/include/common.php';
-
-/*$imagearray = array(
- 'editimg' => "<img src='" . $pathIcon16 . '/edit.png'."' alt='" . _AM_WFDOWNLOADS_ICO_EDIT . "' title='" . _AM_WFDOWNLOADS_ICO_EDIT . "' align='middle'>",
- 'deleteimg' => "<img src='" . $pathIcon16 . '/delete.png'."' alt='" . _AM_WFDOWNLOADS_ICO_DELETE . "' title='" . _AM_WFDOWNLOADS_ICO_DELETE . "' align='middle'>",
- 'online' => "<img src='" . $pathIcon16 . '/1.png'."' alt='" . _AM_WFDOWNLOADS_ICO_ONLINE . "' title='" . _AM_WFDOWNLOADS_ICO_ONLINE . "' align='middle'>",
- 'offline' => "<img src='" . $pathIcon16 . '/0.png'."' alt='" . _AM_WFDOWNLOADS_ICO_OFFLINE . "' title='" . _AM_WFDOWNLOADS_ICO_OFFLINE . "' align='middle'>",
- 'approved' => "<img src='" . $pathIcon16 . '/on.png'."' alt=''" . _AM_WFDOWNLOADS_ICO_APPROVED . "' title=''" . _AM_WFDOWNLOADS_ICO_APPROVED . "' align='middle'>",
- 'notapproved' => "<img src='" . $pathIcon16 . '/off.png'."' alt='" . _AM_WFDOWNLOADS_ICO_NOTAPPROVED . "' title='" . _AM_WFDOWNLOADS_ICO_NOTAPPROVED . "' align='middle'>",
- 'relatedfaq' => "<img src='../images/icon/link.png' alt='" . _AM_WFDOWNLOADS_ICO_LINK . "' title='" . _AM_WFDOWNLOADS_ICO_LINK . "' align='middle'>",
- 'relatedurl' => "<img src='../images/icon/world_link.png' alt='" . _AM_WFDOWNLOADS_ICO_URL . "' title='" . _AM_WFDOWNLOADS_ICO_URL . "' align='middle'>",
- 'addfaq' => "<img src='" . $pathIcon16 . '/add.png'."' alt='" . _AM_WFDOWNLOADS_ICO_ADD . "' title='" . _AM_WFDOWNLOADS_ICO_ADD . "' align='middle'>",
- 'approve' => "<img src='" . $pathIcon16 . '/on.png'."' alt='" . _AM_WFDOWNLOADS_ICO_APPROVE . "' title='" . _AM_WFDOWNLOADS_ICO_APPROVE . "' align='middle'>",
- 'statsimg' => "<img src='../images/icon/statistics.png' alt='" . _AM_WFDOWNLOADS_ICO_STATS . "' title='" . _AM_WFDOWNLOADS_ICO_STATS . "' align='middle'>",
- 'ignore' => "<img src='../images/icon/ignore.png' alt='" . _AM_WFDOWNLOADS_ICO_IGNORE . "' title='" . _AM_WFDOWNLOADS_ICO_IGNORE . "' align='middle'>",
- 'ack_yes' => "<img src='" . $pathIcon16 . '/on.png'."' alt='" . _AM_WFDOWNLOADS_ICO_ACK . "' title='" . _AM_WFDOWNLOADS_ICO_ACK . "' align='middle'>",
- 'ack_no' => "<img src='" . $pathIcon16 . '/off.png'."' alt='" . _AM_WFDOWNLOADS_ICO_REPORT . "' title='" . _AM_WFDOWNLOADS_ICO_REPORT . "' align='middle'>",
- 'con_yes' => "<img src='" . $pathIcon16 . '/on.png'."' alt='" . _AM_WFDOWNLOADS_ICO_CONFIRM . "' title='" . _AM_WFDOWNLOADS_ICO_CONFIRM . "' align='middle'>",
- 'con_no' => "<img src='" . $pathIcon16 . '/off.png'."' alt='" . _AM_WFDOWNLOADS_ICO_CONBROKEN . "' title='" . _AM_WFDOWNLOADS_ICO_CONBROKEN . "' align='middle'>"
- );*/
-
-//if ( file_exists($GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php'))) {
-// include_once $GLOBALS['xoops']->path('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/moduleadmin.php');
-//} else {
-// echo xoops_error('/' . $xoopsModule->getInfo('dirmoduleadmin') . '/moduleadmin/ is required!!!');
-//}
-
// Load language files
-xoops_loadLanguage('admin', $xoopsModule->dirname());
-xoops_loadLanguage('modinfo', $xoopsModule->dirname());
-xoops_loadLanguage('main', $xoopsModule->dirname());
+xoops_loadLanguage('admin', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('modinfo', $wfdownloads->getModule()->dirname());
+xoops_loadLanguage('main', $wfdownloads->getModule()->dirname());
-// Load Xoops handlers
-$member_handler = xoops_gethandler('member');
-$notification_handler = &xoops_gethandler('notification');
-$gperm_handler = xoops_gethandler('groupperm');
-
if (!isset($xoopsTpl) || !is_object($xoopsTpl)) {
- include_once(XOOPS_ROOT_PATH . "/class/template.php");
+ include_once(XOOPS_ROOT_PATH . '/class/template.php');
$xoopsTpl = new XoopsTpl();
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -577,12 +577,12 @@
$filter_title = WfdownloadsRequest::getString('filter_title', '');
$filter_category_title_condition = WfdownloadsRequest::getString('filter_category_title_condition', '=');
$filter_category_title = WfdownloadsRequest::getString('filter_category_title', '');
- $filter_poster = WfdownloadsRequest::getArray('filter_poster', null);
+ $filter_submitter = WfdownloadsRequest::getArray('filter_submitter', null);
$filter_date = WfdownloadsRequest::getArray('filter_date', null);
$filter_date_condition = WfdownloadsRequest::getString('filter_date_condition', '<');
if ($op == 'downloads.filter') {
- if ($filter_title == '' && $filter_category_title == '' && is_null($filter_poster)) {
+ if ($filter_title == '' && $filter_category_title == '' && is_null($filter_submitter)) {
$op = 'downloads.list';
}
}
@@ -632,9 +632,9 @@
$criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
}
}
- // Evaluate poster criteria
- if (!is_null($filter_poster)) {
- $criteria->add(new Criteria('poster', '(' . implode(',', $filter_poster) . ')', 'IN'));
+ // Evaluate submitter criteria
+ if (!is_null($filter_submitter)) {
+ $criteria->add(new Criteria('submitter', '(' . implode(',', $filter_submitter) . ')', 'IN'));
}
// Evaluate date criteria
if (!empty($filter_date)) {
@@ -665,8 +665,8 @@
$GLOBALS['xoopsTpl']->assign('filter_title_condition', $filter_title_condition);
$GLOBALS['xoopsTpl']->assign('filter_category_title', $filter_category_title);
$GLOBALS['xoopsTpl']->assign('filter_category_title_condition', $filter_category_title_condition);
- $poster_select = new XoopsFormSelectUser(null, 'filter_poster', true, $filter_poster, 2, true);
- $GLOBALS['xoopsTpl']->assign('filter_poster_select', $poster_select->render());
+ $submitter_select = new XoopsFormSelectUser(null, 'filter_submitter', true, $filter_submitter, 5, true);
+ $GLOBALS['xoopsTpl']->assign('filter_submitter_select', $submitter_select->render());
$date_select = new XoopsFormDateTime (null, 'filter_date', 15, time(), false);
$GLOBALS['xoopsTpl']->assign('filter_date_select', $date_select->render());
$GLOBALS['xoopsTpl']->assign('filter_date_condition', $filter_date_condition);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -198,8 +198,8 @@
//$editContentFormElement = new XoopsFormText($caption, $key, 50, 255, $downloadUserId);
$editContentFormElement = new XoopsFormSelectUser ($caption, $key, false, $downloadUserId, 1, false);
break;
- case "features":
- case "requirements":
+ case "features" :
+ case "requirements" :
if ($download->getVar($key) != '') {
$downloadName = "<ul>";
$values = explode('|', trim($download->getVar($key)));
@@ -208,7 +208,7 @@
} else {
$downloadName = '';
}
- // array(value, name)
+
$downloadContent = array(
$download->getVar($key),
$downloadName
@@ -228,9 +228,49 @@
);
$editContentFormElement = new XoopsFormTextArea($caption, $key, $download->getVar($key, 'e'), 7, 60);
break;
+ case "dhistory" :
+ // array(value, name)
+ $downloadContent = array(
+ $download->getVar($key, 'e'),
+ $myts->displayTarea($download->getVar($key), true, false, false, false, true)
+ );
+ // array(value, name)
+ $modificationContent = array(
+ $modification->getVar($key, 'e'),
+ $myts->displayTarea($modification->getVar($key), true, false, false, false, true)
+ );
+ $editContentFormElement = new XoopsFormTextArea($caption, $key, $download->getVar($key, 'e'), 7, 60);
+ break;
// IN PROGRESS FROM HERE
// IN PROGRESS FROM HERE
// IN PROGRESS FROM HERE
+ case "summary" :
+// IN PROGRESS $wfdownloads->getConfig('autosummary') check
+ // array(value, name)
+ $downloadContent = array(
+ $download->getVar($key, 'e'),
+ $myts->displayTarea($download->getVar($key), true, false, false, false, true)
+ );
+ // array(value, name)
+ $modificationContent = array(
+ $modification->getVar($key, 'e'),
+ $myts->displayTarea($modification->getVar($key), true, false, false, false, true)
+ );
+ $editContentFormElement = new XoopsFormDhtmlTextArea($caption, $key, $download->getVar($key, 'e'), 10, 60, 'smartHiddenSummary');
+ break;
+ case "description" :
+ // array(value, name)
+ $downloadContent = array(
+ $download->getVar($key, 'e'),
+ $myts->displayTarea($download->getVar($key), true, false, false, false, true)
+ );
+ // array(value, name)
+ $modificationContent = array(
+ $modification->getVar($key, 'e'),
+ $myts->displayTarea($modification->getVar($key), true, false, false, false, true)
+ );
+ $editContentFormElement = new XoopsFormDhtmlTextArea($caption, $key, $download->getVar($key, 'e'), 15, 60, 'smartHiddenDescription');
+ break;
case "screenshot":
case "screenshot2":
case "screenshot3":
@@ -239,11 +279,6 @@
//
if ($modification->getVar($key) != '') $modificationContent = "<img src='" . XOOPS_URL . "/{$wfdownloads->getConfig('screenshots')}/{$modification->getVar($key)}' width='{$wfdownloads->getConfig('shotwidth')}' alt='' title='' />";
break;
- case "dhistory":
- $downloadContent = $myts->displayTarea($download->getVar($key), true, false, false, false, true);
- //
- $modificationContent = $myts->displayTarea($modification->getVar($key), true, false, false, false, true);
- break;
case "offline":
$downloadContent = $download->getVar($key) ? _YES : _NO;
//
@@ -324,7 +359,7 @@
redirect_header(WFDOWNLOADS_URL . '/admin/index.php', 1, _AM_WFDOWNLOADS_MOD_REQUPDATED);
break;
-
+/*
case "modification.ignore":
$requestid = WfdownloadsRequest::getInt('requestid', 0, 'POST');
@@ -332,6 +367,41 @@
$wfdownloads->getHandler('modification')->deleteAll($criteria, true);
redirect_header(WFDOWNLOADS_URL . '/admin/index.php', 1, _AM_WFDOWNLOADS_MOD_REQDELETED);
break;
+*/
+ case "modification.ignore":
+ case "modification.delete" :
+ $requestid = WfdownloadsRequest::getInt('requestid', 0);
+ $ok = WfdownloadsRequest::getBool('ok', false, 'POST');
+ if (!$modification = $wfdownloads->getHandler('modification')->get($requestid)) {
+ redirect_header($currentFile, 4, _AM_WFDOWNLOADS_MOD_NOTFOUND);
+ exit();
+ }
+ $title = $modification->getVar('title');
+ if ($ok == true) {
+/*
+IN PROGRESS
+IN PROGRESS
+IN PROGRESS
+ if (!$GLOBALS['xoopsSecurity']->check()) {
+ redirect_header($currentFile, 3, implode(',', $GLOBALS['xoopsSecurity']->getErrors()));
+ }
+*/
+ if ($wfdownloads->getHandler('modification')->deleteAll(new Criteria('requestid', $requestid), true)) {
+ redirect_header(WFDOWNLOADS_URL . '/admin/index.php', 1, _AM_WFDOWNLOADS_MOD_REQDELETED);
+ } else {
+ echo $modification->getHtmlErrors();
+ }
+ } else {
+ wfdownloads_xoops_cp_header();
+ xoops_confirm(
+ array('op' => 'modification.ignore', 'requestid' => $requestid, 'ok' => true, 'title' => $title),
+ $currentFile,
+ _AM_WFDOWNLOADS_MOD_REALLYIGNOREDTHIS . "<br /><br>" . $title,
+ _DELETE
+ );
+ xoops_cp_footer();
+ }
+ break;
case "reports.modifications.list":
default:
@@ -413,6 +483,8 @@
$modification_array['title'] = ($modification->getVar('title'));
$modification_array['submitter_uname'] = XoopsUserUtility::getUnameFromId($modification->getVar('submitter'));
$modification_array['formatted_date'] = formatTimestamp($modification->getVar('requestdate'), _DATESTRING);
+ $download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
+ $modification_array['download'] = $download->toArray();
$GLOBALS['xoopsTpl']->append('modifications', $modification_array);
}
//Include page navigation
@@ -428,7 +500,7 @@
$xoopsTpl->assign('use_reviews', $wfdownloads->getConfig('enable_reviews'));
$xoopsTpl->assign('use_brokenreports', $wfdownloads->getConfig('enable_brokenreports'));
- $GLOBALS['xoopsTpl']->display("db:" . $xoopsModule->dirname() . "_admin_reportsmodificationslist.html");
+ $GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_reportsmodificationslist.html");
include 'admin_footer.php';
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/formelementchoose.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -21,10 +21,6 @@
defined('XOOPS_ROOT_PATH') or die('Restricted access');
-xoops_load('XoopsFormElementTray');
-xoops_load('XoopsFormButton');
-xoops_load('XoopsFormLabel');
-
/**
* Form element that ...
*/
@@ -120,6 +116,7 @@
break;
case 'XoopsFormText' :
case 'XoopsFormTextArea' :
+ case 'XoopsFormDhtmlTextArea' :
default :
$tray = new XoopsFormElementTray ('', ' ', '');
$button = new XoopsFormButton('', "{$formElementName}_button_{$i}", constant("_BUTTON_{$i}"), 'button');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/modification.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -115,12 +115,30 @@
function approveModification($requestid)
{
$sql = "UPDATE " . $this->table . " m, " . $this->wfdownloads->getHandler('download')->table . " d";
- $sql
- .= " SET d.cid = 'm.cid', d.title = 'm.title',
- d.url = 'm.url', d.filename = 'm.filename', d.filetype = 'm.filetype', d.mirror = 'm.mirror', d.license = 'm.license', d.features = 'm.features', d.homepage = 'm.homepage', d.version = 'm.version', d.size = 'm.size', d.platform = 'm.platform',
- d.screenshot = 'm.screenshot', d.screenshot2 = 'm.screenshot2', d.screenshot3 = 'm.screenshot3', d.screenshot4 = 'm.screenshot4', d.publisher = 'm.publisher', d.status = '2', d.price = 'm.price', d.requirements = 'm.requirements',
- d.homepagetitle = 'm.homepagetitle', d.limitations = 'm.limitations', d.versiontypes = 'm.versiontypes', d.dhistory = 'm.dhistory', d.updated = 'm.updated',
- d.summary = 'm.summary', d.description = 'm.description'";
+ $sql.= " SET
+ d.cid = 'm.cid',
+ d.title = 'm.title',
+ d.url = 'm.url',
+ d.filename = 'm.filename',
+ d.filetype = 'm.filetype',
+ d.mirror = 'm.mirror',
+ d.license = 'm.license',
+ d.features = 'm.features',
+ d.homepage = 'm.homepage',
+ d.version = 'm.version',
+ d.size = 'm.size',
+ d.platform = 'm.platform',
+ d.screenshot = 'm.screenshot', d.screenshot2 = 'm.screenshot2', d.screenshot3 = 'm.screenshot3', d.screenshot4 = 'm.screenshot4',
+ d.publisher = 'm.publisher',
+ d.status = '2',
+ d.price = 'm.price',
+ d.requirements = 'm.requirements',
+ d.homepagetitle = 'm.homepagetitle',
+ d.limitations = 'm.limitations',
+ d.versiontypes = 'm.versiontypes',
+ d.dhistory = 'm.dhistory', d.updated = 'm.updated',
+ d.summary = 'm.summary',
+ d.description = 'm.description'";
$sql .= " WHERE d.lid = 'm.lid' AND m.requestid='" . (int)$requestid . "'";
if ($this->db->query($sql)) {
return $this->deleteAll(new Criteria('requestid', (int)$requestid));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-01-03 22:42:52 UTC (rev 12253)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-12-21)</u></b>
+<b><u>=> Version 3.23 Beta (2014-01-03)</u></b>
- update jQuery Thickbox plugin to 3.1 (luciorota)
- fixed: jQuery bug in templates (luciorota)
- standardization of English language files (cesag)
@@ -21,7 +21,7 @@
- added: enable/disable reviews system (luciorota)
- added: enable/disable ratings system (luciorota)
- added: enable/disable brokens reports system (luciorota)
-- added: admin side downloads filter (luciorota)
+- added: filter downloads by title, category, submitter, ... in admin side (luciorota)
- added: breadcrumb class (luciorota)
- added: new auto summary option: auto summary if summary field is empty (luciorota)
- added: new auto summary option: plain text or html auto summary (luciorota)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/header.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/header.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/header.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -21,22 +21,6 @@
include_once dirname(dirname(dirname(__FILE__))) . '/mainfile.php';
include_once dirname(__FILE__) . '/include/common.php';
-$myts = MyTextSanitizer::getInstance();
-
-include_once XOOPS_ROOT_PATH . '/class/tree.php';
-include_once XOOPS_ROOT_PATH . "/modules/" . WFDOWNLOADS_DIRNAME . "/class/xoopstree.php";
-//include_once XOOPS_ROOT_PATH . '/class/xoopstree.php';
-xoops_load('XoopsUserUtility'); // MyTextSanitizer object
-
-//$module_handler =& xoops_gethandler('module');
-//$xoopsModule =& $module_handler->getByDirname($mydirname);
-
// uncomment the below line only if you are using Protector 3.x module
// and you trust your users when uploading files, it is recommended to not allow anonymous uploads if you do so!!
//define('PROTECTOR_SKIP_FILESCHECKER', true);
-
-// Load Xoops handlers
-$module_handler = xoops_gethandler('module');
-$member_handler = xoops_gethandler('member');
-$notification_handler = &xoops_gethandler('notification');
-$gperm_handler = xoops_gethandler('groupperm');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/common.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -20,9 +20,6 @@
*/
defined("XOOPS_ROOT_PATH") or die("XOOPS root path not defined");
-//$module_handler =& xoops_gethandler('module');
-//$xoopsModule = & $module_handler->getByDirname(basename(dirname(dirname(__FILE__))));
-
// This must contain the name of the folder in which reside Wfdownloads
define("WFDOWNLOADS_DIRNAME", basename(dirname(dirname(__FILE__))));
define("WFDOWNLOADS_URL", XOOPS_URL . '/modules/' . WFDOWNLOADS_DIRNAME);
@@ -32,6 +29,10 @@
xoops_loadLanguage('common', WFDOWNLOADS_DIRNAME);
+include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
+include_once XOOPS_ROOT_PATH . '/class/tree.php';
+include_once XOOPS_ROOT_PATH . '/class/pagenav.php';
+
include_once WFDOWNLOADS_ROOT_PATH . '/include/functions.php';
include_once WFDOWNLOADS_ROOT_PATH . '/include/constants.php';
include_once WFDOWNLOADS_ROOT_PATH . '/class/session.php'; // WfdownloadsSession class
@@ -39,8 +40,13 @@
include_once WFDOWNLOADS_ROOT_PATH . '/class/request.php'; // WfdownloadsRequest class
include_once WFDOWNLOADS_ROOT_PATH . '/class/breadcrumb.php'; // WfdownloadsBreadcrumb class
include_once WFDOWNLOADS_ROOT_PATH . '/class/tree.php'; // WfdownloadsObjectTree class
+include_once WFDOWNLOADS_ROOT_PATH . '/class/xoopstree.php'; // WfdownloadsXoopsTree class
include_once WFDOWNLOADS_ROOT_PATH . '/class/formelementchoose.php'; // WfdownloadsFormElementChoose class
+xoops_load('XoopsUserUtility');
+// MyTextSanitizer object
+$myts = MyTextSanitizer::getInstance();
+
$debug = false;
$wfdownloads = WfdownloadsWfdownloads::getInstance($debug);
@@ -53,3 +59,8 @@
$wfdownloads_isAdmin = wfdownloads_userIsAdmin();
}
+// Load Xoops handlers
+$module_handler = xoops_gethandler('module');
+$member_handler = xoops_gethandler('member');
+$notification_handler = &xoops_gethandler('notification');
+$gperm_handler = xoops_gethandler('groupperm');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -299,7 +299,7 @@
define('_AM_WFDOWNLOADS_MOD_ORIGINAL', "Original download details");
define('_AM_WFDOWNLOADS_MOD_REQDELETED', "Modification request removed from the database");
define('_AM_WFDOWNLOADS_MOD_REQUPDATED', "Selected download Modified and database updated successfully");
-define('_AM_WFDOWNLOADS_MOD_VIEW', "View");
+define('_AM_WFDOWNLOADS_MOD_VIEW', "View modification");
define('_AM_WFDOWNLOADS_MOD_FILENAME', "Local file name");
define('_AM_WFDOWNLOADS_MOD_FILETYPE', "Local file type");
define('_AM_WFDOWNLOADS_MOD_STATUS', "Status");
@@ -624,6 +624,11 @@
define('_AM_WFDOWNLOADS_CLONE_FAIL', "Sorry, we failed in creating the new clone. Maybe you need to temporally set write permissions (CHMOD 777) to 'modules' folder and try again.");
// admin/categories.php
define('_AM_WFDOWNLOADS_FCATEGORY_ID', "ID");
+// admin/reportsmodifications.php
+define('_AM_WFDOWNLOADS_MOD_IGNORE', "Ignore and delete modification");
+define('_AM_WFDOWNLOADS_MOD_VIEWDESC', "<b>View & Compare</b> download and modification.");
+define('_AM_WFDOWNLOADS_MOD_IGNOREDESC', "<b>Ignore & Delete</b> modification.");
+define('_AM_WFDOWNLOADS_MOD_REALLYIGNOREDTHIS', "Are you sure to ignore and delete this modification?");
//Editor:
define('_AM_WFDOWNLOADS_MOD_DOHTML', "Allow HTML tags");
define('_AM_WFDOWNLOADS_MOD_DOSMILEY', "Allow XOOPS Smilies");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_downloadslist.html 2014-01-03 22:42:52 UTC (rev 12253)
@@ -42,7 +42,7 @@
<input id='filter_category_title' type='text' value='<{$filter_category_title}>' maxlength='100' size='15' title=''
name='filter_category_title'>
</td>
- <td><{$filter_poster_select}></td>
+ <td><{$filter_submitter_select}></td>
<td>
<{*
<select id='filter_date_condition' title='<{$smarty.const._AM_WFDOWNLOADS_SEARCH}>' name='filter_date_condition' size='1'>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2014-01-03 22:42:52 UTC (rev 12253)
@@ -10,20 +10,20 @@
<p>
<img src="<{xoModuleIcons16 1.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_IGNOREDESC}>"
alt="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_IGNOREDESC}>"/> <{$smarty.const._AM_WFDOWNLOADS_BROKEN_IGNOREDESC}>
- <br/>
+ <br />
<img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_EDITDESC}>"
alt="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_EDITDESC}>"/> <{$smarty.const._AM_WFDOWNLOADS_BROKEN_EDITDESC}>
- <br/>
+ <br />
<img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_DELETEDESC}>"
alt="<{$smarty.const._AM_WFDOWNLOADS_BROKEN_DELETEDESC}>"/> <{$smarty.const._AM_WFDOWNLOADS_BROKEN_DELETEDESC}>
- <br/>
+ <br />
<img src="<{xoModuleIcons16 1.png}>"/> <{$smarty.const._AM_WFDOWNLOADS_BROKEN_ACKDESC}>
- <br/>
+ <br />
<img src="<{xoModuleIcons16 1.png}>"/> <{$smarty.const._AM_WFDOWNLOADS_BROKEN_CONFIRMDESC}>
</p>
</fieldset>
-<br/>
+<br />
<fieldset>
<legend style='font-weight: bold; color: #900;'><{$smarty.const._AM_WFDOWNLOADS_BROKEN_REPORTS}></legend>
@@ -101,13 +101,21 @@
<{/if}>
</fieldset>
-<br/>
+<br />
<fieldset>
<legend style='font-weight: bold;'><{$smarty.const._AM_WFDOWNLOADS_MOD_MODREQUESTSINFO}></legend>
<p>
<{$smarty.const._AM_WFDOWNLOADS_MOD_TOTMODREQUESTS}>: <{$modifications_count}>
</p>
+
+ <p>
+ <img src="<{xoModuleIcons16 view.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEWDESC}>"/> <{$smarty.const._AM_WFDOWNLOADS_MOD_VIEWDESC}>
+ <br />
+ <img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNOREDESC}>"/> <{$smarty.const._AM_WFDOWNLOADS_MOD_IGNOREDESC}>
+ </p>
</fieldset>
<fieldset>
@@ -124,12 +132,21 @@
<th><{$smarty.const._AM_WFDOWNLOADS_MINDEX_ACTION}></th>
</tr>
<{foreach item=modification from=$modifications}>
- <tr>
+ <tr class="<{cycle values='even, odd'}>">
<td><{$modification.requestid}></td>
- <td><{$modification.title}></td>
+ <td><{$modification.download.title}> -> <{$modification.title}></td>
<td><{$modification.submitter_uname}></td>
<td><{$modification.formatted_date}></td>
- <td><a href='?op=modification.show&requestid=<{$modification.requestid}>'><{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}></a></td>
+ <td align='center'>
+ <a href='?op=modification.show&requestid=<{$modification.requestid}>'>
+ <img src="<{xoModuleIcons16 view.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_VIEW}>"/>
+ </a>
+ <a href='?op=modification.ignore&requestid=<{$modification.requestid}>'>
+ <img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"/>
+ </a>
+ </td>
</tr>
<{/foreach}>
</table>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2014-01-03 22:42:52 UTC (rev 12253)
@@ -73,7 +73,7 @@
<div>
<small>
<{$smarty.const._MD_WFDOWNLOADS_SUBMITTER}>: <{$download.submitter}>
- <br/>
+ <br />
<{$lang_subdate}>: <{$download.updated}>
</small>
</div>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-12-30 16:19:24 UTC (rev 12252)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-01-03 22:42:52 UTC (rev 12253)
@@ -42,9 +42,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-12-21';
-$modversion['release_date'] = '2013/12/21';
-$modversion['releasedate'] = '2013-12-21';
+$modversion['date'] = '2014-01-03';
+$modversion['release_date'] = '2014/01/03';
+$modversion['releasedate'] = '2014-01-03';
$modversion['status'] = 'BETA 2';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|