From: Eloi G. <el...@re...> - 2003-01-04 21:55:07
|
Hi all! I submitted the moveElements() function to SF-featurerequests friday, = but since this is an existing function that I'm requesting be changed, I = thought it should be posted here for developers' review. One of my template sets uses subdirectories. The listTemplates function = couldn't be used with it without the following parameter addition. The = new code is in red. * @param string $subdir The name of a requested subdirectory within = the template directory function listTemplates($module, $subdir =3D NULL, $dirOnly =3D FALSE) = { if ($subdir!=3DNULL) $subdir =3D $subdir . "/"; if(is_dir($GLOBALS["core"]->home_dir . "themes/" . = $_SESSION["OBJ_layout"]->current_theme . "/templates/" . $module . "/" . = $subdir)) { return $GLOBALS["core"]->readDirectory($this->home_dir . "themes/" = . $_SESSION["OBJ_layout"]->current_theme . "/templates/" . $module . "/" = . $subdir, $dirOnly); } else if(is_dir($GLOBALS["core"]->home_dir . "mod/" . $module . = "/templates/" . $subdir)) { return $GLOBALS["core"]->readDirectory($this->home_dir . "mod/" . = $module . "/templates/" . $subdir, $dirOnly); } else { return FALSE; } } // END FUNC listTemplates() -Eloi George- |