本文整理匯總了PHP中Setting::removeServiceSetting方法的典型用法代碼示例。如果您正苦於以下問題:PHP Setting::removeServiceSetting方法的具體用法?PHP Setting::removeServiceSetting怎麽用?PHP Setting::removeServiceSetting使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Setting
的用法示例。
在下文中一共展示了Setting::removeServiceSetting方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: removeServiceSetting
function removeServiceSetting($name)
{
return Setting::removeServiceSetting($name, true);
}
示例2: removeServiceSettingGlobal
static function removeServiceSettingGlobal($name)
{
return Setting::removeServiceSetting($name, true);
}
示例3: trashVan
function trashVan()
{
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastTrashSweep', 0, true) > 86400) {
$pool = DBModel::getInstance();
$pool->reset('Comments');
$pool->setQualifier('isfiltered', 's', Timestamp::getUNIXtime() - 1296000);
$pool->setQualifier('isfiltered', 'b', 0);
$pool->delete();
$pool->reset('RemoteResponses');
$pool->setQualifier('isfiltered', 's', Timestamp::getUNIXtime() - 1296000);
$pool->setQualifier('isfiltered', 'b', 0);
$pool->delete();
$pool->reset('RefererLogs');
$pool->setQualifier('referred', 's', Timestamp::getUNIXtime() - 604800);
$pool->delete();
Setting::setServiceSetting('lastTrashSweep', Timestamp::getUNIXtime(), true);
}
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastNoticeRead', 0, true) > 43200) {
Setting::removeServiceSetting('TextcubeNotice', true);
Setting::setServiceSetting('lastNoticeRead', Timestamp::getUNIXtime(), true);
}
}
示例4: trashVan
function trashVan()
{
global $database;
requireModel('common.setting');
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastTrashSweep', 0, true) > 86400) {
// var_dump(Timestamp::getUNIXtime());
// var_dump(Setting::getServiceSetting('lastTrashSweep',0, true));
POD::execute("DELETE FROM {$database['prefix']}Comments where isfiltered < " . Timestamp::getUNIXtime() . " - 1296000 AND isfiltered > 0");
POD::execute("DELETE FROM {$database['prefix']}RemoteResponses where isfiltered < " . Timestamp::getUNIXtime() . " - 1296000 AND isfiltered > 0");
POD::execute("DELETE FROM {$database['prefix']}RefererLogs WHERE referred < " . Timestamp::getUNIXtime() . " - 604800");
Setting::setServiceSetting('lastTrashSweep', Timestamp::getUNIXtime(), true);
}
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastNoticeRead', 0, true) > 43200) {
Setting::removeServiceSetting('TextcubeNotice', true);
Setting::setServiceSetting('lastNoticeRead', Timestamp::getUNIXtime(), true);
}
}
示例5: trashVan
function trashVan()
{
$context = Model_Context::getInstance();
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastTrashSweep', 0, true) > 43200) {
$pool = DBModel::getInstance();
$pool->reset('Comments');
$pool->setQualifier('isfiltered', 's', Timestamp::getUNIXtime() - $context->getProperty('service.trashtimelimit', 302400));
$pool->setQualifier('isfiltered', 'b', 0);
$pool->delete();
$pool->reset('RemoteResponses');
$pool->setQualifier('isfiltered', 's', Timestamp::getUNIXtime() - $context->getProperty('service.trashtimelimit', 302400));
$pool->setQualifier('isfiltered', 'b', 0);
$pool->delete();
$pool->reset('RefererLogs');
$pool->setQualifier('referred', 's', Timestamp::getUNIXtime() - 604800);
$pool->delete();
Setting::setServiceSetting('lastTrashSweep', Timestamp::getUNIXtime(), true);
}
if (Timestamp::getUNIXtime() - Setting::getServiceSetting('lastNoticeRead', 0, true) > 43200) {
Setting::removeServiceSetting('TextcubeNotice', true);
Setting::setServiceSetting('lastNoticeRead', Timestamp::getUNIXtime(), true);
}
}