make the application work again

git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@388 b3834d28-1941-0410-a4f8-b48e95affb8f
This commit is contained in:
cweiske 2009-10-03 21:52:30 +00:00
parent b7345f833d
commit d5f09b7e4d
90 changed files with 725 additions and 562 deletions

View file

@ -1,9 +1,9 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService'); $cdservice =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
$pageName = isset($pageName)?$pageName:""; $pageName = isset($pageName)?$pageName:"";
@ -13,7 +13,7 @@ $currenttag = isset($currenttag)?$currenttag:"";
$this->includeTemplate($GLOBALS['top_include']); $this->includeTemplate($GLOBALS['top_include']);
include('search.inc.php'); include('search.menu.php');
?> ?>
<?php if($pageName == PAGE_INDEX && $GLOBALS['welcomeMessage']):?> <?php if($pageName == PAGE_INDEX && $GLOBALS['welcomeMessage']):?>

View file

@ -20,7 +20,7 @@
***************************************************************************/ ***************************************************************************/
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
$logged_on_userid = $userservice->getCurrentUserId(); $logged_on_userid = $userservice->getCurrentUserId();

View file

@ -1,5 +1,5 @@
<?php <?php
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$commonTags =& $b2tservice->getRelatedTagsByHash($hash); $commonTags =& $b2tservice->getRelatedTagsByHash($hash);
$commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc'); $commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
require_once('sidebar.linkedtags.inc.php'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
require_once('sidebar.linkedtags.inc.php'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
require_once('sidebar.linkedtags.inc.php'); require_once('sidebar.linkedtags.inc.php');

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
if(!isset($user)) { if(!isset($user)) {

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
/* Manage input */ /* Manage input */
$userid = isset($userid)?$userid:NULL; $userid = isset($userid)?$userid:NULL;

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
if(!isset($user)) $user=""; if(!isset($user)) $user="";

View file

@ -1,6 +1,6 @@
<?php <?php
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService'); $searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
$logged_on_userid = $userservice->getCurrentUserId(); $logged_on_userid = $userservice->getCurrentUserId();
if ($logged_on_userid === false) { if ($logged_on_userid === false) {

View file

@ -9,8 +9,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
return array('output' => '', 'stoplist' => $stopList); return array('output' => '', 'stoplist' => $stopList);
} }
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService'); $tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
// link '>' // link '>'
if($level>1) { if($level>1) {

View file

@ -0,0 +1,35 @@
<?php
class SemanticScuttle_Service
{
/**
* SQL database object
*
* @var sql_db
*/
protected $db;
/**
* Returns the single service instance
*
* @internal
* This function can be used once PHP 5.3 is minimum, because only
* 5.3 supports late static binding. For all lower php versions,
* we still need a copy of this method in each service class.
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance;
if (!isset($instance)) {
$instance = new self($db);
}
return $instance;
}
}
?>

View file

@ -1,23 +1,33 @@
<?php <?php
class BookmarkService { class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
function & getInstance(& $db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset ($instance)) if (!isset($instance)) {
$instance = & new BookmarkService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function BookmarkService(& $db) { public function __construct($db)
$this->db = & $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'bookmarks'; $this->tablename = $GLOBALS['tableprefix'] .'bookmarks';
} }
function _getbookmark($fieldname, $value, $all = false) { function _getbookmark($fieldname, $value, $all = false) {
if (!$all) { if (!$all) {
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
$range = ' AND uId = '. $sId; $range = ' AND uId = '. $sId;
} else { } else {
@ -51,7 +61,7 @@ class BookmarkService {
if ($row = & $this->db->sql_fetchrow($dbresult)) { if ($row = & $this->db->sql_fetchrow($dbresult)) {
if ($include_tags) { if ($include_tags) {
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
$row['tags'] = $b2tservice->getTagsForBookmark($bid); $row['tags'] = $b2tservice->getTagsForBookmark($bid);
} }
$output = $row; $output = $row;
@ -118,7 +128,7 @@ class BookmarkService {
return false; return false;
} }
$userservice = & ServiceFactory::getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getCurrentUser(); $user = $userservice->getCurrentUser();
//user has to be either admin, or owner //user has to be either admin, or owner
@ -160,7 +170,7 @@ class BookmarkService {
// Note that date is expected to be a string that's interpretable by strtotime(). // 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) { function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
if($sId == -1) { if($sId == -1) {
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
} }
@ -204,7 +214,7 @@ class BookmarkService {
$extension = end($uriparts); $extension = end($uriparts);
unset($uriparts); unset($uriparts);
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) { if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
$this->db->sql_transaction('rollback'); $this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db); message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@ -260,7 +270,7 @@ class BookmarkService {
$extension = end($uriparts); $extension = end($uriparts);
unset($uriparts); unset($uriparts);
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) { if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) {
$this->db->sql_transaction('rollback'); $this->db->sql_transaction('rollback');
message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db); message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@ -282,9 +292,9 @@ class BookmarkService {
// bookmarks; otherwise, just get the public bookmarks. // bookmarks; otherwise, just get the public bookmarks.
// - if the $user is set and IS the logged-in user, then get all bookmarks. // - if the $user is set and IS the logged-in user, then get all bookmarks.
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {
@ -496,7 +506,7 @@ class BookmarkService {
return false; return false;
} }
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {

View file

@ -1,17 +1,28 @@
<?php <?php
class Bookmark2TagService { class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
function &getInstance(&$db) {
/**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new Bookmark2TagService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function Bookmark2TagService(&$db) { public function __construct($db)
$this->db =& $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'bookmarks2tags'; $this->tablename = $GLOBALS['tableprefix'] .'bookmarks2tags';
} }
@ -42,7 +53,7 @@ class Bookmark2TagService {
} }
} }
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tags = $tagservice->normalize($tags); $tags = $tagservice->normalize($tags);
@ -51,7 +62,7 @@ class Bookmark2TagService {
for ($i = 0; $i < $tags_count; $i++) { for ($i = 0; $i < $tags_count; $i++) {
$tags[$i] = trim(strtolower($tags[$i])); $tags[$i] = trim(strtolower($tags[$i]));
if ($fromApi) { if ($fromApi) {
include_once(dirname(__FILE__) .'/../functions.inc.php'); include_once 'SemanticScuttle/functions.php';
$tags[$i] = convertTag($tags[$i], 'in'); $tags[$i] = convertTag($tags[$i], 'in');
} }
} }
@ -70,7 +81,7 @@ class Bookmark2TagService {
// Media and file types // Media and file types
if (!is_null($extension)) { if (!is_null($extension)) {
include_once(dirname(__FILE__) .'/../functions.inc.php'); include_once 'SemanticScuttle/functions.php';
if ($keys = multi_array_search($extension, $GLOBALS['filetypes'])) { if ($keys = multi_array_search($extension, $GLOBALS['filetypes'])) {
$tags[] = 'system:filetype:'. $extension; $tags[] = 'system:filetype:'. $extension;
@ -93,8 +104,8 @@ class Bookmark2TagService {
} }
} }
$bs =& ServiceFactory::getServiceInstance('BookmarkService'); $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
// Create links between tags // Create links between tags
foreach($tags as $key => $tag) { foreach($tags as $key => $tag) {
@ -150,7 +161,7 @@ class Bookmark2TagService {
} }
function deleteTag($uId, $tag) { function deleteTag($uId, $tag) {
$bs =& ServiceFactory::getServiceInstance('BookmarkService'); $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$query = 'DELETE FROM '. $this->getTableName(); $query = 'DELETE FROM '. $this->getTableName();
$query.= ' USING '. $this->getTableName() .', '. $bs->getTableName(); $query.= ' USING '. $this->getTableName() .', '. $bs->getTableName();
@ -224,7 +235,7 @@ class Bookmark2TagService {
} }
function &getTags($userid = NULL) { function &getTags($userid = NULL) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$logged_on_user = $userservice->getCurrentUserId(); $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'; $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';
@ -299,7 +310,7 @@ class Bookmark2TagService {
// Returns the most popular tags used for a particular bookmark hash // Returns the most popular tags used for a particular bookmark hash
function &getRelatedTagsByHash($hash, $limit = 20) { function &getRelatedTagsByHash($hash, $limit = 20) {
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$sId = $userservice->getCurrentUserId(); $sId = $userservice->getCurrentUserId();
// Logged in // Logged in
if ($userservice->isLoggedOn()) { if ($userservice->isLoggedOn()) {
@ -329,7 +340,7 @@ class Bookmark2TagService {
function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) { function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) {
// look for admin ids // look for admin ids
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$adminIds = $userservice->getAdminIds(); $adminIds = $userservice->getAdminIds();
// ask for their tags // ask for their tags
@ -338,7 +349,7 @@ class Bookmark2TagService {
function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) { function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
// look for contact ids // look for contact ids
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$contacts = $userservice->getWatchlist($user); $contacts = $userservice->getWatchlist($user);
// add the user (to show him/her also his/her tags) // add the user (to show him/her also his/her tags)
@ -406,8 +417,8 @@ class Bookmark2TagService {
} }
function renameTag($userid, $old, $new, $fromApi = false) { function renameTag($userid, $old, $new, $fromApi = false) {
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
if (is_null($userid) || is_null($old) || is_null($new)) if (is_null($userid) || is_null($old) || is_null($new))
return false; return false;

View file

@ -1,18 +1,27 @@
<?php <?php
class CacheService { class SemanticScuttle_Service_Cache extends SemanticScuttle_Service
{
var $basedir; var $basedir;
var $fileextension = '.cache'; var $fileextension = '.cache';
function &getInstance() { /**
static $instance; * Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance;
if (!isset($instance)) {
$instance = new self($db);
}
return $instance;
}
if (!isset($instance)) protected function __construct()
$instance =& new CacheService(); {
return $instance;
}
function CacheService() {
$this->basedir = $GLOBALS['dir_cache']; $this->basedir = $GLOBALS['dir_cache'];
} }

View file

@ -1,17 +1,27 @@
<?php <?php
class CommonDescriptionService { class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new CommonDescriptionService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function CommonDescriptionService(&$db) { public function __construct($db)
$this->db =& $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'commondescription'; $this->tablename = $GLOBALS['tableprefix'] .'commondescription';
} }

View file

@ -1,16 +1,19 @@
<?php <?php
/* Connect to the database and build services */ /* Connect to the database and build services */
class ServiceFactory { class SemanticScuttle_Service_Factory
function ServiceFactory(&$db, $serviceoverrules = array()) { {
public function __construct($db, $serviceoverrules = array())
{
} }
function &getServiceInstance($name, $servicedir = NULL) { public function getServiceInstance($name, $servicedir = null)
{
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype;
static $instances = array(); static $instances = array();
static $db; static $db;
if (!isset($db)) { if (!isset($db)) {
require_once(dirname(__FILE__) .'/../includes/db/'. $dbtype .'.php'); require_once 'SemanticScuttle/db/'. $dbtype .'.php';
$db = new sql_db(); $db = new sql_db();
$db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist); $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
if(!$db->db_connect_id) { if(!$db->db_connect_id) {
@ -25,12 +28,15 @@ class ServiceFactory {
} }
if (!class_exists($name)) { if (!class_exists($name)) {
if (!isset($servicedir)) { if (!isset($servicedir)) {
$servicedir = dirname(__FILE__) .'/'; $servicedir = 'SemanticScuttle/Service/';
} }
require_once($servicedir . strtolower($name) . '.php'); require_once $servicedir . $name . '.php';
} }
$instances[$name] = call_user_func(array($name, 'getInstance'), $db); $instances[$name] = call_user_func(
array('SemanticScuttle_Service_' . $name, 'getInstance'),
$db
);
} }
return $instances[$name]; return $instances[$name];
} }

View file

@ -1,18 +1,28 @@
<?php <?php
class SearchHistoryService { class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
var $sizeSearchHistory; var $sizeSearchHistory;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new SearchHistoryService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function SearchHistoryService(& $db) { public function __construct($db)
$this->db =& $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'searchhistory'; $this->tablename = $GLOBALS['tableprefix'] .'searchhistory';
if(isset($GLOBALS['sizeSearchHistory'])) { if(isset($GLOBALS['sizeSearchHistory'])) {
$this->sizeSearchHistory = $GLOBALS['sizeSearchHistory']; $this->sizeSearchHistory = $GLOBALS['sizeSearchHistory'];

View file

@ -1,17 +1,27 @@
<?php <?php
class TagService { class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new TagService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function TagService(&$db) { public function __construct($db)
$this->db =& $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'tags'; $this->tablename = $GLOBALS['tableprefix'] .'tags';
} }

View file

@ -1,22 +1,33 @@
<?php <?php
class Tag2TagService { class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
var $db; {
var $tablename; protected $tablename;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new Tag2TagService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function Tag2TagService(&$db) {
function __construct(&$db)
{
$this->db =& $db; $this->db =& $db;
$this->tablename = $GLOBALS['tableprefix'] .'tags2tags'; $this->tablename = $GLOBALS['tableprefix'] .'tags2tags';
} }
function addLinkedTags($tag1, $tag2, $relationType, $uId) { function addLinkedTags($tag1, $tag2, $relationType, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -46,7 +57,7 @@ class Tag2TagService {
// Return linked tags just for admin users // Return linked tags just for admin users
function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) { function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) {
// look for admin ids // look for admin ids
$userservice = & ServiceFactory :: getServiceInstance('UserService'); $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
$adminIds = $userservice->getAdminIds(); $adminIds = $userservice->getAdminIds();
//ask for their linked tags //ask for their linked tags
@ -119,7 +130,7 @@ class Tag2TagService {
} }
// try to find data in cache // try to find data in cache
$tcs = & ServiceFactory::getServiceInstance('TagCacheService'); $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
if(count($stopList) == 0) { if(count($stopList) == 0) {
$activatedCache = true; $activatedCache = true;
} else { } else {
@ -177,7 +188,7 @@ class Tag2TagService {
$query = "SELECT DISTINCT tts.tag1 as tag"; $query = "SELECT DISTINCT tts.tag1 as tag";
$query.= " FROM `". $this->getTableName() ."` tts"; $query.= " FROM `". $this->getTableName() ."` tts";
if($orderBy != null) { if($orderBy != null) {
$tsts =& ServiceFactory::getServiceInstance('TagStatService'); $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$query.= ", ".$tsts->getTableName() ." tsts"; $query.= ", ".$tsts->getTableName() ." tsts";
} }
$query.= " WHERE tts.tag1 <> ALL"; $query.= " WHERE tts.tag1 <> ALL";
@ -328,7 +339,7 @@ class Tag2TagService {
} }
function renameTag($uId, $oldName, $newName) { function renameTag($uId, $oldName, $newName) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$newName = $tagservice->normalize($newName); $newName = $tagservice->normalize($newName);
$query = 'UPDATE `'. $this->getTableName() .'`'; $query = 'UPDATE `'. $this->getTableName() .'`';
@ -355,10 +366,10 @@ class Tag2TagService {
} }
function update($tag1, $tag2, $relationType, $uId) { function update($tag1, $tag2, $relationType, $uId) {
$tsts =& ServiceFactory::getServiceInstance('TagStatService'); $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$tsts->updateStat($tag1, $relationType, $uId); $tsts->updateStat($tag1, $relationType, $uId);
$tcs = & ServiceFactory::getServiceInstance('TagCacheService'); $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
$tcs->deleteByUser($uId); $tcs->deleteByUser($uId);
} }
@ -366,7 +377,7 @@ class Tag2TagService {
$query = 'TRUNCATE TABLE `'. $this->getTableName() .'`'; $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';
$this->db->sql_query($query); $this->db->sql_query($query);
$tsts =& ServiceFactory::getServiceInstance('TagStatService'); $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$tsts->deleteAll(); $tsts->deleteAll();
} }

View file

@ -1,31 +1,43 @@
<?php <?php
/**
/* * This class infers on relation between tags by storing all
* This class infers on relation between tags by storing all the including tags or synonymous tag. * the including tags or synonymous tag.
* For example, if the user creates: tag1>tag2>tag3, the system can infer that tag is included into tag1. * For example, if the user creates: tag1>tag2>tag3, the system
* Instead of computing this relation several times, it is saved into this current table. * can infer that tag is included into tag1.
* Instead of computing this relation several times, it is saved
* into this current table.
* For synonymy, this table stores also the group of synonymous tags. * For synonymy, this table stores also the group of synonymous tags.
* The table must be updated for each modification of the relations between tags. * The table must be updated for each modification of
* the relations between tags.
*/ */
class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
class TagCacheService { {
var $db;
var $tablename; var $tablename;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new TagCacheService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function TagCacheService(&$db) { protected function __construct($db)
$this->db =& $db; {
$this->db =$db;
$this->tablename = $GLOBALS['tableprefix'] .'tagscache'; $this->tablename = $GLOBALS['tableprefix'] .'tagscache';
} }
function getChildren($tag1, $uId) { function getChildren($tag1, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
if($tag1 == '') return false; if($tag1 == '') return false;
@ -54,7 +66,7 @@ class TagCacheService {
} }
function addChild($tag1, $tag2, $uId) { function addChild($tag1, $tag2, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -98,7 +110,7 @@ class TagCacheService {
} }
function existsChild($tag1, $tag2, $uId) { function existsChild($tag1, $tag2, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
@ -202,7 +214,7 @@ class TagCacheService {
} }
function _isSynonymKey($tag1, $uId) { function _isSynonymKey($tag1, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$query = "SELECT tag1 FROM `". $this->getTableName() ."`"; $query = "SELECT tag1 FROM `". $this->getTableName() ."`";
@ -214,7 +226,7 @@ class TagCacheService {
} }
function _isSynonymValue($tag2, $uId) { function _isSynonymValue($tag2, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
$query = "SELECT tag2 FROM `". $this->getTableName() ."`"; $query = "SELECT tag2 FROM `". $this->getTableName() ."`";
@ -238,7 +250,7 @@ class TagCacheService {
} }
function _getSynonymKey($tag2, $uId) { function _getSynonymKey($tag2, $uId) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag2 = $tagservice->normalize($tag2); $tag2 = $tagservice->normalize($tag2);
if($this->_isSynonymKey($tag2)) return $tag2; if($this->_isSynonymKey($tag2)) return $tag2;
@ -267,7 +279,7 @@ class TagCacheService {
* $tagExcepted allows to hide a value. * $tagExcepted allows to hide a value.
*/ */
function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) { function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
$tagservice =& ServiceFactory::getServiceInstance('TagService'); $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tag1 = $tagservice->normalize($tag1); $tag1 = $tagservice->normalize($tag1);
$tagExcepted = $tagservice->normalize($tagExcepted); $tagExcepted = $tagservice->normalize($tagExcepted);

View file

@ -1,22 +1,33 @@
<?php <?php
class TagStatService { class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
var $db; {
var $tablename; var $tablename;
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new TagStatService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function TagStatService(&$db) { protected function __construct($db)
$this->db =& $db; {
$this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'tagsstats'; $this->tablename = $GLOBALS['tableprefix'] .'tagsstats';
} }
function getNbChildren($tag1, $relationType, $uId) { function getNbChildren($tag1, $relationType, $uId) {
$tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$query = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`"; $query = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`";
$query.= " WHERE tag1 = '" .$tag1 ."'"; $query.= " WHERE tag1 = '" .$tag1 ."'";
$query.= " AND relationType = '". $relationType ."'"; $query.= " AND relationType = '". $relationType ."'";
@ -91,7 +102,7 @@ class TagStatService {
return false; return false;
} }
$tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId); $linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId);
$nbDescendants = 0; $nbDescendants = 0;
$maxDepth = 0; $maxDepth = 0;
@ -112,7 +123,7 @@ class TagStatService {
} }
function updateAllStat() { function updateAllStat() {
$tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`"; $query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`";
$query.= " WHERE relationType = '>'"; $query.= " WHERE relationType = '>'";

View file

@ -1,15 +1,26 @@
<?php <?php
class TemplateService { class SemanticScuttle_Service_Template extends SemanticScuttle_Service
var $basedir; {
protected $basedir;
function &getInstance() { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new TemplateService(); $instance = new self($db);
}
return $instance; return $instance;
} }
function TemplateService() { public function __construct()
{
$this->basedir = $GLOBALS['TEMPLATES_DIR']; $this->basedir = $GLOBALS['TEMPLATES_DIR'];
} }

View file

@ -1,28 +1,39 @@
<?php <?php
class UserService { class SemanticScuttle_Service_User extends SemanticScuttle_Service
var $db; {
var $fields = array( protected $db;
protected $fields = array(
'primary' => 'uId', 'primary' => 'uId',
'username' => 'username', 'username' => 'username',
'password' => 'password'); 'password' => 'password');
var $profileurl; protected $profileurl;
var $tablename; protected $tablename;
var $sessionkey; protected $sessionkey;
var $cookiekey; protected $cookiekey;
var $cookietime = 1209600; // 2 weeks protected $cookietime = 1209600; // 2 weeks
function &getInstance(&$db) { /**
* Returns the single service instance
*
* @param DB $db Database object
*
* @return SemanticScuttle_Service
*/
public static function getInstance($db)
{
static $instance; static $instance;
if (!isset($instance)) if (!isset($instance)) {
$instance =& new UserService($db); $instance = new self($db);
}
return $instance; return $instance;
} }
function UserService(& $db) { protected function __construct($db)
$this->db =& $db; {
$this->tablename = $GLOBALS['tableprefix'] .'users'; $this->db = $db;
$this->tablename = $GLOBALS['tableprefix'] .'users';
$this->sessionkey = INSTALLATION_ID.'-currentuserid'; $this->sessionkey = INSTALLATION_ID.'-currentuserid';
$this->cookiekey = INSTALLATION_ID.'-login'; $this->cookiekey = INSTALLATION_ID.'-login';
$this->profileurl = createURL('profile', '%2$s'); $this->profileurl = createURL('profile', '%2$s');
$this->updateSessionStability(); $this->updateSessionStability();
} }
@ -601,7 +612,7 @@ class User {
function getName() { function getName() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->name)) { if(!isset($this->name)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->name = $user['name']; $this->name = $user['name'];
} }
@ -611,7 +622,7 @@ class User {
function getEmail() { function getEmail() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->email)) { if(!isset($this->email)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->email = $user['email']; $this->email = $user['email'];
} }
@ -621,7 +632,7 @@ class User {
function getHomepage() { function getHomepage() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->homepage)) { if(!isset($this->homepage)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->homepage = $user['homepage']; $this->homepage = $user['homepage'];
} }
@ -631,7 +642,7 @@ class User {
function getContent() { function getContent() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->content)) { if(!isset($this->content)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->content = $user['uContent']; $this->content = $user['uContent'];
} }
@ -641,7 +652,7 @@ class User {
function getDatetime() { function getDatetime() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->content)) { if(!isset($this->content)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$user = $userservice->getUser($this->id); $user = $userservice->getUser($this->id);
$this->datetime = $user['uDatetime']; $this->datetime = $user['uDatetime'];
} }
@ -651,14 +662,14 @@ class User {
function isAdmin() { function isAdmin() {
// Look for value only if not already set // Look for value only if not already set
if(!isset($this->isAdmin)) { if(!isset($this->isAdmin)) {
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->isAdmin = $userservice->isAdmin($this->id); $this->isAdmin = $userservice->isAdmin($this->id);
} }
return $this->isAdmin; return $this->isAdmin;
} }
function getNbBookmarks($range = 'public') { function getNbBookmarks($range = 'public') {
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
return $bookmarkservice->countBookmarks($this->getId(), $range); return $bookmarkservice->countBookmarks($this->getId(), $range);
} }
} }

View file

@ -1,12 +1,17 @@
<?php <?php
if(!file_exists(dirname(__FILE__) .'/config.inc.php')) { if(!file_exists(dirname(__FILE__) .'/../../data/config.php')) {
die('Please copy "config.inc.php.dist" to "config.inc.php"'); die('Please copy "config.php.dist" to "config.php"');
} }
set_include_path(
get_include_path() . PATH_SEPARATOR
. dirname(__FILE__) . '/../'
);
// 1 // First requirements part (before debug management) // 1 // First requirements part (before debug management)
require_once(dirname(__FILE__) .'/config.default.inc.php'); $datadir = dirname(__FILE__) . '/../../data/';
require_once(dirname(__FILE__) .'/config.inc.php'); require_once($datadir . '/config.default.php');
require_once(dirname(__FILE__) .'/constants.inc.php'); // some constants are based on variables from config file require_once($datadir . '/config.php');
require_once 'SemanticScuttle/constants.php'; // some constants are based on variables from config file
// Debug Management using constants // Debug Management using constants
@ -21,17 +26,18 @@ if(DEBUG_MODE) {
} }
// 2 // Second requirements part which could display bugs (must come after debug management) // 2 // Second requirements part which could display bugs (must come after debug management)
require_once(dirname(__FILE__) .'/services/servicefactory.php'); require_once 'SemanticScuttle/Service.php';
require_once(dirname(__FILE__) .'/functions.inc.php'); require_once 'SemanticScuttle/Service/Factory.php';
require_once 'SemanticScuttle/functions.php';
// 3 // Third requirements part which import functions from includes/ directory // 3 // Third requirements part which import functions from includes/ directory
// UTF-8 functions // UTF-8 functions
require_once(dirname(__FILE__) .'/includes/utf8.php'); require_once 'SemanticScuttle/utf8.php';
// Translation // Translation
require_once(dirname(__FILE__) .'/includes/php-gettext/gettext.inc'); require_once 'php-gettext/gettext.inc';
$domain = 'messages'; $domain = 'messages';
T_setlocale(LC_MESSAGES, $locale); T_setlocale(LC_MESSAGES, $locale);
T_bindtextdomain($domain, dirname(__FILE__) .'/locales'); T_bindtextdomain($domain, dirname(__FILE__) .'/locales');
@ -42,10 +48,10 @@ T_textdomain($domain);
session_start(); session_start();
// 5 // Create mandatory services and objects // 5 // Create mandatory services and objects
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();
$templateservice =& ServiceFactory::getServiceInstance('TemplateService'); $templateservice =SemanticScuttle_Service_Factory::getServiceInstance('Template');
$tplVars = array(); $tplVars = array();
$tplVars['currentUser'] = $currentUser; $tplVars['currentUser'] = $currentUser;
$tplVars['userservice'] = $userservice; $tplVars['userservice'] = $userservice;

View file

@ -19,14 +19,14 @@ class BookmarksTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts=& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts=SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -21,16 +21,16 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->cds =& ServiceFactory::getServiceInstance('CommonDescriptionService'); $this->cds =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
$this->cds->deleteAll(); $this->cds->deleteAll();
} }

View file

@ -20,16 +20,16 @@ class SearchTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->shs =& ServiceFactory::getServiceInstance('SearchHistoryService'); $this->shs =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
$this->shs->deleteAll(); $this->shs->deleteAll();
} }

View file

@ -19,14 +19,14 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -19,16 +19,16 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
$this->tcs =& ServiceFactory::getServiceInstance('TagCacheService'); $this->tcs =SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
$this->tcs->deleteAll(); $this->tcs->deleteAll();
} }

View file

@ -16,16 +16,16 @@ class TagsTest extends PHPUnit_Framework_TestCase
global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix; global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
require_once('./header.inc.php'); require_once('./header.inc.php');
$this->ts =& ServiceFactory::getServiceInstance('TagService'); $this->ts =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$this->ts->deleteAll(); $this->ts->deleteAll();
$this->us =& ServiceFactory::getServiceInstance('UserService'); $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
$this->bs =& ServiceFactory::getServiceInstance('BookmarkService'); $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$this->bs->deleteAll(); $this->bs->deleteAll();
$this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$this->b2ts->deleteAll(); $this->b2ts->deleteAll();
$this->tts =& ServiceFactory::getServiceInstance('Tag2TagService'); $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$this->tts->deleteAll(); $this->tts->deleteAll();
$this->tsts =& ServiceFactory::getServiceInstance('TagStatService'); $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
$this->tsts->deleteAll(); $this->tsts->deleteAll();
} }

View file

@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
$tplVars['pagetitle'] = T_('About'); $tplVars['pagetitle'] = T_('About');
$tplVars['subtitle'] = T_('About'); $tplVars['subtitle'] = T_('About');

View file

@ -17,16 +17,16 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmark2tagservice = & ServiceFactory :: getServiceInstance('Bookmark2Tagservice'); $bookmark2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tagservice');
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService'); $bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService'); $tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
$tagcacheservice = & ServiceFactory :: getServiceInstance('TagCacheService'); $tagcacheservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagCache');
$commondescriptionservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService'); $commondescriptionservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
$searchhistoryservice = & ServiceFactory :: getServiceInstance('SearchHistoryService'); $searchhistoryservice = SemanticScuttle_Service_Factory :: getServiceInstance('SearchHistory');
$tagstatservice = & ServiceFactory :: getServiceInstance('TagStatService'); $tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
// Header variables // Header variables
$tplVars['subtitle'] = T_('Manage users'); $tplVars['subtitle'] = T_('Manage users');

View file

@ -21,12 +21,12 @@
/* Return a json file with list of linked tags */ /* Return a json file with list of linked tags */
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService'); $tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', ''); 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) { function displayTag($tag, $uId) {
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags $uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$output = '{ id:'.rand().', name:\''.$tag.'\''; $output = '{ id:'.rand().', name:\''.$tag.'\'';
$linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>'); $linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>');

View file

@ -21,11 +21,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/* Return a json file with list of tags according to current user and sort by popularity*/ /* Return a json file with list of tags according to current user and sort by popularity*/
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
?> ?>

View file

@ -21,11 +21,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/* Return a json file with list of tags according to current user and sort by popularity*/ /* Return a json file with list of tags according to current user and sort by popularity*/
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
?> ?>

View file

@ -21,12 +21,12 @@
/* Return a json file with list of linked tags */ /* Return a json file with list of linked tags */
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService'); $tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', ''); 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) { function displayTag($tag, $uId) {
$uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags $uId = ($uId==0)?NULL:$uId; // if user is nobody, NULL allows to look for every public tags
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
$output = '{ id:'.rand().', name:\''.$tag.'\''; $output = '{ id:'.rand().', name:\''.$tag.'\'';
$linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId); $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId);

View file

@ -21,11 +21,11 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
/* Return a json file with list of tags according to current user and sort by popularity*/ /* Return a json file with list of tags according to current user and sort by popularity*/
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$bookmarkservice =& ServiceFactory::getServiceInstance('TagService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
?> ?>

View file

@ -22,10 +22,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
header('Content-Type: text/xml; charset=UTF-8'); header('Content-Type: text/xml; charset=UTF-8');
header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT'); header('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT');
header('Cache-Control: no-cache, must-revalidate'); header('Cache-Control: no-cache, must-revalidate');
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService'); $bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', ''); isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', '');

View file

@ -23,7 +23,7 @@ header('Content-Type: text/xml; charset=UTF-8');
header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT"); header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache, must-revalidate"); header("Cache-Control: no-cache, must-revalidate");
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['url']) ? define('GET_URL', $_GET['url']): define('GET_URL', ''); isset($_GET['url']) ? define('GET_URL', $_GET['url']): define('GET_URL', '');

View file

@ -23,7 +23,7 @@ header('Content-Type: text/xml; charset=UTF-8');
header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT"); header("Last-Modified: ". gmdate("D, d M Y H:i:s") ." GMT");
header("Cache-Control: no-cache, must-revalidate"); header("Cache-Control: no-cache, must-revalidate");
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
//No specific services //No specific services

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');

View file

@ -3,10 +3,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))

View file

@ -5,7 +5,7 @@
// Force HTTP authentication first! // Force HTTP authentication first!
//require_once('httpauth.inc.php'); //require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
if($GLOBALS['enableGoogleCustomSearch'] == false) { if($GLOBALS['enableGoogleCustomSearch'] == false) {
echo "Google Custom Search disabled. You can enable it into the config.inc.php file."; echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";
@ -13,7 +13,7 @@ if($GLOBALS['enableGoogleCustomSearch'] == false) {
} }
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
/* /*

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.
if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != '')) if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))

View file

@ -1,12 +1,12 @@
<?php <?php
/* Export data with semantic format (SIOC: http://sioc-project.org/, FOAF, SKOS, Annotea Ontology) */ /* Export data with semantic format (SIOC: http://sioc-project.org/, FOAF, SKOS, Annotea Ontology) */
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.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 */ /* Service creation: only useful services are created */
$userservice =& ServiceFactory::getServiceInstance('UserService'); $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
?> ?>
<?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?> <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?>

View file

@ -1,5 +1,5 @@
<?php <?php
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
// Provides HTTP Basic authentication of a user, and sets two variables, sId and username, // Provides HTTP Basic authentication of a user, and sets two variables, sId and username,
// with the user's info. // with the user's info.

View file

@ -1,5 +1,5 @@
<?php <?php
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
header("Content-type: text/xml"); header("Content-type: text/xml");
?> ?>

View file

@ -11,10 +11,10 @@
// Force HTTP authentication // Force HTTP authentication
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Get all the bookmark's passed-in information // Get all the bookmark's passed-in information
if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != '')) if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.

View file

@ -4,10 +4,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.

View file

@ -8,10 +8,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting // Note that del.icio.us only errors out if no URL was passed in; there's no error on attempting

View file

@ -11,10 +11,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
//require_once('httpauth.inc.php'); //require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.

View file

@ -8,10 +8,10 @@ $countMax = 100;
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Check to see if a tag was specified. // Check to see if a tag was specified.

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
// Get the posts relevant to the passed-in variables. // Get the posts relevant to the passed-in variables.

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
// Get the tags relevant to the passed-in variables. // Get the tags relevant to the passed-in variables.

View file

@ -6,10 +6,10 @@
// Force HTTP authentication first! // Force HTTP authentication first!
require_once('httpauth.inc.php'); require_once('httpauth.inc.php');
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
// Get the tag info. // Get the tag info.
if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != '')) if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService'); $bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService'); $cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', ''); isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');

View file

@ -20,10 +20,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService'); $bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', ''); isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');

View file

@ -1,5 +1,5 @@
<?php <?php
require_once('../header.inc.php'); require_once '../../src/SemanticScuttle/header.php';
if($GLOBALS['enableGoogleCustomSearch'] == false) { if($GLOBALS['enableGoogleCustomSearch'] == false) {
echo "Google Custom Search disabled. You can enable it into the config.inc.php file."; echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";

View file

@ -1,4 +1,4 @@
<?php require_once('../header.inc.php'); <?php require_once '../../src/SemanticScuttle/header.php';
if($GLOBALS['enableGoogleCustomSearch']==false) { if($GLOBALS['enableGoogleCustomSearch']==false) {
echo "Google Custom Search disabled. You can enable it into the config.inc.php file."; echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";

View file

@ -19,11 +19,11 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
// No specific services // No specific services
@ -67,7 +67,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
function startElement($parser, $name, $attrs) { function startElement($parser, $name, $attrs) {
global $depth, $status, $tplVars, $userservice; global $depth, $status, $tplVars, $userservice;
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
if ($name == 'POST') { if ($name == 'POST') {
while(list($attrTitle, $attrVal) = each($attrs)) { while(list($attrTitle, $attrVal) = each($attrs)) {

View file

@ -19,10 +19,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -19,10 +19,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService'); $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
/* Managing current logged user */ /* Managing current logged user */
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', ''); isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');

View file

@ -1,6 +1,6 @@
<?php <?php
header('Content-Type: text/javascript'); header('Content-Type: text/javascript');
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
require_once('functions.inc.php'); require_once('functions.inc.php');
$player_root = ROOT .'includes/player/'; $player_root = ROOT .'includes/player/';
?> ?>

View file

@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */

View file

@ -18,7 +18,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
// No specific services // No specific services

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService'); $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
@list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL; @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
// No specific services // No specific services

View file

@ -19,7 +19,7 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
// No specific services // No specific services

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
header('Content-Type: application/xml'); header('Content-Type: application/xml');

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['terms']) ? define('POST_TERMS', $_POST['terms']): define('POST_TERMS', ''); isset($_POST['terms']) ? define('POST_TERMS', $_POST['terms']): define('POST_TERMS', '');
@ -36,8 +36,8 @@ if (POST_TERMS != '') {
// GET // GET
} else { } else {
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService'); $searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
/* Managing current logged user */ /* Managing current logged user */
$currentUserId = $userservice->getCurrentUserId(); $currentUserId = $userservice->getCurrentUserId();

View file

@ -19,10 +19,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService'); $tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,10 +19,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService'); $tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,10 +19,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService'); $tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
$cdservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService'); $cdservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,10 +19,10 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */

View file

@ -19,10 +19,10 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$tagservice = & ServiceFactory :: getServiceInstance('TagService'); $tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,12 +19,12 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService'); $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
$tagservice = & ServiceFactory :: getServiceInstance('TagService'); $tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2tagService'); $tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', ''); isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);

View file

@ -34,8 +34,8 @@ exit();
///////////////// /////////////////
// This part below will be executed once you comment the two lines above // This part below will be executed once you comment the two lines above
///////////////// /////////////////
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
$tagstatservice = & ServiceFactory :: getServiceInstance('TagStatService'); $tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
?> ?>
<h1>Upgrade</h1> <h1>Upgrade</h1>

View file

@ -19,11 +19,11 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing current logged user */ /* Managing current logged user */
$currentUser = $userservice->getCurrentObjectUser(); $currentUser = $userservice->getCurrentObjectUser();

View file

@ -19,7 +19,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
//No specific services //No specific services

View file

@ -18,11 +18,11 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
***************************************************************************/ ***************************************************************************/
require_once('header.inc.php'); require_once '../src/SemanticScuttle/header.php';
/* Service creation: only useful services are created */ /* Service creation: only useful services are created */
$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService'); $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
$cacheservice =& ServiceFactory::getServiceInstance('CacheService'); $cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
/* Managing all possible inputs */ /* Managing all possible inputs */
isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0); isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);