本文整理汇总了PHP中Updater::getConfigService方法的典型用法代码示例。如果您正苦于以下问题:PHP Updater::getConfigService方法的具体用法?PHP Updater::getConfigService怎么用?PHP Updater::getConfigService使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Updater
的用法示例。
在下文中一共展示了Updater::getConfigService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: int
/**
* @author Sardar Madumarov <madumarov@gmail.com>
* @package oaseo
* @since 1.0
*/
$dbo = Updater::getDbo();
$dbo->query("CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "oaseo_url` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `routeName` varchar(50) NOT NULL,\n `url` varchar(255) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `routeName` (`routeName`,`url`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1");
if (!Updater::getConfigService()->configExists('oaseo', 'robots_contents')) {
$robotsConfigContents = <<<EOT
User-agent: *
Disallow: ow_version.xml
Disallow: INSTALL.txt
Disallow: LICENSE.txt
Disallow: README.txt
Disallow: UPDATE.txt
Disallow: CHANGES.txt
Disallow: /admin/
Disallow: /forgot-password
Disallow: /sign-in
Disallow: /ajax-form
Disallow: /users/waiting-for-approval
Disallow: /join
Disallow: /profile/edit
Disallow: /email-verify
Disallow: /ow_updates/
EOT;
Updater::getConfigService()->addConfig('oaseo', 'robots_contents', $robotsConfigContents);
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'oaseo');
示例2: int
}
try {
$sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "skadate_current_location` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `userId` int(11) NOT NULL,\n `latitude` decimal(12,8) NOT NULL,\n `longitude` decimal(12,8) NOT NULL,\n `updateTimestamp` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n KEY `userId` (`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
print_r($e);
}
try {
$sql = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "skadate_avatar` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `avatarId` int(11) NOT NULL,\n `userId` int(11) NOT NULL,\n `hash` int(11) NOT NULL DEFAULT '0',\n PRIMARY KEY (`id`),\n UNIQUE KEY `avatarId` (`avatarId`,`userId`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
Updater::getDbo()->query($sql);
} catch (Exception $e) {
print_r($e);
}
try {
$sql = "UPDATE `" . OW_DB_PREFIX . "base_plugin` SET developerKey=:dk WHERE `key`=:k";
Updater::getDbo()->query($sql, array("dk" => "99d6bdd5bb6468beaf118c4664dd92ff", "k" => "pcgallery"));
} catch (Exception $e) {
print_r($e);
}
if (!OW::getConfig()->configExists('skadate', 'update_gender_values')) {
OW::getConfig()->addConfig('skadate', 'update_gender_values', true);
} else {
OW::getConfig()->saveConfig('skadate', 'update_gender_values', true);
}
if (!Updater::getConfigService()->configExists('skadate', 'photo_filter_setting_matching')) {
Updater::getConfigService()->addConfig('skadate', 'photo_filter_setting_matching', false);
}
@mkdir(OW_DIR_USERFILES . 'plugins' . DS . 'skadate' . DS . 'avatars' . DS);
@chmod(OW_DIR_USERFILES . 'plugins' . DS . 'skadate' . DS . 'avatars' . DS, 0777);
@mkdir(OW_DIR_PLUGINFILES . 'skadate' . DS . 'avatars' . DS);
@chmod(OW_DIR_PLUGINFILES . 'skadate' . DS . 'avatars' . DS, 0777);
示例3: array
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
$exArr = array();
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'ajaxim');
$moduleName = OW::getPluginManager()->getPlugin('ajaxim')->getModuleName();
try {
if (!Updater::getConfigService()->configExists('ajaxim', 'friends_only')) {
Updater::getConfigService()->addConfig('ajaxim', 'friends_only', 0);
}
} catch (Exception $e) {
$exArr[] = $e;
}
try {
Updater::getDbo()->update("REPLACE INTO `" . OW_DB_PREFIX . "base_preference_section` ( `name`, `sortOrder`) VALUES ('ajaxim', 0)");
} catch (Exception $e) {
$exArr[] = $e;
}
try {
Updater::getDbo()->update("REPLACE INTO `" . OW_DB_PREFIX . "base_preference` ( `key`, `defaultValue`, `sectionName`, `sortOrder`) VALUES ( 'ajaxim_user_settings_enable_sound', '1', 'ajaxim', 0 )");
} catch (Exception $e) {
$exArr[] = $e;
}
try {
示例4: catch
<?php
/**
* Copyright (c) 2013, Podyachev Evgeny <joker.OW2@gmail.com>
* All rights reserved.
* ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/
* and is licensed under Oxwall Store Commercial License.
* Full text of this license can be found at http://www.oxwall.org/store/oscl
*/
/**
* @author Podyachev Evgeny <joker.OW2@gmail.com>
* @package ow_plugins.google_maps_location
* @since 1.6
*/
try {
if (!Updater::getConfigService()->configExists('googlelocation', 'country_restriction')) {
Updater::getConfigService()->addConfig('googlelocation', 'country_restriction', '');
}
} catch (Exception $e) {
}
try {
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('GOOGLELOCATION_CMP_GroupsWidget', false);
$placeWidget = $widgetService->addWidgetToPlace($widget, 'group');
} catch (Exception $e) {
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'googlelocation');
示例5:
<?php
/**
* @author Zarif Safiullin <zaph.work@gmail.com>
* @package ow.ow_plugins.mailbox
* @since 1.7.2
*/
Updater::getLanguageService()->importPrefixFromZip(dirname(dirname(dirname(__FILE__))) . DS . 'langs.zip', 'mailbox');
Updater::getConfigService()->addConfig('mailbox', 'send_message_interval', 60);
$sql = "ALTER TABLE `" . OW_DB_PREFIX . "mailbox_user_last_data` ADD INDEX `userId` ( `userId` )";
Updater::getDbo()->query($sql);
示例6: array
}
if (!Updater::getConfigService()->configExists('base', 'disable_mobile_context')) {
Updater::getConfigService()->addConfig('base', 'disable_mobile_context', 0);
}
if (!Updater::getConfigService()->configExists('base', 'log_file_max_size_mb')) {
Updater::getConfigService()->addConfig('base', 'log_file_max_size_mb', 20);
}
if (!Updater::getConfigService()->configExists('base', 'attch_file_max_size_mb')) {
Updater::getConfigService()->addConfig('base', 'attch_file_max_size_mb', 2);
}
if (!UPDATE_ConfigService::getInstance()->configExists('base', 'users_on_page')) {
UPDATE_ConfigService::getInstance()->addConfig('base', 'users_on_page', 12);
}
if (!Updater::getConfigService()->configExists('base', 'attch_ext_list')) {
$ext = array('txt', 'doc', 'docx', 'sql', 'csv', 'xls', 'ppt', 'pdf', 'jpg', 'jpeg', 'png', 'gif', 'bmp', 'psd', 'ai', 'avi', 'wmv', 'mp3', '3gp', 'flv', 'mkv', 'mpeg', 'mpg', 'swf', 'zip', 'gz', 'tgz', 'gzip', '7z', 'bzip2', 'rar');
Updater::getConfigService()->addConfig('base', 'attch_ext_list', json_encode($ext));
}
$preference = BOL_PreferenceService::getInstance()->findPreference('profile_details_update_stamp');
if (empty($preference)) {
$preference = new BOL_Preference();
}
$preference->key = 'profile_details_update_stamp';
$preference->sectionName = 'general';
$preference->defaultValue = 0;
$preference->sortOrder = 1;
BOL_PreferenceService::getInstance()->savePreference($preference);
try {
Updater::getNavigationService()->addMenuItem(OW_Navigation::ADMIN_MOBILE, 'mobile.admin_settings', 'mobile', 'mobile_admin_settings', OW_Navigation::VISIBLE_FOR_MEMBER);
} catch (Exception $e) {
$logger->addEntry(json_encode($e));
}
示例7:
<?php
if (!Updater::getConfigService()->configExists('equestions', 'allow_popups')) {
Updater::getConfigService()->addConfig('equestions', 'allow_popups', 1);
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'equestions');
示例8:
<?php
Updater::getConfigService()->deleteConfig("fbconnect", "allow_synchronize");
示例9: array
* which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
*/
UPDATE_LanguageService::getInstance()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'admin');
$db = Updater::getDbo();
$logger = Updater::getLogger();
$tblPrefix = OW_DB_PREFIX;
$queryList = array();
$queryList[] = "CREATE TABLE IF NOT EXISTS `{$tblPrefix}base_site_statistic` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT,\n `entityType` varchar(50) NOT NULL,\n `entityId` int(10) unsigned NOT NULL,\n `entityCount` int(10) unsigned NOT NULL DEFAULT '1',\n `timeStamp` int(10) unsigned NOT NULL,\n PRIMARY KEY (`id`),\n KEY `entity` (`entityType`, `timeStamp`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
foreach ($queryList as $query) {
try {
$db->query($query);
} catch (Exception $e) {
$logger->addEntry(json_encode($e));
}
}
Updater::getConfigService()->addConfig('base', 'site_statistics_disallowed_entity_types', 'user-status,avatar-change');
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('BASE_CMP_CustomHtmlWidget', true);
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD);
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('BASE_CMP_RssWidget', true);
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD);
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('ADMIN_CMP_FinanceStatisticWidget', false);
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD);
$widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_TOP);
$widgetService = Updater::getWidgetService();
$widget = $widgetService->addWidget('ADMIN_CMP_UserStatisticWidget', false);
$widgetPlace = $widgetService->addWidgetToPlace($widget, BOL_ComponentAdminService::PLASE_ADMIN_DASHBOARD);
$widgetService->addWidgetToPosition($widgetPlace, BOL_ComponentService::SECTION_TOP);
$widgetService = Updater::getWidgetService();
示例10:
<?php
/**
* Copyright (c) 2012, Skalfa LLC
* All rights reserved.
* ATTENTION: This commercial software is intended for use with Oxwall Free Community Software http://www.oxwall.org/
* and is licensed under Oxwall Store Commercial License.
* Full text of this license can be found at http://www.oxwall.org/store/oscl
*/
if (!Updater::getConfigService()->configExists('usercredits', 'allow_grant_credits')) {
Updater::getConfigService()->addConfig('usercredits', 'allow_grant_credits', "1");
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'usercredits');
示例11: NEWSFEED_TableList
$source = new NEWSFEED_TableList('source', $dbo);
$source->addTable('action');
$source->addTable('action_feed');
$source->changePrefix('newsfeed_tmp_');
$dist = new NEWSFEED_TableList('dist', $dbo);
$dist->createTable('action', "CREATE TABLE `%action%` (\n `id` int(11) NOT NULL auto_increment,\n `entityId` int(11) NOT NULL,\n `entityType` varchar(100) NOT NULL,\n `pluginKey` varchar(100) NOT NULL,\n `data` longtext NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `entity` (`entityType`,`entityId`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
$dist->createTable('action_feed', "CREATE TABLE `%action_feed%` (\n `id` int(11) NOT NULL auto_increment,\n `feedType` varchar(100) NOT NULL,\n `feedId` int(11) NOT NULL,\n `activityId` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `feedId` (`feedType`,`feedId`,`activityId`),\n KEY `actionId` (`activityId`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
$dist->createTable('activity', "CREATE TABLE `%activity%` (\n `id` int(11) NOT NULL auto_increment,\n `activityType` varchar(100) NOT NULL,\n `activityId` int(11) NOT NULL,\n `userId` int(11) NOT NULL,\n `data` text NOT NULL,\n `actionId` int(11) NOT NULL,\n `timeStamp` int(11) NOT NULL,\n `privacy` varchar(100) NOT NULL,\n `visibility` int(11) NOT NULL,\n `status` varchar(100) NOT NULL default 'active',\n UNIQUE KEY `id` (`id`),\n UNIQUE KEY `activityId` (`activityId`,`activityType`,`actionId`),\n KEY `actionId` (`actionId`),\n KEY `userId` (`userId`),\n KEY `activityType` ( `activityType`),\n KEY `timeStamp` (`timeStamp`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
$dist->createTable('cron_command', "CREATE TABLE IF NOT EXISTS `%cron_command%` (\n `id` int(11) NOT NULL auto_increment,\n `command` varchar(100) NOT NULL,\n `data` text NOT NULL,\n `processData` text NOT NULL,\n `timeStamp` int(11) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;");
$dist->addTable('follow');
$dist->query("ALTER TABLE `%follow%` ADD `permission` VARCHAR( 255 ) NOT NULL DEFAULT 'everybody'");
$r = $source->mysqlQuery("SELECT * FROM `%action%`");
while ($sAction = mysql_fetch_assoc($r)) {
$dActionId = $dist->insertRow('action', array('entityType' => $sAction['entityType'], 'entityId' => $sAction['entityId'], 'pluginKey' => $sAction['pluginKey'], 'data' => $sAction['data']));
$dActivityCreateId = $dist->insertRow('activity', array('actionId' => $dActionId, 'activityType' => 'create', 'activityId' => $sAction['userId'], 'userId' => $sAction['userId'], 'data' => json_encode(array()), 'userId' => $sAction['userId'], 'timeStamp' => $sAction['createTime'], 'privacy' => 'everybody', 'visibility' => $sAction['privacy'], 'status' => $sAction['status']));
$dActivitySubscribeId = $dist->insertRow('activity', array('actionId' => $dActionId, 'activityType' => 'subscribe', 'activityId' => $sAction['userId'], 'userId' => $sAction['userId'], 'data' => json_encode(array()), 'userId' => $sAction['userId'], 'timeStamp' => $sAction['updateTime'], 'privacy' => 'everybody', 'visibility' => $sAction['privacy'], 'status' => $sAction['status']));
$actionFeeds = $source->queryForList('SELECT * FROM `%action_feed%` WHERE actionId=:a', array('a' => $sAction['id']));
foreach ($actionFeeds as $feed) {
$dist->insertRow('action_feed', array('feedType' => $feed['feedType'], 'feedId' => $feed['feedId'], 'activityId' => $dActivityCreateId));
$dist->insertRow('action_feed', array('feedType' => $feed['feedType'], 'feedId' => $feed['feedId'], 'activityId' => $dActivitySubscribeId));
}
}
$dist->insertRow('cron_command', array('command' => 'update3500CronJob', 'data' => json_encode(array()), 'processData' => json_encode(array()), 'timeStamp' => time()));
$source->dropTables();
Updater::getConfigService()->addConfig('newsfeed', 'disabled_action_types', '');
$updateDir = dirname(__FILE__) . DS;
Updater::getLanguageService()->importPrefixFromZip($updateDir . 'langs.zip', 'newsfeed');
$newsfeed = OW::getPluginManager()->getPlugin('newsfeed');
$staticDir = OW_DIR_STATIC_PLUGIN . $newsfeed->getModuleName() . DS;
$staticJsDir = $staticDir . 'js' . DS;
@copy($newsfeed->getStaticJsDir() . 'newsfeed.js', $staticJsDir . 'newsfeed.js');
示例12: catch
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
* ---
* Copyright (c) 2011, Oxwall Foundation
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
try {
if (!Updater::getConfigService()->configExists('groups', 'is_forum_connected')) {
Updater::getConfigService()->addConfig('groups', 'is_forum_connected', '0', 'Add Forum to Groups plugin');
}
} catch (Exception $e) {
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'groups');
示例13: array
<?php
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'uheader');
$sql = array();
$sql[] = "ALTER TABLE `" . OW_DB_PREFIX . "uheader_cover` ADD `templateId` int(11) DEFAULT NULL";
$sql[] = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "uheader_template` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `file` varchar(255) NOT NULL,\n `settings` text NOT NULL,\n `default` int(11) NOT NULL DEFAULT '0',\n `timeStamp` int(11) NOT NULL,\n PRIMARY KEY (`id`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
$sql[] = "CREATE TABLE IF NOT EXISTS `" . OW_DB_PREFIX . "uheader_template_role` (\n `id` int(11) NOT NULL AUTO_INCREMENT,\n `templateId` int(11) NOT NULL,\n `roleId` int(11) NOT NULL,\n PRIMARY KEY (`id`),\n UNIQUE KEY `templateId` (`templateId`,`roleid`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8;";
foreach ($sql as $query) {
Updater::getDbo()->query($query);
}
Updater::getConfigService()->addConfig('uheader', 'tpl_view_mode', 'list', 'Cover gallery view mode');
try {
$plugin = OW::getPluginManager()->getPlugin("uheader");
$basePlugin = OW::getPluginManager()->getPlugin("base");
spl_autoload_register(array('OW_Autoload', 'autoload'));
OW::getAutoloader()->addPackagePointer("UHEADER_BOL", $plugin->getBolDir());
OW::getAutoloader()->addPackagePointer("UHEADER_CLASS", $plugin->getClassesDir());
OW::getAutoloader()->addPackagePointer("BASE_CLASS", $basePlugin->getClassesDir());
} catch (Exception $e) {
}
try {
//Add default templates
$templatesBridge = UHEADER_CLASS_TemplatesBridge::getInstance();
$templatesBridge->addBuiltInCovers();
} catch (Exception $e) {
}
try {
UHEADER_BOL_Service::getInstance()->saveInfoConfig(UHEADER_BOL_Service::INFO_LINE1, "base-gender-age");
UHEADER_BOL_Service::getInstance()->saveInfoConfig(UHEADER_BOL_Service::INFO_LINE2, "base-about");
} catch (Exception $e) {
}
示例14: time
<?php
/**
* This software is intended for use with Oxwall Free Community Software http://www.oxwall.org/ and is
* licensed under The BSD license.
* ---
* Copyright (c) 2011, Oxwall Foundation
* All rights reserved.
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
* following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this list of conditions and
* the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
* the following disclaimer in the documentation and/or other materials provided with the distribution.
*
* - Neither the name of the Oxwall Foundation nor the names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
Updater::getConfigService()->addConfig('mailbox', 'plugin_update_timestamp', time(), '');
Updater::getLanguageService()->importPrefixFromZip(dirname(dirname(dirname(__FILE__))) . DS . 'langs.zip', 'mailbox');
示例15:
<?php
if (!Updater::getConfigService()->configExists('questions', 'allow_popups')) {
Updater::getConfigService()->addConfig('questions', 'allow_popups', 1);
}
if (Updater::getConfigService()->configExists('questions', 'ev_page_visited')) {
Updater::getConfigService()->saveConfig('questions', 'ev_page_visited', 0);
}
Updater::getLanguageService()->importPrefixFromZip(dirname(__FILE__) . DS . 'langs.zip', 'questions');