|
From: <luc...@us...> - 2013-09-14 21:28:34
|
Revision: 12049
http://sourceforge.net/p/xoops/svn/12049
Author: luciorota
Date: 2013-09-14 21:28:28 +0000 (Sat, 14 Sep 2013)
Log Message:
-----------
fixed download edit links in frontside
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-14 20:56:00 UTC (rev 12048)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-14 21:28:28 UTC (rev 12049)
@@ -224,13 +224,12 @@
$download['version'] = 0;
}
$download['downtime'] = wfdownloads_getDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
- $download['downtime'] = str_replace("|", "<br />", $download['downtime']);
+ $download['downtime'] = str_replace('|', '<br />', $download['downtime']);
$download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
$time = ($this->getVar('updated') != 0) ? $this->getVar('updated') : $this->getVar('published');
$download['updated'] = formatTimestamp($time, $this->wfdownloads->getConfig('dateformat'));
- $is_updated = ($this->getVar('updated') != 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
- $download['lang_subdate'] = $is_updated;
+ $download['lang_subdate'] = ($this->getVar('updated') != 0) ? _MD_WFD_UPDATEDON : _MD_WFD_SUBMITDATE;
$summary = $this->getVar('summary');
if ($this->wfdownloads->getConfig('autosummary') == true || empty($summary)) {
@@ -728,8 +727,7 @@
$filestatus_radio = new XoopsFormRadioYN(_AM_WFD_FILE_FILESSTATUS, 'offline', $this->getVar('offline', 'e'));
$sform->addElement($filestatus_radio);
- $up_dated = ($this->getVar('updated', 'e') == 0) ? false : true;
- $file_updated_radio = new XoopsFormRadioYN(_AM_WFD_FILE_SETASUPDATED, 'up_dated', $up_dated);
+ $file_updated_radio = new XoopsFormRadioYN(_AM_WFD_FILE_SETASUPDATED, 'up_dated', ($this->getVar('updated', 'e') == true));
$sform->addElement($file_updated_radio);
if (!$this->isNew() && $this->getVar('published') == 0) {
@@ -755,9 +753,6 @@
$button_delete = new XoopsFormButton('', '', _DELETE, 'submit');
$button_delete->setExtra('onclick="this.form.elements.op.value=\'download.delete\'"');
$button_tray->addElement($button_delete);
- $butt_dupct2 = new XoopsFormButton('', '', _AM_WFD_BCANCEL, 'submit');
- $butt_dupct2->setExtra('onclick="this.form.elements.op.value=\'downloadsConfigMenu\'"');
- $button_tray->addElement($butt_dupct2);
}
$button_reset = new XoopsFormButton('', '', _RESET, 'reset');
$button_tray->addElement($button_reset);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-14 20:56:00 UTC (rev 12048)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_download.html 2013-09-14 21:28:28 UTC (rev 12049)
@@ -1,7 +1,7 @@
<div>
<b><a href="singlefile.php?cid=<{$download.cid}>&lid=<{$download.id}>" title="<{$smarty.const._MD_WFD_VIEWDETAILS}>"><{$download.title}></a></b> <{$download.icons}>
<{if ($download.isadmin == true)}>
- <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="submit.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
<a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
<{/if}>
</div>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-14 20:56:00 UTC (rev 12048)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_singlefile.html 2013-09-14 21:28:28 UTC (rev 12049)
@@ -7,7 +7,7 @@
<h3>
<{$download.title}> <{$download.icons}>
<{if ($download.isadmin == true)}>
- <a href="admin/downloads.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
+ <a href="submit.php?op=download.edit&lid=<{$download.id}>"><img src="<{xoModuleIcons16 edit.png}>" title="<{$smarty.const._EDIT}>" alt="<{$smarty.const._EDIT}>" /></a>
<a href="admin/downloads.php?op=download.delete&lid=<{$download.id}>"><img src="<{xoModuleIcons16 delete.png}>" title="<{$smarty.const._DELETE}>" alt="<{$smarty.const._DELETE}>" /></a>
<{/if}>
</h3>
|