diff --git a/lib/php/Collections.php b/lib/php/Collections.php index f98ebb8..3ec608d 100644 --- a/lib/php/Collections.php +++ b/lib/php/Collections.php @@ -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'])){ diff --git a/lib/php/Library.php b/lib/php/Library.php index 18ce4a3..3013a5c 100644 --- a/lib/php/Library.php +++ b/lib/php/Library.php @@ -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; @@ -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