Merge in some desired changes from the statements_20090623 branch

git-svn-id: file:///svn-source/pmgr/branches/invoice_receipt_20090629@193 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-30 18:09:17 +00:00
parent 2b2991a13a
commit 0558c35ebc
2 changed files with 25 additions and 18 deletions

View File

@@ -78,6 +78,24 @@ class AppModel extends Model {
/**************************************************************************
**************************************************************************
**************************************************************************
* function: nameToID
* - Returns the ID of the named item
*/
function nameToID($name) {
$this->cacheQueries = true;
$item = $this->find('first', array
('recursive' => -1,
'conditions' => compact('name'),
));
$this->cacheQueries = false;
$item = current($item);
return $item['id'];
}
/**************************************************************************
**************************************************************************
**************************************************************************