]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
make the application work again
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 3 Oct 2009 21:52:30 +0000 (21:52 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 3 Oct 2009 21:52:30 +0000 (21:52 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@388 b3834d28-1941-0410-a4f8-b48e95affb8f

90 files changed:
data/templates/bookmarks.tpl.php
data/templates/dynamictags.inc.php
data/templates/search.menu.php [moved from src/SemanticScuttle/search.php with 100% similarity]
data/templates/sidebar.block.common.php
data/templates/sidebar.block.linked.php
data/templates/sidebar.block.menu.php
data/templates/sidebar.block.menu2.php
data/templates/sidebar.block.popular.php
data/templates/sidebar.block.recent.php
data/templates/sidebar.block.related.php
data/templates/sidebar.block.search.php
data/templates/sidebar.linkedtags.inc.php
src/SemanticScuttle/Service.php [new file with mode: 0644]
src/SemanticScuttle/Service/Bookmark.php
src/SemanticScuttle/Service/Bookmark2Tag.php [moved from src/SemanticScuttle/Service/Bookmark2tag.php with 91% similarity]
src/SemanticScuttle/Service/Cache.php
src/SemanticScuttle/Service/CommonDescription.php
src/SemanticScuttle/Service/Factory.php
src/SemanticScuttle/Service/SearchHistory.php
src/SemanticScuttle/Service/Tag.php
src/SemanticScuttle/Service/Tag2Tag.php [moved from src/SemanticScuttle/Service/Tag2tag.php with 91% similarity]
src/SemanticScuttle/Service/TagCache.php
src/SemanticScuttle/Service/TagStat.php
src/SemanticScuttle/Service/Template.php
src/SemanticScuttle/Service/User.php
src/SemanticScuttle/header.php
src/SemanticScuttle/utf8.php [moved from includes/utf8.php with 100% similarity]
tests/bookmarksTest.php
tests/commonDescriptionTest.php
tests/searchTest.php
tests/tag2TagTest.php
tests/tagsCacheTest.php
tests/tagsTest.php
www/about.php
www/admin.php
www/ajax/getadminlinkedtags.php
www/ajax/getadmintags.php
www/ajax/getcontacttags.php
www/ajax/getlinkedtags.php
www/ajax/gettags.php
www/ajaxDelete.php
www/ajaxGetTitle.php
www/ajaxIsAvailable.php
www/alltags.php
www/api/export_csv.php
www/api/export_gcs.php
www/api/export_html.php
www/api/export_sioc.php
www/api/httpauth.inc.php
www/api/opensearch.php
www/api/posts_add.php
www/api/posts_all.php
www/api/posts_dates.php
www/api/posts_delete.php
www/api/posts_get.php
www/api/posts_public.php
www/api/posts_recent.php
www/api/posts_update.php
www/api/tags_get.php
www/api/tags_rename.php
www/bookmarkcommondescriptionedit.php
www/bookmarks.php
www/edit.php
www/gsearch/context.php
www/gsearch/index.php
www/history.php
www/import.php
www/importNetscape.php
www/importStructure.php
www/index.php
www/jsScuttle.php
www/login.php
www/password.php
www/populartags.php
www/profile.php
www/register.php
www/rss.php
www/search.php
www/tag2tagadd.php
www/tag2tagdelete.php
www/tag2tagedit.php
www/tagcommondescriptionedit.php
www/tagdelete.php
www/tagedit.php
www/tagrename.php
www/tags.php
www/upgrade.php
www/users.php
www/watch.php
www/watchlist.php

index 2b673b7ada76a5726e0cb0612592d4f559ad56d7..176892835fb59edafb7fd29b75f5a727e8cceeea 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 
 /* Service creation: only useful services are created */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$tagservice =& ServiceFactory::getServiceInstance('TagService');
-$cdservice =& ServiceFactory::getServiceInstance('CommonDescriptionService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$cdservice =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
 
 
 $pageName = isset($pageName)?$pageName:"";
@@ -13,7 +13,7 @@ $currenttag = isset($currenttag)?$currenttag:"";
 
 $this->includeTemplate($GLOBALS['top_include']);
 
-include('search.inc.php');
+include('search.menu.php');
 ?>
 
 <?php if($pageName == PAGE_INDEX && $GLOBALS['welcomeMessage']):?>
index c6b0d162fce5620361d4ac83b702bc49ffc1d131..c1a589fb1639f023caba344def38aaa308de2d14 100644 (file)
@@ -20,7 +20,7 @@
  ***************************************************************************/
 
 /* Service creation: only useful services are created */
-$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
+$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 
index 6f1e9f7e48264e5e7f3694efae66222750e8fccf..7fbc782a1e12d984e63e0d22a1a1dee9e5fdd970 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
 $commonTags =& $b2tservice->getRelatedTagsByHash($hash);
 $commonTags =& $b2tservice->tagCloud($commonTags, 5, 90, 225, 'alphabet_asc');
 
index 0fa36c953fef3dc4da49b42caf93bc70123c0f23..6802051b7d7b0a71849b38aa80700f9c1919e227 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
 require_once('sidebar.linkedtags.inc.php');
 
index ed1069a83fab109d641ddb13e55bdb9615bc84ed..6ab5a95bf195bc36c2cb88202852b7142490703f 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
 
 require_once('sidebar.linkedtags.inc.php');
index 8329ef3e4341711016dd52600288887c3202c33f..fbab636f7145add6f34a5949c2c767885b05b19c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
 require_once('sidebar.linkedtags.inc.php');
 
index 42796204a26a9cbfa635585a3546401d45aacbaa..3f5e8ca1a7f364673c89c3f300db9ba370e42d96 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
 
 
 if(!isset($user)) {
index 71f9aa9cc185e0c32e4ba20f8bf4fd59ddae1d5e..48312089d5e2b45d05f2cc07f9f7dd7846ca39c1 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
 
 /* Manage input */
 $userid = isset($userid)?$userid:NULL;
index 182ea833a254d61764995e927076610f8397ccd5..559c648931234cc718d77cd2b7f009e17fde3120 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
 
 
 if(!isset($user)) $user="";
index 4e3c8019161068bba3327f38d79ba85c6faabff4..ed79f2852f11a59cab14c79a0121015b40b7d2ec 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /* Service creation: only useful services are created */
-$searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
+$searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
 
 $logged_on_userid = $userservice->getCurrentUserId();
 if ($logged_on_userid === false) {
index 555eafc003d673b7cbedd6b5ee743b51caf465ce..f978339e0a0b83252cf8ed2f0df0111cb5d1f966 100644 (file)
@@ -9,8 +9,8 @@ function displayLinkedTags($tag, $linkType, $uId, $cat_url, $user, $editingMode
        return array('output' => '', 'stoplist' => $stopList);
     }
 
-    $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
-    $tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
+    $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
+    $tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
 
     // link '>'
     if($level>1) {
diff --git a/src/SemanticScuttle/Service.php b/src/SemanticScuttle/Service.php
new file mode 100644 (file)
index 0000000..a537262
--- /dev/null
@@ -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;
+       }
+
+}
+?>
\ No newline at end of file
index f1195930da8c122c9f04a2c9c326d3fc02c9daa4..6075a0d830efe02b16bad65d880ee024845c1088 100644 (file)
@@ -1,23 +1,33 @@
 <?php
-class BookmarkService {
-       var $db;
+class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service
+{
        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;
-               if (!isset ($instance))
-               $instance = & new BookmarkService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function BookmarkService(& $db) {
-               $this->db = & $db;
+       public function __construct($db)
+    {
+               $this->db = $db;
                $this->tablename = $GLOBALS['tableprefix'] .'bookmarks';
        }
 
        function _getbookmark($fieldname, $value, $all = false) {
                if (!$all) {
-                       $userservice = & ServiceFactory :: getServiceInstance('UserService');
+                       $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                        $sId = $userservice->getCurrentUserId();
                        $range = ' AND uId = '. $sId;
                } else {
@@ -51,7 +61,7 @@ class BookmarkService {
 
                if ($row = & $this->db->sql_fetchrow($dbresult)) {
                        if ($include_tags) {
-                               $b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
+                               $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
                                $row['tags'] = $b2tservice->getTagsForBookmark($bid);
                        }
                        $output = $row;                 
@@ -118,7 +128,7 @@ class BookmarkService {
                        return false;
                }
 
-               $userservice = & ServiceFactory::getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory::getServiceInstance('User');
                $user = $userservice->getCurrentUser();
 
                //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().
        function addBookmark($address, $title, $description, $privateNote, $status, $categories, $date = NULL, $fromApi = false, $fromImport = false, $sId = -1) {
                if($sId == -1) {
-                       $userservice = & ServiceFactory :: getServiceInstance('UserService');
+                       $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                        $sId = $userservice->getCurrentUserId();
                }
 
@@ -204,7 +214,7 @@ class BookmarkService {
                $extension = end($uriparts);
                unset($uriparts);
 
-               $b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
+               $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
                if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension, false, $fromImport)) {
                        $this->db->sql_transaction('rollback');
                        message_die(GENERAL_ERROR, 'Could not insert bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@@ -260,7 +270,7 @@ class BookmarkService {
                $extension = end($uriparts);
                unset($uriparts);
 
-               $b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
+               $b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
                if (!$b2tservice->attachTags($bId, $categories, $fromApi, $extension)) {
                        $this->db->sql_transaction('rollback');
                        message_die(GENERAL_ERROR, 'Could not update bookmark', '', __LINE__, __FILE__, $sql, $this->db);
@@ -282,9 +292,9 @@ class BookmarkService {
                //    bookmarks; otherwise, just get the public bookmarks.
                //  - if the $user is set and IS the logged-in user, then get all bookmarks.
 
-               $userservice =& ServiceFactory::getServiceInstance('UserService');
-               $b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-               $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+               $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $sId = $userservice->getCurrentUserId();
 
                if ($userservice->isLoggedOn()) {
@@ -480,15 +490,15 @@ class BookmarkService {
                return true;
        }
 
-       function deleteBookmarksForUser($uId) {\r
-               $query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'bookmarks WHERE uId = '. intval($uId);\r
-\r
-               if (!($dbresult = & $this->db->sql_query($query))) {\r
-                       message_die(GENERAL_ERROR, 'Could not delete bookmarks', '', __LINE__, __FILE__, $query, $this->db);\r
-                       return false;\r
-               }\r
-\r
-               return true;\r
+       function deleteBookmarksForUser($uId) {
+               $query = 'DELETE FROM '. $GLOBALS['tableprefix'] .'bookmarks WHERE uId = '. intval($uId);
+
+               if (!($dbresult = & $this->db->sql_query($query))) {
+                       message_die(GENERAL_ERROR, 'Could not delete bookmarks', '', __LINE__, __FILE__, $query, $this->db);
+                       return false;
+               }
+
+               return true;
        }
 
        function countOthers($address) {
@@ -496,7 +506,7 @@ class BookmarkService {
                        return false;
                }
 
-               $userservice = & ServiceFactory :: getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                $sId = $userservice->getCurrentUserId();
 
                if ($userservice->isLoggedOn()) {
similarity index 91%
rename from src/SemanticScuttle/Service/Bookmark2tag.php
rename to src/SemanticScuttle/Service/Bookmark2Tag.php
index 918fb5bdf5c05b666cb997d58f32c829d70e4e8b..bd3f3af41f7864dd8d983d2fa1847c1dfb7f812e 100644 (file)
@@ -1,17 +1,28 @@
 <?php
-class Bookmark2TagService {
-       var $db;
+class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
+{
        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;
-               if (!isset($instance))
-               $instance =& new Bookmark2TagService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function Bookmark2TagService(&$db) {
-               $this->db =& $db;
+       public function __construct($db)
+    {
+               $this->db = $db;
                $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);
 
 
@@ -51,7 +62,7 @@ class Bookmark2TagService {
                for ($i = 0; $i < $tags_count; $i++) {
                        $tags[$i] = trim(strtolower($tags[$i]));
                        if ($fromApi) {
-                               include_once(dirname(__FILE__) .'/../functions.inc.php');
+                               include_once 'SemanticScuttle/functions.php';
                                $tags[$i] = convertTag($tags[$i], 'in');
                        }
                }
@@ -70,7 +81,7 @@ class Bookmark2TagService {
 
                // Media and file types
                if (!is_null($extension)) {
-                       include_once(dirname(__FILE__) .'/../functions.inc.php');
+                       include_once 'SemanticScuttle/functions.php';
                        
                        if ($keys = multi_array_search($extension, $GLOBALS['filetypes'])) {
                                $tags[] = 'system:filetype:'. $extension;
@@ -93,8 +104,8 @@ class Bookmark2TagService {
                        }
                }
 
-               $bs =& ServiceFactory::getServiceInstance('BookmarkService');
-               $tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
                // Create links between tags
                foreach($tags as $key => $tag) {
@@ -150,7 +161,7 @@ class Bookmark2TagService {
        }
 
        function deleteTag($uId, $tag) {
-               $bs =& ServiceFactory::getServiceInstance('BookmarkService');
+               $bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
 
                $query = 'DELETE FROM '. $this->getTableName();
                $query.= ' USING '. $this->getTableName() .', '. $bs->getTableName();
@@ -183,23 +194,23 @@ class Bookmark2TagService {
        }
 
        /* Allow deletion in admin page */
-       function deleteTagsForUser($uId) {\r
-               $qmask = 'DELETE FROM %s USING %s, %s WHERE %s.bId = %s.bId AND %s.uId = %d';\r
-               $query = sprintf($qmask,\r
-               $this->getTableName(),\r
-               $this->getTableName(),\r
-               $GLOBALS['tableprefix'].'bookmarks',\r
-               $this->getTableName(),\r
-               $GLOBALS['tableprefix'].'bookmarks',\r
-               $GLOBALS['tableprefix'].'bookmarks',\r
-               $uId);\r
-\r
-               if (!($dbresult =& $this->db->sql_query($query))) {\r
-                       message_die(GENERAL_ERROR, 'Could not delete tags', '', __LINE__, __FILE__, $query, $this->db);\r
-                       return false;\r
-               }\r
-\r
-               return true;\r
+       function deleteTagsForUser($uId) {
+               $qmask = 'DELETE FROM %s USING %s, %s WHERE %s.bId = %s.bId AND %s.uId = %d';
+               $query = sprintf($qmask,
+               $this->getTableName(),
+               $this->getTableName(),
+               $GLOBALS['tableprefix'].'bookmarks',
+               $this->getTableName(),
+               $GLOBALS['tableprefix'].'bookmarks',
+               $GLOBALS['tableprefix'].'bookmarks',
+               $uId);
+
+               if (!($dbresult =& $this->db->sql_query($query))) {
+                       message_die(GENERAL_ERROR, 'Could not delete tags', '', __LINE__, __FILE__, $query, $this->db);
+                       return false;
+               }
+
+               return true;
        }
 
        function &getTagsForBookmark($bookmarkid) {
@@ -224,7 +235,7 @@ class Bookmark2TagService {
        }
 
        function &getTags($userid = NULL) {
-               $userservice =& ServiceFactory::getServiceInstance('UserService');
+               $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                $logged_on_user = $userservice->getCurrentUserId();
 
                $query = 'SELECT T.tag, COUNT(B.bId) AS bCount FROM '. $GLOBALS['tableprefix'] .'bookmarks AS B INNER JOIN '. $userservice->getTableName() .' AS U ON B.uId = U.'. $userservice->getFieldName('primary') .' INNER JOIN '. $GLOBALS['tableprefix'] .'bookmarks2tags AS T ON B.bId = T.bId';
@@ -299,7 +310,7 @@ class Bookmark2TagService {
 
        // Returns the most popular tags used for a particular bookmark hash
        function &getRelatedTagsByHash($hash, $limit = 20) {
-               $userservice = & ServiceFactory :: getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                $sId = $userservice->getCurrentUserId();
                // Logged in
                if ($userservice->isLoggedOn()) {
@@ -329,7 +340,7 @@ class Bookmark2TagService {
        
        function &getAdminTags($limit = 30, $logged_on_user = NULL, $days = NULL) {
                // look for admin ids
-               $userservice = & ServiceFactory :: getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                $adminIds = $userservice->getAdminIds();
                
                // ask for their tags
@@ -338,7 +349,7 @@ class Bookmark2TagService {
        
        function &getContactTags($user, $limit = 30, $logged_on_user = NULL, $days = NULL) {
                // look for contact ids
-               $userservice = & ServiceFactory :: getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                $contacts = $userservice->getWatchlist($user);
                
                // add the user (to show him/her also his/her tags)
@@ -406,8 +417,8 @@ class Bookmark2TagService {
        }
 
        function renameTag($userid, $old, $new, $fromApi = false) {
-               $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
 
                if (is_null($userid) || is_null($old) || is_null($new))
                return false;
index fe66d38e995d23e38804267f0cffa75ec8480d6f..5ca284355ef64771973b3d0d69b5ea03d5314f91 100644 (file)
@@ -1,18 +1,27 @@
 <?php
-class CacheService {
+class SemanticScuttle_Service_Cache extends SemanticScuttle_Service
+{
     var $basedir;
     var $fileextension = '.cache';
 
-    function &getInstance() {
-        static $instance;
-        
-        if (!isset($instance))
-            $instance =& new CacheService();
-
-        return $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;
+       }
 
-    function CacheService() {
+    protected function __construct()
+    {
         $this->basedir = $GLOBALS['dir_cache'];    
     }
 
index 86e0c0f74eee7065fd1274cc2ad5e9f685b9268b..ed1ffddfc49058557f92ed96c75fa01864499b70 100644 (file)
@@ -1,17 +1,27 @@
 <?php
-class CommonDescriptionService {
-       var $db;
+class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_Service
+{
        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;
-               if (!isset($instance))
-               $instance =& new CommonDescriptionService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function CommonDescriptionService(&$db) {
-               $this->db =& $db;
+       public function __construct($db)
+    {
+               $this->db = $db;
                $this->tablename = $GLOBALS['tableprefix'] .'commondescription';
        }
 
index b5215e385152dde28183e1bfcd3c6bf5fd5e9c9a..b4ba28e11147158b97580f19ff9569986f9d8c53 100644 (file)
@@ -1,16 +1,19 @@
 <?php
 /* Connect to the database and build services */
 
-class ServiceFactory {
-       function ServiceFactory(&$db, $serviceoverrules = array()) {
+class SemanticScuttle_Service_Factory
+{
+       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;
                static $instances = array();
                static $db;
                if (!isset($db)) {
-                       require_once(dirname(__FILE__) .'/../includes/db/'. $dbtype .'.php');
+                       require_once 'SemanticScuttle/db/'. $dbtype .'.php';
                        $db = new sql_db();
                        $db->sql_connect($dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist);
                        if(!$db->db_connect_id) {
@@ -25,12 +28,15 @@ class ServiceFactory {
                        }
                        if (!class_exists($name)) {
                                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];
        }
index 91457e8d85b08ac93386c79ea9590f330786da9e..7cffa838711939a938606f0c309c0c7fff765b3f 100644 (file)
@@ -1,18 +1,28 @@
 <?php
-class SearchHistoryService {
-       var $db;
+class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_Service
+{
        var $tablename;
        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;
-               if (!isset($instance))
-               $instance =& new SearchHistoryService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function SearchHistoryService(& $db) {
-               $this->db =& $db;
+       public function __construct($db)
+    {
+               $this->db = $db;
                $this->tablename = $GLOBALS['tableprefix'] .'searchhistory';
                if(isset($GLOBALS['sizeSearchHistory'])) {
                        $this->sizeSearchHistory = $GLOBALS['sizeSearchHistory'];
index fc44a99cb8c1f5882343d7750ccfb6d1c47dad66..2a70948ff4dfbded8d01cf240d32ed66e0e9bdf8 100644 (file)
@@ -1,17 +1,27 @@
 <?php
-class TagService {
-       var $db;
+class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
+{
        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;
-               if (!isset($instance))
-               $instance =& new TagService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function TagService(&$db) {
-               $this->db =& $db;
+       public function __construct($db)
+    {
+               $this->db = $db;
                $this->tablename = $GLOBALS['tableprefix'] .'tags';
        }
 
similarity index 91%
rename from src/SemanticScuttle/Service/Tag2tag.php
rename to src/SemanticScuttle/Service/Tag2Tag.php
index 956fd49b24790083c059be3fa62e689d87b2240b..b209d60117e8f74282454e3019015d9954c2448f 100644 (file)
@@ -1,22 +1,33 @@
 <?php
-class Tag2TagService {
-       var $db;
-       var $tablename;
-
-       function &getInstance(&$db) {
+class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
+{
+       protected $tablename;
+
+    /**
+     * 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 Tag2TagService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function Tag2TagService(&$db) {
+
+       function __construct(&$db)
+    {
                $this->db =& $db;
                $this->tablename = $GLOBALS['tableprefix'] .'tags2tags';
        }
 
        function addLinkedTags($tag1, $tag2, $relationType, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -46,7 +57,7 @@ class Tag2TagService {
        // Return linked tags just for admin users
        function getAdminLinkedTags($tag, $relationType, $inverseRelation = false, $stopList = array()) {
                // look for admin ids
-               $userservice = & ServiceFactory :: getServiceInstance('UserService');
+               $userservice = SemanticScuttle_Service_Factory :: getServiceInstance('User');
                $adminIds = $userservice->getAdminIds();
                
                //ask for their linked tags
@@ -119,7 +130,7 @@ class Tag2TagService {
                }
 
                // try to find data in cache
-               $tcs = & ServiceFactory::getServiceInstance('TagCacheService');
+               $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
                if(count($stopList) == 0) {
                        $activatedCache = true;
                } else {
@@ -177,7 +188,7 @@ class Tag2TagService {
                $query = "SELECT DISTINCT tts.tag1 as tag";
                $query.= " FROM `". $this->getTableName() ."` tts";
                if($orderBy != null) {
-                       $tsts =& ServiceFactory::getServiceInstance('TagStatService');
+                       $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                        $query.= ", ".$tsts->getTableName() ." tsts";
                }
                $query.= " WHERE tts.tag1 <> ALL";
@@ -328,7 +339,7 @@ class Tag2TagService {
        }       
 
        function renameTag($uId, $oldName, $newName) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $newName = $tagservice->normalize($newName);
 
                $query = 'UPDATE `'. $this->getTableName() .'`';
@@ -355,10 +366,10 @@ class Tag2TagService {
        }
 
        function update($tag1, $tag2, $relationType, $uId) {
-               $tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $tsts->updateStat($tag1, $relationType, $uId);
 
-               $tcs = & ServiceFactory::getServiceInstance('TagCacheService');
+               $tcs = SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
                $tcs->deleteByUser($uId);
        }
 
@@ -366,7 +377,7 @@ class Tag2TagService {
                $query = 'TRUNCATE TABLE `'. $this->getTableName() .'`';
                $this->db->sql_query($query);
 
-               $tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $tsts->deleteAll();
        }
 
index ed2eefc1a1bfc3c5e9bef8f6f0fc2d4444a0c429..30f9ebd50ad7b020b20d57ca68bc1ae867dc3696 100644 (file)
@@ -1,31 +1,43 @@
 <?php
-
-/*
- * This class infers on relation between tags by storing all 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.
- * Instead of computing this relation several times, it is saved into this current table.
+/**
+ * This class infers on relation between tags by storing all
+ * 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.
+ * 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.
- * 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 TagCacheService {
-       var $db;
+class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
+{
        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;
-               if (!isset($instance))
-               $instance =& new TagCacheService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function TagCacheService(&$db) {
-               $this->db =& $db;
+       protected function __construct($db)
+    {
+               $this->db =$db;
                $this->tablename = $GLOBALS['tableprefix'] .'tagscache';
        }
 
        function getChildren($tag1, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
 
                if($tag1 == '') return false;
@@ -54,7 +66,7 @@ class TagCacheService {
        }
 
        function addChild($tag1, $tag2, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -98,7 +110,7 @@ class TagCacheService {
        }
 
        function existsChild($tag1, $tag2, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tag2 = $tagservice->normalize($tag2);
 
@@ -202,7 +214,7 @@ class TagCacheService {
        }
 
        function _isSynonymKey($tag1, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
 
                $query = "SELECT tag1 FROM `". $this->getTableName() ."`";
@@ -214,7 +226,7 @@ class TagCacheService {
        }
 
        function _isSynonymValue($tag2, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag2 = $tagservice->normalize($tag2);
 
                $query = "SELECT tag2 FROM `". $this->getTableName() ."`";
@@ -238,7 +250,7 @@ class TagCacheService {
        }
 
        function _getSynonymKey($tag2, $uId) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag2 = $tagservice->normalize($tag2);
 
                if($this->_isSynonymKey($tag2)) return $tag2;
@@ -267,7 +279,7 @@ class TagCacheService {
         * $tagExcepted allows to hide a value.
         */
        function _getSynonymValues($tag1, $uId, $tagExcepted = NULL) {
-               $tagservice =& ServiceFactory::getServiceInstance('TagService');
+               $tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $tag1 = $tagservice->normalize($tag1);
                $tagExcepted = $tagservice->normalize($tagExcepted);
 
index 9d3ca5dc2fdc802537b6e564c59c6aba841fee84..c54dcb7cc568c7fd165c1c571e5541b3576ec359 100644 (file)
@@ -1,22 +1,33 @@
 <?php
-class TagStatService {
-       var $db;
+class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
+{
+
        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;
-               if (!isset($instance))
-               $instance =& new TagStatService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function TagStatService(&$db) {
-               $this->db =& $db;
+       protected function __construct($db)
+    {
+               $this->db = $db;
                $this->tablename = $GLOBALS['tableprefix'] .'tagsstats';
        }
 
        function getNbChildren($tag1, $relationType, $uId) {
-               $tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $query = "SELECT tag1, relationType, uId FROM `". $tts->getTableName() ."`";
                $query.= " WHERE tag1 = '" .$tag1 ."'";
                $query.= " AND relationType = '". $relationType ."'";
@@ -91,7 +102,7 @@ class TagStatService {
                        return false;
                }
 
-               $tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $linkedTags = $tts->getLinkedTags($tag1, $relationType, $uId);
                $nbDescendants = 0;
                $maxDepth = 0;
@@ -112,7 +123,7 @@ class TagStatService {
        }
 
        function updateAllStat() {
-               $tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
                $query = "SELECT tag1, uId FROM `". $tts->getTableName() ."`";
                $query.= " WHERE relationType = '>'";
index 05e494c646de3aaf3b39aa6885705f2868ccc250..dbe56709d3500c0c43d9c0bf8f45e7cdf632438d 100644 (file)
@@ -1,15 +1,26 @@
 <?php
-class TemplateService {
-       var $basedir;
+class SemanticScuttle_Service_Template extends SemanticScuttle_Service
+{
+       protected $basedir;
 
-       function &getInstance() {
+    /**
+     * 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 TemplateService();
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function TemplateService() {
+       public function __construct()
+    {
                $this->basedir = $GLOBALS['TEMPLATES_DIR'];
        }
 
index 407632b24ea4bd74e96d64267aed1a3e72bbca40..bc88c0b48b0734b1725267a68a4d12a41737a05c 100644 (file)
@@ -1,28 +1,39 @@
 <?php
-class UserService {
-       var $db;
-       var $fields = array(
+class SemanticScuttle_Service_User extends SemanticScuttle_Service
+{
+       protected $db;
+       protected $fields = array(
         'primary'   =>  'uId',
         'username'  =>  'username',
         'password'  =>  'password');
-       var $profileurl;
-       var $tablename;
-       var $sessionkey;
-       var $cookiekey;
-       var $cookietime = 1209600; // 2 weeks
-
-       function &getInstance(&$db) {
+       protected $profileurl;
+       protected $tablename;
+       protected $sessionkey;
+       protected $cookiekey;
+       protected $cookietime = 1209600; // 2 weeks
+
+    /**
+     * 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 UserService($db);
+               if (!isset($instance)) {
+            $instance = new self($db);
+        }
                return $instance;
        }
 
-       function UserService(& $db) {
-               $this->db =& $db;
-               $this->tablename = $GLOBALS['tableprefix'] .'users';
+       protected function __construct($db)
+    {
+               $this->db = $db;
+               $this->tablename  = $GLOBALS['tableprefix'] .'users';
                $this->sessionkey = INSTALLATION_ID.'-currentuserid';
-               $this->cookiekey = INSTALLATION_ID.'-login';
+               $this->cookiekey  = INSTALLATION_ID.'-login';
                $this->profileurl = createURL('profile', '%2$s');
                $this->updateSessionStability();
        }
@@ -436,21 +447,21 @@ class UserService {
                return true;
        }
 
-       function getAllUsers ( ) {\r
-               $query = 'SELECT * FROM '. $this->getTableName();\r
-\r
-               if (! ($dbresult =& $this->db->sql_query($query)) ) {\r
-                       message_die(GENERAL_ERROR, 'Could not get users', '', __LINE__, __FILE__, $query, $this->db);\r
-                       return false;\r
-               }\r
-\r
-               $rows = array();\r
-\r
-               while ( $row = $this->db->sql_fetchrow($dbresult) ) {\r
-                       $rows[] = $row;\r
-               }\r
-               $this->db->sql_freeresult($dbresult);\r
-               return $rows;\r
+       function getAllUsers ( ) {
+               $query = 'SELECT * FROM '. $this->getTableName();
+
+               if (! ($dbresult =& $this->db->sql_query($query)) ) {
+                       message_die(GENERAL_ERROR, 'Could not get users', '', __LINE__, __FILE__, $query, $this->db);
+                       return false;
+               }
+
+               $rows = array();
+
+               while ( $row = $this->db->sql_fetchrow($dbresult) ) {
+                       $rows[] = $row;
+               }
+               $this->db->sql_freeresult($dbresult);
+               return $rows;
        }
        
        // Returns an array with admin uIds
@@ -461,18 +472,18 @@ class UserService {
                        $admins[] = $this->getIdFromUser($adminName); 
                }
                return $admins;
-       }\r
-\r
-       function deleteUser($uId) {\r
-               $query = 'DELETE FROM '. $this->getTableName() .' WHERE uId = '. intval($uId);\r
-\r
-               if (!($dbresult = & $this->db->sql_query($query))) {\r
-                       message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $query, $this->db);\r
-                       return false;\r
-               }\r
-\r
-               return true;\r
-       }\r
+       }
+
+       function deleteUser($uId) {
+               $query = 'DELETE FROM '. $this->getTableName() .' WHERE uId = '. intval($uId);
+
+               if (!($dbresult = & $this->db->sql_query($query))) {
+                       message_die(GENERAL_ERROR, 'Could not delete user', '', __LINE__, __FILE__, $query, $this->db);
+                       return false;
+               }
+
+               return true;
+       }
 
 
        function sanitisePassword($password) {
@@ -601,7 +612,7 @@ class User {
        function getName() {
                // Look for value only if not already set
                if(!isset($this->name)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $user = $userservice->getUser($this->id);
                        $this->name = $user['name'];
                }
@@ -611,7 +622,7 @@ class User {
        function getEmail() {
                // Look for value only if not already set
                if(!isset($this->email)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $user = $userservice->getUser($this->id);
                        $this->email = $user['email'];
                }
@@ -621,7 +632,7 @@ class User {
        function getHomepage() {
                // Look for value only if not already set
                if(!isset($this->homepage)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $user = $userservice->getUser($this->id);
                        $this->homepage = $user['homepage'];
                }
@@ -631,7 +642,7 @@ class User {
        function getContent() {
                // Look for value only if not already set
                if(!isset($this->content)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $user = $userservice->getUser($this->id);
                        $this->content = $user['uContent'];
                }
@@ -641,7 +652,7 @@ class User {
        function getDatetime() {
                // Look for value only if not already set
                if(!isset($this->content)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $user = $userservice->getUser($this->id);
                        $this->datetime = $user['uDatetime'];
                }
@@ -651,14 +662,14 @@ class User {
        function isAdmin() {
                // Look for value only if not already set
                if(!isset($this->isAdmin)) {
-                       $userservice =& ServiceFactory::getServiceInstance('UserService');
+                       $userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
                        $this->isAdmin = $userservice->isAdmin($this->id);
                }
                return $this->isAdmin;
        }
        
        function getNbBookmarks($range = 'public') {
-               $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+               $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
                return $bookmarkservice->countBookmarks($this->getId(), $range);
        }
 }
index 024cb0694221f28cdcc5543bf43e067cd9933fc4..b01679c4a0fc8d43922a244d39183401c4d36a82 100644 (file)
@@ -1,12 +1,17 @@
 <?php
-if(!file_exists(dirname(__FILE__) .'/config.inc.php')) {
-       die('Please copy "config.inc.php.dist" to "config.inc.php"');
+if(!file_exists(dirname(__FILE__) .'/../../data/config.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)
-require_once(dirname(__FILE__) .'/config.default.inc.php');
-require_once(dirname(__FILE__) .'/config.inc.php');
-require_once(dirname(__FILE__) .'/constants.inc.php'); // some constants are based on variables from config file
+$datadir = dirname(__FILE__) . '/../../data/';
+require_once($datadir . '/config.default.php');
+require_once($datadir . '/config.php');
+require_once 'SemanticScuttle/constants.php'; // some constants are based on variables from config file
 
 
 // Debug Management using constants
@@ -21,17 +26,18 @@ if(DEBUG_MODE) {
 }
 
 // 2 // Second requirements part which could display bugs (must come after debug management)
-require_once(dirname(__FILE__) .'/services/servicefactory.php');
-require_once(dirname(__FILE__) .'/functions.inc.php');
+require_once 'SemanticScuttle/Service.php';
+require_once 'SemanticScuttle/Service/Factory.php';
+require_once 'SemanticScuttle/functions.php';
 
 
 // 3 // Third requirements part which import functions from includes/ directory
 
 // UTF-8 functions
-require_once(dirname(__FILE__) .'/includes/utf8.php');
+require_once 'SemanticScuttle/utf8.php';
 
 // Translation
-require_once(dirname(__FILE__) .'/includes/php-gettext/gettext.inc');
+require_once 'php-gettext/gettext.inc';
 $domain = 'messages';
 T_setlocale(LC_MESSAGES, $locale);
 T_bindtextdomain($domain, dirname(__FILE__) .'/locales');
@@ -42,10 +48,10 @@ T_textdomain($domain);
 session_start();
 
 // 5 // Create mandatory services and objects
-$userservice =& ServiceFactory::getServiceInstance('UserService');
+$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
 $currentUser = $userservice->getCurrentObjectUser();
 
-$templateservice =& ServiceFactory::getServiceInstance('TemplateService');
+$templateservice =SemanticScuttle_Service_Factory::getServiceInstance('Template');
 $tplVars = array();
 $tplVars['currentUser'] = $currentUser;
 $tplVars['userservice'] = $userservice;
index e229d5e21957b1f073322279790fa92472c4e569..3bff35dd4a6e86e08d5dd61d7dec36b866d1c901 100644 (file)
@@ -19,14 +19,14 @@ class BookmarksTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $filetypes, $debugMode;
                require_once('./header.inc.php');
 
-               $this->us =& ServiceFactory::getServiceInstance('UserService');
-               $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts=& ServiceFactory::getServiceInstance('Bookmark2TagService');
+               $this->b2ts=SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $this->tsts->deleteAll();
        }
 
index c8666c2d37b4eaddc099a0ae9cb66674b24c06be..f73b6468bfa0a2ffd4e6ce191a8b979f8ddb09c0 100644 (file)
@@ -21,16 +21,16 @@ class CommonDescriptionTest extends PHPUnit_Framework_TestCase
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
        require_once('./header.inc.php');
 
-       $this->us =& ServiceFactory::getServiceInstance('UserService');
-       $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+       $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+       $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
        $this->bs->deleteAll();
-       $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+       $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
        $this->b2ts->deleteAll();
-       $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+       $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
        $this->tts->deleteAll(); 
-       $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+       $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
        $this->tsts->deleteAll();
-       $this->cds =& ServiceFactory::getServiceInstance('CommonDescriptionService');
+       $this->cds =SemanticScuttle_Service_Factory::getServiceInstance('CommonDescription');
        $this->cds->deleteAll();
     }
  
index 2e517178e67cd9ed83909adbe0ae4f14e6148f0c..1dce7dcead6bc763e6887c6c953a4c9ef5dc9223 100644 (file)
@@ -20,16 +20,16 @@ class SearchTest extends PHPUnit_Framework_TestCase
         global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
        require_once('./header.inc.php');
 
-       $this->us =& ServiceFactory::getServiceInstance('UserService');
-       $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+       $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+       $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
        $this->bs->deleteAll();
-       $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+       $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
        $this->b2ts->deleteAll();
-       $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+       $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
        $this->tts->deleteAll(); 
-       $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+       $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
        $this->tsts->deleteAll();
-       $this->shs =& ServiceFactory::getServiceInstance('SearchHistoryService');
+       $this->shs =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
        $this->shs->deleteAll();
     }
 
index 8bb9ef3a030a8d8afed150787ca9a0dba80315a0..ab3114c6f767b47ed322d57e8619dd2f864084b5 100644 (file)
@@ -19,14 +19,14 @@ class Tag2TagTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once('./header.inc.php');
 
-               $this->us =& ServiceFactory::getServiceInstance('UserService');
-               $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $this->tsts->deleteAll();
        }
 
index 595afb91f5bc9b0cd6409f0017f9d6e37c5e241b..7673565a37af7c442da28ad1144958522b7423e5 100644 (file)
@@ -19,16 +19,16 @@ class TagsCacheTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix, $TEMPLATES_DIR, $debugMode;
                require_once('./header.inc.php');
 
-               $this->us =& ServiceFactory::getServiceInstance('UserService');
-               $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $this->tsts->deleteAll();
-               $this->tcs =& ServiceFactory::getServiceInstance('TagCacheService');
+               $this->tcs =SemanticScuttle_Service_Factory::getServiceInstance('TagCache');
                $this->tcs->deleteAll();
        }
 
index 49fec6f463d4ad041aa8b1319585aa26f5a25b49..d4957c9040b99067563deda50906a27e7e1cf923 100644 (file)
@@ -16,16 +16,16 @@ class TagsTest extends PHPUnit_Framework_TestCase
                global $dbhost, $dbuser, $dbpass, $dbname, $dbport, $dbpersist, $dbtype, $tableprefix;
                require_once('./header.inc.php');
 
-               $this->ts =& ServiceFactory::getServiceInstance('TagService');
+               $this->ts =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
                $this->ts->deleteAll();
-               $this->us =& ServiceFactory::getServiceInstance('UserService');
-               $this->bs =& ServiceFactory::getServiceInstance('BookmarkService');
+               $this->us =SemanticScuttle_Service_Factory::getServiceInstance('User');
+               $this->bs =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
                $this->bs->deleteAll();
-               $this->b2ts =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+               $this->b2ts =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
                $this->b2ts->deleteAll();
-               $this->tts =& ServiceFactory::getServiceInstance('Tag2TagService');
+               $this->tts =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
                $this->tts->deleteAll();
-               $this->tsts =& ServiceFactory::getServiceInstance('TagStatService');
+               $this->tsts =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
                $this->tsts->deleteAll();
        }
 
index 878e7e5fb926b5a0aa5c587a292601d476f36416..9644320b6233b77f2f40075b8fc40df6b4e9dcbb 100644 (file)
@@ -18,7 +18,7 @@
  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['subtitle'] = T_('About');
index b57b5683f1ded41d2750e08b70023f2ba9d44d04..37ebe4b5c3e7a37b621abe7664fe9b44d9f50d45 100644 (file)
@@ -1,71 +1,71 @@
-<?php\r
-/***************************************************************************\r
- Copyright (C) 2007 - 2008 SemanticScuttle project (fork from Scuttle)\r
- http://sourceforge.net/projects/semanticscuttle/\r\r
-\r
- This program is free software; you can redistribute it and/or modify\r
- it under the terms of the GNU General Public License as published by\r
- the Free Software Foundation; either version 2 of the License, or\r
- (at your option) any later version.\r
-\r
- This program is distributed in the hope that it will be useful,\r
- but WITHOUT ANY WARRANTY; without even the implied warranty of\r
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
- GNU General Public License for more details.\r
- You should have received a copy of the GNU General Public License\r
- along with this program; if not, write to the Free Software\r
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
- ***************************************************************************/\r
-\r
-require_once('header.inc.php');\r
+<?php
+/***************************************************************************
+ Copyright (C) 2007 - 2008 SemanticScuttle project (fork from Scuttle)
+ http://sourceforge.net/projects/semanticscuttle/
 
-/* Service creation: only useful services are created */\r
-$bookmark2tagservice = & ServiceFactory :: getServiceInstance('Bookmark2Tagservice');\r
-$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
-$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
-$tagcacheservice = & ServiceFactory :: getServiceInstance('TagCacheService');
-$commondescriptionservice = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
-$searchhistoryservice = & ServiceFactory :: getServiceInstance('SearchHistoryService');
-$tagstatservice = & ServiceFactory :: getServiceInstance('TagStatService');\r
-\r
-// Header variables\r
-$tplVars['subtitle'] = T_('Manage users');\r
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ GNU General Public License for more details.
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ ***************************************************************************/
+
+require_once '../src/SemanticScuttle/header.php';
+
+/* Service creation: only useful services are created */
+$bookmark2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tagservice');
+$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
+$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
+$tagcacheservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagCache');
+$commondescriptionservice = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
+$searchhistoryservice = SemanticScuttle_Service_Factory :: getServiceInstance('SearchHistory');
+$tagstatservice = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
+
+// Header variables
+$tplVars['subtitle'] = T_('Manage users');
 $tplVars['loadjs'] = true;
 $tplVars['sidebar_blocks'] = array('users' );
 $tplVars['error'] = '';
-$tplVars['msg'] = '';\r
-\r
-if ( !$userservice->isLoggedOn() ) {\r
-       header('Location: '. createURL('login', ''));\r
-       exit();\r
+$tplVars['msg'] = '';
+
+if ( !$userservice->isLoggedOn() ) {
+       header('Location: '. createURL('login', ''));
+       exit();
 }
-\r
-if ( !$currentUser->isAdmin() ) {\r
-       header('Location: '. createURL('bookmarks', $currentUser->getUsername()));\r
-       exit();\r
-}\r
-\r
+
+if ( !$currentUser->isAdmin() ) {
+       header('Location: '. createURL('bookmarks', $currentUser->getUsername()));
+       exit();
+}
+
 @list($url, $action, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
-\r
+
 if ( $action
 && (strpos($_SERVER['HTTP_REFERER'], ROOT.'admin') === 0)  // Prevent CSRF attacks
-) {\r
-       switch ( $action ) {\r
-               case 'delete':\r
-                       if ( $user && ($userinfo = $userservice->getUserByUsername($user)) ) {\r
-                               $uId = $userinfo['uId'];\r
+) {
+       switch ( $action ) {
+               case 'delete':
+                       if ( $user && ($userinfo = $userservice->getUserByUsername($user)) ) {
+                               $uId = $userinfo['uId'];
 
                                $tagcacheservice->deleteByUser($uId);
-                               $tag2tagservice->removeLinkedTagsForUser($uId);\r
-                               $userservice->deleteUser($uId);\r
+                               $tag2tagservice->removeLinkedTagsForUser($uId);
+                               $userservice->deleteUser($uId);
                                $bookmark2tagservice->deleteTagsForUser($uId);
                                $commondescriptionservice->deleteDescriptionsForUser($uId);
                                $searchhistoryservice->deleteSearchHistoryForUser($uId);
-                               $tagstatservice->deleteTagStatForUser($uId);                            \r
-                               // XXX: don't delete bookmarks before tags, else tags can't be deleted !!!\r
-                               $bookmarkservice->deleteBookmarksForUser($uId);\r
-\r
-                               $tplVars['msg'] = sprintf(T_('%s and all his bookmarks and tags were deleted.'), $user);\r
+                               $tagstatservice->deleteTagStatForUser($uId);                            
+                               // XXX: don't delete bookmarks before tags, else tags can't be deleted !!!
+                               $bookmarkservice->deleteBookmarksForUser($uId);
+
+                               $tplVars['msg'] = sprintf(T_('%s and all his bookmarks and tags were deleted.'), $user);
                        }
                        break;
                case 'checkUrl' :
@@ -74,21 +74,21 @@ if ( $action
                                if(!checkUrl($bookmark['bAddress'])) {
                                        $tplVars['error'].= T_('Problem with ').$bookmark['bAddress'].' ('. $bookmark['username'] .')<br/>';  
                                }
-                       }\r
-                       break;\r
-               default:\r
-                       // DO NOTHING\r
-       }\r
-}\r
-\r
-$templatename = 'admin.tpl';\r
-$users =& $userservice->getObjectUsers();\r
-\r
-if ( !is_array($users) ) {\r
-       $users = array();\r
-}\r
-\r
-$tplVars['users'] =& $users;\r
-\r
-$templateservice->loadTemplate($templatename, $tplVars);\r
+                       }
+                       break;
+               default:
+                       // DO NOTHING
+       }
+}
+
+$templatename = 'admin.tpl';
+$users =& $userservice->getObjectUsers();
+
+if ( !is_array($users) ) {
+       $users = array();
+}
+
+$tplVars['users'] =& $users;
+
+$templateservice->loadTemplate($templatename, $tplVars);
 ?>
index 75aae9a9f94649e431a5f7c72b41dd5ce47efaf5..89dd1e6a348fea80cc14ccf57ebdb00c7a611579 100644 (file)
 
 /* 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 */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
-$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
 
 /* Managing all possible inputs */
 isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
@@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
 function displayTag($tag, $uId) {
        $uId = ($uId==0)?NULL:$uId;  // if user is nobody, NULL allows to look for every public tags
        
-       $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+       $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
        $output =  '{ id:'.rand().', name:\''.$tag.'\'';
 
        $linkedTags = $tag2tagservice->getAdminLinkedTags($tag, '>');
index e3d80252b13cdca85de535e3969e10c0732a008a..8345516d7798e1b116167dd95432f1ae096752b8 100644 (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*/
 
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
 
 ?>
 
index 9c25e1a8a36c97fcbf3e31161be948bac7661e5d..e5086550b3934491f1f660a784b4a83d2814fc68 100644 (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*/
 
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
 
 ?>
 
index a34805be522125e1fcf0cb9c34620c58f513b6c4..2a93a3dece2c2c2609fb0d3605ef140ca77c707e 100644 (file)
 
 /* 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 */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
-$tagstatservice =& ServiceFactory::getServiceInstance('TagStatService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
+$tagstatservice =SemanticScuttle_Service_Factory::getServiceInstance('TagStat');
 
 /* Managing all possible inputs */
 isset($_GET['tag']) ? define('GET_TAG', $_GET['tag']): define('GET_TAG', '');
@@ -36,7 +36,7 @@ isset($_GET['uId']) ? define('GET_UID', $_GET['uId']): define('GET_UID', '');
 function displayTag($tag, $uId) {
        $uId = ($uId==0)?NULL:$uId;  // if user is nobody, NULL allows to look for every public tags
        
-       $tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+       $tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
        $output =  '{ id:'.rand().', name:\''.$tag.'\'';
 
        $linkedTags = $tag2tagservice->getLinkedTags($tag, '>', $uId);
index 7b8b33a46d051678c43b636255f8e6559e2ea019..b6b12c7b0ecd7db83b3bb9f64ce567a6efd26256 100644 (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*/
 
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag');
 
 ?>
 
index a1119caef7b0483072714c31a84377284c8a2416..f605b3a11bd22ded922de190a0edd453394eb18e 100644 (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('Last-Modified: '. gmdate("D, d M Y H:i:s") .' GMT');
 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 */
-$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
+$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
 
 /* Managing all possible inputs */
 isset($_GET['id']) ? define('GET_ID', $_GET['id']): define('GET_ID', '');
index fc895dbd295181799b7cdf0c8a6057060d22d87d..5d36b721994d154c240b3fe3756846563a50214d 100644 (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("Cache-Control: no-cache, must-revalidate");
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Managing all possible inputs */
 isset($_GET['url']) ? define('GET_URL', $_GET['url']): define('GET_URL', '');
index ffd4379f89c756a184e6f00d78e08923b68a0f0d..139061c46d857c4b3a99e9a8b5bebd69b4fd5984 100644 (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("Cache-Control: no-cache, must-revalidate");
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
 //No specific services
index 95e797ae920737482fd025c5af8049b47afc35be..0a8828846beea65501f99a45c31f61a10a7d3851 100644 (file)
  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 */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 
 
index 2389642c1c7049967e7ed823f402aff274c55432..c696001cd0cda041bab593d9b1b5bf6f79e9aa16 100644 (file)
@@ -1,47 +1,47 @@
-<?php\r
-// Export in CSV format in order to allow the import into a spreadsheet tool like Excel\r
-\r
+<?php
+// Export in CSV format in order to allow the import into a spreadsheet tool like Excel
+
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');\r
-require_once('../header.inc.php');\r
-
-/* Service creation: only useful services are created */\r
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');\r
-\r
-// Check to see if a tag was specified.\r
-if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))\r
-    $tag = trim($_REQUEST['tag']);\r
-else\r
-    $tag = NULL;\r
-\r
-// Get the posts relevant to the passed-in variables.\r
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());\r
-\r
+require_once('httpauth.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
+
+/* Service creation: only useful services are created */
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+
+// Check to see if a tag was specified.
+if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
+    $tag = trim($_REQUEST['tag']);
+else
+    $tag = NULL;
+
+// Get the posts relevant to the passed-in variables.
+$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());
+
 header("Content-Type: application/csv-tab-delimited-table;charset=UTF-8");
-header("Content-disposition: filename=exportBookmarks.csv");\r
-\r
+header("Content-disposition: filename=exportBookmarks.csv");
+
 //columns titles
 echo 'url;title;tags;description';
-echo "\n";\r
-\r
-foreach($bookmarks['bookmarks'] as $row) {\r
-    if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))\r
-        $description = '';\r
-    else\r
-        $description = filter(str_replace(array("\r\n", "\n", "\r"),"", $row['bDescription']), 'xml');\r
-\r
-    $taglist = '';\r
-    if (count($row['tags']) > 0) {\r
-        foreach($row['tags'] as $tag)\r
-            $taglist .= convertTag($tag) .',';\r
-        $taglist = substr($taglist, 0, -1);\r
-    } else {\r
-        $taglist = 'system:unfiled';\r
-    }\r
-\r
+echo "\n";
+
+foreach($bookmarks['bookmarks'] as $row) {
+    if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
+        $description = '';
+    else
+        $description = filter(str_replace(array("\r\n", "\n", "\r"),"", $row['bDescription']), 'xml');
+
+    $taglist = '';
+    if (count($row['tags']) > 0) {
+        foreach($row['tags'] as $tag)
+            $taglist .= convertTag($tag) .',';
+        $taglist = substr($taglist, 0, -1);
+    } else {
+        $taglist = 'system:unfiled';
+    }
+
     echo '"'.filter($row['bAddress'], 'xml') .'";"'. filter($row['bTitle'], 'xml') .'";"'. filter($taglist, 'xml') .'";"'. $description .'"';
-    echo "\n";\r
-}\r
-\r
-\r
-?>\r
+    echo "\n";
+}
+
+
+?>
index 6f1f4c274f06c283b96aa43bc67bb1efe42ed165..1eed96125cdf38b85c7e705341d7a3e5ce2d1669 100644 (file)
@@ -5,7 +5,7 @@
 
 // Force HTTP authentication first!
 //require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 if($GLOBALS['enableGoogleCustomSearch'] == false) {
     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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
 
 
 /*
index 55553c2765c6629bbdac1ddade105a1816f8fe5f..922901adfac25997148da2793665b55d7a29f2e9 100644 (file)
@@ -1,54 +1,54 @@
-<?php\r
-// Implements the del.icio.us API request for all a user's posts, optionally filtered by tag.\r
-\r
-// del.icio.us behavior:\r
-// - doesn't include the filtered tag as an attribute on the root element (we do)\r
-\r
+<?php
+// Implements the del.icio.us API request for all a user's posts, optionally filtered by tag.
+
+// del.icio.us behavior:
+// - doesn't include the filtered tag as an attribute on the root element (we do)
+
 // Force HTTP authentication first!
-require_once('httpauth.inc.php');\r
-require_once('../header.inc.php');\r
-
-/* Service creation: only useful services are created */\r
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');\r
-\r
-// Check to see if a tag was specified.\r
-if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))\r
-    $tag = trim($_REQUEST['tag']);\r
-else\r
-    $tag = NULL;\r
-\r
-// Get the posts relevant to the passed-in variables.\r
-$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());\r
-\r
-\r
-// Set up the XML file and output all the posts.\r
+require_once('httpauth.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
+
+/* Service creation: only useful services are created */
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+
+// Check to see if a tag was specified.
+if (isset($_REQUEST['tag']) && (trim($_REQUEST['tag']) != ''))
+    $tag = trim($_REQUEST['tag']);
+else
+    $tag = NULL;
+
+// Get the posts relevant to the passed-in variables.
+$bookmarks =& $bookmarkservice->getBookmarks(0, NULL, $userservice->getCurrentUserId(), $tag, NULL, getSortOrder());
+
+
+// Set up the XML file and output all the posts.
 echo '<!DOCTYPE NETSCAPE-Bookmark-file-1>'."\r\n";
-echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">';\r
-echo '<!-- This is an automatically generated file. -->'."\r\n";\r
-echo '<TITLE>Bookmarks</TITLE>'."\r\n";\r
-echo '<H1 LAST_MODIFIED="'. date('U') .'">Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."</H1>\r\n";\r
-echo '<DL><p>'."\r\n";\r
-\r
-\r
-\r
-foreach($bookmarks['bookmarks'] as $row) {\r
-    if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))\r
-        $description = '';\r
-    else\r
-        $description = 'description="'. filter($row['bDescription'], 'xml') .'" ';\r
-\r
-    $taglist = '';\r
-    if (count($row['tags']) > 0) {\r
-        foreach($row['tags'] as $tag)\r
-            $taglist .= convertTag($tag) .',';\r
-        $taglist = substr($taglist, 0, -1);\r
-    } else {\r
-        $taglist = 'system:unfiled';\r
-    }\r
-\r
-    echo "\t<dt><a href=\"". filter($row['bAddress'], 'xml') .'" '. $description .' hash="'. md5($row['bAddress']) .'" tags="'. filter($taglist, 'xml') .'" ADD_DATE="'. date('U', strtotime($row['bDatetime'])) ."\" >" . filter($row['bTitle'], 'xml') ."</a>\r\n";\r
-}\r
-\r
-\r
-echo '</DL><p>';\r
-?>\r
+echo '<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">';
+echo '<!-- This is an automatically generated file. -->'."\r\n";
+echo '<TITLE>Bookmarks</TITLE>'."\r\n";
+echo '<H1 LAST_MODIFIED="'. date('U') .'">Bookmarks for '. htmlspecialchars($currentUser->getUsername()) .''. (is_null($tag) ? '' : ' tag="'. htmlspecialchars($tag) .'"') ." from " . $sitename ."</H1>\r\n";
+echo '<DL><p>'."\r\n";
+
+
+
+foreach($bookmarks['bookmarks'] as $row) {
+    if (is_null($row['bDescription']) || (trim($row['bDescription']) == ''))
+        $description = '';
+    else
+        $description = 'description="'. filter($row['bDescription'], 'xml') .'" ';
+
+    $taglist = '';
+    if (count($row['tags']) > 0) {
+        foreach($row['tags'] as $tag)
+            $taglist .= convertTag($tag) .',';
+        $taglist = substr($taglist, 0, -1);
+    } else {
+        $taglist = 'system:unfiled';
+    }
+
+    echo "\t<dt><a href=\"". filter($row['bAddress'], 'xml') .'" '. $description .' hash="'. md5($row['bAddress']) .'" tags="'. filter($taglist, 'xml') .'" ADD_DATE="'. date('U', strtotime($row['bDatetime'])) ."\" >" . filter($row['bTitle'], 'xml') ."</a>\r\n";
+}
+
+
+echo '</DL><p>';
+?>
index 746d0eaeee74acd4b351ea81ccf878aa5421d40e..90713e77e6fe886a5801ac06e84c5e1506e064d9 100644 (file)
@@ -1,12 +1,12 @@
 <?php
-/* Export data with semantic format (SIOC: http://sioc-project.org/, FOAF, SKOS, Annotea Ontology) */\r
-\r
-require_once('../header.inc.php');
-header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.php\r
+/* Export data with semantic format (SIOC: http://sioc-project.org/, FOAF, SKOS, Annotea Ontology) */
 
-/* Service creation: only useful services are created */\r
-$userservice =& ServiceFactory::getServiceInstance('UserService');
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+require_once '../../src/SemanticScuttle/header.php';
+header('Content-Type: text/xml; charset=utf-8'); //we change headers html defined in headers.inc.php
+
+/* Service creation: only useful services are created */
+$userservice =SemanticScuttle_Service_Factory::getServiceInstance('User');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
 
 ?>
 <?php echo "<?xml version=\"1.0\" encoding=\"utf-8\"\n?>"; ?>
index 5dd7444dc0bd064646efceefa8ca7b87fd423afc..23e3a5e31e0877c3a9a8c568a2d540cb2ef17f3b 100644 (file)
@@ -1,5 +1,5 @@
 <?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,
 //  with the user's info.
index a6f79f8b52468a741def129d5c88c7074b4172f4..422695739d8ffff3cc2eb6d98fbba34e88f636ef 100644 (file)
@@ -1,18 +1,18 @@
 <?php 
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 header("Content-type: text/xml");
 ?>
 
-<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"\r
-                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">\r
-  <ShortName><?php echo $GLOBALS['sitename']?></ShortName>\r
-  <LongName></LongName>\r
-  <Description><?php echo $GLOBALS['welcomeMessage']?></Description>\r
-  <InputEncoding>UTF-8</InputEncoding>\r
-  <Contact><?php echo $GLOBALS['adminemail']?></Contact>\r
-  <Developer>Jan Seifert "jan.seifert@uid.com"</Developer>\r
-  <Tags>semanticscuttle bookmark web</Tags>\r
-  <Image width="16" height="16">data:image/gif;base64,R0lGODlhEAAQAMZ9ANaPE9mREteTHtSXLdmXIdiXJtaYKdiYJ9iYKNeaLtKdP9CdRd2dLNWfQuWiFMqjX9+hNMykXt6jPOCkPM2oaM+paeCpQuGoR+OqOeKpR+GqS9+uWeSwU+ayS+uzOeWxVeWxWOSyWOu0POazXOS0YOm8Zee8cOy+WOm9a/jBLum+bPbCNurAbe7BYuvBc/LDV/LEV+zEdv/KKf/KLP/KLf/LLuzHe//MNP/NN/nMTv/OOf/OPP/OP/jNW//PPvnOVv/QQv7QRv/QRP/RR/HOhP/SSf/STPnRav/TT//TUPfScf/UUvzUXP/UVP/VV/bTfv/WWf/WW//WXP7XYf/XX//XYP/YZPPVmf/ZZv/ZZ/vYeP/aaf/aa//abP/abf/abvvaef/bb//bcfzbfP/ccv/cc//cdP/cdf/dd//deP/def3egP/ee//efP/efv/ffv/ggf/gg//ghP/ghfrfmv/hif/ii//ijP/jkfzjm//kkv7klv/lmP///////////yH5BAEKAH8ALAAAAAAQABAAAAergH+Cg38hhIeHIFcmiIgDLnt0Go2EE1pyd0QbjQMQDC9bZGprKBcjA4IfAQMrQUhOVFlhaGNPMRl/Aw4yMzc7QkZNUlZdZmASqAJKcW1WPDpARUtQUx0RgyR5fHpzUTU4PkMiqIMVNnh2c25lSTQpAIgqdXJvaWReXz0JiCxwbWhiuGCp8uMAohJszhw5AYMJlBwFEHFoYQHBAwUEMHgwgKjBA0QLKFAaKSgQADs=</Image>\r
-  <Url type="text/html" template="<?php echo $GLOBALS['root']?>search.php/all/{searchTerms}"/>\r
-  <moz:SearchForm><?php echo $GLOBALS['root']?></moz:SearchForm>\r
+<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"
+                       xmlns:moz="http://www.mozilla.org/2006/browser/search/">
+  <ShortName><?php echo $GLOBALS['sitename']?></ShortName>
+  <LongName></LongName>
+  <Description><?php echo $GLOBALS['welcomeMessage']?></Description>
+  <InputEncoding>UTF-8</InputEncoding>
+  <Contact><?php echo $GLOBALS['adminemail']?></Contact>
+  <Developer>Jan Seifert "jan.seifert@uid.com"</Developer>
+  <Tags>semanticscuttle bookmark web</Tags>
+  <Image width="16" height="16">data:image/gif;base64,R0lGODlhEAAQAMZ9ANaPE9mREteTHtSXLdmXIdiXJtaYKdiYJ9iYKNeaLtKdP9CdRd2dLNWfQuWiFMqjX9+hNMykXt6jPOCkPM2oaM+paeCpQuGoR+OqOeKpR+GqS9+uWeSwU+ayS+uzOeWxVeWxWOSyWOu0POazXOS0YOm8Zee8cOy+WOm9a/jBLum+bPbCNurAbe7BYuvBc/LDV/LEV+zEdv/KKf/KLP/KLf/LLuzHe//MNP/NN/nMTv/OOf/OPP/OP/jNW//PPvnOVv/QQv7QRv/QRP/RR/HOhP/SSf/STPnRav/TT//TUPfScf/UUvzUXP/UVP/VV/bTfv/WWf/WW//WXP7XYf/XX//XYP/YZPPVmf/ZZv/ZZ/vYeP/aaf/aa//abP/abf/abvvaef/bb//bcfzbfP/ccv/cc//cdP/cdf/dd//deP/def3egP/ee//efP/efv/ffv/ggf/gg//ghP/ghfrfmv/hif/ii//ijP/jkfzjm//kkv7klv/lmP///////////yH5BAEKAH8ALAAAAAAQABAAAAergH+Cg38hhIeHIFcmiIgDLnt0Go2EE1pyd0QbjQMQDC9bZGprKBcjA4IfAQMrQUhOVFlhaGNPMRl/Aw4yMzc7QkZNUlZdZmASqAJKcW1WPDpARUtQUx0RgyR5fHpzUTU4PkMiqIMVNnh2c25lSTQpAIgqdXJvaWReXz0JiCxwbWhiuGCp8uMAohJszhw5AYMJlBwFEHFoYQHBAwUEMHgwgKjBA0QLKFAaKSgQADs=</Image>
+  <Url type="text/html" template="<?php echo $GLOBALS['root']?>search.php/all/{searchTerms}"/>
+  <moz:SearchForm><?php echo $GLOBALS['root']?></moz:SearchForm>
 </OpenSearchDescription>
index ba3e02ccac312509a7e0784c4909e9ee4e4e7075..f396b5eabbacfbd936fabd9dff362c09a0351f10 100644 (file)
 
 // Force HTTP authentication
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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
 if (isset($_REQUEST['url']) && (trim($_REQUEST['url']) != ''))
index 4ecbd7e7c5c856ad9fde22a8639ecd584c67d26e..4c280c7ac1ae972d127c33676e230729b2a311f3 100644 (file)
@@ -6,10 +6,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index d4962ff339c8629b0d21cf1e70590a314548bdb8..5f002d15039bf9c273eb4877d7ca9ba3e3acea7f 100644 (file)
@@ -4,10 +4,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index d24ba59b7e3f9c356c2d9f4779ca74d5011cd9c5..7ad332f50826c3e7439f5e79aafd5a07a63b457d 100644 (file)
@@ -8,10 +8,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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
index 34d192eb134ca67da772188d7c3327aaa1e38ef1..a6a61029e8c04842dffc8a2fb53fd6fcc172f3c1 100644 (file)
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index f7aa955de8c731f87a705d72c6a51ea5fa1c7c1c..2ade45ef8ed5ec9da8cd94839c09818b63ef9427 100644 (file)
@@ -6,10 +6,10 @@
 
 // Force HTTP authentication first!
 //require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index daa9d390c5c35991d5dd8265249e8d30663df49f..e8bc644a04fca91ebd46c0724d2c3ef692bfc078 100644 (file)
@@ -8,10 +8,10 @@ $countMax = 100;
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index 6ea50e2895cdd10030076169a38cf6982a974bd4..18e5676ea80b6da86abfe94b03fda28341a796b3 100644 (file)
@@ -6,10 +6,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index cee36ee56066e61c511021d64d951c38ec67a487..043b62909217c5d59bb5a29494a3e22ce3e26ad6 100644 (file)
@@ -6,10 +6,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* 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.
index dd16339366058010c0288e3e6d2881002c757068..bf78b39baea52ee3a3993e918aed1d7b558f909f 100644 (file)
@@ -6,10 +6,10 @@
 
 // Force HTTP authentication first!
 require_once('httpauth.inc.php');
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
 
 // Get the tag info.
 if (isset($_REQUEST['old']) && (trim($_REQUEST['old']) != ''))
index ac1890e0e6df80fb7ab22b917d2779ce1cd6d5f2..8a46313fe6a6cf267f237234f9e1f6cefc4fbf1f 100644 (file)
  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 */
-$bookmarkservice  = & ServiceFactory :: getServiceInstance('BookmarkService');
-$cdservice        = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
+$bookmarkservice  = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
+$cdservice        = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 91d09997c8037e5e4c0cafd270fbb08e505c0b63..32bdba03507ed76c1ac8519d157df4470f1343f8 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
index 005493d8a8872d4eaabb4b435fdc4392ec443672..6f30d3c04edb4cc76c618aedecd08a4ae1d84e59 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice = & ServiceFactory :: getServiceInstance('BookmarkService');
+$bookmarkservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark');
 
 /* Managing all possible inputs */
 isset($_POST['submitted']) ? define('POST_SUBMITTED', $_POST['submitted']): define('POST_SUBMITTED', '');
index e4599ad3ee12ed82091c05b34669e56fb53fbd46..80c02cbe007ce4ee421dc34fdc99e526a62a75c2 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-require_once('../header.inc.php');
+require_once '../../src/SemanticScuttle/header.php';
 
 if($GLOBALS['enableGoogleCustomSearch'] == false) {
     echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";
index 47839f40709c918f2deb05243b18cb12b4b8b962..aabc56aacfc76b373f29ad75bdf3fcb3904e6b3b 100644 (file)
@@ -1,4 +1,4 @@
-<?php require_once('../header.inc.php');
+<?php require_once '../../src/SemanticScuttle/header.php';
 
 if($GLOBALS['enableGoogleCustomSearch']==false) {
     echo "Google Custom Search disabled. You can enable it into the config.inc.php file.";
index b6765153063b8952f50333f4067973dfaca00a6d..a7c2024ff61dfa231c57d631dd5fe7b1da596f58 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
index d9ea00996db3bf847c27cfe611bf521dacc0a2c7..8f6e3869d83fe979d2b2927772fee444c9b38e67 100644 (file)
@@ -19,7 +19,7 @@
  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 */
 // No specific services
@@ -67,7 +67,7 @@ if ($userservice->isLoggedOn() && sizeof($_FILES) > 0 && $_FILES['userfile']['si
 function startElement($parser, $name, $attrs) {
        global $depth, $status, $tplVars, $userservice;
 
-       $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+       $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
 
        if ($name == 'POST') {
                while(list($attrTitle, $attrVal) = each($attrs)) {
index 4580429495c2662867118e4b3ef64f500803e2bb..ad5b414c524e522fbbfe88699b0eb78ff20d7df5 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
 
 
 /* Managing all possible inputs */
index 89780f5aeb4e6279331b8d183ca59c0357d45943..c5f5fa02c32bfd7778df2efbfcc79da0eb390dae 100644 (file)
  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 */
-$tag2tagservice =& ServiceFactory::getServiceInstance('Tag2TagService');
+$tag2tagservice =SemanticScuttle_Service_Factory::getServiceInstance('Tag2Tag');
 
 /* Managing current logged user */
 $currentUser = $userservice->getCurrentObjectUser();
index df55b0572e90b61c0c83b1091e74b6174b0d7e43..28bf678a61173563b85bcf4d2f6c7989fee76831 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['action']) ? define('GET_ACTION', $_GET['action']): define('GET_ACTION', '');
index 0e8b96af7cab6905b453cdeb73cdd9ad7d8b5e2c..474d45f434f58afb51b45bfcddc92c19ab416fe2 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 header('Content-Type: text/javascript');
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 require_once('functions.inc.php');
 $player_root = ROOT .'includes/player/';
 ?>
index 0fa820c0c92432ca93efcaeaa3cec02329c0b929..18d055fc39e1135924338ae8d156fcbba860fd34 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 
 /* Service creation: only useful services are created */
index ba7be8d0a2e64a658f45b97b94ecdf01c21269af..3a822c4d0ca9743d56d8bafb4861f6c5376c47fd 100644 (file)
@@ -18,7 +18,7 @@
  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 */
 // No specific services
index 6429bf772205e68f2ebb0789682f43decc89984f..2f501daeb2e89fecaf80cf5c144a5f232b7d8763 100644 (file)
  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 */
-$b2tservice =& ServiceFactory::getServiceInstance('Bookmark2TagService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$b2tservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark2Tag');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 @list($url, $user) = isset($_SERVER['PATH_INFO']) ? explode('/', $_SERVER['PATH_INFO']) : NULL;
 
index 2d001014297ba0d50819d8dda790890de6cd9e1b..0c2776e1673603db17d98d2b2426847ac29acea5 100644 (file)
@@ -19,7 +19,7 @@
  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 */
 // No specific services
index 3b64873cc036f5813399b3bd698cbcd135848b24..6a0e1beab385674aa31d0cb92076343eb4081374 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
 // No specific services
index 3a2b54aaffcad7a3faa0002d35f042c94578a4ed..672f4cdae3ffef144143ec82a368e730e3e03cd1 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 
 header('Content-Type: application/xml');
index ce47236800f4477bcf06eeb5afef2438809ba652..4a1505324de179f1bb60f92e4792e768c406bd67 100644 (file)
@@ -19,7 +19,7 @@
  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 */
 isset($_POST['terms']) ? define('POST_TERMS', $_POST['terms']): define('POST_TERMS', '');
@@ -36,8 +36,8 @@ if (POST_TERMS != '') {
        // GET
 } else {
        /* Service creation: only useful services are created */
-       $bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-       $searchhistoryservice =& ServiceFactory::getServiceInstance('SearchHistoryService');
+       $bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+       $searchhistoryservice =SemanticScuttle_Service_Factory::getServiceInstance('SearchHistory');
 
        /* Managing current logged user */
        $currentUserId = $userservice->getCurrentUserId();
index 15ee6af89cc47765ce1b3fd9e69bdce5a500ce30..cc1ecb4bfea8d8a22a6173558246baa91aabbe14 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
+$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 78016e7435366dcc1bfee27c072d3dd425ccb0bf..dd71a875b056bde6256e5be23f5399d23d3672a4 100644 (file)
  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 */
-$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
+$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index c707253c83e7c788e86093a13bb4ec25cfee42f1..750e5504909ecf6f109d92031d25cbbb2e01ffbf 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$tag2tagservice = & ServiceFactory :: getServiceInstance('Tag2TagService');
+$tag2tagservice = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
 
 
 /* Managing all possible inputs */
index aba7c433f34db91974143da04f33a6f52c1108ad..84ca5e3d65d7d5a0bfe9f5a8d6c8243a78a4d501 100644 (file)
  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 */
-$b2tservice       = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
-$cdservice        = & ServiceFactory :: getServiceInstance('CommonDescriptionService');
+$b2tservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+$cdservice        = SemanticScuttle_Service_Factory :: getServiceInstance('CommonDescription');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 61d2546c04398b3dc8ea92d1e71bdf40f9009025..9ba18fd7edea8025b6d6a34c9a2a6f8e455c168e 100644 (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
 ***************************************************************************/
 
-require_once('header.inc.php');
+require_once '../src/SemanticScuttle/header.php';
 
 /* Service creation: only useful services are created */
-$b2tservice = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
+$b2tservice = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
 
 
 /* Managing all possible inputs */
index e7b46a1d4514c6edd9d0d841d3a19c37e138a47a..5a3fbb489e3e0d64d8ed4233fd1cbca8de89dfbe 100644 (file)
  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 */
-$tagservice       = & ServiceFactory :: getServiceInstance('TagService');
+$tagservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index bead5e742668f688a700b3cff8eb8f989cf521d8..735e2e8e04e233b3a3efb3ce70630c80973f0594 100644 (file)
  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 */
-$b2tservice       = & ServiceFactory :: getServiceInstance('Bookmark2TagService');
-$tagservice   = & ServiceFactory :: getServiceInstance('TagService');
-$tag2tagservice   = & ServiceFactory :: getServiceInstance('Tag2tagService');
+$b2tservice       = SemanticScuttle_Service_Factory :: getServiceInstance('Bookmark2Tag');
+$tagservice   = SemanticScuttle_Service_Factory :: getServiceInstance('Tag');
+$tag2tagservice   = SemanticScuttle_Service_Factory :: getServiceInstance('Tag2Tag');
 
 /* Managing all possible inputs */
 isset($_POST['confirm']) ? define('POST_CONFIRM', $_POST['confirm']): define('POST_CONFIRM', '');
index 376d9fecb9880e5de2111b8672578de22f1596a9..52bf289d4d8b37b4a97096c089ac826cb864588e 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);
index a2fb606d6f18e04a4597098daded1700d981846b..39b82db0bc67e1e1a45a77e866e077c24816852b 100644 (file)
@@ -34,8 +34,8 @@ exit();
 /////////////////
 // This part below will be executed once you comment the two lines above
 /////////////////
-require_once('header.inc.php');
-$tagstatservice   = & ServiceFactory :: getServiceInstance('TagStatService');
+require_once '../src/SemanticScuttle/header.php';
+$tagstatservice   = SemanticScuttle_Service_Factory :: getServiceInstance('TagStat');
 ?>
 
 <h1>Upgrade</h1>
index e2689e6266309fac87b580f4b80180bd9cc1b554..111e5126750c2da93511e0c49b7ae6e1f7c03e39 100644 (file)
  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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing current logged user */
 $currentUser = $userservice->getCurrentObjectUser();
index 01a6bcc38bf25e81007763cdbd79e5182b97a952..64dd3169f14dec0dab97812a0807524d5e3a51c6 100644 (file)
@@ -19,7 +19,7 @@
  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 */
 //No specific services
index 87803959611a1624de08319d7734e06a85073e39..289a47852ad62dfe015822b210b3361d065234bb 100644 (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
 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 */
-$bookmarkservice =& ServiceFactory::getServiceInstance('BookmarkService');
-$cacheservice =& ServiceFactory::getServiceInstance('CacheService');
+$bookmarkservice =SemanticScuttle_Service_Factory::getServiceInstance('Bookmark');
+$cacheservice =SemanticScuttle_Service_Factory::getServiceInstance('Cache');
 
 /* Managing all possible inputs */
 isset($_GET['page']) ? define('GET_PAGE', $_GET['page']): define('GET_PAGE', 0);