mirror of
https://github.com/e107inc/e107.git
synced 2025-07-26 01:11:28 +02:00
Bug #3615 - DOWNLOAD_VIEW_NAME_LINKED does not check if download agreement
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $
|
||||||
| $Revision: 1.3 $
|
| $Revision: 1.4 $
|
||||||
| $Date: 2006-12-07 16:49:28 $
|
| $Date: 2006-12-23 16:25:17 $
|
||||||
| $Author: sweetas $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
@@ -134,8 +134,8 @@ SC_END
|
|||||||
|
|
||||||
|
|
||||||
SC_BEGIN DOWNLOAD_ADMIN_EDIT
|
SC_BEGIN DOWNLOAD_ADMIN_EDIT
|
||||||
global $dl, $imode;
|
global $dl;
|
||||||
return (ADMIN && getperms('6')) ? "<a href='".e_ADMIN."download.php?create.edit.".$dl['download_id']."' title='edit'><img src='".e_IMAGE."packs/".$imode."/generic/edit.png' alt='' style='padding:0px;border:0px' /></a>" : "";
|
return (ADMIN && getperms('6')) ? "<a href='".e_ADMIN."download.php?create.edit.".$dl['download_id']."' title='edit'><img src='".e_IMAGE."generic/lite/edit.png' alt='' style='padding:0px;border:0px' /></a>" : "";
|
||||||
SC_END
|
SC_END
|
||||||
|
|
||||||
SC_BEGIN DOWNLOAD_CATEGORY
|
SC_BEGIN DOWNLOAD_CATEGORY
|
||||||
@@ -175,8 +175,12 @@ return $dl['download_name'];
|
|||||||
SC_END
|
SC_END
|
||||||
|
|
||||||
SC_BEGIN DOWNLOAD_VIEW_NAME_LINKED
|
SC_BEGIN DOWNLOAD_VIEW_NAME_LINKED
|
||||||
global $dl;
|
global $pref,$dl,$tp;
|
||||||
return "<a href='".e_BASE."request.php?".$dl['download_id']."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
if ($pref['agree_flag'] == 1) {
|
||||||
|
return "<a href='".e_BASE."request.php?".$dl['download_id']."' onclick= \"return confirm('".$tp->toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc defs"))."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||||
|
} else {
|
||||||
|
return "<a href='".e_BASE."request.php?".$dl['download_id']."' title='".LAN_dl_46."'>".$dl['download_name']."</a>";
|
||||||
|
}
|
||||||
SC_END
|
SC_END
|
||||||
|
|
||||||
SC_BEGIN DOWNLOAD_VIEW_AUTHOR
|
SC_BEGIN DOWNLOAD_VIEW_AUTHOR
|
||||||
@@ -240,7 +244,6 @@ else
|
|||||||
{
|
{
|
||||||
return LAN_dl_75;
|
return LAN_dl_75;
|
||||||
}
|
}
|
||||||
|
|
||||||
SC_END
|
SC_END
|
||||||
|
|
||||||
SC_BEGIN DOWNLOAD_VIEW_IMAGEFULL
|
SC_BEGIN DOWNLOAD_VIEW_IMAGEFULL
|
||||||
@@ -281,7 +284,7 @@ SC_END
|
|||||||
SC_BEGIN DOWNLOAD_VIEW_RATING
|
SC_BEGIN DOWNLOAD_VIEW_RATING
|
||||||
require_once(e_HANDLER."rate_class.php");
|
require_once(e_HANDLER."rate_class.php");
|
||||||
$rater = new rater;
|
$rater = new rater;
|
||||||
global $dl, $imode;
|
global $dl;
|
||||||
$text = "
|
$text = "
|
||||||
<table style='width:100%'>
|
<table style='width:100%'>
|
||||||
<tr>
|
<tr>
|
||||||
@@ -289,10 +292,10 @@ SC_BEGIN DOWNLOAD_VIEW_RATING
|
|||||||
|
|
||||||
if ($ratearray = $rater->getrating("download", $dl['download_id'])) {
|
if ($ratearray = $rater->getrating("download", $dl['download_id'])) {
|
||||||
for($c = 1; $c <= $ratearray[1]; $c++) {
|
for($c = 1; $c <= $ratearray[1]; $c++) {
|
||||||
$text .= "<img src='".e_IMAGE."packs/".$imode."/rate/star.png' alt='' />";
|
$text .= "<img src='".e_IMAGE."rate/".IMODE."/star.png' alt='' />";
|
||||||
}
|
}
|
||||||
if ($ratearray[2]) {
|
if ($ratearray[2]) {
|
||||||
$text .= "<img src='".e_IMAGE."packs/".$imode."/rate/".$ratearray[2].".png' alt='' />";
|
$text .= "<img src='".e_IMAGE."rate/".IMODE."/".$ratearray[2].".png' alt='' />";
|
||||||
}
|
}
|
||||||
if ($ratearray[2] == "") {
|
if ($ratearray[2] == "") {
|
||||||
$ratearray[2] = 0;
|
$ratearray[2] = 0;
|
||||||
|
Reference in New Issue
Block a user