+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2014 |
+--------------------------------------------------------------------+
- * @param $loadFromDB boolean whether to load from the database
- * @param $force boolean whether to force a reconstruction
+ * @param bool $loadFromDB
+ * whether to load from the database.
+ * @param bool $force
+ * whether to force a reconstruction.
if (self::$_singleton === NULL || $force) {
// goto a simple error handler
$GLOBALS['civicrm_default_error_scope'] = CRM_Core_TemporaryErrorScope::create(array('CRM_Core_Error', 'handle'));
if (self::$_singleton === NULL || $force) {
// goto a simple error handler
$GLOBALS['civicrm_default_error_scope'] = CRM_Core_TemporaryErrorScope::create(array('CRM_Core_Error', 'handle'));
$url = CRM_Utils_System::url('civicrm/admin/setting/path', 'reset=1');
CRM_Core_Session::setStatus(ts('%1 has an incorrect directory path. Please go to the <a href="%2">path setting page</a> and correct it.', array(
1 => $key,
$url = CRM_Utils_System::url('civicrm/admin/setting/path', 'reset=1');
CRM_Core_Session::setStatus(ts('%1 has an incorrect directory path. Please go to the <a href="%2">path setting page</a> and correct it.', array(
1 => $key,
$class = $this->userFrameworkClass;
// redundant with _setUserFrameworkConfig
$this->userSystem = new $class();
$class = $this->userFrameworkClass;
// redundant with _setUserFrameworkConfig
$this->userSystem = new $class();
if (!isset(self::$_mail)) {
$mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
'mailing_backend'
if (!isset(self::$_mail)) {
$mailingInfo = CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::MAILING_PREFERENCES_NAME,
'mailing_backend'
*/
public static function _createMailer($driver, $params) {
if ($driver == 'CRM_Mailing_BAO_Spool') {
*/
public static function _createMailer($driver, $params) {
if ($driver == 'CRM_Mailing_BAO_Spool') {
// Whether we delete/create or simply preserve directories, we should
// certainly make sure the restrictions are enforced.
// Whether we delete/create or simply preserve directories, we should
// certainly make sure the restrictions are enforced.
- foreach (array($this->templateCompileDir, $this->uploadDir, $this->configAndLogDir, $this->customFileUploadDir) as $dir) {
+ foreach (array(
+ $this->templateCompileDir,
+ $this->uploadDir,
+ $this->configAndLogDir,
+ $this->customFileUploadDir
+ ) as $dir) {
$session = CRM_Core_Session::singleton();
if ($session->get('userID') && !$session->get('authSrc')) {
$session->set('authSrc', CRM_Core_Permission::AUTH_SRC_LOGIN);
$session = CRM_Core_Session::singleton();
if ($session->get('userID') && !$session->get('authSrc')) {
$session->set('authSrc', CRM_Core_Permission::AUTH_SRC_LOGIN);
// cleanup templates_c directory
$this->cleanup(1, FALSE);
// cleanup templates_c directory
$this->cleanup(1, FALSE);
$module_files = CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles();
if ($this->userPermissionClass->isModulePermissionSupported()) {
// Can store permissions -- so do it!
$this->userPermissionClass->upgradePermissions(
CRM_Core_Permission::basicPermissions()
);
$module_files = CRM_Extension_System::singleton()->getMapper()->getActiveModuleFiles();
if ($this->userPermissionClass->isModulePermissionSupported()) {
// Can store permissions -- so do it!
$this->userPermissionClass->upgradePermissions(
CRM_Core_Permission::basicPermissions()
);
// Cannot store permissions -- warn if any modules require them
$modules_with_perms = array();
foreach ($module_files as $module_file) {
// Cannot store permissions -- warn if any modules require them
$modules_with_perms = array();
foreach ($module_files as $module_file) {
CRM_Extension_System::singleton()->getCache()->flush();
CRM_Utils_Hook::singleton(TRUE);
CRM_Core_PseudoConstant::getModuleExtensions(TRUE);
CRM_Extension_System::singleton()->getCache()->flush();
CRM_Utils_Hook::singleton(TRUE);
CRM_Core_PseudoConstant::getModuleExtensions(TRUE);