From 44c3fab2cce4937abf14ba8652bc250fcedbf2db Mon Sep 17 00:00:00 2001 From: e107steved Date: Sat, 23 Dec 2006 16:25:17 +0000 Subject: [PATCH] Bug #3615 - DOWNLOAD_VIEW_NAME_LINKED does not check if download agreement --- .../shortcode/batch/download_shortcodes.php | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/e107_files/shortcode/batch/download_shortcodes.php b/e107_files/shortcode/batch/download_shortcodes.php index a2441c141..d575b98c6 100644 --- a/e107_files/shortcode/batch/download_shortcodes.php +++ b/e107_files/shortcode/batch/download_shortcodes.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $ -| $Revision: 1.3 $ -| $Date: 2006-12-07 16:49:28 $ -| $Author: sweetas $ +| $Revision: 1.4 $ +| $Date: 2006-12-23 16:25:17 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -134,8 +134,8 @@ SC_END SC_BEGIN DOWNLOAD_ADMIN_EDIT -global $dl, $imode; -return (ADMIN && getperms('6')) ? "" : ""; +global $dl; +return (ADMIN && getperms('6')) ? "" : ""; SC_END SC_BEGIN DOWNLOAD_CATEGORY @@ -175,8 +175,12 @@ return $dl['download_name']; SC_END SC_BEGIN DOWNLOAD_VIEW_NAME_LINKED -global $dl; -return "".$dl['download_name'].""; +global $pref,$dl,$tp; +if ($pref['agree_flag'] == 1) { + return "toJS($tp->toHTML($pref['agree_text'],FALSE,"parse_sc defs"))."' title='".LAN_dl_46."'>".$dl['download_name'].""; +} else { + return "".$dl['download_name'].""; +} SC_END SC_BEGIN DOWNLOAD_VIEW_AUTHOR @@ -240,7 +244,6 @@ else { return LAN_dl_75; } - SC_END SC_BEGIN DOWNLOAD_VIEW_IMAGEFULL @@ -281,7 +284,7 @@ SC_END SC_BEGIN DOWNLOAD_VIEW_RATING require_once(e_HANDLER."rate_class.php"); $rater = new rater; - global $dl, $imode; +global $dl; $text = " @@ -289,10 +292,10 @@ SC_BEGIN DOWNLOAD_VIEW_RATING if ($ratearray = $rater->getrating("download", $dl['download_id'])) { for($c = 1; $c <= $ratearray[1]; $c++) { - $text .= ""; + $text .= ""; } if ($ratearray[2]) { - $text .= ""; + $text .= ""; } if ($ratearray[2] == "") { $ratearray[2] = 0;