コード例 #1
0
 /**
  * Updates.
  */
 public function Structure()
 {
     // Backwards compatibility with v1.
     if (C('Plugins.TouchIcon.Uploaded')) {
         SaveToConfig('Garden.TouchIcon', 'TouchIcon/apple-touch-icon.png');
         RemoveFromConfig('Plugins.TouchIcon.Uploaded');
     }
 }
コード例 #2
0
 public function DiscussionController_BeforeDiscussionRender_Handler(&$Sender)
 {
     if (!C('Plugin.Sitemaps.Regenerate')) {
         return;
     }
     RemoveFromConfig('Plugin.Sitemaps.Regenerate');
     $Sender->AddJsFile($this->GetResource('js/sitemaps.js', FALSE, FALSE));
 }
コード例 #3
0
 public function Controller_Toggle($Sender)
 {
     if (Gdn::Session()->ValidateTransientKey(GetValue(1, $Sender->RequestArgs))) {
         if (C('Plugins.SEO.Enabled')) {
             RemoveFromConfig('Plugins.SEO.Enabled');
         } else {
             SaveToConfig('Plugins.SEO.Enabled', TRUE);
         }
     }
     redirect('plugin/seo');
 }
コード例 #4
0
ファイル: class.router.php プロジェクト: kennyma/Garden
 public function DeleteRoute($Route)
 {
     $Route = $this->GetRoute($Route);
     // Is a valid route?
     if ($Route !== FALSE) {
         if (!in_array($Route['Route'], $this->ReservedRoutes)) {
             RemoveFromConfig('Routes.' . $Route['Key']);
             $this->_LoadRoutes();
         }
     }
 }
コード例 #5
0
ファイル: default.php プロジェクト: seedbank/old-repo
 public function Controller_Toggle($Sender)
 {
     // Enable/Disable Content Flagging
     if (Gdn::Session()->ValidateTransientKey(GetValue(1, $Sender->RequestArgs))) {
         if (C('Plugins.Kudos.Enabled')) {
             RemoveFromConfig('Plugins.Kudos.Enabled');
         } else {
             SaveToConfig('Plugins.Kudos.Enabled', TRUE);
         }
         Redirect('plugin/kudos');
     }
 }
コード例 #6
0
 public function DisablePlugin($PluginName)
 {
     // Get the plugin and make sure its name is the correct case.
     $Plugin = $this->GetPluginInfo($PluginName);
     if ($Plugin) {
         $PluginName = $Plugin['Index'];
     }
     Gdn_Autoloader::SmartFree(Gdn_Autoloader::CONTEXT_PLUGIN, $Plugin);
     // 1. Check to make sure that no other enabled plugins rely on this one
     // Get all available plugins and compile their requirements
     foreach ($this->EnabledPlugins() as $CheckingName => $Trash) {
         $CheckingInfo = $this->GetPluginInfo($CheckingName);
         $RequiredPlugins = ArrayValue('RequiredPlugins', $CheckingInfo, FALSE);
         if (is_array($RequiredPlugins) && array_key_exists($PluginName, $RequiredPlugins) === TRUE) {
             throw new Exception(sprintf(T('You cannot disable the %1$s plugin because the %2$s plugin requires it in order to function.'), $PluginName, $CheckingName));
         }
     }
     // 2. Perform necessary hook action
     $this->_PluginHook($PluginName, self::ACTION_DISABLE, TRUE);
     // 3. Disable it
     RemoveFromConfig("EnabledPlugins.{$PluginName}");
     unset($this->EnabledPlugins[$PluginName]);
     // Redefine the locale manager's settings $Locale->Set($CurrentLocale, $EnabledApps, $EnabledPlugins, TRUE);
     Gdn::Locale()->Refresh();
     return TRUE;
 }
