Elxis CMS Forum

Extensions => Components => Topic started by: mmarch on February 07, 2007, 12:58:32

Title: Problem creating new directory
Post by: mmarch on February 07, 2007, 12:58:32
Hi guys!!!

I installed MamboFlashGame Component. Everything work fine except - when i try create new game directory i received back message -

Fatal error: Call to undefined function mosReadDirectory() in C:\webroot\xampp\htdocs\merkurs\administrator\components\com_mamboflashgames\admin.mamboflashgames.php on line 554

This is code -
553                <td valign="top"><?php echo _MAMBOFG_DESCRIPTION; ?>:</td>       
554                 <td colspan="2">
555                  <?php

What there is wrong? Hoe i can fix this issue??? I am absolutely ZERO in php. Sorry.
Title: Re: Problem creating new directory
Post by: eliasan on February 07, 2007, 16:43:42
In Elxis the mosReadDirectory function has been replaced by the $fmanager->listFiles() function, defined at includes\Core\filemanager.class.php

You have to modify code in order to call the new function.

I haven't installed neither used the component you are refering to, so the only thing I can do is to show you the way to fix it.
Title: Re: Problem creating new directory
Post by: mmarch on May 22, 2007, 17:23:51
Hi!!

Long time ago I solved this problem in Database. When i needed new categoryi go directly todatabase and made all necessary changes there. But now istarted project and this solution not better for me. In your previous answer you offer me show me, how ican fix it


PLEASE SHOW MEEEEEEEEEEEEEEEE !!!!!

Thank's and sorry :D
Title: Re: Problem creating new directory
Post by: eliasan on May 23, 2007, 00:58:48
Hi mmarch,

In /includes/Core/elxis.php, line 2200,
you will find the comment out definition for the mosReadDirectory function.
function mosReadDirectory( $path, $filter='.', $recurse=false, $fullpath=false  )

In /includes/Core/filemanager.class.php, line 243,
you will find the definition for the listFiles function.
function listFiles($path, $filter = '.', $recurse = false, $fullpath = false)

As you can see they have the same parameters. That is good because you can easily replace "mosReadDirectory" with "listFiles".

To use the listFiles you have to make sure that that the $fmanager class is available.

Type:
global $fmanager;

Now you can replace the mosReadDirectory() call with $fmanager->listFiles()

I hope that helped.