修复数据库出错的bug

This commit is contained in:
2012-10-24 21:38:12 +08:00
parent 375a141cf6
commit aa5ae34544
2 changed files with 2 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<?php <?php
/* /*
Plugin Name: 自动发布 Plugin Name: 自动发布
Version: 1.9.2 Version: 1.9.3
Plugin URL: http://xiaosong.org/share/auto-pub-plugin-update Plugin URL: http://xiaosong.org/share/auto-pub-plugin-update
Description: 自动发布文章,修正时区问题,增加相关挂载点,自动删除缓存文件。 Description: 自动发布文章,修正时区问题,增加相关挂载点,自动删除缓存文件。
Author: 小松 Author: 小松

View File

@@ -13,7 +13,7 @@ while($row = $DB->fetch_array($result)){
$autopubCopyRight = '<p style="text-align:right;font-size:12px;">(此文通过<a href="http://xiaosong.org/share/auto-pub-plugin-update">emlog自动发布插件</a>发布)</p>'; $autopubCopyRight = '<p style="text-align:right;font-size:12px;">(此文通过<a href="http://xiaosong.org/share/auto-pub-plugin-update">emlog自动发布插件</a>发布)</p>';
$content = $row['content'].$autopubCopyRight; $content = $row['content'].$autopubCopyRight;
if(time() > $pub_time){ if(time() > $pub_time){
$sql_do = "UPDATE ".DB_PREFIX."blog SET hide = 'n',date = '".$pub_time."',content = '".$content."' WHERE gid='".$row['gid']."'"; $sql_do = "UPDATE ".DB_PREFIX."blog SET hide = 'n',date = '".$pub_time."',content = '".addslashes($content)."' WHERE gid='".$row['gid']."'";
$DB->query($sql_do); $DB->query($sql_do);
$CACHE->updateCache(); $CACHE->updateCache();
doAction('save_log', $row['gid']); doAction('save_log', $row['gid']);