Added Service Add, some internal consistency updates
This commit is contained in:
@@ -68,7 +68,7 @@ class Config extends Kohana_Config {
|
||||
* Show a date using a site configured format
|
||||
*/
|
||||
public static function date($date) {
|
||||
return is_null($date) ? '' : date(Company::instance()->date_format(),$date);
|
||||
return (is_null($date) OR ! $date) ? '' : date(Company::instance()->date_format(),$date);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -52,9 +52,7 @@ abstract class Controller_TemplateDefault extends lnApp_Controller_TemplateDefau
|
||||
|
||||
protected function save(Model $o) {
|
||||
try {
|
||||
$o->save();
|
||||
|
||||
return $o->saved();
|
||||
return $o->save();
|
||||
|
||||
} catch (ORM_Validation_Exception $e) {
|
||||
SystemMessage::factory()
|
||||
|
@@ -202,7 +202,6 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
->where('company','like','%'.$term.'%')
|
||||
->or_where('first_name','like','%'.$term.'%')
|
||||
->or_where('last_name','like','%'.$term.'%')
|
||||
->or_where('email','like','%'.$term.'%')
|
||||
->where_close();
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ class Model_Setup extends ORM_OSB {
|
||||
|
||||
// Validation rules
|
||||
public function rules() {
|
||||
$r = Arr::merge(parent::rules(), array(
|
||||
$x = Arr::merge(parent::rules(), array(
|
||||
'url' => array(
|
||||
array('not_empty'),
|
||||
array('min_length', array(':value', 8)),
|
||||
@@ -36,9 +36,9 @@ class Model_Setup extends ORM_OSB {
|
||||
));
|
||||
|
||||
// This module doesnt use site_id.
|
||||
unset($r['site_id']);
|
||||
unset($x['site_id']);
|
||||
|
||||
return $r;
|
||||
return $x;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user