|
From: <luc...@us...> - 2013-09-09 22:17:32
|
Revision: 12016
http://sourceforge.net/p/xoops/svn/12016
Author: luciorota
Date: 2013-09-09 22:17:28 +0000 (Mon, 09 Sep 2013)
Log Message:
-----------
renamed some functions
Modified Paths:
--------------
XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
XoopsModules/wfdownloads/trunk/wfdownloads/index.php
XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/review.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/categories.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -97,7 +97,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize') < 300) {
+ if (wfdownloads_checkModule('formulize') < 300) {
$formulize_fid = (isset($_POST["formulize_fid"])) ? (int)$_POST["formulize_fid"] : 0;
}
// Added Formulize module support (2006/05/04) jpc - end
@@ -115,7 +115,7 @@
$category->setVar('spotlighttop', $spotlighttop);
$category->setVar('imgurl', $imgurl);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$category->setVar('formulize_fid', $formulize_fid);
}
// Added Formulize module support (2006/05/04) jpc - end
@@ -127,8 +127,8 @@
if ($cid == 0) {
$newid = (int)$category->getVar('cid');
}
- wfd_save_Permissions($down_groups, $newid, 'WFDownCatPerm');
- wfd_save_Permissions($up_groups, $newid, 'WFUpCatPerm');
+ wfdownloads_savePermissions($down_groups, $newid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $newid, 'WFUpCatPerm');
/**
* Notify of new category
*/
@@ -140,8 +140,8 @@
$database_mess = _AM_WFD_CCATEGORY_CREATED;
} else {
$database_mess = _AM_WFD_CCATEGORY_MODIFIED;
- wfd_save_Permissions($down_groups, $cid, 'WFDownCatPerm');
- wfd_save_Permissions($up_groups, $cid, 'WFUpCatPerm');
+ wfdownloads_savePermissions($down_groups, $cid, 'WFDownCatPerm');
+ wfdownloads_savePermissions($up_groups, $cid, 'WFUpCatPerm');
}
redirect_header($currentFile, 1, $database_mess);
break;
@@ -229,9 +229,9 @@
$adminMenu->addItemButton(_AM_WFD_CCATEGORY_CREATENEW, "{$currentFile}?op=category.add", 'add');
echo $adminMenu->renderButton();
- $totalCategories = wfd_totalcategory();
+ $totalCategories = wfdownloads_categoriesCount();
if ($totalCategories > 0) {
- $sorted_categories = wfd_sortCategories();
+ $sorted_categories = wfdownloads_sortCategories();
$GLOBALS['xoopsTpl']->assign('sorted_categories', $sorted_categories);
$GLOBALS['xoopsTpl']->assign('token', $GLOBALS['xoopsSecurity']->getTokenHTML() );
$GLOBALS['xoopsTpl']->display("db:" . $wfdownloads->getModule()->dirname() . "_admin_categorieslist.html");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -76,14 +76,14 @@
case "delVote":
$rating = $wfdownloads->getHandler('rating')->get($_GET['rid']);
if ($wfdownloads->getHandler('rating')->delete($rating, true)) {
- wfd_updaterating(intval($rating->getVar('lid')));
+ wfdownloads_updateRating(intval($rating->getVar('lid')));
}
redirect_header($currentFile, 1, _AM_WFD_VOTE_VOTEDELETED);
break;
// Added Formulize module support (2006/05/04) jpc - start
case "patch_formulize":
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(!isset($_POST['patch_formulize'])) {
print "<form action=\"{$currentFile}?op=patch_formulize\" method=post>";
print "<input type = submit name=patch_formulize value=\"Apply Patch for Formulize\">";
@@ -144,7 +144,7 @@
$start_expired = WfdownloadsRequest::getInt('start_expired', 0);
$start_offline = WfdownloadsRequest::getInt('start_offline', 0);
- $totalcats = wfd_totalcategory();
+ $totalcats = wfdownloads_categoriesCount();
$categories = $wfdownloads->getHandler('category')->getObjects(null, true, false);
$totalDownloadsCount = $wfdownloads->getHandler('download')->getCount();
@@ -333,7 +333,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (!wfdownload_checkModule('formulize')) {
+ if (!wfdownloads_checkModule('formulize')) {
$sform = $download->getAdminForm($title);
} elseif ((isset($_POST['submit_category']) && !empty($_POST['submit_category'])) || $lid) {
$fid = $category->getVar('formulize_fid');
@@ -348,7 +348,7 @@
$customArray['entry'] = $download->getVar('formulize_idreq');
$customArray['go_back'] = "";
$customArray['parentLinks'] = "";
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entry);
else
$owner = getEntryOwner($entry, $fid);
@@ -652,7 +652,7 @@
$category = $wfdownloads->getHandler('category')->get($cid);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$fid = $category->getVar('formulize_fid');
if($fid) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formread.php";
@@ -661,7 +661,7 @@
if ($lid) {
$entries[$fid][0] = $download->getVar('formulize_idreq');
if($entries[$fid][0]) {
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entries[$fid][0]);
else
$owner = getEntryOwner($entries[$fid][0], $fid);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -132,6 +132,6 @@
$iform->addElement($dup_tray);
}
$iform->display();
- echo wfd_serverstats();
+ echo wfdownloads_serverStats();
include_once "admin_footer.php";
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -28,7 +28,7 @@
$indexAdmin = new ModuleAdmin();
//--------------------------
-$totalcats = wfd_totalcategory();
+$totalcats = wfdownloads_categoriesCount();
$totalbrokendownloads = $wfdownloads->getHandler('report')->getCount();
$totalmodrequests = $wfdownloads->getHandler('modification')->getCount();
$newreviews = $wfdownloads->getHandler('review')->getCount();
@@ -120,7 +120,7 @@
$indexAdmin->addConfigBoxLine('');
$redirectFile = $_SERVER['PHP_SELF'];
-if (!wfdownload_checkModule('formulize'))
+if (!wfdownloads_checkModule('formulize'))
$indexAdmin->addConfigBoxLine(_AM_WFD_FORMULIZE_NOT_AVILABLE);
else
$indexAdmin->addConfigBoxLine(_AM_WFD_FORMULIZE_AVAILABLE);
@@ -156,6 +156,6 @@
echo $indexAdmin->addNavigation('index.php');
echo $indexAdmin->renderIndex();
- echo wfd_serverstats();
+ echo wfdownloads_serverStats();
include_once "admin_footer.php";
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/ratings.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -27,7 +27,7 @@
$rid = WfdownloadsRequest::getInt('rid', 0);
$lid = WfdownloadsRequest::getInt('lid', 0);
$wfdownloads->getHandler('rating')->deleteAll(new Criteria("ratingid", $rid), true);
- wfd_updaterating($lid);
+ wfdownloads_updateRating($lid);
redirect_header($currentFile, 1, _AM_WFD_VOTEDELETED);
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/brokenfile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -109,7 +109,7 @@
include XOOPS_ROOT_PATH . '/header.php';
// Begin Main page Heading etc
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/module.css');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/category.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -83,7 +83,7 @@
$form->addElement(new XoopsFormText(_AM_WFD_FCATEGORY_TITLE, 'title', 50, 255, $this->getVar('title', 'e')), true);
- $totalcats = wfd_totalcategory();
+ $totalcats = wfdownloads_categoriesCount();
if ($totalcats > 0) {
$categories = $this->wfdownloads->getHandler('category')->getObjects();
$categoriesTree = new XoopsObjectTree($categories, 'cid', 'pid');
@@ -139,7 +139,7 @@
$form->addElement($options_tray);
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(file_exists(XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php")) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$fids = allowedForms();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/class/download.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -148,7 +148,7 @@
$download['path'] = $this->wfdownloads->getHandler('category')->getNicePath($download['cid']);
- $download['imageheader'] = wfd_imageheader();
+ $download['imageheader'] = wfdownloads_headerImage();
$download['title'] = trim($this->getVar('title'));
$download['url'] = $this->getVar('url');
@@ -159,7 +159,7 @@
$download['screenshot_full'] = $this->getVar('screenshot');
if ($this->getVar('screenshot') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb'] = down_createthumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb'] = wfdownloads_createThumb($download['screenshot_full'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot'));
@@ -170,7 +170,7 @@
$download['screenshot_full2'] = $this->getVar('screenshot2');
if ($this->getVar('screenshot2') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb2'] = down_createthumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb2'] = wfdownloads_createThumb($download['screenshot_full2'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb2'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot2'));
@@ -181,7 +181,7 @@
$download['screenshot_full3'] = $this->getVar('screenshot3');
if ($this->getVar('screenshot3') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb3'] = down_createthumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb3'] = wfdownloads_createThumb($download['screenshot_full3'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb3'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot3'));
@@ -192,7 +192,7 @@
$download['screenshot_full4'] = $this->getVar('screenshot4');
if ($this->getVar('screenshot4') && file_exists(XOOPS_ROOT_PATH . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4')))) {
if ($this->wfdownloads->getConfig('usethumbs') == true) {
- $download['screenshot_thumb4'] = down_createthumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
+ $download['screenshot_thumb4'] = wfdownloads_createThumb($download['screenshot_full4'], $this->wfdownloads->getConfig('screenshots'), "thumbs", $this->wfdownloads->getConfig('shotwidth'), $this->wfdownloads->getConfig('shotheight'),
$this->wfdownloads->getConfig('imagequality'), $this->wfdownloads->getConfig('updatethumbs'), $this->wfdownloads->getConfig('keepaspect'));
} else {
$download['screenshot_thumb4'] = XOOPS_URL . "/" . $this->wfdownloads->getConfig('screenshots') . "/" . xoops_trim($this->getVar('screenshot4'));
@@ -223,7 +223,7 @@
} else {
$download['version'] = 0;
}
- $download['downtime'] = wfdownloads_GetDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
+ $download['downtime'] = wfdownloads_getDownloadTime($this->getVar('size'), 1, 1, 1, 1, 0);
$download['downtime'] = str_replace("|", "<br />", $download['downtime']);
$download['size'] = wfdownloads_bytesToSize1024($this->getVar('size'));
@@ -312,7 +312,7 @@
$download['review_average_rating'] = $averageReviewsRating; // new
$download['review_rateimg'] = 'rate' . round(number_format($averageReviewsRating, 0) / 2) . '.gif'; // this definition is not removed for compatibility issues
- $download['icons'] = wfd_displayicons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
+ $download['icons'] = wfdownloads_displayIcons($this->getVar('published'), $this->getVar('status'), $this->getVar('hits'));
$sql3 = "SELECT downurl FROM " . $xoopsDB->prefix('wfdownloads_mirrors') . " WHERE lid = '" . $download['id'] . "' AND submit = '1'";
$results3 = $xoopsDB->query($sql3);
@@ -934,7 +934,7 @@
xoops_comment_delete((int)$this->wfdownloads->getModule()->mid(), (int)$download->getVar('lid'));
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
if(file_exists(XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php') AND $download->getVar('formulize_idreq') > 0) {
include_once XOOPS_ROOT_PATH . '/modules/formulize/include/functions.php';
//deleteFormEntries(array($download->getVar('formulize_idreq')));
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -32,7 +32,7 @@
-function wfdownloads_CleanVars(&$global, $key, $default = '', $type = 'int') {
+function wfdownloads_cleanVars(&$global, $key, $default = '', $type = 'int') {
switch ($type) {
case 'array':
$ret = (isset($global[$key]) && is_array($global[$key])) ? $global[$key] : $default;
@@ -264,7 +264,7 @@
* @access public
* @author luciorota
*/
-function wfdownload_checkModule($dirname) {
+function wfdownloads_checkModule($dirname) {
if (!xoops_isActiveModule($dirname)) {
return false;
}
@@ -285,7 +285,7 @@
* @access public
* @author luciorota
*/
-function wfd_sortCategories($pid = 0, $level = 0)
+function wfdownloads_sortCategories($pid = 0, $level = 0)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -301,19 +301,16 @@
$pid = $subCategory->getVar('pid');
$cid = $subCategory->getVar('cid');
$sorted[] = array('pid' => $pid, 'cid' => $cid, 'level' => $level, 'category' => $subCategory->toArray());
- if ($subSorted = wfd_sortCategories($cid, $level)) {
+ if ($subSorted = wfdownloads_sortCategories($cid, $level)) {
$sorted = array_merge($sorted, $subSorted);
}
}
}
return $sorted;
}
-function wfdownloads_sortCategories($pid = 0, $level = 0)
-{
- wfd_sortCategories($pid, $level);
-}
+
/**
* Create download by letter choice bar/menu
* updated starting from this idea http://xoops.org/modules/news/article.php?storyid=6497
@@ -414,7 +411,7 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_TableExists($table)
+function wfdownloads_tableExists($table)
{
$bRetVal = false;
//Verifies that a MySQL table exists
@@ -445,7 +442,7 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_GetMeta($key)
+function wfdownloads_getMeta($key)
{
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
$sql = sprintf("SELECT metavalue FROM %s WHERE metakey=%s", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($key));
@@ -471,10 +468,10 @@
* @access public
* @author xhelp development team
*/
-function wfdownloads_SetMeta($key, $value)
+function wfdownloads_setMeta($key, $value)
{
$xoopsDB =& XoopsDatabaseFactory::getDatabaseConnection();
- if($ret = wfdownloads_GetMeta($key)){
+ if($ret = wfdownloads_getMeta($key)){
$sql = sprintf("UPDATE %s SET metavalue = %s WHERE metakey = %s", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($value), $xoopsDB->quoteString($key));
} else {
$sql = sprintf("INSERT INTO %s (metakey, metavalue) VALUES (%s, %s)", $xoopsDB->prefix('wfdownloads_meta'), $xoopsDB->quoteString($key), $xoopsDB->quoteString($value));
@@ -488,7 +485,7 @@
-function &wfdownloads_gethandler($name, $optional = false )
+function wfdownloads_getHandler($name, $optional = false )
{
static $handlers;
$name = strtolower(trim($name));
@@ -609,7 +606,7 @@
* @param $perm_name
* @return
**/
-function wfd_save_Permissions($groups, $id, $permName)
+function wfdownloads_savePermissions($groups, $id, $permName)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -636,7 +633,7 @@
*
* @return
**/
-function wfd_toolbar()
+function wfdownloads_toolbar()
{
global $xoopsUser;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -663,11 +660,11 @@
/**
- * wfd_serverstats()
+ * wfdownloads_serverStats()
*
* @return
**/
-function wfd_serverstats()
+function wfdownloads_serverStats()
{
global $xoopsDB;
$html = "";
@@ -724,7 +721,7 @@
* @param integer $counter
* @return
*/
-function wfd_displayicons($time, $status = 0, $counter = 0)
+function wfdownloads_displayIcons($time, $status = 0, $counter = 0)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -844,45 +841,44 @@
/**
* updaterating()
*
- * @param $sel_id
+ * @param $lid
* @return updates rating data in itemtable for a given item
**/
-function wfd_updaterating($sel_id)
+function wfdownloads_updateRating($lid)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
- $ratings = $wfdownloads->getHandler('rating')->getObjects(new Criteria("lid", intval($sel_id)));
- $votesDB = count($ratings);
- $totalrating = 0;
- foreach (array_keys($ratings) as $i) {
- $totalrating += $ratings[$i]->getVar('rating');
+ $ratings = $wfdownloads->getHandler('rating')->getObjects(new Criteria('lid', (int)$lid));
+ $ratings_count = count($ratings);
+ $totalRating = 0;
+ foreach ($ratings as $rating) {
+ $totalRating += $rating->getVar('rating');
}
- $finalrating = $totalrating / $votesDB;
- $finalrating = number_format($finalrating, 4);
- $download = $wfdownloads->getHandler('download')->get($sel_id);
- $download->setVar("rating", $finalrating);
- $download->setVar('votes', $votesDB);
+ $averageRating = $totalRating / $ratings_count;
+ $averageRating = number_format($averageRating, 4);
+ $download = $wfdownloads->getHandler('download')->get($lid);
+ $download->setVar('rating', $averageRating);
+ $download->setVar('votes', $ratings_count);
$wfdownloads->getHandler('download')->insert($download);
}
/**
- * totalcategory()
+ * wfdownloads_categoriesCount()
*
- * @param integer $pid
* @return
**/
-function wfd_totalcategory()
+function wfdownloads_categoriesCount()
{
global $xoopsUser;
+ $gperm_handler = xoops_gethandler('groupperm');
$wfdownloads = WfdownloadsWfdownloads::getInstance();
$groups = (is_object($xoopsUser)) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
- $gperm_handler = & xoops_gethandler('groupperm');
- $allowed_cats = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
- return count($allowed_cats);
+ $allowedDownCategoriesIds = $gperm_handler->getItemIds('WFDownCatPerm', $groups, $wfdownloads->getModule()->mid());
+ return count($allowedDownCategoriesIds);
}
@@ -894,24 +890,23 @@
* @param integer $get_child
* @return the total number of items in items table that are accociated with a given table $table id
**/
-function wfd_getTotalItems($sel_id = 0, $ids = array())
+function wfdownloads_getTotalDownloads($cid = 0, $cids = array())
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
- $sel_id = intval($sel_id);
- $criteria = new CriteriaCompo(new Criteria("offline", 0));
+ $criteria = new CriteriaCompo(new Criteria('offline', false));
$criteria->add(new Criteria('published', 0, '>'));
- $criteria->add(new Criteria('published', time(), "<="));
- $expired_criteria = new CriteriaCompo(new Criteria('expired', 0));
- $expired_criteria->add(new Criteria("expired", time(), ">="), "OR");
- $criteria->add($expired_criteria);
- if ($sel_id > 0) {
- $criteria->add(new Criteria("cid", $sel_id));
+ $criteria->add(new Criteria('published', time(), '<='));
+ $expiredCriteria = new CriteriaCompo(new Criteria('expired', 0));
+ $expiredCriteria->add(new Criteria('expired', time(), '>='), 'OR');
+ $criteria->add($expiredCriteria);
+ if ($cid > 0) {
+ $criteria->add(new Criteria('cid', (int)$cid));
}
- if (count($ids) > 0) {
- $criteria->add(new Criteria("cid", "(".implode(',', $ids).")", "IN"));
+ if (count($cids) > 0) {
+ $criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
}
- $criteria->setGroupby("cid");
+ $criteria->setGroupby('cid');
$info['published'] = $wfdownloads->getHandler('download')->getMaxPublishdate($criteria);
$info['count'] = $wfdownloads->getHandler('download')->getCount($criteria);
@@ -920,23 +915,23 @@
-function wfd_imageheader()
+function wfdownloads_headerImage()
{
global $xoopsDB;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
$image = '';
- $result = $xoopsDB -> query("SELECT indeximage, indexheading FROM " . $xoopsDB -> prefix("wfdownloads_indexpage ") . " ");
+ $result = $xoopsDB -> query("SELECT indeximage, indexheading FROM " . $xoopsDB -> prefix('wfdownloads_indexpage') . " ");
list($indexImage, $indexHeading) = $xoopsDB -> fetchrow($result);
if (!empty($indeximage)) {
- $image = wfd_displayimage($indexImage, "'index.php'", $wfdownloads->getConfig('mainimagedir'), $indexHeading);
+ $image = wfdownloads_displayImage($indexImage, 'index.php', $wfdownloads->getConfig('mainimagedir'), $indexHeading);
}
return $image;
}
-function wfd_displayimage($image = '', $path = '', $imgSource = '', $altText = '')
+function wfdownloads_displayImage($image = '', $href = '', $imgSource = '', $altText = '')
{
global $xoopsUser;
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -944,19 +939,22 @@
$showImage = '';
// Check to see if link is given
- if ($path) {
- $showImage = "<a href=" . $path . ">";
+ if ($href) {
+ $showImage = "<a href='{$href}'>";
}
// checks to see if the file is valid else displays default blank image
- if (!is_dir(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image) && file_exists(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image)) {
- $showImage .= "<img src='" . XOOPS_URL . "/" . $imgSource . "/" . $image . "' border='0' alt='" . $altText . "' /></a>";
+ if (!is_dir(XOOPS_ROOT_PATH . '/'' . $imgSource . '/'' . $image) && file_exists(XOOPS_ROOT_PATH . "/" . $imgSource . "/" . $image)) {
+ $showImage .= "<img src='" . XOOPS_URL . "/{$imgSource}/{$image}' border='0' alt='{$altText}' />";
} else {
if ($xoopsUser && $xoopsUser->isAdmin($wfdownloads->getModule()->mid())) {
- $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/brokenimg.png' alt='" . _MD_WFD_ISADMINNOTICE . "' /></a>";
+ $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/brokenimg.png' alt='" . _MD_WFD_ISADMINNOTICE . "' />";
} else {
- $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/blank.png' alt=" . $altText . " /></a>";
+ $showImage .= "<img src='" . XOOPS_URL . "/modules/wfdownloads/images/blank.gif' alt='{$altText}' />";
}
}
+ if ($href) {
+ $showImage.= "</a>";
+ }
clearstatcache();
return $showImage;
}
@@ -964,7 +962,7 @@
/**
- * down_createthumb()
+ * wfdownloads_createThumb()
*
* @param $img_name
* @param $img_path
@@ -976,7 +974,7 @@
* @param integer $aspect
* @return
**/
-function down_createthumb($imgName, $imgPath, $imgSavePath, $width = 100, $height = 100, $quality = 100, $update = 0, $aspect = 1)
+function wfdownloads_createThumb($imgName, $imgPath, $imgSavePath, $width = 100, $height = 100, $quality = 100, $update = 0, $aspect = 1)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -1095,7 +1093,7 @@
// This function is used to show some different download times
// BCMATH-Support in PHP needed!
// (c)02.04.04 by St@neCold, sto...@cs..., http://www.csgui.de
-function wfdownloads_GetDownloadTime($size = 0, $gmodem = 1, $gisdn = 1, $gdsl = 1, $gslan = 0, $gflan = 0)
+function wfdownloads_getDownloadTime($size = 0, $gmodem = 1, $gisdn = 1, $gdsl = 1, $gslan = 0, $gflan = 0)
{
$aflag = array();
$amtime = array();
@@ -1144,7 +1142,7 @@
-function wfd_strrrchr($haystack, $needle)
+function wfdownloads_strrrchr($haystack, $needle)
{
return substr($haystack, 0, strpos($haystack, $needle) + 1);
}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -49,7 +49,7 @@
} else {
echo $feedback;
}
- wfdownloads_SetMeta("version", "3.23"); //Set meta version to current
+ wfdownloads_setMeta("version", "3.23"); //Set meta version to current
return true;
}
@@ -146,7 +146,7 @@
function update_tables_to_322($module) {
$dbupdater = new WfdownloadsDbupdater();
- if (!wfdownloads_TableExists('wfdownloads_meta')) {
+ if (!wfdownloads_tableExists('wfdownloads_meta')) {
// Create table wfdownloads_meta
$table = new WfdownloadsTable('wfdownloads_meta');
$table->setStructure("CREATE TABLE %s (
@@ -160,7 +160,7 @@
}
}
- if (!wfdownloads_TableExists('wfdownloads_mirrors')) {
+ if (!wfdownloads_tableExists('wfdownloads_mirrors')) {
// Create table wfdownloads_mirror
$table = new WfdownloadsTable('wfdownloads_mirrors');
$table->setStructure("CREATE TABLE %s (
@@ -182,7 +182,7 @@
}
}
- if (!wfdownloads_TableExists('wfdownloads_ip_log')) {
+ if (!wfdownloads_tableExists('wfdownloads_ip_log')) {
// Create table wfdownloads_ip_log
$table = new WfdownloadsTable('wfdownloads_ip_log');
$table->setStructure("CREATE TABLE %s (
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -75,7 +75,7 @@
// With custom forms, because a multi term query using AND could have some terms match only custom form fields and other terms match only native wf-downloads fields, each term must be evaluated independently, across both modules, and then if an AND operator is in effect, the intersection of the results is returned. If OR is in effect, then all results are returned.
// Determine what the custom forms are that need searching, if any
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
$fids = array();
foreach($allowedDownCategoriesIds as $cid) {
$category = $wfdownloads->getHandler('category')->get($cid);
@@ -114,7 +114,7 @@
$saved_ids = array();
// Find all IDs of entries in all custom forms which match the current term
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
foreach($fids as $fid) {
if(!isset($formulizeElements_handler)) {
$formulizeElements_handler = xoops_getmodulehandler('elements', 'formulize');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -68,7 +68,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
-$catarray['imageheader'] = wfd_imageheader();
+$catarray['imageheader'] = wfdownloads_headerImage();
$catarray['indexheaderalign'] = $head_arr['indexheaderalign'];
$catarray['indexfooteralign'] = $head_arr['indexfooteralign'];
$html = ($head_arr['nohtml']) ? 1 : 0;
@@ -79,14 +79,14 @@
$catarray['indexheader'] = $myts->displayTarea($head_arr['indexheader'], $html, $smiley, $xcodes, $images, $breaks);
$catarray['indexfooter'] = $myts->displayTarea($head_arr['indexfooter'], $html, $smiley, $xcodes, $images, $breaks);
$catarray['letters'] = wfdownloads_lettersChoice();
-$catarray['toolbar'] = wfd_toolbar();
+$catarray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catarray);
// Begin Main page download info
$chcount = 0;
$countin = 0;
-$listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
+$listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
// Get total amount of categories
$total_cat = count($allowedDownCategoriesIds);
@@ -141,7 +141,7 @@
$isNewImage = wfdownloads_isNewImage($publishdate);
if (($mainCategories[$i]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . "/" . $wfdownloads->getConfig('catimage') . "/" . $mainCategories[$i]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($mainCategories[$i]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
"thumbs", $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/mirror.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -69,7 +69,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoopsTpl->assign('category_path', $wfdownloads->getHandler('category')->getNicePath($cid));
$xoopsTpl->assign('category_id', $cid);
@@ -176,7 +176,7 @@
$breadcrumb->addLink(_MD_WFD_ADDMIRROR, '');
echo $breadcrumb->render();
- echo "<div align='center'>" . wfd_imageheader() . "</div><br />\n";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div><br />\n";
echo "<div>" . _MD_WFD_MIRROR_SNEWMNAMEDESC . "</div>\n";
// Generate form
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/newlist.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -30,9 +30,9 @@
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0 => XOOPS_GROUP_ANONYMOUS);
-$catArray['imageheader'] = wfd_imageheader();
+$catArray['imageheader'] = wfdownloads_headerImage();
$catArray['letters'] = wfdownloads_lettersChoice();
-$catArray['toolbar'] = wfd_toolbar();
+$catArray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catArray);
// Breadcrumb
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/ratefile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -97,7 +97,7 @@
$rating->setVar('ratingtimestamp', time());
if ($wfdownloads->getHandler('rating')->insert($rating)) {
// All is well. Calculate Score & Add to Summary (for quick retrieval & sorting) to DB.
- wfd_updaterating($lid);
+ wfdownloads_updateRating($lid);
$thankyouMessage = _MD_WFD_VOTEAPPRE . "<br />" . sprintf(_MD_WFD_THANKYOU, $xoopsConfig['sitename']);
redirect_header("singlefile.php?cid={$cid}&lid={$lid}", 4, $thankyouMessage);
} else {
@@ -145,7 +145,7 @@
$xoopsTpl->assign('voteform', $sform->render());
$xoopsTpl->assign('download', array('lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'description' => $download->getVar('description')));
- $xoopsTpl->assign('file', array('id' => $lid, 'lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'imageheader' => wfd_imageheader())); // this definition is not removed for compatibility issues
+ $xoopsTpl->assign('file', array('id' => $lid, 'lid' => $lid, 'cid' => $cid, 'title' => $download->getVar('title'), 'imageheader' => wfdownloads_headerImage())); // this definition is not removed for compatibility issues
include 'footer.php';
}
break;
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/review.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/review.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -66,7 +66,7 @@
// Generate content header
$sql = "SELECT * FROM " . $xoopsDB->prefix('wfdownloads_indexpage') . " ";
$head_arr = $xoopsDB->fetchArray($xoopsDB->query($sql));
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
$xoopsTpl->assign('category_path', $wfdownloads->getHandler('category')->getNicePath($cid));
$xoopsTpl->assign('category_id', $cid);
@@ -149,7 +149,7 @@
$breadcrumb->addLink(_MD_WFD_REVIEWTHISFILE, '');
echo $breadcrumb->render();
- echo "<div align='center'>" . wfd_imageheader() . "</div><br />\n";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div><br />\n";
echo "<div>" . _MD_WFD_REV_SNEWMNAMEDESC . "</div>\n";
// Generate form
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -63,7 +63,7 @@
if (
$wfdownloads->getConfig('usethumbs') &&
function_exists('gd_info')) {
- $imgurl = down_createthumb($category->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imgurl = wfdownloads_createThumb($category->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -84,7 +84,7 @@
// Added Formulize module support (2006/03/06, 2006/03/08) jpc - start
$formulize_idreq = $download->getVar('formulize_idreq');
-if(wfdownload_checkModule('formulize') && $formulize_idreq) {
+if(wfdownloads_checkModule('formulize') && $formulize_idreq) {
$xoopsTpl->assign('custom_form', 1);
include_once XOOPS_ROOT_PATH . '/modules/formulize/include/extract.php';
// get the form id and id_req of the user's entry
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/submit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/submit.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -86,7 +86,7 @@
$filename = $down['filename'];
$filetype = $_FILES['userfile']['type'];
$title = $_FILES['userfile']['name'];
- $title = rtrim(wfd_strrrchr($title, "."), ".");
+ $title = rtrim(wfdownloads_strrrchr($title, "."), ".");
$title = (isset($_POST['title_checkbox']) && $_POST['title_checkbox'] == 1) ? $title : trim($_POST['title']);
}
// Load screenshot
@@ -199,7 +199,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
- if (wfdownload_checkModule('formulize')) {
+ if (wfdownloads_checkModule('formulize')) {
// Now that the $download object has been instantiated, handle the Formulize part of the submission...
$category = $wfdownloads->getHandler('category')->get($cid);
$fid = $category->getVar('formulize_fid');
@@ -210,7 +210,7 @@
if ($lid) {
$entries[$fid][0] = $download->getVar('formulize_idreq');
if ($entries[$fid][0]) {
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entries[$fid][0]);
else
$owner = getEntryOwner($entries[$fid][0], $fid);
@@ -386,7 +386,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
// Breadcrumb
@@ -395,7 +395,7 @@
$breadcrumb->addLink(_MD_WFD_SUBMITDOWNLOAD, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('image_header', wfdownloads_headerImage());
$xoopsTpl->assign('down_disclaimer', false);
$xoopsTpl->assign('disclaimer', $myts->displayTarea($wfdownloads->getConfig('disclaimer'), 1, 1, 1, 1, 1));
$xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
@@ -436,7 +436,7 @@
$category = $wfdownloads->getHandler('category')->get($cid);
$fid = $category->getVar('formulize_fid');
$customArray = array();
- if (wfdownload_checkModule('formulize') && $fid) {
+ if (wfdownloads_checkModule('formulize') && $fid) {
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/formdisplay.php";
include_once XOOPS_ROOT_PATH . "/modules/formulize/include/functions.php";
$customArray['fid'] = $fid;
@@ -446,7 +446,7 @@
$customArray['entry'] = $download->getVar('formulize_idreq');
$customArray['go_back'] = '';
$customArray['parentLinks'] = '';
- if (wfdownload_checkModule('formulize') < 300)
+ if (wfdownloads_checkModule('formulize') < 300)
$owner = getEntryOwner($entry);
else
$owner = getEntryOwner($entry, $fid);
@@ -454,7 +454,7 @@
$customArray['owner_groups'] = $owner_groups;
}
$sform = $download->getForm($customArray);
- } elseif (wfdownload_checkModule('formulize')) {
+ } elseif (wfdownloads_checkModule('formulize')) {
$sform = $download->getCategoryForm();
} else {
$sform = $download->getForm();
@@ -467,7 +467,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
// Breadcrumb
$breadcrumb = new WfdownloadsBreadcrumb();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/topten.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/topten.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -39,9 +39,9 @@
$thisselected = $action_array[$sort];
$sortDB = $list_array[$thisselected];
-$catarray['imageheader'] = wfd_imageheader();
+$catarray['imageheader'] = wfdownloads_headerImage();
$catarray['letters'] = wfdownloads_lettersChoice();
-$catarray['toolbar'] = wfd_toolbar();
+$catarray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl -> assign('catarray', $catarray);
$arr = array();
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -80,7 +80,7 @@
}
// Added Formulize module support (2006/05/04) jpc - start
-if (wfdownload_checkModule('formulize')) {
+if (wfdownloads_checkModule('formulize')) {
$formulize_fid = $category->getVar('formulize_fid');
if($formulize_fid)
$xoopsTpl->assign('custom_form', true);
@@ -90,9 +90,9 @@
// Added Formulize module support (2006/05/04) jpc - end
// Generate Header
-$catArray['imageheader'] = wfd_imageheader();
+$catArray['imageheader'] = wfdownloads_headerImage();
$catArray['letters'] = wfdownloads_lettersChoice();
-$catArray['toolbar'] = wfd_toolbar();
+$catArray['toolbar'] = wfdownloads_toolbar();
$xoopsTpl->assign('catarray', $catArray);
$xoopsTpl->assign('categoryPath', $wfdownloads->getHandler('category')->getNicePath($cid)); // this definition is not removed for compatibility issues
@@ -120,7 +120,7 @@
$allSubcategories = $categoriesTree->getFirstChild($cid);
if (is_array($allSubcategories) > 0 && !isset($_GET['list']) && !isset($_GET['selectdate'])) {
- $listings = wfd_getTotalItems(0, $allowedDownCategoriesIds);
+ $listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
$scount = 1;
foreach($allSubcategories as $subcategory) {
// Check if subcategory is allowed
@@ -135,7 +135,7 @@
// ----- added for subcat images -----
if (($subcategory->getVar('imgurl') != '') && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $subcategory->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($subcategory->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($subcategory->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
@@ -197,7 +197,7 @@
// Making the category image and title available in the template
if (($categories[$cid]->getVar('imgurl') != "") && is_file(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage') . '/' . $categories[$cid]->getVar('imgurl'))) {
if ($wfdownloads->getConfig('usethumbs') && function_exists('gd_info')) {
- $imageURL = down_createthumb($categories[$cid]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
+ $imageURL = wfdownloads_createThumb($categories[$cid]->getVar('imgurl'), $wfdownloads->getConfig('catimage'),
'thumbs', $wfdownloads->getConfig('cat_imgwidth'), $wfdownloads->getConfig('cat_imgheight'),
$wfdownloads->getConfig('imagequality'), $wfdownloads->getConfig('updatethumbs'), $wfdownloads->getConfig('keepaspect'));
} else {
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/visit.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2013-09-09 18:28:43 UTC (rev 12015)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/visit.php 2013-09-09 22:17:28 UTC (rev 12016)
@@ -82,7 +82,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- $catarray['imageheader'] = wfd_imageheader();
+ $catarray['imageheader'] = wfdownloads_headerImage();
$xoopsTpl->assign('catarray', $catarray);
// Breadcrumb
@@ -91,7 +91,7 @@
$breadcrumb->addLink(_MD_WFD_DOWNLOADNOW, '');
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
- $xoopsTpl->assign('image_header', wfd_imageheader());
+ $xoopsTpl->assign('image_header', wfdownloads_headerImage());
$xoopsTpl->assign('down_disclaimer', true);
$xoopsTpl->assign('downdisclaimer', $myts->displayTarea($wfdownloads->getConfig('downdisclaimer'), 1, 1, 1, 1, 1));
$xoopsTpl->assign('cancel_location', WFDOWNLOADS_URL . '/index.php'); // this definition is not removed for compatibility issues
@@ -118,7 +118,7 @@
$xoTheme->addStylesheet(WFDOWNLOADS_URL . '/thickbox.css');
$xoopsTpl->assign('wfdownloads_url', WFDOWNLOADS_URL . '/');
- echo "<div align='center'>" . wfd_imageheader() . "</div>";
+ echo "<div align='center'>" . wfdownloads_headerImage() . "</div>";
$url = $myts->htmlSpecialChars(preg_replace('/javascript:/si' , 'javascript:', $download->getVar('url')), ENT_QUOTES);
echo "<h4><img src='" . WFDOWNLOADS_URL . "/images/icon/downloads.gif' align='middle' alt='' title='" . _MD_WFD_DOWNINPROGRESS . "' /> " . _MD_WFD_DOWNINPROGRESS . "</h4>\n";
@@ -174,7 +174,7 @@
exit();
} else {
include XOOPS_ROOT_PATH . '/header.php';
- echo "<br /><div align='center'>" . wfd_imageheader() . "</div>";
+ echo "<br /><div align='center'>" . wfdownloads_headerImage() . "</div>";
reportBroken($lid);
}
|