本文整理汇总了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();
}