Jednak wracam z tematem.
Oto fragment pliku admin.exitPoll.php
Kod PHP:
<?php
/**
* eXiT-Poll
*/
/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );
global $mosConfig_componentsDir;
// ensure user has access to this function
if (!($acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'all' )
| $acl->acl_check( 'administration', 'edit', 'users', $my->usertype, 'components', 'com_poll' ))) {
mosRedirect( 'index2.php', _NOT_AUTH );
}
// carico il file della lingua (se esiste)
if (file_exists($mosConfig_absolute_path.'/administrator'.$mosConfig_componentsDir.'/com_exitPoll/language/'.$mosConfig_lang.'.php'))
{
require_once($mosConfig_absolute_path.'/administrator'.$mosConfig_componentsDir.'/com_exitPoll/language/'.$mosConfig_lang.'.php');
}
else
{
require_once($mosConfig_absolute_path.'/administrator'.$mosConfig_componentsDir.'/com_exitPoll/language/english.php');
}
Jak widać zminne $mosConfig_absolute_path czy $mosConfig_lang są wykrywane przez skrypt i jest ok, natomiast jak pisałem na początku wątka dodałem do pliku configuration.php inijke $mosConfig_componentsDir = 'system/components' i jeśli nie wastawie na początku skryptu
Kod PHP:
global $mosConfig_componentsDir
zmienna nie jest widziana, co zrobić aby była widoczna tak jak np
Kod PHP:
$mosConfig_absolute_path