|
From: <luc...@us...> - 2014-02-04 21:19:02
|
Revision: 12287
http://sourceforge.net/p/xoops/svn/12287
Author: luciorota
Date: 2014-02-04 21:19:00 +0000 (Tue, 04 Feb 2014)
Log Message:
-----------
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/reportsmodifications.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -105,8 +105,8 @@
if (in_array($key, $notAllowedKeys)) {
continue;
}
- $caption = (constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) : $key);
- $description = (constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") : '');
+ $caption = (defined("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key)) : $key);
+ $description = (defined("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") ? constant("_AM_WFDOWNLOADS_MOD_" . strtoupper($key) . "_DESC") : '');
$editContent = '';
// Extra jobs for some keys
switch ($key) {
@@ -300,11 +300,11 @@
$hidden = new XoopsFormHidden('op', 'modification.change');
$button_tray->addElement($hidden);
if (!$modification->isNew()) {
- $button_approve = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BAPPROVE, 'submit');
- $button_approve->setExtra('onclick="this.form.elements.op.value=\'modification.change\'"');
+ $button_approve = new XoopsFormButton('', '', _SUBMIT, 'submit');
+ $button_approve->setExtra('onclick="this.form.elements.op.value=\'modification.save\'"');
$button_tray->addElement($button_approve);
}
- $button_ignore = new XoopsFormButton('', '', _AM_WFDOWNLOADS_BIGNORE, 'submit');
+ $button_ignore = new XoopsFormButton('', '', _AM_WFDOWNLOADS_MOD_IGNORE, 'submit');
$button_ignore->setExtra('onclick="this.form.elements.op.value=\'modification.ignore\'"');
$button_tray->addElement($button_ignore);
$button_reset = new XoopsFormButton('', '', _RESET, 'reset');
@@ -319,10 +319,48 @@
exit();
break;
+ case "modification.save" :
+ $requestid = WfdownloadsRequest::getInt('requestid', 0);
+
+ $modification = $wfdownloads->getHandler('modification')->get($requestid);
+ $download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
+
+ if ($modification->getVar('version') == $download->getVar('version')) {
+ $raiseModifyEvents = false;
+ } else {
+ $raiseModifyEvents = true;
+ }
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+ // SAVE MODIFIED FIELDS
+
+ // DELETE MODIFICATIONREQUEST
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+// IN PROGRESS FROM HERE
+ if ($raiseModifyEvents) {
+ // Trigger the three events related to modified files (one for the file, category, and global event categories respectively)
+ $tags = array();
+ $tags['FILE_NAME'] = $download->getVar('title');
+ $tags['FILE_URL'] = WFDOWNLOADS_URL . '/singlefile.php?cid=' . $cid . '&lid=' . $lid;
+ $category = $wfdownloads->getHandler('category')->get($cid);
+ $tags['FILE_VERSION'] = $download->getVar('version');
+ $tags['CATEGORY_NAME'] = $category->getVar('title');
+ $tags['CATEGORY_URL'] = WFDOWNLOADS_URL . '/viewcat.php?cid=' . $cid;
+
+ $notification_handler->triggerEvent('global', 0, 'filemodified', $tags);
+ $notification_handler->triggerEvent('category', $cid, 'filemodified', $tags);
+ $notification_handler->triggerEvent('file', $lid, 'filemodified', $tags);
+ }
+
+ redirect_header(WFDOWNLOADS_URL . '/admin/index.php', 1, _AM_WFDOWNLOADS_MOD_REQUPDATED);
+ break;
+
case "modification.change" :
/* Added by Lankford on 2007/3/21 */
// Get a pointer to the download record and the modification record, then compare their 'versions' to see if they are different. If they are, then raise filemodify events.
- $requestid = WfdownloadsRequest::getInt('requestid', 0, 'POST');
+ $requestid = WfdownloadsRequest::getInt('requestid', 0, 'GET');
$modification = $wfdownloads->getHandler('modification')->get($requestid);
$download = $wfdownloads->getHandler('download')->get($modification->getVar('lid'));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2014-02-04 21:19:00 UTC (rev 12287)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2014-01-07)</u></b>
+<b><u>=> Version 3.23 Beta (2014-02-04)</u></b>
- update jQuery Thickbox plugin to 3.1 (luciorota)
- fixed: jQuery bug in templates (luciorota)
- standardization of English language files (cesag)
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -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 modification");
+define('_AM_WFDOWNLOADS_MOD_VIEW', "View and edit modification request");
define('_AM_WFDOWNLOADS_MOD_FILENAME', "Local file name");
define('_AM_WFDOWNLOADS_MOD_FILETYPE', "Local file type");
define('_AM_WFDOWNLOADS_MOD_STATUS', "Status");
@@ -625,7 +625,7 @@
// 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_IGNORE', "Ignore and delete modification request");
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?");
@@ -636,3 +636,6 @@
define('_AM_WFDOWNLOADS_MOD_DOIMAGE', "Allow XOOPS Images");
define('_AM_WFDOWNLOADS_MOD_DOBR', "Convert line breaks");
define('_AM_WFDOWNLOADS_MOD_FORMULIZE_IDREQ', "Formulize Form ID");
+// 3.23
+define('_AM_WFDOWNLOADS_MOD_APPROVE', "Approve and delete modification request");
+define('_AM_WFDOWNLOADS_MOD_SAVE', "Save");
\ No newline at end of file
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_mirrorslist.html 2014-02-04 21:19:00 UTC (rev 12287)
@@ -45,15 +45,24 @@
<td class='even'><{$mirror_waiting.submitter_uname}></td>
<td class='even'><{$mirror_waiting.formatted_date}></td>
<td class='even' align='center'>
- <a href='?op=mirror.approve&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 1.png}>"
- title="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"
- alt="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"/></a>
- <a href='?op=mirror.edit&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 edit.png}>"
- title="<{$smarty.const._EDIT}>"
- alt="<{$smarty.const._EDIT}>"/></a>
- <a href='?op=mirror.delete&mirror_id=<{$mirror_waiting.mirror_id}>'><img src="<{xoModuleIcons16 delete.png}>"
- title="<{$smarty.const._DELETE}>"
- alt="<{$smarty.const._DELETE}>"/></a>
+ <a href='?op=mirror.approve&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 1.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_BAPPROVE}>"/>
+ </a>
+ <a href='?op=mirror.edit&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 edit.png}>"
+ title="<{$smarty.const._EDIT}>"
+ alt="<{$smarty.const._EDIT}>"/>
+ </a>
+ <a href='?op=mirror.delete&mirror_id=<{$mirror_waiting.mirror_id}>'>
+ <img
+ src="<{xoModuleIcons16 delete.png}>"
+ title="<{$smarty.const._DELETE}>"
+ alt="<{$smarty.const._DELETE}>"/>
+ </a>
</td>
</tr>
<{/foreach}>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/admin/wfdownloads_admin_reportsmodificationslist.html 2014-02-04 21:19:00 UTC (rev 12287)
@@ -138,13 +138,23 @@
<td><{$modification.submitter_uname}></td>
<td><{$modification.formatted_date}></td>
<td align='center'>
+ <a href='?op=modification.change&requestid=<{$modification.requestid}>'>
+ <img
+ src="<{xoModuleIcons16 1.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_MOD_APPROVE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_APPROVE}>"/>
+ </a>
<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}>"/>
+ <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}>"/>
+ <img
+ src="<{xoModuleIcons16 delete.png}>"
+ title="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"
+ alt="<{$smarty.const._AM_WFDOWNLOADS_MOD_IGNORE}>"/>
</a>
</td>
</tr>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-01-31 16:55:27 UTC (rev 12286)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2014-02-04 21:19:00 UTC (rev 12287)
@@ -42,9 +42,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2014-01-07';
-$modversion['release_date'] = '2014/01/07';
-$modversion['releasedate'] = '2014-01-07';
+$modversion['date'] = '2014-02-04';
+$modversion['release_date'] = '2014/02/04';
+$modversion['releasedate'] = '2014-02-04';
$modversion['status'] = 'BETA 2';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
|