本文整理汇总了PHP中Logging::writeLog_Warning方法的典型用法代码示例。如果您正苦于以下问题:PHP Logging::writeLog_Warning方法的具体用法?PHP Logging::writeLog_Warning怎么用?PHP Logging::writeLog_Warning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Logging
的用法示例。
在下文中一共展示了Logging::writeLog_Warning方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: chkCSRFToken
/**
* CSRF対策のトークンをチェックする。
* 異常時はログに書き込む
* @return boolean
*/
static function chkCSRFToken($file = null, $line = null)
{
if (ENABLE_CSRF == TRUE) {
return true;
}
if ($_POST) {
// CSRF トークンが正しいかチェック
if (\Security::check_token()) {
return true;
}
}
$msg2 = 'Invalid CSRF Token';
// Log::error($msg2);
$log = new Logging();
$log->writeLog_Warning($msg2, $file, $line);
return false;
}
示例2: action_adminArticleDelete
public function action_adminArticleDelete($shortName = null, $threadId = null)
{
if ($shortName == null || $threadId == null) {
$log = new Logging();
$log->writeLog_Warning('trying to detele board. but shortName or threadId is null', __FILE__, __LINE__);
return Response::forge('パラメータ異常');
}
$mode = Input::get('mode');
if ($mode == null || $mode != 'confirm' && $mode != 'delete') {
$log = new Logging();
$log->writeLog_Warning('trying to detele article. but mode-parameter is invalid.', __FILE__, __LINE__);
return Response::forge('パラメータ異常');
}
//掲示板を取得
$board = $this->getBoardFromShortName($shortName);
if ($board == null) {
$log = new Logging();
$log->writeLog_Warning('trying to detele article. but board is missing.', __FILE__, __LINE__);
return Response::forge('パラメータ異常');
}
//スレッドのbbsIdを確認
if (!$this->isBoardContainsArticle($board, $threadId)) {
$log = new Logging();
$log->writeLog_Warning('trying to detele article. but board is not contain the article.', __FILE__, __LINE__);
return Response::forge('パラメータ異常');
}
$this->setBoardTitle($board);
Model_Article::clear_cache();
//スレッド元か?レスか?
$ar = Model_Article::find($threadId);
$commentOf = $ar->commentOf;
$backURL = '';
if ($commentOf != 0) {
$backURL = '/bbs/thread' . DS . $shortName . DS . $commentOf;
} else {
$backURL = '/bbs/index' . DS . $shortName;
}
if ($this->isBoardMine($board)) {
$data['board'] = $board;
$data['article'] = $ar;
$data['attaches'] = $this->getAttach($board, $threadId);
$data['backURL'] = $backURL;
if ($mode == 'confirm') {
$content = View::forge('bbs/articleDeleteConfirm', $data);
$this->template->content = $content;
return;
} else {
if ($mode == 'delete') {
$this->deleteArticle($ar);
Response::redirect($backURL);
}
}
}
$log = new Logging();
$log->writeLog_Warning('trying to detele article. but owner is invalid', __FILE__, __LINE__);
return Response::forge('パラメータ異常');
}