Application cleanup

This commit is contained in:
Deon George
2013-05-10 20:48:10 +10:00
parent 970b2ef4f0
commit c0ba6d4e98
36 changed files with 284 additions and 544 deletions

View File

@@ -7,7 +7,6 @@
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
* @todo Rename to Record/ID.php
*/
class Model_Record_ID extends ORM_OSB {
protected $_primary_key = 'module_id';
@@ -16,7 +15,6 @@ class Model_Record_ID extends ORM_OSB {
protected $_created_column = FALSE;
protected $_updated_column = FALSE;
// @todo we need $mid here, since if there is no record, we cant figure out the module that called us.
public function next_id($mid) {
if (is_null($this->id)) {
$this->module_id = $mid;
@@ -34,7 +32,7 @@ class Model_Record_ID extends ORM_OSB {
$this->id++;
if (! $this->save())
throw new Koahan_Exception(_('Unable to increase ID for :table'),array(':table'=>$mid));
throw HTTP_Exception::factory(501,'Unable to increase ID for :table',array(':table'=>$mid));
return $this->id;
}