From ac9382ea9281599ecd56e1b5fdeaf21a9d784e6b Mon Sep 17 00:00:00 2001 From: bugrain Date: Tue, 13 Jan 2009 00:42:54 +0000 Subject: [PATCH] Added plugin installed check on entry Added download_shortcodes.php (copied from core) Fixed some href links that were pointing back to core download Bugtracker #3651 Added individual filesize fields for mirror files --- e107_plugins/download/download.php | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/e107_plugins/download/download.php b/e107_plugins/download/download.php index 1a547857a..2e56702ba 100644 --- a/e107_plugins/download/download.php +++ b/e107_plugins/download/download.php @@ -11,17 +11,18 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/download/download.php,v $ -| $Revision: 1.1 $ -| $Date: 2009-01-11 02:56:30 $ +| $Revision: 1.2 $ +| $Date: 2009-01-13 00:42:54 $ | $Author: bugrain $ | +----------------------------------------------------------------------------+ */ require_once("../../class2.php"); +if (!plugInstalled('download')) { exit(); } include_lan(e_PLUGIN.'download/languages/'.e_LANGUAGE.'/lan_download.php'); -require_once(e_HANDLER."comment_class.php"); -require_once(e_FILE."shortcode/batch/download_shortcodes.php"); +require_once(e_PLUGIN.'download/download_shortcodes.php'); +require_once(e_HANDLER.'comment_class.php'); $cobj = new comment; global $tp; @@ -520,7 +521,7 @@ if ($action == "report" && check_class($pref['download_reportbroken'])) ".LAN_dl_32.": ".$download_name."
- + ".LAN_dl_53." @@ -610,8 +611,8 @@ if($action == "mirror") function parse_download_mirror_table($row, $mirrorstring, $mirrorList) { - global $DOWNLOAD_MIRROR; - list($mirrorHost_id, $mirrorHost_url, $mirrorRequests) = explode(",", $mirrorstring); + global $DOWNLOAD_MIRROR, $e107; + list($mirrorHost_id, $mirrorHost_url, $mirrorRequests, $mirrorFilesize) = explode(",", $mirrorstring); extract($mirrorList[$mirrorHost_id]); @@ -620,8 +621,8 @@ function parse_download_mirror_table($row, $mirrorstring, $mirrorList) $DOWNLOAD_MIRROR_LOCATION = ($mirror_location ? $mirror_location : ""); $DOWNLOAD_MIRROR_DESCRIPTION = ($mirror_description ? $mirror_description : ""); - $DOWNLOAD_MIRROR_FILESIZE = $e107->parseMemorySize($row['download_filesize']); - $DOWNLOAD_MIRROR_LINK = ""; + $DOWNLOAD_MIRROR_FILESIZE = $e107->parseMemorySize($mirrorFilesize); + $DOWNLOAD_MIRROR_LINK = ""; $DOWNLOAD_MIRROR_REQUESTS = (ADMIN ? LAN_dl_73.$mirrorRequests : ""); $DOWNLOAD_TOTAL_MIRROR_REQUESTS = (ADMIN ? LAN_dl_74.$mirror_count : "");