xoops forums

Mamba

Moderator
Posted on: 4/10 1:47
Mamba
Mamba (Show more)
Moderator
Posts: 10620
Since: 2004/4/23
#1

Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Resized Image

The Wfdownloads 3.30 Beta-1 is available for testing on XOOPS 2.5.9 and PHP 5.6.+

New in this version: namespaces, autoloading, various fixes, PHP 7 compatibility (tested on PHP 7.2.4)

You can download it from GitHub.

And you can fork it from GitHub as well, and submit your improvements or bug fixes there.

We encourage everybody to open an account on GitHub and get used to working with Git, as this is the current Industry Standard.

Please note:

a) This version is developed and tested ONLY on XOOPS 2.5.9
Support XOOPS => DONATE
Use 2.5.9 | Docs | Modules | Bugs

luciorota

Module Developer
Posted on: 6/9 19:47
luciorota
luciorota (Show more)
Module Developer
Posts: 181
Since: 2007/4/20
#2

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Hi
I fork to test but I cannot install.

Fatal error: Class 'WfdownloadsUtility' not found in C:\wamp64\www\xoops.259\modules\wfdownloads\include\oninstall.php on line 49

zyspec

Module Developer
Posted on: 6/11 0:34
zyspec
zyspec (Show more)
Module Developer
Posts: 1027
Since: 2004/9/21
#3

Re: Wfdownloads 3.30 Beta-1 for XOOPS 2.5.9 and PHP 5.6+

Unfortunately it looks like Mamba forgot to rewrite part of the install function in the ./include/oninstall.php file. You might try replacing lines 41-64 (the xoops_module_pre_install_wfdownloads function) with:
function xoops_module_pre_install_wfdownloads(XoopsModule $module)
{
    include 
__DIR__ '/common.php';
    
/** @var XoopsModulesWfdownloadsUtility $utility */
    
$utility = new XoopsModulesWfdownloadsUtility();
    
//check for minimum XOOPS version
    
$xoopsSuccess $utility::checkVerXoops($module);
    
// check for minimum PHP version
    
$phpSuccess   $utility::checkVerPhp($module);
    if (
false !== $xoopsSuccess && false !==  $phpSuccess) {
        
$moduleTables =& $module->getInfo('tables');
        foreach (
$moduleTables as $table) {
            
$GLOBALS['xoopsDB']->queryF('DROP TABLE IF EXISTS ' $GLOBALS['xoopsDB']->prefix($table) . ';');
        }
    }
    return 
$xoopsSuccess && $phpSuccess;
}


That should at least get you past the pre-install check for PHP and XOOPs versions.