issue 26 Document status change with config.

old version coding with hard coding


git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8448 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ovclas 2011-06-03 08:51:55 +00:00
parent 0ba04bb1f7
commit e3376c3c3a
8 changed files with 45 additions and 20 deletions

View file

@ -11,6 +11,7 @@
// search option to use in admin page
var $search_option = array('title','content','title_content','user_name',); // /< Search options
var $statusList = array('private'=>'PRIVATE', 'public'=>'PUBLIC', 'secret'=>'SECRET', 'temp'=>'TEMP');
/**
* @brief Implement if additional tasks are necessary when installing
@ -262,5 +263,23 @@
FileHandler::removeFilesInDir(_XE_PATH_."files/cache/document_category");
}
/**
* @brief Document Status List
**/
function getStatusList()
{
return $this->statusList;
}
function getDefaultStatus()
{
return $this->statusList['public'];
}
function getConfigStatus($key)
{
if(array_key_exists($key, $this->statusList)) return $this->statusList[$key];
else $this->getDefaultStatus();
}
}
?>