|
From: <luc...@us...> - 2013-09-24 17:49:03
|
Revision: 12091
http://sourceforge.net/p/xoops/svn/12091
Author: luciorota
Date: 2013-09-24 17:49:00 +0000 (Tue, 24 Sep 2013)
Log Message:
-----------
- templatized letterschoice
- fixed errors (mamba/luciorota)
- added some directories checks
Modified Paths:
--------------
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/docs/changelog.txt
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/language/english/admin.php
XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
Added Paths:
-----------
XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/downloads.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -21,6 +21,11 @@
$currentFile = basename(__FILE__);
include_once dirname(__FILE__) . '/admin_header.php';
+if (!is_dir($wfdownloads->getConfig('uploaddir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS);
+ exit();
+}
+
$op = WfdownloadsRequest::getString('op', 'downloads.list');
switch ($op) {
case "download.edit" :
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/images.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -21,6 +21,19 @@
$currentFile = basename(__FILE__);
include_once dirname(__FILE__) . '/admin_header.php';
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('mainimagedir'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('screenshots'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS);
+ exit();
+}
+if (!is_dir(XOOPS_ROOT_PATH . '/' . $wfdownloads->getConfig('catimage'))) {
+ redirect_header('index.php', 4, _AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS);
+ exit();
+}
+
$op = WfdownloadsRequest::getString('op', 'images.list');
switch ($op) {
case "image.upload" :
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/admin/index.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -193,8 +193,8 @@
//---------------------------
- echo $indexAdmin->addNavigation('index.php');
- echo $indexAdmin->renderIndex();
- echo wfdownloads_serverStats();
+echo $indexAdmin->addNavigation('index.php');
+echo $indexAdmin->renderIndex();
+echo wfdownloads_serverStats();
include 'admin_footer.php';
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/docs/changelog.txt 2013-09-24 17:49:00 UTC (rev 12091)
@@ -1,4 +1,4 @@
-<b><u>=> Version 3.23 Beta (2013-09-22)</u></b>
+<b><u>=> Version 3.23 Beta (2013-09-24)</u></b>
- module standardization: header.php, admin/admin_header.php, xoops_version.php
- module standardization: standardize directories/files names/structures
- module standardization: standardize code headers
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/functions.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -327,29 +327,35 @@
$criteria = $wfdownloads->getHandler('download')->getActiveCriteria();
$criteria->setGroupby('UPPER(LEFT(title,1))');
$countsByLetters = $wfdownloads->getHandler('download')->getCounts($criteria);
-
- $letterChoice = _MD_WFDOWNLOADS_BROWSETOTOPIC . "<br />";
- $letterChoice .= "[ ";
- //$alphabet = array ("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z");
+ // Fill alphabet array
$alphabet = wfdownloads_alphabet();
- $num = count($alphabet) - 1;
- $counter = 0;
-
+ $alphabet_array = array();
foreach($alphabet as $letter) {
+ $letter_array = array();
if(isset($countsByLetters[$letter])) {
- $letterChoice .= "<a href='" . XOOPS_URL . "/modules/wfdownloads/viewcat.php?list=$letter' title='" . $countsByLetters[$letter] . "'>$letter</a>";
+ $letter_array['letter'] = $letter;
+ $letter_array['count'] = $countsByLetters[$letter];
+ $letter_array['url'] = "" . XOOPS_URL . "/modules/wfdownloads/viewcat.php?list={$letter}";
} else {
- $letterChoice .= "$letter";
+ $letter_array['letter'] = $letter;
+ $letter_array['count'] = 0;
+ $letter_array['url'] = "";
}
- if ($counter == round($num / 2))
- $letterChoice .= " ]<br />[ ";
- elseif ($counter != $num)
- $letterChoice .= " | ";
- $counter++;
+ $alphabet_array[$letter] = $letter_array;
+ unset($letter_array);
}
-
- $letterChoice .= " ]";
- return $letterChoice;
+ // Render output
+ if ( !isset($GLOBALS['xoTheme']) || !is_object($GLOBALS['xoTheme']) ) {
+ include_once $GLOBALS['xoops']->path( "/class/theme.php" );
+ $GLOBALS['xoTheme'] = new xos_opal_Theme();
+ }
+ require_once $GLOBALS['xoops']->path('class/template.php');
+ $letterschoiceTpl = new XoopsTpl();
+ $letterschoiceTpl->caching = false; // Disable cache
+ $letterschoiceTpl->assign('alphabet', $alphabet_array);
+ $html = $letterschoiceTpl->fetch("db:" . $wfdownloads->getModule()->dirname() . "_common_letterschoice.html");
+ unset($letterschoiceTpl);
+ return $html;
}
@@ -891,13 +897,12 @@
/**
- * getTotalItems()
+ * wfdownloads_getTotalDownloads()
*
- * @param integer $sel_id
- * @param integer $get_child
+ * @param integer OR array of integer $cids
* @return the total number of items in items table that are accociated with a given table $table id
**/
-function wfdownloads_getTotalDownloads($cid = 0, $cids = array())
+function wfdownloads_getTotalDownloads($cids = 0)
{
$wfdownloads = WfdownloadsWfdownloads::getInstance();
@@ -907,12 +912,13 @@
$expiredCriteria = new CriteriaCompo(new Criteria('expired', 0));
$expiredCriteria->add(new Criteria('expired', time(), '>='), 'OR');
$criteria->add($expiredCriteria);
- if ($cid > 0) {
+ if (is_array($cids) && count($cids) > 0) {
+ $criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
+ } elseif ($cid > 0) {
$criteria->add(new Criteria('cid', (int)$cid));
+ } else {
+ return false;
}
- if (count($cids) > 0) {
- $criteria->add(new Criteria('cid', '(' . implode(',', $cids) . ')', 'IN'));
- }
$criteria->setGroupby('cid');
$info['published'] = $wfdownloads->getHandler('download')->getMaxPublishdate($criteria);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/module.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -31,7 +31,7 @@
}
function xoops_module_install_wfdownloads(&$xoopsModule) {
// NOP
-}
+ return true;}
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/include/search.inc.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -170,6 +170,7 @@
unset($queryCriteria);
// Make an array of the downloads based on the lid, and a separate list of all the lids found (the separate list is used in the case of an AND operator to derive an intersection of the hits across all search terms -- and it is used to determine the start and limit points of the main results array for an OR query)
+ $downloads_lids = array();
foreach($tempDownloads as $tempDownload) {
$downloads[(int)$tempDownload->getVar('lid')] = $tempDownload;
$downloads_lids[] = (int)$tempDownload->getVar('lid');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/index.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/index.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -86,7 +86,7 @@
$chcount = 0;
$countin = 0;
-$listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
+$listings = wfdownloads_getTotalDownloads($allowedDownCategoriesIds);
// Get total amount of categories
$total_cat = count($allowedDownCategoriesIds);
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/admin.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -640,6 +640,10 @@
define('_AM_WFDOWNLOADS_DIRNOTCREATED','The directory can not be created');
define('_AM_WFDOWNLOADS_PERMSET','The permission has been set');
define('_AM_WFDOWNLOADS_PERMNOTSET','The permission can not be set');
+define('_AM_WFDOWNLOADS_ERROR_UPLOADDIRNOTEXISTS',"Warning: the upload directory does not exists");
+define('_AM_WFDOWNLOADS_ERROR_MAINIMAGEDIRNOTEXISTS',"Warning: the main images directory does not exists");
+define('_AM_WFDOWNLOADS_ERROR_SCREENSHOTSDIRNOTEXISTS',"Warning: the categories images upload directory does not exists");
+define('_AM_WFDOWNLOADS_ERROR_CATIMAGEDIRNOTEXISTS',"Warning: the upload directory does not exists");
// admin/downloads.php
define('_AM_WFDOWNLOADS_SEARCH','Search');
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/language/english/modinfo.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -153,7 +153,7 @@
define('_MI_WFDOWNLOADS_PLATFORM','Enter platforms');
define('_MI_WFDOWNLOADS_SUBCATS','Subcategories');
define('_MI_WFDOWNLOADS_VERSIONTYPES','Version status');
-define('_MI_WFDOWNLOADS_LICENSE','Enter license');
+define('_MI_WFDOWNLOADS_LICENSE','Enter licenses');
define('_MI_WFDOWNLOADS_LIMITS','Enter file limitations');
define('_MI_WFDOWNLOADS_MAXSHOTS','[screenshots] Select max number of screenshots');
define('_MI_WFDOWNLOADS_MAXSHOTSDSC','Sets the maximum number of allowed screenshot uploads.');
@@ -182,7 +182,7 @@
// Description of each config items
define('_MI_WFDOWNLOADS_PLATFORMDSC','List of platforms to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
define('_MI_WFDOWNLOADS_SUBCATSDSC','Select "' . _YES . '" to display subcategories. Selecting "' . _NO . '" will hide sub-categories from the listings.');
-define('_MI_WFDOWNLOADS_LICENSEDSC','List of platforms to enter.<br />Separate with |');
+define('_MI_WFDOWNLOADS_LICENSEDSC','List of licenses to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!');
// Text for notifications
define('_MI_WFDOWNLOADS_GLOBAL_NOTIFY','Global');
@@ -353,14 +353,14 @@
define("_MI_WFDOWNLOADS_MAINIMGDIRDSC","Path relative to Xoops root path: "" . XOOPS_ROOT_PATH . "/".<br />No trailing slash.");
define("_MI_WFDOWNLOADS_CATEGORYIMGDSC","Path relative to Xoops root path: "" . XOOPS_ROOT_PATH . "/".<br />No trailing slash.");
-define("_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC","// in progress");
+define("_MI_WFDOWNLOADS_SHOWDISCLAIMERDSC","");
define("_MI_WFDOWNLOADS_DISCLAIMERDSC","HTML tags, smiley icons, XOOPS codes, images are enabled.");
-define("_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC","// in progress");
+define("_MI_WFDOWNLOADS_SHOWDOWNDISCLDSC","");
define("_MI_WFDOWNLOADS_DOWNDISCLAIMERDSC","HTML tags, smiley icons, XOOPS codes, images are enabled.");
-define("_MI_WFDOWNLOADS_LIMITSDSC","// in progress");
-define("_MI_WFDOWNLOADS_VERSIONTYPESDSC","// in progress");
+define("_MI_WFDOWNLOADS_LIMITSDSC","List of limits to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
+define("_MI_WFDOWNLOADS_VERSIONTYPESDSC","List of version types to enter.<br />Separate with |<br />IMPORTANT: Do not change this once the site is live, add new to the end of the list!");
define("_MI_WFDOWNLOADS_REVIEW_ENABLE","[reviews] Enable Reviews system");
define("_MI_WFDOWNLOADS_REVIEW_ENABLEDSC","If enabled, Reviews system (submit and show reviews) is enabled in backend.");
@@ -370,3 +370,18 @@
define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLE","[broken reports] Enable Broken reports system");
define("_MI_WFDOWNLOADS_BROKENREPORT_ENABLEDSC","If enabled, Broken reports system is enabled in backend.");
+
+define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS","File submission generals permissions");
+define("_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGSDSC","");
+
+define("_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGS","Screenshots preferences");
+define("_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGSDSC","");
+
+define("_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGS","Files preferences");
+define("_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGSDSC","");
+
+define("_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMS","Extra systems preferences");
+define("_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMSDSC","");
+
+define("_MI_WFDOWNLOADS_VARIOUS_CONFIGS","Various preferences");
+define("_MI_WFDOWNLOADS_VARIOUS_CONFIGSDSC","");
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/singlefile.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -239,7 +239,7 @@
// Copyright
if ($wfdownloads->getConfig('copyright') == true) {
- $xoopsTpl->assign('lang_copyright', $download->getVar('title') . ' © ' . _MD_WFDOWNLOADS_COPYRIGHT . ' ' . date('Y'));
+ $xoopsTpl->assign('lang_copyright', $download->getVar('title') . ' © ' . _MD_WFDOWNLOADS_COPYRIGHT . ' ' . formatTimestamp(time(),'Y'));
}
$xoopsTpl->assign('down', $downloadInfo); // this definition is not removed for compatibility issues
$xoopsTpl->assign('download', $downloadInfo);
Added: XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html (rev 0)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/templates/wfdownloads_common_letterschoice.html 2013-09-24 17:49:00 UTC (rev 12091)
@@ -0,0 +1,47 @@
+<style type="text/css">
+button {
+ -moz-border-radius:2px;
+ -webkit-border-radius:2px;
+ -moz-box-shadow:2px 2px 2px rgba(0,0,0,0.4);
+ -webkit-box-shadow:2px 2px 2px rgba(0,0,0,0.4);
+
+ border:1px solid;
+
+ background:-webkit-gradient(linear,0% 0%,0% 100%,from(rgba(255,255,255,1)),to(rgba(185,185,185,1)));
+ background:-moz-linear-gradient(top,rgba(255,255,255,1),rgba(185,185,185,1));
+
+ padding:2px 4px;
+ marging: 2px 2px;
+}
+button.green {
+ background:-webkit-gradient(linear,0% 0%,0% 100%,from(rgba(93,169,17,1)),to(rgba(202,246,160,1)));
+ background:-moz-linear-gradient(top,rgba(93,169,17,1),rgba(202,246,160,1));
+}
+
+button:hover {
+ background:rgba(240,240,240,1);
+}
+
+button:active, button:focus {
+ background:-webkit-gradient(linear,0% 100%,0% 0%,from(rgba(255,255,255,1)),to(rgba(185,185,185,1)));
+ background:-moz-linear-gradient(bottom,rgba(255,255,255,1),rgba(185,185,185,1));
+}
+
+button:disabled {
+ color:rgba(0,0,0,0.4);
+ background:rgba(220,220,220,1);
+}
+</style>
+<{$smarty.const._MD_WFDOWNLOADS_BROWSETOTOPIC}>
+<br />
+<div>
+<{assign var="alphabetcount" value=$alphabet|@count}>
+<{foreach name=letters item=letter from=$alphabet}>
+<{if ($letter.count > 0)}>
+<button class='button green' type='button' style='cursor:pointer' onclick='window.location="<{$letter.url}>"' title='<{$letter.count}>'><{$letter.letter}></button>
+<{else}>
+<button class='button' type='button' disabled='disabled'><{$letter.letter}></button>
+<{/if}>
+<{if ($smarty.foreach.letters.iteration == (round($alphabetcount/2))+1)}></div><div><{else}> <{/if}>
+<{/foreach}>
+</div>
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/viewcat.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -21,8 +21,9 @@
$currentFile = basename(__FILE__);
include 'header.php';
-$cid = WfdownloadsRequest::getInt('cid', 0, 'GET');
-$start = WfdownloadsRequest::getInt('start', 0, 'GET');
+$cid = WfdownloadsRequest::getInt('cid', 0);
+$start = WfdownloadsRequest::getInt('start', 0);
+//$list = WfdownloadsRequest::getString('list', null);
$orderby = isset($_GET['orderby']) ? convertorderbyin($_GET['orderby']) : $wfdownloads->getConfig('filexorder');
$groups = is_object($xoopsUser) ? $xoopsUser->getGroups() : array(0=>XOOPS_GROUP_ANONYMOUS);
@@ -113,16 +114,23 @@
foreach(array_reverse($categoriesTree->getAllParent($cid)) as $parentCategory) {
$breadcrumb->addLink($parentCategory->getVar('title'), 'viewcat.php?cid=' . $parentCategory->getVar('cid'));
}
-$breadcrumb->addLink($category->getVar('title'), '');
+if ($category->getVar('title') != '') {
+ $breadcrumb->addLink($category->getVar('title'), '');
+}
+if (isset($_GET['list'])) {
+ $breadcrumb->addLink($_GET['list'], '');
+}
$xoopsTpl->assign('wfdownloads_breadcrumb', $breadcrumb->render());
// Display Subcategories for selected Category
$allSubcategories = $categoriesTree->getFirstChild($cid);
+
if (is_array($allSubcategories) > 0 && !isset($_GET['list']) && !isset($_GET['selectdate'])) {
- $listings = wfdownloads_getTotalDownloads(0, $allowedDownCategoriesIds);
+ $listings = wfdownloads_getTotalDownloads($allowedDownCategoriesIds);
$scount = 1;
foreach($allSubcategories as $subcategory) {
+ $download_count = 0;
// Check if subcategory is allowed
if (!in_array($subcategory->getVar('cid'), $allowedDownCategoriesIds)) {
continue;
@@ -147,13 +155,13 @@
// ----- end subcat images -----
if (count($subsubCategories) > 0) {
- foreach (array_keys($subsubCategories) as $k) {
- if (in_array($subsubCategories[$k]->getVar('cid'), $allowedDownCategoriesIds)) {
- $download_count += isset($listings['count'][$subsubCategories[$k]->getVar('cid')]) ? $listings['count'][$subsubCategories[$k]->getVar('cid')] : 0;
+ foreach ($subsubCategories as $subsubCategory) {
+ if (in_array($subsubCategory->getVar('cid'), $allowedDownCategoriesIds)) {
+ $download_count += isset($listings['count'][$subsubCategory->getVar('cid')]) ? $listings['count'][$subsubCategory->getVar('cid')] : 0;
$infercategories[] = array(
- 'cid' => $subsubCategories[$k]->getVar('cid'),
- 'id' => $subsubCategories[$k]->getVar('cid'), // this definition is not removed for compatibility issues
- 'title' => $subsubCategories[$k]->getVar('title'),
+ 'cid' => $subsubCategory->getVar('cid'),
+ 'id' => $subsubCategory->getVar('cid'), // this definition is not removed for compatibility issues
+ 'title' => $subsubCategory->getVar('title'),
'image' => $imageURL,
'image_URL' => $imageURL,
'count' => $download_count, // this definition is not removed for compatibility issues
Modified: XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php
===================================================================
--- XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-24 14:11:46 UTC (rev 12090)
+++ XoopsModules/wfdownloads/trunk/wfdownloads/xoops_version.php 2013-09-24 17:49:00 UTC (rev 12091)
@@ -47,9 +47,9 @@
$modversion['onUpdate'] = 'include/module.php';
$modversion['onUninstall'] = 'include/module.php';
-$modversion['date'] = '2013-09-21';
-$modversion['release_date'] = '2013/09/21';
-$modversion['releasedate'] = '2013-09-21';
+$modversion['date'] = '2013-09-24';
+$modversion['release_date'] = '2013/09/24';
+$modversion['releasedate'] = '2013-09-24';
$modversion['status'] = 'BETA 1';
$modversion['teammembers'] = "Bender, David, FrankBlack, Xpider, M0nty, Mithrandir, Marcan, felix[fx2024], Sudhaker, Jegelstaff";
@@ -318,6 +318,9 @@
$i++;
$modversion['templates'][$i]['file'] = $modversion['dirname'] . '_common_breadcrumb.html';
$modversion['templates'][$i]['description'] = '';
+$i++;
+$modversion['templates'][$i]['file'] = $modversion['dirname'] . '_common_letterschoice.html';
+$modversion['templates'][$i]['description'] = '';
//Module config setting
@@ -381,8 +384,8 @@
$modversion['config'][] = array(
'name' => 'submissions_configs',
- 'title' => '',
- 'description' => '',
+ 'title' => '_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_SUBMISSIONS_CONFIGSDSC',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
@@ -452,8 +455,8 @@
$modversion['config'][] = array(
'name' => 'screenshots_configs',
- 'title' => '',
- 'description' => '',
+ 'title' => '_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_SCREENSHOTS_CONFIGSDSC',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
@@ -533,8 +536,8 @@
$modversion['config'][] = array(
'name' => 'filesuploads_configs',
- 'title' => '',
- 'description' => '',
+ 'title' => '_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_FILESUPLOADS_CONFIGSDSC',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
@@ -605,8 +608,8 @@
$modversion['config'][] = array(
'name' => 'extrasystems_configs',
- 'title' => '',
- 'description' => '',
+ 'title' => '_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMS',
+ 'description' => '_MI_WFDOWNLOADS_SCREENSHOTS_ESTRASYSTEMSDSC',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
@@ -676,9 +679,9 @@
'default' => true);
$modversion['config'][] = array(
- 'name' => 'permissions_configs',
- 'title' => '',
- 'description' => '',
+ 'name' => 'various_configs',
+ 'title' => '_MI_WFDOWNLOADS_VARIOUS_CONFIGS',
+ 'description' => '_MI_WFDOWNLOADS_VARIOUS_CONFIGSDSC',
'formtype' => 'line_break',
'valuetype' => 'textbox',
'default' => 'head');
|