Need some help with mosReadDirectory.. - Joomla! Forum - community, help and support


hi all,

i've come across problem mosreaddirectory i'm not sure how or why it's stopped working, i'm using following code (to display files inside folder) administration component..

code: select all

global $mainframe;
$db = jfactory::getdbo();
      
$imgfiles = mosreaddirectory( $mainframe->getcfg( 'absolute_path' ) . "/v4/images/portfolio/" );
$images = array();
      
foreach ($imgfiles $file) {
   if (!eregi( "db", $file )) {
      $images[] = $file;
   }
};
      
foreach ($images $file => $file_options) {
   $linkedfile .= '<option value="'.$file_options.'">'.$file_options.'</option>'."\r";
};


however, i'm getting these errors:

jfolder::files: path not folder
jfolder::folder: path not folder

warning: array_merge() [function.array-merge]: argument #1 not array in /home/souliedc/public_html/v4/plugins/system/legacy/functions.php on line 286

warning: array_merge() [function.array-merge]: argument #2 not array in /home/souliedc/public_html/v4/plugins/system/legacy/functions.php on line 286

warning: asort() expects parameter 1 array, null given in /home/souliedc/public_html/v4/plugins/system/legacy/functions.php on line 288

warning: invalid argument supplied foreach() in /home/souliedc/public_html/v4/administrator/components/com_portfolio/admin.portfolio.html.php on line 72


i have legacy plugin enabled, , double checked file folders/paths make sure exist etc. can't think of i've done kill script? if can help, that'd fantastic!! :)

replace "$mainframe->getcfg( 'absolute_path' )" jpath_site.





Comments

Popular posts from this blog

Christian Home School Programs - Joomla! Forum - community, help and support

Typo in documentation

captcha in coldfusion MX