- added function setDMS()

- remove spaces
This commit is contained in:
steinm 2010-11-25 07:36:22 +00:00
parent aa0f628f77
commit 7a6e0a622f

View File

@ -37,18 +37,22 @@ function addKeywordCategory($owner, $name) {
return LetoDMS_KeywordCategory::addKeywordCategory($owner, $name); return LetoDMS_KeywordCategory::addKeywordCategory($owner, $name);
} }
//---------------------------------------------------------------------------------------------- //---------------------------------------------------------------------------
class LetoDMS_KeywordCategory class LetoDMS_KeywordCategory {
{
var $_id; var $_id;
var $_ownerID; var $_ownerID;
var $_name; var $_name;
var $_dms;
function LetoDMS_KeywordCategory($id, $ownerID, $name) function LetoDMS_KeywordCategory($id, $ownerID, $name) {
{
$this->_id = $id; $this->_id = $id;
$this->_name = $name; $this->_name = $name;
$this->_ownerID = $ownerID; $this->_ownerID = $ownerID;
$this->_dms = null;
}
function setDMS($dms) {
$this->_dms = $dms;
} }
function getKeywordCategory($id) { function getKeywordCategory($id) {
@ -137,8 +141,7 @@ class LetoDMS_KeywordCategory
return $this->_owner; return $this->_owner;
} }
function setName($newName) function setName($newName) {
{
GLOBAL $db; GLOBAL $db;
$queryStr = "UPDATE tblKeywordCategories SET name = '$newName' WHERE id = ". $this->_id; $queryStr = "UPDATE tblKeywordCategories SET name = '$newName' WHERE id = ". $this->_id;
@ -189,8 +192,7 @@ class LetoDMS_KeywordCategory
return $db->getResult($queryStr); return $db->getResult($queryStr);
} }
function remove() function remove() {
{
GLOBAL $db; GLOBAL $db;
$queryStr = "DELETE FROM tblKeywords WHERE category = " . $this->_id; $queryStr = "DELETE FROM tblKeywords WHERE category = " . $this->_id;