本文整理汇总了PHP中system::revue方法的典型用法代码示例。如果您正苦于以下问题:PHP system::revue方法的具体用法?PHP system::revue怎么用?PHP system::revue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类system
的用法示例。
在下文中一共展示了system::revue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: stop
static function stop($release_id)
{
if ($release = ormObjects::get($release_id)) {
$release->last_subscribe = date('Y-m-d H:i:s');
$release->error_part_num = 0;
$release->error_iteration_num = 0;
$release->part_count_awaiting = $release->part_count_awaiting - 1;
$release->save();
$subscribe = $release->getParent();
$subscribe->last_subscribe = date('Y-m-d H:i:s');
$subscribe->save();
page::assign('part', $_SESSION['SUBSCR_PART']);
page::assign('name', $release->name);
system::revue($subscribe, page::parse(lang::get('SUBSCRIBE_HIST_STOP')), info);
}
}
示例2: restore
public function restore()
{
if (!empty($this->id)) {
$ret = db::q('UPDATE <<objects>> SET o_to_trash = 0 WHERE o_id = "' . $this->id . '";');
if ($ret === false) {
$this->newError(12, 'Ошибка в SQL запросе!');
return false;
}
system::revue($this, lang::get('REVUE_RESTORE'), info);
return true;
} else {
return false;
}
}
示例3: createObject
protected function createObject()
{
// Проверяем, если в структуре сайта нет домашней страницы, делаем текущую таковой
if (isset($this->new_prop['is_home_page']) && !$this->new_prop['is_home_page']) {
$hp = db::q('SELECT p_obj_id FROM <<pages>>
WHERE lang_id = "' . languages::curId() . '" and
domain_id = "' . domains::curId() . '" and
is_home_page = 1', value);
$this->new_prop['is_home_page'] = empty($hp) ? 1 : 0;
}
$ret = parent::createObject();
if ($ret !== false) {
$this->saveRight(true);
if (isset($this->new_prop['pseudo_url']) && strlen($this->new_prop['pseudo_url']) > 80) {
$this->new_prop['pseudo_url'] = $this->id;
}
$fields = '';
reset($this->new_prop);
while (list($key, $value) = each($this->new_prop)) {
if ($this->isPageField($key)) {
$fields .= $this->procValue($key, $value);
}
}
$fields = substr($fields, 0, strlen($fields) - 2);
if (!empty($fields)) {
$this->setHomePage(false);
$fields = ', ' . $fields;
$sql = 'INSERT INTO <<pages>>
SET p_obj_id = "' . $this->id . '",
lang_id = "' . languages::curId() . '",
domain_id = "' . domains::curId() . '"' . $fields . ';';
if (db::q($sql) !== false) {
$ret = $this->id;
searchIndex::autoIndex($this);
ormPages::clearCache();
system::revue($this, 'Добавил страницу', info);
} else {
$ret = false;
}
}
}
return $ret;
}