]> gitweb.fluxo.info Git - semanticscuttle.git/commitdiff
use dbservice in all services that need a db
authorcweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 24 Oct 2009 09:10:05 +0000 (09:10 +0000)
committercweiske <cweiske@b3834d28-1941-0410-a4f8-b48e95affb8f>
Sat, 24 Oct 2009 09:10:05 +0000 (09:10 +0000)
git-svn-id: https://semanticscuttle.svn.sourceforge.net/svnroot/semanticscuttle/trunk@406 b3834d28-1941-0410-a4f8-b48e95affb8f

src/SemanticScuttle/Service/Bookmark2Tag.php
src/SemanticScuttle/Service/CommonDescription.php
src/SemanticScuttle/Service/SearchHistory.php
src/SemanticScuttle/Service/Tag.php
src/SemanticScuttle/Service/Tag2Tag.php
src/SemanticScuttle/Service/TagCache.php
src/SemanticScuttle/Service/TagStat.php
src/SemanticScuttle/Service/User.php

index 07d75b94377c7703eb2f3f3cafaa40a2b29ceba8..2702acb11be8196276556572eea0f500b1f494b2 100644 (file)
@@ -1,9 +1,6 @@
 <?php
-class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
+class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_DbService
 {
-       var $tablename;
-
-
     /**
      * Returns the single service instance
      *
@@ -481,9 +478,5 @@ class SemanticScuttle_Service_Bookmark2Tag extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index ed1ffddfc49058557f92ed96c75fa01864499b70..92327c2cb0c0d79c41ea36d4afa9a82be878d27f 100644 (file)
@@ -1,8 +1,6 @@
 <?php
-class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_Service
+class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_DbService
 {
-       var $tablename;
-
     /**
      * Returns the single service instance
      *
@@ -170,8 +168,5 @@ class SemanticScuttle_Service_CommonDescription extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index 7cffa838711939a938606f0c309c0c7fff765b3f..b50d056c063f25eb6460290b186612306d41cf1a 100644 (file)
@@ -1,7 +1,6 @@
 <?php
-class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_Service
+class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_DbService
 {
-       var $tablename;
        var $sizeSearchHistory;
 
     /**
@@ -127,8 +126,5 @@ class SemanticScuttle_Service_SearchHistory extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index 2a70948ff4dfbded8d01cf240d32ed66e0e9bdf8..c8636409e4e8bf663b6556c8311bfa89d71073bd 100644 (file)
@@ -1,8 +1,6 @@
 <?php
-class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
+class SemanticScuttle_Service_Tag extends SemanticScuttle_DbService
 {
-       var $tablename;
-
     /**
      * Returns the single service instance
      *
@@ -95,7 +93,7 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
        }
 
        function renameTag($uId, $oldName, $newName) {
-               $newname = $this->normalize($newname);
+               $newname = $this->normalize($newName);
                
                $query = 'UPDATE `'. $this->getTableName() .'`';
                $query.= ' SET tag="'.$newName.'"';
@@ -126,8 +124,5 @@ class SemanticScuttle_Service_Tag extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index d283b5709276b1a2a740cbe881aebebc81facf16..41e26bf4f8ed5331a4dd30e337c65fd2b87bb6cd 100644 (file)
@@ -1,8 +1,6 @@
 <?php
-class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
+class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_DbService
 {
-       protected $tablename;
-
     /**
      * Returns the single service instance
      *
@@ -381,8 +379,5 @@ class SemanticScuttle_Service_Tag2Tag extends SemanticScuttle_Service
                $tsts->deleteAll();
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index 95f3ea80bda6732ae681e841fc082b696aff8c0a..7f5a1574e8cb9a5c49fd9648725982b6e8cd2b84 100644 (file)
@@ -10,9 +10,8 @@
  * The table must be updated for each modification of
  * the relations between tags.
  */
-class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
+class SemanticScuttle_Service_TagCache extends SemanticScuttle_DbService
 {
-       var $tablename;
 
     /**
      * Returns the single service instance
@@ -354,8 +353,5 @@ class SemanticScuttle_Service_TagCache extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index 1bb7b05674f7d1bc0cce9a4c1b64ec8286ac3790..0c0b70a352849a02c06c32a4ddaa10cb8e9833c7 100644 (file)
@@ -1,9 +1,6 @@
 <?php
-class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
+class SemanticScuttle_Service_TagStat extends SemanticScuttle_DbService
 {
-
-       var $tablename;
-
     /**
      * Returns the single service instance
      *
@@ -197,8 +194,5 @@ class SemanticScuttle_Service_TagStat extends SemanticScuttle_Service
                $this->db->sql_query($query);
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
 }
 ?>
index 49951d1d70397b910f4d4721d4c4dbe368b188cb..bc9ebfe21f656f88804043a2b46a685d0f1781f7 100644 (file)
@@ -1,13 +1,11 @@
 <?php
-class SemanticScuttle_Service_User extends SemanticScuttle_Service
+class SemanticScuttle_Service_User extends SemanticScuttle_DbService
 {
-       protected $db;
        protected $fields = array(
         'primary'   =>  'uId',
         'username'  =>  'username',
         'password'  =>  'password');
        protected $profileurl;
-       protected $tablename;
        protected $sessionkey;
        protected $cookiekey;
        protected $cookietime = 1209600; // 2 weeks
@@ -569,10 +567,6 @@ class SemanticScuttle_Service_User extends SemanticScuttle_Service
                return $_SESSION['sessionStable'] == 1;
        }
 
-       // Properties
-       function getTableName()       { return $this->tablename; }
-       function setTableName($value) { $this->tablename = $value; }
-
        function getFieldName($field)         { return $this->fields[$field]; }
        function setFieldName($field, $value) { $this->fields[$field] = $value; }