本文整理汇总了PHP中tag::diff方法的典型用法代码示例。如果您正苦于以下问题:PHP tag::diff方法的具体用法?PHP tag::diff怎么用?PHP tag::diff使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tag
的用法示例。
在下文中一共展示了tag::diff方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: do_save
//.........这里部分代码省略.........
empty($clink) && ($clink = strtolower(pinyin($title)));
if (empty($aid) && $clink) {
articleTable::check_clink($clink) && iPHP::alert('该文章自定义链接已经存在!请检查是否重复');
}
}
if (empty($description) && empty($url)) {
$description = $this->autodesc($body);
}
stripos($pic, 'http://') === false or $pic = iFS::http($pic);
stripos($mpic, 'http://') === false or $mpic = iFS::http($mpic);
stripos($spic, 'http://') === false or $spic = iFS::http($spic);
$haspic = empty($pic) ? 0 : 1;
$SELFURL = __SELF__ . $_POST['REFERER'];
if (empty($_POST['REFERER']) || strstr($_POST['REFERER'], '=save')) {
$SELFURL = __SELF__ . '?app=article&do=manage';
}
$editor or $editor = empty(iMember::$data->nickname) ? iMember::$data->username : iMember::$data->nickname;
// if($aid && $ischapter){
// $this->article_data($body,$aid);
// iDB::query("UPDATE `#iCMS@__article` SET `chapter`=chapter+1 WHERE `id` = '$aid'");
// iPHP::success('章节添加完成!','url:'.$SELFURL);
// }
iPHP::import(iPHP_APP_CORE . '/iMAP.class.php');
$picdata = '';
$ucid = 0;
$fields = articleTable::fields($aid);
if (empty($aid)) {
$postime = $pubdate;
$hits = 0;
$good = $bad = $comments = 0;
$ischapter && ($chapter = 1);
$mobile = 0;
$aid = articleTable::insert(compact($fields));
if ($this->callback['primary']) {
$PCB = $this->callback['primary'];
$handler = $PCB[0];
$params = (array) $PCB[1] + array('indexid' => $aid);
if (is_callable($handler)) {
call_user_func_array($handler, $params);
}
}
if ($tags) {
iPHP::app('tag.class', 'static');
tag::add($tags, $userid, $aid, $cid);
//articleTable::update(compact('tags'),array('id'=>$aid));
}
map::init('prop', $this->appid);
$pid && map::add($pid, $aid);
map::init('category', $this->appid);
map::add($cid, $aid);
$scid && map::add($scid, $aid);
$tagArray && tag::map_iid($tagArray, $aid);
$url or $this->article_data($body, $aid, $haspic);
$this->categoryApp->update_count_one($cid);
$article_url = iURL::get('article', array(array('id' => $aid, 'url' => $url, 'cid' => $cid, 'pubdate' => $pubdate), $this->category[$cid]))->href;
if ($status && iCMS::$config['api']['baidu']['sitemap']['sync']) {
baidu_ping($article_url);
}
if ($callback) {
return array("code" => $callback, 'indexid' => $aid);
}
$moreBtn = array(array("text" => "查看该文章", "target" => '_blank', "url" => $article_url, "o" => 'target="_blank"'), array("text" => "编辑该文章", "url" => APP_URI . "&do=add&id=" . $aid), array("text" => "继续添加文章", "url" => APP_URI . "&do=add&cid=" . $cid), array("text" => "返回文章列表", "url" => $SELFURL), array("text" => "查看网站首页", "url" => iCMS_URL, "target" => '_blank'));
iPHP::$dialog['lock'] = true;
iPHP::dialog('success:#:check:#:文章添加完成!<br />10秒后返回文章列表', 'url:' . $SELFURL, 10, $moreBtn);
} else {
if ($tags) {
iPHP::app('tag.class', 'static');
tag::diff($tags, $_tags, iMember::$userid, $aid, $cid);
}
$picdata = $this->picdata($pic, $mpic, $spic);
articleTable::update(compact($fields), array('id' => $aid));
if ($this->callback['primary']) {
$PCB = $this->callback['primary'];
$handler = $PCB[0];
$params = (array) $PCB[1] + array('indexid' => $aid);
if (is_callable($handler)) {
call_user_func_array($handler, $params);
}
}
map::init('prop', $this->appid);
map::diff($pid, $_pid, $aid);
map::init('category', $this->appid);
map::diff($cid, $_cid, $aid);
map::diff($scid, $_scid, $aid);
$url or $this->article_data($body, $aid, $haspic);
//$ischapter && $this->chapter_count($aid);
if ($_cid != $cid) {
$this->categoryApp->update_count_one($_cid, '-');
$this->categoryApp->update_count_one($cid);
}
if ($callback) {
return array("code" => $callback, 'indexid' => $aid);
}
// if(!strstr($this->category[$cid]['contentRule'],'{PHP}')&&!$this->category[$cid]['url']&&$this->category[$cid]['mode']=="1" && $status) {
// $htmlApp = iACP::app('html');
// $htmlApp->Article($aid);
// }
iPHP::success('文章编辑完成!<br />3秒后返回文章列表', 'url:' . $SELFURL);
}
}