#19 - flock rss.xml and rss errors doesn't block adding anymore
This commit is contained in:
parent
c0134348e2
commit
1cdb3e051d
2 changed files with 10 additions and 5 deletions
|
@ -198,8 +198,8 @@ class FileRSSFeed extends RSSFeed {
|
|||
foreach($merger->getFeeds(20) as $f) {
|
||||
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
|
||||
**/
|
||||
require_once('class_rssfeed.php');
|
||||
$rss = new AutoblogRSS(RSS_FILE);
|
||||
$rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl);
|
||||
try {
|
||||
require_once('class_rssfeed.php');
|
||||
$rss = new AutoblogRSS(RSS_FILE);
|
||||
$rss->addNewAutoblog($sitename, $foldername, $siteurl, $rssurl);
|
||||
}
|
||||
catch (Exception $e) {
|
||||
;
|
||||
}
|
||||
|
||||
$fp = fopen($foldername .'/index.php', 'w+');
|
||||
if( !fwrite($fp, "<?php require_once '../autoblog.php'; ?>") )
|
||||
|
|
Loading…
Reference in a new issue