コード例 #7
0
 public function UnsetDefaultAuthenticator($AuthenticationSchemeAlias)
 {
     $AuthenticationSchemeAlias = strtolower($AuthenticationSchemeAlias);
     if (C('Garden.Authenticator.DefaultScheme') == $AuthenticationSchemeAlias) {
         RemoveFromConfig('Garden.Authenticator.DefaultScheme');
         return TRUE;
     }
     return FALSE;
 }
コード例 #8
0
 public function EnableTheme($ThemeName, $IsMobile = FALSE)
 {
     // Make sure to run the setup
     $this->TestTheme($ThemeName);
     // Set the theme.
     $ThemeInfo = $this->GetThemeInfo($ThemeName);
     $ThemeFolder = GetValue('Folder', $ThemeInfo, '');
     $oldTheme = $IsMobile ? C('Garden.MobileTheme', 'mobile') : C('Garden.Theme', 'default');
     if ($ThemeFolder == '') {
         throw new Exception(T('The theme folder was not properly defined.'));
     } else {
         $Options = GetValueR("{$ThemeName}.Options", $this->AvailableThemes());
         if ($Options) {
             if ($IsMobile) {
                 SaveToConfig(array('Garden.MobileTheme' => $ThemeName, 'Garden.MobileThemeOptions.Name' => GetValueR("{$ThemeName}.Name", $this->AvailableThemes(), $ThemeFolder)));
             } else {
                 SaveToConfig(array('Garden.Theme' => $ThemeName, 'Garden.ThemeOptions.Name' => GetValueR("{$ThemeName}.Name", $this->AvailableThemes(), $ThemeFolder)));
             }
         } else {
             if ($IsMobile) {
                 SaveToConfig('Garden.MobileTheme', $ThemeName);
                 RemoveFromConfig('Garden.MobileThemeOptions');
             } else {
                 SaveToConfig('Garden.Theme', $ThemeName);
                 RemoveFromConfig('Garden.ThemeOptions');
             }
         }
     }
     Logger::event('theme_changed', LogLevel::NOTICE, 'The {themeType} theme changed from {oldTheme} to {newTheme}.', array('themeType' => $IsMobile ? 'mobile' : 'desktop', 'oldTheme' => $oldTheme, 'newTheme' => $ThemeName));
     // Tell the locale cache to refresh itself.
     Gdn::Locale()->Refresh();
     return TRUE;
 }
