rename ServiceFactory::getServiceInstance() to get() - much easier to write
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@396 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
parent
3df99a0aec
commit
68c01cda10
69 changed files with 170 additions and 170 deletions
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$cdservice =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$cdservice =SemanticScuttle_Service_Factory::get('CommonDescription');
|
||||
|
||||
|
||||
$pageName = isset($pageName)?$pageName:"";
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
***************************************************************************/
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
|
||||
$logged_on_userid = $userservice->getCurrentUserId();
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$commonTags =& $b2tservice->getRelatedTagsByHash($hash);
|
||||
$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
require_once('sidebar.linkedtags.inc.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
|
||||
require_once('sidebar.linkedtags.inc.php');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
require_once('sidebar.linkedtags.inc.php');
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
|
||||
|
||||
if(!isset($user)) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
|
||||
/* Manage input */
|
||||
$userid = isset($userid)?$userid:NULL;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
|
||||
|
||||
if(!isset($user)) $user="";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Service creation: only useful services are created */
|
||||
$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
|
||||
$searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
|
||||
|
||||
$logged_on_userid = $userservice->getCurrentUserId();
|
||||
if ($logged_on_userid === false) {
|
||||
|
|
|
@ -9,8 +9,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
|
|||
return array('output' => '', 'stoplist' => $stopList);
|
||||
}
|
||||
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
|
||||
// link '>'
|
||||
if($level>1) {
|
||||
|
|
|
@ -27,7 +27,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
|
||||
function _getbookmark($fieldname, $value, $all = false) {
|
||||
if (!$all) {
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$sId = $userservice->getCurrentUserId();
|
||||
$range = ' AND uId = '. $sId;
|
||||
} else {
|
||||
|
@ -61,7 +61,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
|
||||
if ($row = & $this->db->sql_fetchrow($dbresult)) {
|
||||
if ($include_tags) {
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
$row['tags'] = $b2tservice->getTagsForBookmark($bid);
|
||||
}
|
||||
$output = $row;
|
||||
|
@ -128,7 +128,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
return false;
|
||||
}
|
||||
|
||||
$userservice = SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getCurrentUser();
|
||||
|
||||
//user has to be either admin, or owner
|
||||
|
@ -170,7 +170,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
// Note that date is expected to be a string that's interpretable by strtotime().
|
||||
function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
|
||||
if($sId == -1) {
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$sId = $userservice->getCurrentUserId();
|
||||
}
|
||||
|
||||
|
@ -214,7 +214,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
$extension = end($uriparts);
|
||||
unset($uriparts);
|
||||
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
|
||||
$this->db->sql_transaction('rollback');
|
||||
message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db);
|
||||
|
@ -270,7 +270,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
$extension = end($uriparts);
|
||||
unset($uriparts);
|
||||
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) {
|
||||
$this->db->sql_transaction('rollback');
|
||||
message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db);
|
||||
|
@ -292,9 +292,9 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
// bookmarks; otherwise, just get the public bookmarks.
|
||||
// - if the $user is set and IS the logged-in user, then get all bookmarks.
|
||||
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$sId = $userservice->getCurrentUserId();
|
||||
|
||||
if ($userservice->isLoggedOn()) {
|
||||
|
@ -506,7 +506,7 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
|
|||
return false;
|
||||
}
|
||||
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$sId = $userservice->getCurrentUserId();
|
||||
|
||||
if ($userservice->isLoggedOn()) {
|
||||
|
|
|
@ -53,7 +53,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
}
|
||||
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tags = $tagservice->normalize($tags);
|
||||
|
||||
|
||||
|
@ -104,8 +104,8 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
}
|
||||
|
||||
$bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
// Create links between tags
|
||||
foreach($tags as $key => $tag) {
|
||||
|
@ -161,7 +161,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function deleteTag($uId, $tag) {
|
||||
$bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
$query = 'DELETE FROM '. $this->getTableName();
|
||||
$query.= ' USING '. $this->getTableName() .', '. $bs->getTableName();
|
||||
|
@ -235,7 +235,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function &getTags($userid = NULL) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$logged_on_user = $userservice->getCurrentUserId();
|
||||
|
||||
$query = 'SELECT T.tag, COUNT(B.bId) AS bCount FROM '. $GLOBALS['tableprefix'] .'bookmarks AS B INNER JOIN '. $userservice->getTableName() .' AS U ON B.uId = U.'. $userservice->getFieldName('primary') .' INNER JOIN '. $GLOBALS['tableprefix'] .'bookmarks2tags AS T ON B.bId = T.bId';
|
||||
|
@ -310,7 +310,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
|
||||
// Returns the most popular tags used for a particular bookmark hash
|
||||
function &getRelatedTagsByHash($hash, $limit = 20) {
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$sId = $userservice->getCurrentUserId();
|
||||
// Logged in
|
||||
if ($userservice->isLoggedOn()) {
|
||||
|
@ -340,7 +340,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
|
||||
function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) {
|
||||
// look for admin ids
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$adminIds = $userservice->getAdminIds();
|
||||
|
||||
// ask for their tags
|
||||
|
@ -349,7 +349,7 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
|
||||
function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
|
||||
// look for contact ids
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$contacts = $userservice->getWatchlist($user);
|
||||
|
||||
// add the user (to show him/her also his/her tags)
|
||||
|
@ -417,8 +417,8 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function renameTag($userid, $old, $new, $fromApi = false) {
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
|
||||
if (is_null($userid) || is_null($old) || is_null($new))
|
||||
return false;
|
||||
|
|
|
@ -62,7 +62,7 @@ class SemanticScuttle_Service_Factory
|
|||
*
|
||||
* @return SemanticScuttle_Service Service object
|
||||
*/
|
||||
public static function getServiceInstance($name)
|
||||
public static function get($name)
|
||||
{
|
||||
self::loadDb();
|
||||
self::loadService($name);
|
||||
|
|
|
@ -27,7 +27,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function addLinkedTags($tag1, $tag2, $relationType, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
$tag2 = $tagservice->normalize($tag2);
|
||||
|
||||
|
@ -57,7 +57,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
// Return linked tags just for admin users
|
||||
function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) {
|
||||
// look for admin ids
|
||||
$userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
|
||||
$userservice = SemanticScuttle_Service_Factory :: get('User');
|
||||
$adminIds = $userservice->getAdminIds();
|
||||
|
||||
//ask for their linked tags
|
||||
|
@ -130,7 +130,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
// try to find data in cache
|
||||
$tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
|
||||
$tcs = SemanticScuttle_Service_Factory::get('TagCache');
|
||||
if(count($stopList) == 0) {
|
||||
$activatedCache = true;
|
||||
} else {
|
||||
|
@ -188,7 +188,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
$query = "SELECT DISTINCT tts.tag1 as tag";
|
||||
$query.= " FROM `". $this->getTableName() ."` tts";
|
||||
if($orderBy != null) {
|
||||
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$query.= ", ".$tsts->getTableName() ." tsts";
|
||||
}
|
||||
$query.= " WHERE tts.tag1 <> ALL";
|
||||
|
@ -339,7 +339,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function renameTag($uId, $oldName, $newName) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$newName = $tagservice->normalize($newName);
|
||||
|
||||
$query = 'UPDATE `'. $this->getTableName() .'`';
|
||||
|
@ -366,10 +366,10 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function update($tag1, $tag2, $relationType, $uId) {
|
||||
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$tsts->updateStat($tag1, $relationType, $uId);
|
||||
|
||||
$tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
|
||||
$tcs = SemanticScuttle_Service_Factory::get('TagCache');
|
||||
$tcs->deleteByUser($uId);
|
||||
}
|
||||
|
||||
|
@ -377,7 +377,7 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
|
|||
$query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';
|
||||
$this->db->sql_query($query);
|
||||
|
||||
$tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$tsts->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function getChildren($tag1, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
|
||||
if($tag1 == '') return false;
|
||||
|
@ -66,7 +66,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function addChild($tag1, $tag2, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
$tag2 = $tagservice->normalize($tag2);
|
||||
|
||||
|
@ -110,7 +110,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function existsChild($tag1, $tag2, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
$tag2 = $tagservice->normalize($tag2);
|
||||
|
||||
|
@ -214,7 +214,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function _isSynonymKey($tag1, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
|
||||
$query = "SELECT tag1 FROM `". $this->getTableName() ."`";
|
||||
|
@ -226,7 +226,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function _isSynonymValue($tag2, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag2 = $tagservice->normalize($tag2);
|
||||
|
||||
$query = "SELECT tag2 FROM `". $this->getTableName() ."`";
|
||||
|
@ -250,7 +250,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function _getSynonymKey($tag2, $uId) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag2 = $tagservice->normalize($tag2);
|
||||
|
||||
if($this->_isSynonymKey($tag2)) return $tag2;
|
||||
|
@ -279,7 +279,7 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
|
|||
* $tagExcepted allows to hide a value.
|
||||
*/
|
||||
function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
|
||||
$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tag1 = $tagservice->normalize($tag1);
|
||||
$tagExcepted = $tagservice->normalize($tagExcepted);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function getNbChildren($tag1, $relationType, $uId) {
|
||||
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$query = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`";
|
||||
$query.= " WHERE tag1 = '" .$tag1 ."'";
|
||||
$query.= " AND relationType = '". $relationType ."'";
|
||||
|
@ -102,7 +102,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
|
|||
return false;
|
||||
}
|
||||
|
||||
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId);
|
||||
$nbDescendants = 0;
|
||||
$maxDepth = 0;
|
||||
|
@ -123,7 +123,7 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
|
|||
}
|
||||
|
||||
function updateAllStat() {
|
||||
$tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
$query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`";
|
||||
$query.= " WHERE relationType = '>'";
|
||||
|
|
|
@ -612,7 +612,7 @@ class User {
|
|||
function getName() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->name)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getUser($this->id);
|
||||
$this->name = $user['name'];
|
||||
}
|
||||
|
@ -622,7 +622,7 @@ class User {
|
|||
function getEmail() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->email)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getUser($this->id);
|
||||
$this->email = $user['email'];
|
||||
}
|
||||
|
@ -632,7 +632,7 @@ class User {
|
|||
function getHomepage() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->homepage)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getUser($this->id);
|
||||
$this->homepage = $user['homepage'];
|
||||
}
|
||||
|
@ -642,7 +642,7 @@ class User {
|
|||
function getContent() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->content)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getUser($this->id);
|
||||
$this->content = $user['uContent'];
|
||||
}
|
||||
|
@ -652,7 +652,7 @@ class User {
|
|||
function getDatetime() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->content)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$user = $userservice->getUser($this->id);
|
||||
$this->datetime = $user['uDatetime'];
|
||||
}
|
||||
|
@ -662,14 +662,14 @@ class User {
|
|||
function isAdmin() {
|
||||
// Look for value only if not already set
|
||||
if(!isset($this->isAdmin)) {
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->isAdmin = $userservice->isAdmin($this->id);
|
||||
}
|
||||
return $this->isAdmin;
|
||||
}
|
||||
|
||||
function getNbBookmarks($range = 'public') {
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
return $bookmarkservice->countBookmarks($this->getId(), $range);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,10 +50,10 @@ if (!defined('UNIT_TEST_MODE')) {
|
|||
}
|
||||
|
||||
// 5 // Create mandatory services and objects
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$currentUser = $userservice->getCurrentObjectUser();
|
||||
|
||||
$templateservice =SemanticScuttle_Service_Factory::getServiceInstance('Template');
|
||||
$templateservice =SemanticScuttle_Service_Factory::get('Template');
|
||||
$tplVars = array();
|
||||
$tplVars['currentUser'] = $currentUser;
|
||||
$tplVars['userservice'] = $userservice;
|
||||
|
|
|
@ -20,14 +20,14 @@ class BookmarksTest extends PHPUnit_Framework_TestCase
|
|||
$tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts=SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts=SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -21,16 +21,16 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
|
|||
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
$this->cds =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
|
||||
$this->cds =SemanticScuttle_Service_Factory::get('CommonDescription');
|
||||
$this->cds->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,16 +20,16 @@ class SearchTest extends PHPUnit_Framework_TestCase
|
|||
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
$this->shs =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
|
||||
$this->shs =SemanticScuttle_Service_Factory::get('SearchHistory');
|
||||
$this->shs->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,14 +19,14 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase
|
|||
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,16 +19,16 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
|
|||
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
$this->tcs =SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
|
||||
$this->tcs =SemanticScuttle_Service_Factory::get('TagCache');
|
||||
$this->tcs->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -16,16 +16,16 @@ class TagsTest extends PHPUnit_Framework_TestCase
|
|||
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
|
||||
require_once dirname(__FILE__) . '/../src/SemanticScuttle/header.php';
|
||||
|
||||
$this->ts =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$this->ts =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$this->ts->deleteAll();
|
||||
$this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$this->us =SemanticScuttle_Service_Factory::get('User');
|
||||
$this->bs =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$this->bs->deleteAll();
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$this->b2ts =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$this->b2ts->deleteAll();
|
||||
$this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$this->tts =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$this->tts->deleteAll();
|
||||
$this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$this->tsts =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
$this->tsts->deleteAll();
|
||||
}
|
||||
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmark2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tagservice');
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
|
||||
$tagcacheservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagCache');
|
||||
$commondescriptionservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
|
||||
$searchhistoryservice = SemanticScuttle_Service_Factory :: getServiceInstance('SearchHistory');
|
||||
$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
|
||||
$bookmark2tagservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tagservice');
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
|
||||
$tagcacheservice = SemanticScuttle_Service_Factory :: get('TagCache');
|
||||
$commondescriptionservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
|
||||
$searchhistoryservice = SemanticScuttle_Service_Factory :: get('SearchHistory');
|
||||
$tagstatservice = SemanticScuttle_Service_Factory :: get('TagStat');
|
||||
|
||||
// Header variables
|
||||
$tplVars['subtitle'] = T_('Manage users');
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
|
||||
|
@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
|
|||
function displayTag($tag, $uId) {
|
||||
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags
|
||||
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$output = '{ id:'.rand().', name:\''.$tag.'\'';
|
||||
|
||||
$linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>');
|
||||
|
|
|
@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
$tagstatservice =SemanticScuttle_Service_Factory::get('TagStat');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
|
||||
|
@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
|
|||
function displayTag($tag, $uId) {
|
||||
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags
|
||||
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
$output = '{ id:'.rand().', name:\''.$tag.'\'';
|
||||
|
||||
$linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId);
|
||||
|
|
|
@ -24,8 +24,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Tag');
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ header('Cache-Control: no-cache, must-revalidate');
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', '');
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||
|
|
|
@ -13,7 +13,7 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) {
|
|||
}
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
|
||||
|
|
|
@ -5,8 +5,8 @@ require_once '../../src/SemanticScuttle/header.php';
|
|||
header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.php
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$userservice =SemanticScuttle_Service_Factory::get('User');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
?>
|
||||
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?>
|
||||
|
|
|
@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
// Get all the bookmark's passed-in information
|
||||
if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
|
||||
|
|
|
@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
|
|
|
@ -7,7 +7,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
|
|
|
@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting
|
||||
|
|
|
@ -14,7 +14,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
|
|
|
@ -11,7 +11,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Check to see if a tag was specified.
|
||||
|
|
|
@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
// Get the posts relevant to the passed-in variables.
|
||||
|
|
|
@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
|
||||
|
||||
// Get the tags relevant to the passed-in variables.
|
||||
|
|
|
@ -9,7 +9,7 @@ require_once('httpauth.inc.php');
|
|||
require_once '../../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
|
||||
// Get the tag info.
|
||||
if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
|
||||
$cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
|
||||
$cdservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
|
||||
|
|
|
@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
|
||||
$bookmarkservice = SemanticScuttle_Service_Factory :: get('Bookmark');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
|
||||
|
|
|
@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
|
||||
|
|
|
@ -67,7 +67,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
|
|||
function startElement($parser, $name, $attrs) {
|
||||
global $depth, $status, $tplVars, $userservice;
|
||||
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
if ($name == 'POST') {
|
||||
while(list($attrTitle, $attrVal) = each($attrs)) {
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
|
||||
|
||||
/* Managing all possible inputs */
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice =SemanticScuttle_Service_Factory::get('Tag2Tag');
|
||||
|
||||
/* Managing current logged user */
|
||||
$currentUser = $userservice->getCurrentObjectUser();
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$b2tservice =SemanticScuttle_Service_Factory::get('Bookmark2Tag');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
|
||||
header('Content-Type: application/xml');
|
||||
|
|
|
@ -36,8 +36,8 @@ if (POST_TERMS != '') {
|
|||
// GET
|
||||
} else {
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$searchhistoryservice =SemanticScuttle_Service_Factory::get('SearchHistory');
|
||||
|
||||
/* Managing current logged user */
|
||||
$currentUserId = $userservice->getCurrentUserId();
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
|
||||
|
||||
|
||||
/* Managing all possible inputs */
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
$cdservice = SemanticScuttle_Service_Factory :: get('CommonDescription');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
|
||||
|
||||
/* Managing all possible inputs */
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
|
||||
$tagservice = SemanticScuttle_Service_Factory :: get('Tag');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,9 +22,9 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
|
||||
$tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
|
||||
$b2tservice = SemanticScuttle_Service_Factory :: get('Bookmark2Tag');
|
||||
$tagservice = SemanticScuttle_Service_Factory :: get('Tag');
|
||||
$tag2tagservice = SemanticScuttle_Service_Factory :: get('Tag2Tag');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
|
||||
|
|
|
@ -35,7 +35,7 @@ exit();
|
|||
// This part below will be executed once you comment the two lines above
|
||||
/////////////////
|
||||
require_once '../src/SemanticScuttle/header.php';
|
||||
$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
|
||||
$tagstatservice = SemanticScuttle_Service_Factory :: get('TagStat');
|
||||
?>
|
||||
|
||||
<h1>Upgrade</h1>
|
||||
|
|
|
@ -22,8 +22,8 @@
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing current logged user */
|
||||
$currentUser = $userservice->getCurrentObjectUser();
|
||||
|
|
|
@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|||
require_once '../src/SemanticScuttle/header.php';
|
||||
|
||||
/* Service creation: only useful services are created */
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
|
||||
$bookmarkservice =SemanticScuttle_Service_Factory::get('Bookmark');
|
||||
$cacheservice =SemanticScuttle_Service_Factory::get('Cache');
|
||||
|
||||
/* Managing all possible inputs */
|
||||
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
|
||||
|
|
Loading…
Reference in a new issue