diff --git a/src/SemanticScuttle/DbService.php b/src/SemanticScuttle/DbService.php new file mode 100644 index 0000000..875ee98 --- /dev/null +++ b/src/SemanticScuttle/DbService.php @@ -0,0 +1,67 @@ + + * @license GPL http://www.gnu.org/licenses/gpl.html + * @link http://sourceforge.net/projects/semanticscuttle + */ + +/** + * Base class for services utilizing the database. + * + * @category Bookmarking + * @package SemanticScuttle + * @author Christian Weiske + * @license GPL http://www.gnu.org/licenses/gpl.html + * @link http://sourceforge.net/projects/semanticscuttle + */ +class SemanticScuttle_DbService extends SemanticScuttle_Service +{ + /** + * Database object + * + * @var sql_db + */ + protected $db; + + + + /** + * Database table name + * + * @var string + */ + protected $tablename; + + + + /** + * Returns database table name + * + * @return string Table name + */ + public function getTableName() + { + return $this->tablename; + } + + + + /** + * Set the database table name + * + * @param string $value New table name + * + * @return void + */ + function setTableName($value) + { + $this->tablename = $value; + } + +} diff --git a/src/SemanticScuttle/Service/Bookmark.php b/src/SemanticScuttle/Service/Bookmark.php index fd88156..98259d7 100644 --- a/src/SemanticScuttle/Service/Bookmark.php +++ b/src/SemanticScuttle/Service/Bookmark.php @@ -1,8 +1,6 @@ attachTags( + $aok = $b2tservice->attachTags( $bId, $categories, $fromApi, $extension, false, $fromImport ); if (!$aok) { @@ -680,11 +678,6 @@ class SemanticScuttle_Service_Bookmark extends SemanticScuttle_Service $this->db->sql_query($query); } - - // Properties - function getTableName() { return $this->tablename; } - function setTableName($value) { $this->tablename = $value; } - } ?> diff --git a/src/SemanticScuttle/header.php b/src/SemanticScuttle/header.php index 0e8974a..44e8fb1 100644 --- a/src/SemanticScuttle/header.php +++ b/src/SemanticScuttle/header.php @@ -27,6 +27,7 @@ if(DEBUG_MODE) { // 2 // Second requirements part which could display bugs (must come after debug management) require_once 'SemanticScuttle/Service.php'; +require_once 'SemanticScuttle/DbService.php'; require_once 'SemanticScuttle/Service/Factory.php'; require_once 'SemanticScuttle/functions.php';