Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/php/Collections.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function fetchCollections($params = array()){
}

$feed = new Zotero_Feed($response->getRawBody());
$this->owningLibrary->_lastFeed = $feed;
$this->owningLibrary->setLastFeed($feed);
$addedCollections = $this->addCollectionsFromFeed($feed);

if(isset($feed->links['next'])){
Expand Down
18 changes: 18 additions & 0 deletions lib/php/Library.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ public function __construct($libraryType = null, $libraryID = null, $libraryUrlI
if (!extension_loaded('curl')) {
throw new Exception("You need cURL");
}
//check if APC is loaded
if (!extension_loaded('apc') && !ini_get('apc.enabled')) {
throw new Exception("PHP extension APC is not loaded/or enabled in php.ini");
}
//check if DOMDocument object is loaded
if (!extension_loaded('xml')) {
throw new Exception("PHP extension XML is not loaded");
}

$this->libraryType = $libraryType;
$this->libraryID = $libraryID;
Expand Down Expand Up @@ -271,6 +279,16 @@ public function getLastFeed(){
return $this->_lastFeed;
}

/**
* Sets the last Zotero_Feed
*
* @param Zotero_feed
*/
public function setLastFeed($feed)
{
$this->_lastFeed = $feed;
}

/**
* Construct a string that uniquely identifies a library
* This is not related to the server GUIDs
Expand Down