コード例 #9
0
ファイル: structure.php プロジェクト: elpum/TgaForumBundle
    $RoleModel->Define(array('Name' => 'Moderator', 'RoleID' => 32, 'Sort' => '5', 'Deletable' => '1', 'CanSession' => '1', 'Description' => T('Moderator Role Description', 'Moderators have permission to edit most content.')));
    $RoleModel->Define(array('Name' => 'Administrator', 'RoleID' => 16, 'Sort' => '6', 'Deletable' => '1', 'CanSession' => '1', 'Description' => T('Administrator Role Description', 'Administrators have permission to do anything.')));
    unset($RoleModel);
}
// User Table
$Construct->Table('User');
$PhotoIDExists = $Construct->ColumnExists('PhotoID');
$PhotoExists = $Construct->ColumnExists('Photo');
$Construct->PrimaryKey('UserID')->Column('Name', 'varchar(50)', FALSE, 'key')->Column('Password', 'varbinary(100)')->Column('HashMethod', 'varchar(10)', TRUE)->Column('Photo', 'varchar(255)', NULL)->Column('Title', 'varchar(100)', NULL)->Column('Location', 'varchar(100)', NULL)->Column('About', 'text', TRUE)->Column('Email', 'varchar(200)', FALSE, 'index')->Column('ShowEmail', 'tinyint(1)', '0')->Column('Gender', array('u', 'm', 'f'), 'u')->Column('CountVisits', 'int', '0')->Column('CountInvitations', 'int', '0')->Column('CountNotifications', 'int', NULL)->Column('InviteUserID', 'int', TRUE)->Column('DiscoveryText', 'text', TRUE)->Column('Preferences', 'text', TRUE)->Column('Permissions', 'text', TRUE)->Column('Attributes', 'text', TRUE)->Column('DateSetInvitations', 'datetime', TRUE)->Column('DateOfBirth', 'datetime', TRUE)->Column('DateFirstVisit', 'datetime', TRUE)->Column('DateLastActive', 'datetime', TRUE, 'index')->Column('LastIPAddress', 'varchar(39)', TRUE)->Column('AllIPAddresses', 'varchar(100)', TRUE)->Column('DateInserted', 'datetime', FALSE, 'index')->Column('InsertIPAddress', 'varchar(39)', TRUE)->Column('DateUpdated', 'datetime', TRUE)->Column('UpdateIPAddress', 'varchar(39)', TRUE)->Column('HourOffset', 'int', '0')->Column('Score', 'float', NULL)->Column('Admin', 'tinyint(1)', '0')->Column('Verified', 'tinyint(1)', '0')->Column('Banned', 'tinyint(1)', '0')->Column('Deleted', 'tinyint(1)', '0')->Column('Points', 'int', 0)->Set($Explicit, $Drop);
// Make sure the system user is okay.
$SystemUserID = C('Garden.SystemUserID');
if ($SystemUserID) {
    $SysUser = Gdn::UserModel()->GetID($SystemUserID);
    if (!$SysUser || GetValue('Deleted', $SysUser) || GetValue('Admin', $SysUser) != 2) {
        $SystemUserID = FALSE;
        RemoveFromConfig('Garden.SystemUserID');
    }
}
if (!$SystemUserID) {
    // Try and find a system user.
    $SystemUserID = Gdn::SQL()->GetWhere('User', array('Name' => 'System', 'Admin' => 2))->Value('UserID');
    if ($SystemUserID) {
        SaveToConfig('Garden.SystemUserID', $SystemUserID);
    }
}
// UserRole Table
$Construct->Table('UserRole');
$UserRoleExists = $Construct->TableExists();
$Construct->Column('UserID', 'int', FALSE, 'primary')->Column('RoleID', 'int', FALSE, 'primary')->Set($Explicit, $Drop);
if (!$UserRoleExists) {
    // Assign the guest user to the guest role
コード例 #10
0
 /**
  *
  *
  * @return bool
  */
 public function initialize()
 {
     if ($this->GenerateSQL()) {
         $this->SQL->CaptureModifications = true;
         Gdn::structure()->CaptureOnly = true;
         $this->Database->CapturedSql = array();
         $SQLPath = $this->data('SQLPath');
         if (!$SQLPath) {
             $SQLPath = 'import/import_' . date('Y-m-d_His') . '.sql';
             $this->data('SQLPath', $SQLPath);
         }
     } else {
         // Importing will overwrite our System user record.
         // Our CustomFinalization step (e.g. vbulletinimportmodel) needs this to be regenerated.
         RemoveFromConfig('Garden.SystemUserID');
     }
     return true;
 }
コード例 #11
0
 /**
  * Remove the mobile logo from config & delete it.
  *
  * @since 2.0.0
  * @access public
  */
 public function removeMobileLogo()
 {
     if (Gdn::request()->isAuthenticatedPostBack(true) && Gdn::session()->checkPermission('Garden.Community.Manage')) {
         $MobileLogo = c('Garden.MobileLogo', '');
         RemoveFromConfig('Garden.MobileLogo');
         safeUnlink(PATH_ROOT . "/{$MobileLogo}");
         $this->informMessage(sprintf(t('%s deleted.'), t('Mobile logo')));
     }
     $this->render('blank', 'utility', 'dashboard');
 }
コード例 #12
0
 /**
  * Gets/Sets the Garden Installation Secret
  * 
  * @staticvar string $InstallationSecret
  * @param string $SetInstallationSecret
  * @return string Installation Secret or NULL
  */
 public static function InstallationSecret($SetInstallationSecret = NULL) {
    static $InstallationSecret = FALSE;
    if (!is_null($SetInstallationSecret)) {
       if ($SetInstallationSecret !== FALSE) {
          SaveToConfig ('Garden.InstallationSecret', $SetInstallationSecret);
       } else {
          RemoveFromConfig('Garden.InstallationSecret');
       }
       $InstallationSecret = $SetInstallationSecret;
    }
    
    if ($InstallationSecret === FALSE)
       $InstallationSecret = C('Garden.InstallationSecret', NULL);
    
    return $InstallationSecret;
 }
コード例 #13
0
 /**
  * 1-Time on Disable
  */
 public function OnDisable()
 {
     RemoveFromConfig('Plugins.AllViewed.Enabled');
 }
コード例 #14
0
 /**
  * Delete a field.
  */
 public function SettingsController_ProfileFieldDelete_Create($Sender, $Args)
 {
     $Sender->Permission('Garden.Settings.Manage');
     $Sender->SetData('Title', 'Delete Field');
     if (isset($Args[0])) {
         if ($Sender->Form->IsPostBack()) {
             RemoveFromConfig('ProfileExtender.Fields.' . $Args[0]);
             $Sender->RedirectUrl = Url('/settings/profileextender');
         } else {
             $Sender->SetData('Field', $this->GetProfileField($Args[0]));
         }
     }
     $Sender->Render('delete', '', 'plugins/ProfileExtender');
 }
コード例 #15
0
ファイル: class.chat.plugin.php プロジェクト: er0k/trickno
 /**
  * Plugin cleanup
  *
  * This method is fired only once, immediately before the plugin is disabled, and is a great place to 
  * perform cleanup tasks such as deletion of unsued files and folders.
  */
 public function OnDisable()
 {
     RemoveFromConfig('Plugins.Chat.Domain');
 }
コード例 #16
0
ファイル: class.gdn.php プロジェクト: R-J/vanilla
 /**
  * Gets/Sets the Garden Installation Secret
  *
  * @staticvar string $InstallationSecret
  * @param string $SetInstallationSecret
  * @return string Installation Secret or NULL
  */
 public static function installationSecret($SetInstallationSecret = null)
 {
     static $InstallationSecret = false;
     if (!is_null($SetInstallationSecret)) {
         if ($SetInstallationSecret !== false) {
             SaveToConfig('Garden.InstallationSecret', $SetInstallationSecret);
         } else {
             RemoveFromConfig('Garden.InstallationSecret');
         }
         $InstallationSecret = $SetInstallationSecret;
     }
     if ($InstallationSecret === false) {
         $InstallationSecret = c('Garden.InstallationSecret', null);
     }
     return $InstallationSecret;
 }
コード例 #17
0
ファイル: routes.php プロジェクト: nbudin/Garden
 public function Delete($RouteIndex = FALSE, $TransientKey = FALSE)
 {
     $this->Permission('Garden.Routes.Manage');
     $this->DeliveryType(DELIVERY_TYPE_BOOL);
     $Session = Gdn::Session();
     $Routes = Gdn::Config('Routes');
     $Key = FALSE;
     if (is_numeric($RouteIndex) && $RouteIndex !== FALSE) {
         $Keys = array_keys($Routes);
         $Key = ArrayValue($RouteIndex, $Keys);
     }
     // If seeing the form for the first time...
     if ($TransientKey !== FALSE && $Session->ValidateTransientKey($TransientKey) && !in_array($Key, $this->ReservedRoutes) && $Key !== FALSE) {
         RemoveFromConfig('Routes' . '.' . $Key);
     }
     if ($this->_DeliveryType === DELIVERY_TYPE_ALL) {
         Redirect('garden/routes');
     }
     $this->Render();
 }
コード例 #18
0
ファイル: class.pluginmanager.php プロジェクト: nickhx/Garden
 public function DisablePlugin($PluginName)
 {
     // 1. Check to make sure that no other enabled plugins rely on this one
     // Get all available plugins and compile their requirements
     foreach ($this->EnabledPlugins as $CheckingName => $CheckingInfo) {
         $RequiredPlugins = ArrayValue('RequiredPlugins', $CheckingInfo, FALSE);
         if (is_array($RequiredPlugins) && array_key_exists($PluginName, $RequiredPlugins) === TRUE) {
             throw new Exception(sprintf(T('You cannot disable the %1$s plugin because the %2$s plugin requires it in order to function.'), $PluginName, $CheckingName));
         }
     }
     // 2. Perform necessary hook action
     $this->_PluginHook($PluginName, self::ACTION_DISABLE, TRUE);
     // 3. Disable it
     RemoveFromConfig('EnabledPlugins' . '.' . $PluginName);
     unset($this->EnabledPlugins[$PluginName]);
     // Redefine the locale manager's settings $Locale->Set($CurrentLocale, $EnabledApps, $EnabledPlugins, TRUE);
     $ApplicationManager = new Gdn_ApplicationManager();
     $Locale = Gdn::Locale();
     $Locale->Set($Locale->Current(), $ApplicationManager->EnabledApplicationFolders(), $this->EnabledPluginFolders(), TRUE);
 }
コード例 #19
0
 /**
  * Remove the mobile logo from config & delete it.
  *
  * @since 2.0.0
  * @access public
  * @param string $TransientKey Security token.
  */
 public function removeMobileLogo($TransientKey = '')
 {
     $Session = Gdn::session();
     if ($Session->validateTransientKey($TransientKey) && $Session->checkPermission('Garden.Community.Manage')) {
         $MobileLogo = c('Garden.MobileLogo', '');
         RemoveFromConfig('Garden.MobileLogo');
         @unlink(PATH_ROOT . DS . $MobileLogo);
     }
     redirect('/settings/banner');
 }
コード例 #20
0
 /**
  * Undocumented method.
  *
  * @param string $ApplicationName Undocumented variable.
  * @todo Document DisableApplication() method.
  */
 public function DisableApplication($ApplicationName)
 {
     // 1. Check to make sure that this application is allowed to be disabled
     $ApplicationInfo = ArrayValueI($ApplicationName, $this->AvailableApplications(), array());
     $ApplicationName = $ApplicationInfo['Index'];
     if (!ArrayValue('AllowDisable', $ApplicationInfo, TRUE)) {
         throw new Exception(sprintf(T('You cannot disable the %s application.'), $ApplicationName));
     }
     // 2. Check to make sure that no other enabled applications rely on this one
     foreach ($this->EnabledApplications() as $CheckingName => $CheckingInfo) {
         $RequiredApplications = ArrayValue('RequiredApplications', $CheckingInfo, FALSE);
         if (is_array($RequiredApplications) && array_key_exists($ApplicationName, $RequiredApplications) === TRUE) {
             throw new Exception(sprintf(T('You cannot disable the %1$s application because the %2$s application requires it in order to function.'), $ApplicationName, $CheckingName));
         }
     }
     // 2. Disable it
     RemoveFromConfig("EnabledApplications.{$ApplicationName}");
     // Clear the object caches.
     Gdn_Autoloader::SmartFree(Gdn_Autoloader::CONTEXT_APPLICATION, $ApplicationInfo);
     // Redefine the locale manager's settings $Locale->Set($CurrentLocale, $EnabledApps, $EnabledPlugins, TRUE);
     $Locale = Gdn::Locale();
     $Locale->Set($Locale->Current(), $this->EnabledApplicationFolders(), Gdn::PluginManager()->EnabledPluginFolders(), TRUE);
     $this->EventArguments['AddonName'] = $ApplicationName;
     Gdn::PluginManager()->CallEventHandlers($this, 'ApplicationManager', 'AddonDisabled');
 }
コード例 #21
0
 public function OnDisable()
 {
     RemoveFromConfig('Plugin.Chatwee.Code');
     RemoveFromConfig('Plugin.Chatwee.APIKey');
     RemoveFromConfig('Plugin.Chatwee.Chatid');
 }
コード例 #22
0
 /**
  * Database changes needed for this plugin.
  */
 public function Structure()
 {
     $Structure = Gdn::Structure();
     $Structure->Table('Flag')->Column('DiscussionID', 'int(11)', TRUE)->Column('InsertUserID', 'int(11)', FALSE, 'key')->Column('InsertName', 'varchar(64)')->Column('AuthorID', 'int(11)')->Column('AuthorName', 'varchar(64)')->Column('ForeignURL', 'varchar(255)', FALSE, 'key')->Column('ForeignID', 'int(11)')->Column('ForeignType', 'varchar(32)')->Column('Comment', 'text')->Column('DateInserted', 'datetime')->Set(FALSE, FALSE);
     // Turn off disabled Flagging plugin (deprecated)
     if (C('Plugins.Flagging.Enabled', NULL) === FALSE) {
         RemoveFromConfig('EnabledPlugins.Flagging');
     }
 }
コード例 #23
0
 public function DeleteState()
 {
     RemoveFromConfig('Garden.Import');
 }
コード例 #24
0
ファイル: default.php プロジェクト: unlight/Morf
 public function Setup()
 {
     if (!is_dir('uploads/tmp')) {
         mkdir('uploads/tmp', 0777, True);
     }
     if (!is_dir('uploads/i')) {
         mkdir('uploads/i', 0777, True);
     }
     RemoveFromConfig('EnabledPlugins.LoadUp');
     RemoveFromConfig('Plugins.LoadUp');
     $this->Structure();
 }
コード例 #25
0
 /**
  * Undocumented method.
  *
  * @param string $ApplicationName Undocumented variable.
  * @todo Document DisableApplication() method.
  */
 public function DisableApplication($ApplicationName)
 {
     // 1. Check to make sure that this application is allowed to be disabled
     $ApplicationInfo = ArrayValue($ApplicationName, $this->AvailableApplications(), array());
     if (!ArrayValue('AllowDisable', $ApplicationInfo, TRUE)) {
         throw new Exception(sprintf(T('You cannot disable the %s application.'), $ApplicationName));
     }
     // 2. Check to make sure that no other enabled applications rely on this one
     foreach ($this->EnabledApplications() as $CheckingName => $CheckingInfo) {
         $RequiredApplications = ArrayValue('RequiredApplications', $CheckingInfo, FALSE);
         if (is_array($RequiredApplications) && array_key_exists($ApplicationName, $RequiredApplications) === TRUE) {
             throw new Exception(sprintf(T('You cannot disable the %1$s application because the %2$s application requires it in order to function.'), $ApplicationName, $CheckingName));
         }
     }
     // 2. Disable it
     RemoveFromConfig('EnabledApplications' . '.' . $ApplicationName);
     // Redefine the locale manager's settings $Locale->Set($CurrentLocale, $EnabledApps, $EnabledPlugins, TRUE);
     $PluginManager = Gdn::Factory('PluginManager');
     $Locale = Gdn::Locale();
     $Locale->Set($Locale->Current(), $this->EnabledApplicationFolders(), $PluginManager->EnabledPluginFolders(), TRUE);
 }
コード例 #26
0
 /**
  *
  *
  * @throws Gdn_UserException
  */
 public function disableTheme()
 {
     if ($this->currentTheme() == 'default') {
         throw new Gdn_UserException(T('You cannot disable the default theme.'));
     }
     $oldTheme = $this->enabledTheme();
     RemoveFromConfig('Garden.Theme');
     $newTheme = $this->enabledTheme();
     if ($oldTheme != $newTheme) {
         $this->themeHook($oldTheme, self::ACTION_DISABLE, true);
         Logger::event('theme_changed', 'The {themeType} theme was changed from {oldTheme} to {newTheme}.', array('themeType' => 'desktop', 'oldTheme' => $oldTheme, 'newTheme' => $newTheme));
     }
 }
コード例 #27
0
 public function RemoveLogo($TransientKey = '')
 {
     $Session = Gdn::Session();
     if ($Session->ValidateTransientKey($TransientKey) && $Session->CheckPermission('Garden.Themes.Manage')) {
         $Logo = C('Garden.Logo', '');
         RemoveFromConfig('Garden.Logo');
         @unlink(PATH_ROOT . DS . $Logo);
     }
     Redirect('/settings/banner');
 }
コード例 #28
0
ファイル: class.thememanager.php プロジェクト: rnovino/Garden
 public function EnableTheme($ThemeName)
 {
     // Make sure to run the setup
     $this->TestTheme($ThemeName);
     // Set the theme.
     $ThemeInfo = $this->GetThemeInfo($ThemeName);
     $ThemeFolder = GetValue('Folder', $ThemeInfo, '');
     if ($ThemeFolder == '') {
         throw new Exception(T('The theme folder was not properly defined.'));
     } else {
         $Options = GetValueR("{$ThemeName}.Options", $this->AvailableThemes());
         if ($Options) {
             SaveToConfig(array('Garden.Theme' => $ThemeName, 'Garden.ThemeOptions.Name' => GetValueR("{$ThemeName}.Name", $this->AvailableThemes(), $ThemeFolder)));
         } else {
             SaveToConfig('Garden.Theme', $ThemeName);
             RemoveFromConfig('Garden.ThemeOptions');
         }
     }
     // Tell the locale cache to refresh itself.
     Gdn::Locale()->Refresh();
     return TRUE;
 }
コード例 #29
0
 protected function _Disable()
 {
     RemoveFromConfig('Plugins.Flagging.Enabled');
 }
コード例 #30
0
   /**
    * Undocumented method.
    *
    * @param string $ApplicationName Undocumented variable.
    * @todo Document DisableApplication() method.
    */
   public function DisableApplication($ApplicationName) {
      // 1. Check to make sure that this application is allowed to be disabled
      $ApplicationInfo = ArrayValueI($ApplicationName, $this->AvailableApplications(), array());
      $ApplicationName = $ApplicationInfo['Index'];
      if (!ArrayValue('AllowDisable', $ApplicationInfo, TRUE))
         throw new Exception(sprintf(T('You cannot disable the %s application.'), $ApplicationName));

      // 2. Check to make sure that no other enabled applications rely on this one
      foreach ($this->EnabledApplications() as $CheckingName => $CheckingInfo) {
         $RequiredApplications = ArrayValue('RequiredApplications', $CheckingInfo, FALSE);
         if (is_array($RequiredApplications) && array_key_exists($ApplicationName, $RequiredApplications) === TRUE) {
            throw new Exception(sprintf(T('You cannot disable the %1$s application because the %2$s application requires it in order to function.'), $ApplicationName, $CheckingName));
         }
      }

      // 2. Disable it
      RemoveFromConfig('EnabledApplications'.'.'.$ApplicationName);

      // Clear the object caches.
      @unlink(PATH_LOCAL_CACHE.'/controller_map.ini');
      @unlink(PATH_LOCAL_CACHE.'/library_map.ini');

      // Redefine the locale manager's settings $Locale->Set($CurrentLocale, $EnabledApps, $EnabledPlugins, TRUE);
      $Locale = Gdn::Locale();
      $Locale->Set($Locale->Current(), $this->EnabledApplicationFolders(), Gdn::PluginManager()->EnabledPluginFolders(), TRUE);
   }