本文整理匯總了PHP中unknown::modifiednow方法的典型用法代碼示例。如果您正苦於以下問題:PHP unknown::modifiednow方法的具體用法?PHP unknown::modifiednow怎麽用?PHP unknown::modifiednow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類unknown
的用法示例。
在下文中一共展示了unknown::modifiednow方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: update_when_compiled
/**
*
*
* @param unknown $tpl_source
* @param unknown $bBlog (reference)
* @return unknown
*/
function update_when_compiled($tpl_source, &$bBlog)
{
global $bBlog;
// prevent parse error ? wtf ??
// well that worked. WTF?
if (!defined('IN_BBLOG_ADMIN')) {
$bBlog->modifiednow();
}
return $tpl_source;
}
示例2: deleteComment
/**
*
*
* @param unknown $bBlog (reference)
* @param unknown $id
*/
function deleteComment(&$bBlog, $id)
{
$id = intval($id);
$postid = $bBlog->get_var('select postid from ' . T_COMMENTS . ' where commentid="' . $id . '"');
$childcount = $bBlog->get_var('select count(*) as c from ' . T_COMMENTS . ' where parentid="' . $id . '" group by commentid');
if ($childcount > 0) {
// there are replies to the comment so we can't delete it.
$bBlog->query('update ' . T_COMMENTS . ' set deleted="true", postername="", posteremail="", posterwebsite="", pubemail=0, pubwebsite=0, commenttext="Deleted Comment" where commentid="' . $val . '"');
} else {
// just delete the comment
$bBlog->query('delete from ' . T_COMMENTS . ' where commentid="' . $id . '"');
}
$newnumcomments = $bBlog->get_var('SELECT count(*) as c FROM ' . T_COMMENTS . ' WHERE postid="' . $postid . '" and deleted="false" group by postid');
$bBlog->query('update ' . T_POSTS . ' set commentcount="' . $newnumcomments . '" where postid="' . $postid . '"');
$bBlog->modifiednow();
}