当前位置: 首页>>代码示例>>PHP>>正文


PHP RemoveFromConfig函数代码示例

本文整理汇总了PHP中RemoveFromConfig函数的典型用法代码示例。如果您正苦于以下问题:PHP RemoveFromConfig函数的具体用法?PHP RemoveFromConfig怎么用?PHP RemoveFromConfig使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了RemoveFromConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Structure

 /**
  * 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');
     }
 }
开发者ID:SatiricMan,项目名称:addons,代码行数:11,代码来源:class.touchicon.plugin.php

示例2: DiscussionController_BeforeDiscussionRender_Handler

 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));
 }
开发者ID:ru4,项目名称:arabbnota,代码行数:8,代码来源:class.sitemaps.plugin.php

示例3: Controller_Toggle

 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');
 }
开发者ID:JamieChung,项目名称:VanillaSEO,代码行数:11,代码来源:class.vanillaseo.plugin.php

示例4: DeleteRoute

 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();
         }
     }
 }
开发者ID:kennyma,项目名称:Garden,代码行数:11,代码来源:class.router.php

示例5: Controller_Toggle

 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');
     }
 }
开发者ID:seedbank,项目名称:old-repo,代码行数:12,代码来源:default.php

示例6: DisablePlugin

 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;
 }
开发者ID:elpum,项目名称:TgaForumBundle,代码行数:26,代码来源:class.pluginmanager.php

示例7: UnsetDefaultAuthenticator

 public function UnsetDefaultAuthenticator($AuthenticationSchemeAlias)
 {
     $AuthenticationSchemeAlias = strtolower($AuthenticationSchemeAlias);
     if (C('Garden.Authenticator.DefaultScheme') == $AuthenticationSchemeAlias) {
         RemoveFromConfig('Garden.Authenticator.DefaultScheme');
         return TRUE;
     }
     return FALSE;
 }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:9,代码来源:class.auth.php

示例8: EnableTheme

 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;
 }
开发者ID:3marproof,项目名称:vanilla,代码行数:33,代码来源:class.thememanager.php

示例9: T

    $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
开发者ID:elpum,项目名称:TgaForumBundle,代码行数:31,代码来源:structure.php

示例10: initialize

 /**
  *
  *
  * @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;
 }
开发者ID:oMadMartigaNo,项目名称:readjust-forum,代码行数:23,代码来源:class.importmodel.php

示例11: removeMobileLogo

 /**
  * 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');
 }
开发者ID:vanilla,项目名称:vanilla,代码行数:16,代码来源:class.settingscontroller.php

示例12: InstallationSecret

 /**
  * 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;
 }
开发者ID:nerdgirl,项目名称:Forums-ILoveBadTV,代码行数:23,代码来源:class.gdn.php

示例13: OnDisable

 /**
  * 1-Time on Disable
  */
 public function OnDisable()
 {
     RemoveFromConfig('Plugins.AllViewed.Enabled');
 }
开发者ID:tautomers,项目名称:knoopvszombies,代码行数:7,代码来源:class.allviewed.plugin.php

示例14: SettingsController_ProfileFieldDelete_Create

 /**
  * 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');
 }
开发者ID:embo-hd,项目名称:vanilla,代码行数:17,代码来源:class.profileextender.plugin.php

示例15: OnDisable

 /**
  * 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');
 }
开发者ID:er0k,项目名称:trickno,代码行数:10,代码来源:class.chat.plugin.php


注:本文中的RemoveFromConfig函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。