Sunday 25 April 2010 6:37:09 am
class eZExtension
{
....
static function activateExtensions( $extensionType = false ){
$extensionDirectory = eZExtension::baseDirectory(); $activeExtensions = eZExtension::activeExtensions( $extensionType ); $hasExtensions = false;
$ini = eZINI::instance();
foreach ( $activeExtensions as $activeExtension )
{
$extensionSettingsPath = $extensionDirectory . '/' . $activeExtension . '/settings';
if ( file_exists( $extensionSettingsPath ) ) {
$ini->prependOverrideDir( $extensionSettingsPath, true );
if ( isset( $GLOBALS['eZCurrentAccess'] ) )
{
eZExtension::prependSiteAccess( $activeExtension );
}
$hasExtensions = true;
}
else if ( !file_exists( $extensionDirectory . '/' . $activeExtension ) )
{
eZDebug::writeWarning( "Extension '$activeExtension' does not exist, looked for directory '" . $extensionDirectory . '/' . $activeExtension . "'" );
}
}
if ( $hasExtensions )
$ini->loadCache();
}
.......
}
Peter, The operation that you describe is quite logical, above the function ez, which checks if an extension enabled exist, with the line: ! File_exists ($ extensionDirectory. '/'. ActiveExtension $);
($extensonDirectory: the directory "extension" ; $activeExtension: name / path in the settings files for each extension) I think if you put the name of the extension,or the path of the extension, EZ doesn't care, the important thing is that the directory of the extension exists
. It will be useful, sometimes you end up with more that 20 extensions, it will be good to group them into separate directories, somethings like that:
extension /
ezsystem /
.... (Default extension that comes with ez)
Design /
....
webservices / .... TKS, Regrads
Abdelkader RHOUATI
Blog (french) : http://arhouati.com
----
Extension arh_jdebug : EzDebug using jquery
|