本文整理汇总了PHP中inDeveloperMode函数的典型用法代码示例。如果您正苦于以下问题:PHP inDeveloperMode函数的具体用法?PHP inDeveloperMode怎么用?PHP inDeveloperMode使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了inDeveloperMode函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getDefaultPortalSettings
/**
* Gets the default Portal settings.
*
* @return array the array containing default Portal settings.
*/
private function getDefaultPortalSettings()
{
$portalConfig = array('platform' => 'portal', 'debugSugarApi' => true, 'logLevel' => 'ERROR', 'logWriter' => 'ConsoleWriter', 'logFormatter' => 'SimpleFormatter', 'metadataTypes' => array(), 'defaultModule' => 'Cases', 'orderByDefaults' => array('Cases' => array('field' => 'case_number', 'direction' => 'desc'), 'Bugs' => array('field' => 'bug_number', 'direction' => 'desc'), 'Notes' => array('field' => 'date_modified', 'direction' => 'desc'), 'KBDocuments' => array('field' => 'date_modified', 'direction' => 'desc')));
if (inDeveloperMode()) {
$portalConfig['logLevel'] = 'DEBUG';
}
return $portalConfig;
}
示例2: loadDictionaryFromStorage
/**
* Load a dictionary for a particular api
* @internal
* @param string $apiType The api type for the dictionary you want to load ("Rest" or "Soap")
* @return array The data stored in saveDictionaryToStorage()
*/
protected function loadDictionaryFromStorage($apiType)
{
$dictFile = $this->cacheDir . 'ServiceDictionary.' . $apiType . '.php';
if (!file_exists($dictFile) || inDeveloperMode()) {
// No stored service dictionary, I need to build them
$this->buildAllDictionaries();
}
require $dictFile;
return $apiDictionary[$apiType];
}
示例3: createLanguageFile
/**
* Called from VardefManager to allow for caching a lang file for a module
* @param module - the name of the module we are working with
* @param templates - an array of templates this module uses
*/
public static function createLanguageFile($module, $templates = array('default'), $refresh = false)
{
global $mod_strings, $current_language;
if (inDeveloperMode() || !empty($_SESSION['developerMode'])) {
$refresh = true;
}
$temp_mod_strings = $mod_strings;
$lang = $current_language;
if (empty($lang)) {
$lang = $GLOBALS['sugar_config']['default_language'];
}
if (empty(self::$createdModules[$module]) && ($refresh || !file_exists(sugar_cached('modules/') . $module . '/language/' . $lang . '.lang.php'))) {
$loaded_mod_strings = array();
$loaded_mod_strings = LanguageManager::loadTemplateLanguage($module, $templates, $lang, $loaded_mod_strings);
self::$createdModules[$module] = true;
LanguageManager::refreshLanguage($module, $lang, $loaded_mod_strings);
}
}
示例4: setup
public function setup()
{
$themedef = array();
include 'themes/' . SugarTestThemeUtilities::createAnonymousTheme() . '/themedef.php';
$this->_themeDef = $themedef;
SugarThemeRegistry::add($this->_themeDef);
$this->_themeObject = SugarThemeRegistry::get($this->_themeDef['dirName']);
$themedef = array();
include 'themes/' . SugarTestThemeUtilities::createAnonymousChildTheme($this->_themeObject->__toString()) . '/themedef.php';
$this->_themeDefChild = $themedef;
SugarThemeRegistry::add($this->_themeDefChild);
$this->_themeObjectChild = SugarThemeRegistry::get($this->_themeDefChild['dirName']);
// test assumes developerMode is off, so css minifying happens
if (inDeveloperMode()) {
$this->_olddeveloperMode = $GLOBALS['sugar_config']['developerMode'];
}
$GLOBALS['sugar_config']['developerMode'] = false;
}
示例5: jsParser
protected function jsParser()
{
if (inDeveloperMode()) {
return $this->text;
}
//If the JSMIn extension is loaded, use that as it can be as much as 1000x faster than JShrink
if (extension_loaded("jsmin")) {
return @jsmin($this->text);
}
if (!empty($GLOBALS['sugar_config']['uglify'])) {
$descriptorspec = array(0 => array("pipe", "r"), 1 => array("pipe", "w"));
$process = proc_open($GLOBALS['sugar_config']['uglify'], $descriptorspec, $pipes);
if (is_resource($process)) {
fwrite($pipes[0], $this->text);
fclose($pipes[0]);
$out = stream_get_contents($pipes[1]);
fclose($pipes[1]);
proc_close($process);
return $out;
}
}
require_once 'jssource/Minifier.php';
return JShrink\Minifier::minify($this->text);
}
示例6: preDisplay
/**
* This method checks to see if the configuration file exists and, if not, creates one by default
*
*/
public function preDisplay()
{
global $app_strings;
//Rebuild config file if it doesn't exist
if (!file_exists($this->configFile)) {
ModuleInstaller::handleBaseConfig();
}
$this->ss->assign("configFile", $this->configFile);
$config = ModuleInstaller::getBaseConfig();
$this->ss->assign('configHash', md5(serialize($config)));
$sugarSidecarPath = ensureJSCacheFilesExist();
$this->ss->assign("sugarSidecarPath", $sugarSidecarPath);
// TODO: come up with a better way to deal with the various JS files
// littered in sidecar.tpl.
$voodooFile = 'custom/include/javascript/voodoo.js';
if (SugarAutoLoader::fileExists($voodooFile)) {
$this->ss->assign('voodooFile', $voodooFile);
}
//Load sidecar theme css
$theme = new SidecarTheme();
$this->ss->assign("css_url", $theme->getCSSURL());
$this->ss->assign("developerMode", inDeveloperMode());
//Loading label
$this->ss->assign('LBL_LOADING', $app_strings['LBL_ALERT_TITLE_LOADING']);
$this->ss->assign('LBL_ENABLE_JAVASCRIPT', $app_strings['LBL_ENABLE_JAVASCRIPT']);
$slFunctionsPath = inDeveloperMode() ? "cache/Expressions/functions_cache_debug.js" : "cache/Expressions/functions_cache.js";
if (!is_file($slFunctionsPath)) {
$GLOBALS['updateSilent'] = true;
include "include/Expressions/updatecache.php";
}
$this->ss->assign("SLFunctionsPath", $slFunctionsPath);
if (!empty($this->authorization)) {
$this->ss->assign('appPrefix', $config['env'] . ":" . $config['appId'] . ":");
$this->ss->assign('authorization', $this->authorization);
}
}
示例7: checkError
/**
* Checks for database not being connected
*
* @param string $msg message to prepend to the error message
* @param bool $dieOnError true if we want to die immediately on error
* @return bool
*/
public function checkError($msg = '', $dieOnError = false)
{
$userMsg = inDeveloperMode() ? "{$msg}: " : "";
if (!isset($this->database)) {
$GLOBALS['log']->error("Database Is Not Connected");
if ($this->dieOnError || $dieOnError) {
sugar_die($userMsg . "Database Is Not Connected");
} else {
$this->last_error = $userMsg . "Database Is Not Connected";
}
return true;
}
return false;
}
示例8: getModuleField
function getModuleField($module, $fieldname, $aow_field, $view = 'EditView', $value = '', $alt_type = '')
{
global $current_language, $app_strings, $app_list_strings, $current_user, $beanFiles, $beanList;
// use the mod_strings for this module
$mod_strings = return_module_language($current_language, $module);
// set the filename for this control
$file = create_cache_directory('modules/AOW_WorkFlow/') . $module . $view . $alt_type . $fieldname . '.tpl';
if (!is_file($file) || inDeveloperMode() || !empty($_SESSION['developerMode'])) {
if (!isset($vardef)) {
require_once $beanFiles[$beanList[$module]];
$focus = new $beanList[$module]();
$vardef = $focus->getFieldDefinition($fieldname);
}
$displayParams = array();
//$displayParams['formName'] = 'EditView';
// if this is the id relation field, then don't have a pop-up selector.
if ($vardef['type'] == 'relate' && $vardef['id_name'] == $vardef['name']) {
$vardef['type'] = 'varchar';
}
if (isset($vardef['precision'])) {
unset($vardef['precision']);
}
//$vardef['precision'] = $locale->getPrecedentPreference('default_currency_significant_digits', $current_user);
//TODO Fix datetimecomebo
//temp work around
if ($vardef['type'] == 'datetimecombo') {
$vardef['type'] = 'datetime';
}
// trim down textbox display
if ($vardef['type'] == 'text') {
$vardef['rows'] = 2;
$vardef['cols'] = 32;
}
// create the dropdowns for the parent type fields
if ($vardef['type'] == 'parent_type') {
$vardef['type'] = 'enum';
}
if ($vardef['type'] == 'link') {
$vardef['type'] = 'relate';
$vardef['rname'] = 'name';
$vardef['id_name'] = $vardef['name'] . '_id';
if ((!isset($vardef['module']) || $vardef['module'] == '') && $focus->load_relationship($vardef['name'])) {
$vardef['module'] = $focus->{$vardef}['name']->getRelatedModuleName();
}
}
//check for $alt_type
if ($alt_type != '') {
$vardef['type'] = $alt_type;
}
// remove the special text entry field function 'getEmailAddressWidget'
if (isset($vardef['function']) && ($vardef['function'] == 'getEmailAddressWidget' || $vardef['function']['name'] == 'getEmailAddressWidget')) {
unset($vardef['function']);
}
if (isset($vardef['name']) && ($vardef['name'] == 'date_entered' || $vardef['name'] == 'date_modified')) {
$vardef['name'] = 'aow_temp_date';
}
// load SugarFieldHandler to render the field tpl file
static $sfh;
if (!isset($sfh)) {
require_once 'include/SugarFields/SugarFieldHandler.php';
$sfh = new SugarFieldHandler();
}
$contents = $sfh->displaySmarty('fields', $vardef, $view, $displayParams);
// Remove all the copyright comments
$contents = preg_replace('/\\{\\*[^\\}]*?\\*\\}/', '', $contents);
if ($view == 'EditView' && ($vardef['type'] == 'relate' || $vardef['type'] == 'parent')) {
$contents = str_replace('"' . $vardef['id_name'] . '"', '{/literal}"{$fields.' . $vardef['name'] . '.id_name}"{literal}', $contents);
$contents = str_replace('"' . $vardef['name'] . '"', '{/literal}"{$fields.' . $vardef['name'] . '.name}"{literal}', $contents);
}
// hack to disable one of the js calls in this control
if (isset($vardef['function']) && ($vardef['function'] == 'getCurrencyDropDown' || $vardef['function']['name'] == 'getCurrencyDropDown')) {
$contents .= "{literal}<script>function CurrencyConvertAll() { return; }</script>{/literal}";
}
// Save it to the cache file
if ($fh = @sugar_fopen($file, 'w')) {
fputs($fh, $contents);
fclose($fh);
}
}
// Now render the template we received
$ss = new Sugar_Smarty();
// Create Smarty variables for the Calendar picker widget
global $timedate;
$time_format = $timedate->get_user_time_format();
$date_format = $timedate->get_cal_date_format();
$ss->assign('USER_DATEFORMAT', $timedate->get_user_date_format());
$ss->assign('TIME_FORMAT', $time_format);
$time_separator = ":";
$match = array();
if (preg_match('/\\d+([^\\d])\\d+([^\\d]*)/s', $time_format, $match)) {
$time_separator = $match[1];
}
$t23 = strpos($time_format, '23') !== false ? '%H' : '%I';
if (!isset($match[2]) || $match[2] == '') {
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M");
} else {
$pm = $match[2] == "pm" ? "%P" : "%p";
$ss->assign('CALENDAR_FORMAT', $date_format . ' ' . $t23 . $time_separator . "%M" . $pm);
}
$ss->assign('CALENDAR_FDOW', $current_user->get_first_day_of_week());
//.........这里部分代码省略.........
示例9: checkTemplate
function checkTemplate($cacheRowFile)
{
if (inDeveloperMode() || !empty($_SESSION['developerMode'])) {
return false;
}
return file_exists($cacheRowFile);
}
示例10: getJSURL
/**
* Returns the URL for an image in the current theme. If not found in the current theme, will revert
* to looking in the base theme.
*
* @param string $jsFileName js file name
* @param bool $returnURL if true, returns URL with unique image mark, otherwise returns path to the file
* @return string path to js file
*/
public function getJSURL($jsFileName, $returnURL = true)
{
if (isset($this->_jsCache[$jsFileName]) && sugar_is_file(sugar_cached($this->_jsCache[$jsFileName]))) {
if ($returnURL) {
return getJSPath("cache/" . $this->_jsCache[$jsFileName]);
} else {
return sugar_cached($this->_jsCache[$jsFileName]);
}
}
$jsFileContents = '';
$fullFileName = $this->getJSPath() . '/' . $jsFileName;
$defaultFileName = $this->getDefaultJSPath() . '/' . $jsFileName;
if (isset($this->parentTheme) && SugarThemeRegistry::get($this->parentTheme) instanceof SugarTheme && ($filename = SugarThemeRegistry::get($this->parentTheme)->getJSURL($jsFileName, false)) != '' && !in_array($jsFileName, $this->ignoreParentFiles)) {
$jsFileContents .= file_get_contents($filename);
} else {
if (sugar_is_file($defaultFileName)) {
$jsFileContents .= file_get_contents($defaultFileName);
}
if (sugar_is_file('custom/' . $defaultFileName)) {
$jsFileContents .= file_get_contents('custom/' . $defaultFileName);
}
}
if (sugar_is_file($fullFileName)) {
$jsFileContents .= file_get_contents($fullFileName);
}
if (sugar_is_file('custom/' . $fullFileName)) {
$jsFileContents .= file_get_contents('custom/' . $fullFileName);
}
if (empty($jsFileContents)) {
$GLOBALS['log']->warn("Javascript File {$jsFileName} not found");
return false;
}
// create the cached file location
$jsFilePath = create_cache_directory($fullFileName);
// minify the js
if (!inDeveloperMode() && !sugar_is_file(str_replace('.js', '-min.js', $jsFilePath))) {
$jsFileContents = SugarMin::minify($jsFileContents);
$jsFilePath = str_replace('.js', '-min.js', $jsFilePath);
$fullFileName = str_replace('.js', '-min.js', $fullFileName);
}
// now write the js to cache
sugar_file_put_contents($jsFilePath, $jsFileContents);
$this->_jsCache[$jsFileName] = $fullFileName;
if ($returnURL) {
return getJSPath("cache/" . $fullFileName);
}
return sugar_cached($fullFileName);
}
示例11: checkTemplate
/**
* Checks if a template exists
*
* @param module string module name
* @param view string view need (eg DetailView, EditView, etc)
*/
function checkTemplate($module, $view, $checkFormName = false, $formName = '')
{
if (inDeveloperMode() || !empty($_SESSION['developerMode'])) {
return false;
}
$view = $checkFormName ? $formName : $view;
return file_exists($this->cacheDir . $this->templateDir . $module . '/' . $view . '.tpl');
}
示例12: loadFullAPIList
/**
* Get the list of available APIs
* @param bool $forceRebuild
* @param bool $ignoreDisabled Should we ignore disabled status?
* @return array
*/
public static function loadFullAPIList($forceRebuild = false, $ignoreDisabled = false)
{
if (inDeveloperMode()) {
static $beenHereBefore = false;
if (!$beenHereBefore) {
$forceRebuild = true;
$beenHereBefore = true;
}
}
$cached = sugar_cached('include/externalAPI.cache.php');
if (!$forceRebuild && file_exists($cached)) {
// Already have a cache file built, no need to rebuild
require $cached;
return $ignoreDisabled ? $fullAPIList : self::filterAPIList($fullAPIList);
}
$apiFullList = array();
$meetingPasswordList = array();
$needUrlList = array();
$baseDirList = array('include/externalAPI/', 'custom/include/externalAPI/');
foreach ($baseDirList as $baseDir) {
$dirList = glob($baseDir . '*', GLOB_ONLYDIR);
foreach ($dirList as $dir) {
if ($dir == $baseDir . '.' || $dir == $baseDir . '..' || $dir == $baseDir . 'Base') {
continue;
}
$apiName = str_replace($baseDir, '', $dir);
if (file_exists($dir . '/ExtAPI' . $apiName . '.php')) {
$apiFullList[$apiName]['className'] = 'ExtAPI' . $apiName;
$apiFullList[$apiName]['file'] = $dir . '/' . $apiFullList[$apiName]['className'] . '.php';
}
if (file_exists($dir . '/ExtAPI' . $apiName . '_cstm.php')) {
$apiFullList[$apiName]['className'] = 'ExtAPI' . $apiName . '_cstm';
$apiFullList[$apiName]['file_cstm'] = $dir . '/' . $apiFullList[$apiName]['className'] . '.php';
}
}
}
$optionList = array('supportedModules', 'useAuth', 'requireAuth', 'supportMeetingPassword', 'docSearch', 'authMethod', 'oauthFixed', 'needsUrl', 'canInvite', 'sendsInvites', 'sharingOptions', 'connector', 'oauthParams', 'restrictUploadsByExtension');
foreach ($apiFullList as $apiName => $apiOpts) {
require_once $apiOpts['file'];
if (!empty($apiOpts['file_cstm'])) {
require_once $apiOpts['file_cstm'];
}
$className = $apiOpts['className'];
$apiClass = new $className();
foreach ($optionList as $opt) {
if (isset($apiClass->{$opt})) {
$apiFullList[$apiName][$opt] = $apiClass->{$opt};
}
}
// Special handling for the show/hide of the Meeting Password field, we need to create a dropdown for the Sugar Logic code.
if (isset($apiClass->supportMeetingPassword) && $apiClass->supportMeetingPassword == true) {
$meetingPasswordList[$apiName] = $apiName;
}
}
create_cache_directory('/include/');
$cached_tmp = sugar_cached('include/externalAPI.cache-tmp.php');
$fd = fopen($cached_tmp, 'w');
fwrite($fd, "<" . "?php\n//This file is auto generated by " . basename(__FILE__) . "\n\$fullAPIList = " . var_export($apiFullList, true) . ";\n\n");
fclose($fd);
rename($cached_tmp, $cached);
$fd = fopen(sugar_cached('include/externalAPI.cache-tmp.js'), 'w');
fwrite($fd, "//This file is auto generated by " . basename(__FILE__) . "\nSUGAR.eapm = " . json_encode($apiFullList) . ";\n\n");
fclose($fd);
rename(sugar_cached('include/externalAPI.cache-tmp.js'), sugar_cached('include/externalAPI.cache.js'));
if (!isset($GLOBALS['app_list_strings']['extapi_meeting_password']) || is_array($GLOBALS['app_list_strings']['extapi_meeting_password']) && count(array_diff($meetingPasswordList, $GLOBALS['app_list_strings']['extapi_meeting_password'])) != 0) {
// Our meeting password list is different... we need to do something about this.
require_once 'modules/Administration/Common.php';
$languages = get_languages();
foreach ($languages as $lang => $langLabel) {
$contents = return_custom_app_list_strings_file_contents($lang);
$new_contents = replace_or_add_dropdown_type('extapi_meeting_password', $meetingPasswordList, $contents);
save_custom_app_list_strings_contents($new_contents, $lang);
}
}
return $ignoreDisabled ? $apiFullList : self::filterAPIList($apiFullList);
}
示例13: getBacktraceData
/**
* Getting backtrace information for called function
* @param $function
* @return bool | array
*/
function getBacktraceData($function)
{
if (inDeveloperMode()) {
$backtrace = debug_backtrace();
foreach ($backtrace as $backtraceItem) {
if ($backtraceItem['function'] == $function) {
return $backtraceItem;
}
}
}
return false;
}
示例14: _displayJavascript
/**
* Called from process(). This method will display the correct javascript.
*/
protected function _displayJavascript()
{
global $locale, $sugar_config, $timedate;
if ($this->_getOption('show_javascript')) {
if (!$this->_getOption('show_header')) {
$langHeader = get_language_header();
echo <<<EOHTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html {$langHeader}>
<head>
EOHTML;
}
$js_vars = array("sugar_cache_dir" => "cache/");
if (isset($this->bean->module_dir)) {
$js_vars['module_sugar_grp1'] = $this->bean->module_dir;
}
if (isset($_REQUEST['action'])) {
$js_vars['action_sugar_grp1'] = $_REQUEST['action'];
}
echo '<script>jscal_today = 1000*' . $timedate->asUserTs($timedate->getNow()) . '; if(typeof app_strings == "undefined") app_strings = new Array();</script>';
// Make sure the necessary cache files are in place
$jsFiles = array("sugar_grp1.js", "sugar_grp1_yui.js", "sugar_grp1_jquery.js");
ensureJSCacheFilesExist($jsFiles);
echo getVersionedScript('cache/include/javascript/sugar_grp1_jquery.js');
echo getVersionedScript('cache/include/javascript/sugar_grp1_yui.js');
echo getVersionedScript('cache/include/javascript/sugar_grp1.js');
$version_mark = getVersionedPath(null);
echo '<script>SUGAR = SUGAR || {}; SUGAR.VERSION_MARK = ' . json_encode($version_mark) . ';</script>';
// output necessary config js in the top of the page
$config_js = $this->getSugarConfigJS();
if (!empty($config_js)) {
echo "<script>\n" . implode("\n", $config_js) . "</script>\n";
}
// CSRF form token
echo $this->getCsrfFormTokenJscript();
if (isset($sugar_config['email_sugarclient_listviewmaxselect'])) {
echo "<script>SUGAR.config.email_sugarclient_listviewmaxselect = {$GLOBALS['sugar_config']['email_sugarclient_listviewmaxselect']};</script>";
}
$image_server = defined('TEMPLATE_URL') ? TEMPLATE_URL . '/' : '';
echo '<script type="text/javascript">SUGAR.themes.image_server="' . $image_server . '";</script>';
// cn: bug 12274 - create session-stored key to defend against CSRF
echo '<script type="text/javascript">var name_format = "' . $locale->getLocaleFormatMacro() . '";</script>';
echo self::getJavascriptValidation();
if (!is_file(sugar_cached('jsLanguage/') . $GLOBALS['current_language'] . '.js')) {
require_once 'include/language/jsLanguage.php';
jsLanguage::createAppStringsCache($GLOBALS['current_language']);
}
echo getVersionedScript('cache/jsLanguage/' . $GLOBALS['current_language'] . '.js', $GLOBALS['sugar_config']['js_lang_version']);
echo $this->_getModLanguageJS();
echo getVersionedScript('include/javascript/productTour.js');
if (isset($sugar_config['disc_client']) && $sugar_config['disc_client']) {
echo getVersionedScript('modules/Sync/headersync.js');
}
if (!is_file(sugar_cached("Expressions/functions_cache.js"))) {
$GLOBALS['updateSilent'] = true;
include "include/Expressions/updatecache.php";
}
if (inDeveloperMode()) {
echo getVersionedScript('cache/Expressions/functions_cache_debug.js');
} else {
echo getVersionedScript('cache/Expressions/functions_cache.js');
}
require_once "include/Expressions/DependencyManager.php";
echo "\n" . '<script type="text/javascript">' . DependencyManager::getJSUserVariables($GLOBALS['current_user']) . "</script>\n";
//echo out the $js_vars variables as javascript variables
echo "<script type='text/javascript'>\n";
foreach ($js_vars as $var => $value) {
echo "var {$var} = '{$value}';\n";
}
echo "</script>\n";
}
}
示例15: getConnectors
/**
* getConnectors
* Returns an Array of the connectors that have been loaded into the system
* along with attributes pertaining to each connector.
*
* @param boolean $refresh boolean flag indicating whether or not to force rewriting the file; defaults to false
* @returns mixed $connectors Array of the connector entries found
*/
public static function getConnectors($refresh = false)
{
if (inDeveloperMode()) {
$refresh = true;
}
if (!empty(self::$connectors_cache) && !$refresh) {
return self::$connectors_cache;
}
//define paths
$src1 = 'modules/Connectors/connectors/sources';
$src2 = 'custom/modules/Connectors/connectors/sources';
$src3 = 'custom/modules/Connectors/metadata';
$src4 = 'custom/modules/Connectors/metadata/connectors.php';
$connectors = array();
if ($refresh || !SugarAutoLoader::existing($src4)) {
$sources = array_merge(self::getSources($src1), self::getSources($src2));
if (!file_exists($src3)) {
mkdir_recursive($src3);
}
if (file_exists($src4)) {
require $src4;
//define connectors if it doesn't exist or is not an array
if (!isset($connectors) || !is_array($connectors)) {
$err_str = string_format($GLOBALS['app_strings']['ERR_CONNECTOR_NOT_ARRAY'], array($src4));
$GLOBALS['log']->error($err_str);
}
$sources = array_merge($sources, $connectors);
}
if (!self::saveConnectors($sources, $src4)) {
return array();
}
}
//if
require $src4;
self::$connectors_cache = $connectors;
return $connectors;
}