From: Wouter T. <te...@us...> - 2002-02-09 17:17:50
|
Update of /cvsroot/squirrelmail/sm2-api In directory usw-pr-cvs1:/tmp/cvs-serv14727 Modified Files: ZkLoader.php Log Message: the function to translate modulename into the filename... Index: ZkLoader.php =================================================================== RCS file: /cvsroot/squirrelmail/sm2-api/ZkLoader.php,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -r1.12 -r1.13 --- ZkLoader.php 18 Oct 2001 19:04:50 -0000 1.12 +++ ZkLoader.php 9 Feb 2002 17:17:46 -0000 1.13 @@ -71,7 +71,8 @@ $svcfile = "$this->libhome/$svcname/load.php"; $srvfile = "$this->libhome/$svcname/service.php"; $svcfunc = "zkload_$svcname"; - $modfile = "$this->modhome/$svcname/$modname.php"; + $svclocator = 'zkload_'.$svcname.'_module_locator'; + $modfile = "$this->modhome/$svcname/"; if ( zkCheckName( $svcname ) ) { if ( file_exists( $svcfile ) ) { @@ -87,9 +88,13 @@ } else { $ret = FALSE; } - if( $ret && zkCheckName($modname) && file_exists($modfile) ) { + if( $ret ) { + $code_locator = "\$modfile .= $svclocator( $modname );"; + eval( $code_locator ); + if ( zkCheckName($modname) && file_exists($modfile) ) { require_once($modfile); } + } } else $ret = FALSE; |