24 lines
705 B
PHP
24 lines
705 B
PHP
<?php defined('SYSPATH') or die('No direct access allowed.');
|
|
|
|
/**
|
|
* This class extends Kohana's [Database_Query_Builder_Insert] to ensure that we have a site_id included in the values
|
|
*
|
|
* @package lnAuth
|
|
* @category Helpers
|
|
* @author Deon George
|
|
* @copyright (c) 2009-2013 Deon George
|
|
* @license http://dev.leenooks.net/license.html
|
|
*/
|
|
|
|
abstract class lnAuth_Database_Query_Builder_Insert extends Kohana_Database_Query_Builder_Insert {
|
|
public function compile($db = NULL) {
|
|
$this->_columns = Arr::Merge($this->_columns,['site_id']);
|
|
|
|
foreach ($this->_values as $k=>$v)
|
|
$this->_values[$k] = Arr::Merge($this->_values[$k],[Site::id()]);
|
|
|
|
return parent::compile($db);
|
|
}
|
|
}
|
|
?>
|