#19 - flock rss.xml and rss errors doesn't block adding anymore
This commit is contained in:
parent
c0134348e2
commit
1cdb3e051d
|
@ -198,8 +198,8 @@ class FileRSSFeed extends RSSFeed {
|
||||||
foreach($merger->getFeeds(20) as $f) {
|
foreach($merger->getFeeds(20) as $f) {
|
||||||
parent::addItem($f->title,$f->link,$f->description,$f->author,$f->guid,$f->time);
|
parent::addItem($f->title,$f->link,$f->description,$f->author,$f->guid,$f->time);
|
||||||
}
|
}
|
||||||
|
|
||||||
file_put_contents( $this->filename, $this->xml->asXML() );
|
file_put_contents( $this->filename, $this->xml->asXML(), LOCK_EX );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,9 +89,14 @@ function createAutoblog($type, $sitename, $siteurl, $rssurl, $error = array()) {
|
||||||
/**
|
/**
|
||||||
* RSS
|
* RSS
|
||||||
**/
|
**/
|
||||||
require_once('class_rssfeed.php');
|
try {
|
||||||
$rss = new AutoblogRSS(RSS_FILE);
|
require_once('class_rssfeed.php');
|
||||||
$rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl);
|
$rss = new AutoblogRSS(RSS_FILE);
|
||||||
|
$rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl);
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
$fp = fopen($foldername .'/index.php', 'w+');
|
$fp = fopen($foldername .'/index.php', 'w+');
|
||||||
if( !fwrite($fp, "<?php require_once '../autoblog.php'; ?>") )
|
if( !fwrite($fp, "<?php require_once '../autoblog.php'; ?>") )
|
||||||
|
|
Loading…
Reference in a new issue