Optimised Service Display, extended SSL module functionality
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Database_MySQL extends Kohana_Database_MySQL {
|
||||
class Database_MySQLi extends Kohana_Database_MySQLi {
|
||||
// MySQL uses a backtick for identifiers
|
||||
protected $_identifier = '';
|
||||
}
|
21
application/classes/Database/Query/Builder/Join.php
Normal file
21
application/classes/Database/Query/Builder/Join.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class extends Kohana's [Database_Query_Builder_Join] to ensure that we have a site_id in join statements
|
||||
*
|
||||
* @package OSB
|
||||
* @category Helpers
|
||||
* @author Deon George
|
||||
* @copyright (c) 2009-2013 Open Source Billing
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
|
||||
class Database_Query_Builder_Join extends Kohana_Database_Query_Builder_Join {
|
||||
|
||||
public function compile($db = NULL) {
|
||||
$this->_on[] = array($this->_table.'.site_id','=',Site::id());
|
||||
|
||||
return parent::compile($db);
|
||||
}
|
||||
}
|
||||
?>
|
@@ -50,6 +50,10 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
return sprintf('%s-%04s',Company::instance()->site(TRUE),$this->id);
|
||||
}
|
||||
|
||||
public function activated() {
|
||||
return $this->has('group');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the groups that an account belongs to
|
||||
*/
|
||||
@@ -135,7 +139,7 @@ class Model_Account extends Model_Auth_UserDefault {
|
||||
if (empty($result[$mmo->id]))
|
||||
$result[$mmo->id] = $mmo;
|
||||
|
||||
Sort::MAsort($result,'module->name,menu_display');
|
||||
Sort::MAsort($result,array('module->name','menu_display'));
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
Reference in New Issue
Block a user