修复导致服务器500错误的bug
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
Plugin Name: Rss订阅
|
Plugin Name: Rss订阅
|
||||||
Version: 1.3.1
|
Version: 1.3.2
|
||||||
Plugin URL: http://xiaosong.org/tech/the-official-releas-of-rss-subscribe-plugin
|
Plugin URL: http://xiaosong.org/tech/the-official-releas-of-rss-subscribe-plugin
|
||||||
Description: 订阅朋友的博客feed,显示在自己博客~
|
Description: 订阅朋友的博客feed,显示在自己博客~
|
||||||
Author: 小松
|
Author: 小松
|
||||||
@@ -73,9 +73,9 @@ function insertFeed($url, $title){
|
|||||||
if (isFeedExists($url) == 0) {
|
if (isFeedExists($url) == 0) {
|
||||||
$DB->query("INSERT INTO ".DB_PREFIX."rssfeeds (url, title) VALUES('$url', '$title')");
|
$DB->query("INSERT INTO ".DB_PREFIX."rssfeeds (url, title) VALUES('$url', '$title')");
|
||||||
} elseif (!getTitle($url)) {
|
} elseif (!getTitle($url)) {
|
||||||
formMsg("RSS导入失败,RSS地址{$url}解析失败,请确定RSS地址及XML文件格式正确",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS导入失败,RSS地址{$url}解析失败,请确定RSS地址及XML文件格式正确");
|
||||||
} else {
|
} else {
|
||||||
formMsg("RSS导入失败,数据库中已存在{$url}",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS导入失败,数据库中已存在{$url}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function deleteFeed($id){
|
function deleteFeed($id){
|
||||||
|
|||||||
@@ -106,10 +106,10 @@ if ($do == 'del') {
|
|||||||
updateFeed($id, $url, $title);
|
updateFeed($id, $url, $title);
|
||||||
header("Location:plugin.php?plugin=lastRSS&setting=true");
|
header("Location:plugin.php?plugin=lastRSS&setting=true");
|
||||||
} else {
|
} else {
|
||||||
formMsg("RSS修改失败,插件无法获取{$url}的标题,请自行添加标题再添加该RSS",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS修改失败,插件无法获取{$url}的标题,请自行添加标题再添加该RSS");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
formMsg("RSS修改失败,RSS地址不能为空",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS修改失败,RSS地址不能为空");
|
||||||
}
|
}
|
||||||
} elseif ($do == 'add') {
|
} elseif ($do == 'add') {
|
||||||
$url = isset($_POST['url']) ? trim($_POST['url']) : '';
|
$url = isset($_POST['url']) ? trim($_POST['url']) : '';
|
||||||
@@ -121,10 +121,10 @@ if ($do == 'del') {
|
|||||||
updateLogs();
|
updateLogs();
|
||||||
header("Location:plugin.php?plugin=lastRSS&setting=true");
|
header("Location:plugin.php?plugin=lastRSS&setting=true");
|
||||||
} else {
|
} else {
|
||||||
formMsg("RSS导入失败,插件无法获取{$url}的标题,请自行添加标题再导入该RSS",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS导入失败,插件无法获取{$url}的标题,请自行添加标题再导入该RSS");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
formMsg("RSS导入失败,RSS地址不能为空",'./plugin.php?plugin=lastRSS',0);
|
emMsg("RSS导入失败,RSS地址不能为空");
|
||||||
}
|
}
|
||||||
} elseif ($do == 'config') {
|
} elseif ($do == 'config') {
|
||||||
$lastRSS_cache_time = isset($_POST['lastRSS_cache_time']) ? intval($_POST['lastRSS_cache_time']) : 0;
|
$lastRSS_cache_time = isset($_POST['lastRSS_cache_time']) ? intval($_POST['lastRSS_cache_time']) : 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user