mirror of
https://git.code.sf.net/p/seeddms/code
synced 2026-01-23 01:29:14 +00:00
add getApiKey(), fix checkVersion()
This commit is contained in:
parent
c2b7e4d6c2
commit
3892a6186f
|
|
@ -475,7 +475,7 @@ class SeedDMS_Core_DMS {
|
|||
$this->lasterror = '';
|
||||
$this->version = '@package_version@';
|
||||
if($this->version[0] == '@')
|
||||
$this->version = '6.0.11';
|
||||
$this->version = '6.1.0';
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
|
|
@ -580,7 +580,7 @@ class SeedDMS_Core_DMS {
|
|||
$tbllist = explode(',',strtolower(join(',',$tbllist)));
|
||||
if(!array_search('tblversion', $tbllist))
|
||||
return false;
|
||||
$queryStr = "SELECT * FROM `tblVersion` order by `major`,`minor`,`subminor` WHERE `module`=".$this->db->qstr($module)." limit 1";
|
||||
$queryStr = "SELECT * FROM `tblVersion` WHERE `module`=".$this->db->qstr($module)." ORDER by `major`,`minor`,`subminor` LIMIT 1";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
|
@ -602,7 +602,7 @@ class SeedDMS_Core_DMS {
|
|||
$tbllist = explode(',',strtolower(join(',',$tbllist)));
|
||||
if(!array_search('tblversion', $tbllist))
|
||||
return true;
|
||||
$queryStr = "SELECT * FROM `tblVersion` order by `major`,`minor`,`subminor` WHERE `module`='core' limit 1";
|
||||
$queryStr = "SELECT * FROM `tblVersion` WHERE `module`='core' ORDER by `major`,`minor`,`subminor` LIMIT 1";
|
||||
$resArr = $this->db->getResultArray($queryStr);
|
||||
if (is_bool($resArr) && $resArr == false)
|
||||
return false;
|
||||
|
|
@ -2783,6 +2783,17 @@ class SeedDMS_Core_DMS {
|
|||
return $this->getRole($this->db->getInsertID('tblRoles'));
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get a apikey by its id
|
||||
*
|
||||
* @param integer $name name of key
|
||||
* @return object/boolean apikey or false if no role was found
|
||||
*/
|
||||
function getApiKey($id) { /* {{{ */
|
||||
$classname = $this->classnames['apikey'];
|
||||
return $classname::getInstance($id, $this);
|
||||
} /* }}} */
|
||||
|
||||
/**
|
||||
* Get a apikey by its key name
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user