Skip to content

Commit

Permalink
Fixing access specified on DboSource.
Browse files Browse the repository at this point in the history
  • Loading branch information
predominant committed Apr 11, 2010
1 parent 2e3d45c commit a4cf737
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions cake/libs/model/datasources/dbo_source.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ public function fetchAll($sql, $cache = true, $modelName = null) {
* @param array $resut REference to the fetched row * @param array $resut REference to the fetched row
* @return void * @return void
*/ */
function fetchVirtualField(&$result) { public function fetchVirtualField(&$result) {
if (isset($result[0]) && is_array($result[0])) { if (isset($result[0]) && is_array($result[0])) {
foreach ($result[0] as $field => $value) { foreach ($result[0] as $field => $value) {
if (strpos($field, '__') === false) { if (strpos($field, '__') === false) {
Expand Down Expand Up @@ -464,7 +464,7 @@ public function field($name, $sql) {
* *
* @return void * @return void
*/ */
function flushMethodCache() { public function flushMethodCache() {
$this->methodCache = array(); $this->methodCache = array();
} }


Expand All @@ -480,7 +480,7 @@ function flushMethodCache() {
* @param mixed $value The value to cache into memory. * @param mixed $value The value to cache into memory.
* @return mixed Either null on failure, or the value if its set. * @return mixed Either null on failure, or the value if its set.
*/ */
function cacheMethod($method, $key, $value = null) { public function cacheMethod($method, $key, $value = null) {
if ($this->cacheMethods === false) { if ($this->cacheMethods === false) {
return $value; return $value;
} }
Expand Down Expand Up @@ -590,7 +590,7 @@ public function getLog($sorted = false, $clear = true) {
* @param boolean $sorted Get the queries sorted by time taken, defaults to false. * @param boolean $sorted Get the queries sorted by time taken, defaults to false.
* @return void * @return void
*/ */
function showLog($sorted = false) { public function showLog($sorted = false) {
$log = $this->getLog($sorted, false); $log = $this->getLog($sorted, false);
if (empty($log['log'])) { if (empty($log['log'])) {
return; return;
Expand Down Expand Up @@ -735,7 +735,7 @@ public function create(&$model, $fields = null, $values = null) {
* @param integer $recursive Number of levels of association * @param integer $recursive Number of levels of association
* @return mixed boolean false on error/failure. An array of results on success. * @return mixed boolean false on error/failure. An array of results on success.
*/ */
function read(&$model, $queryData = array(), $recursive = null) { public function read(&$model, $queryData = array(), $recursive = null) {
$queryData = $this->__scrubQueryData($queryData); $queryData = $this->__scrubQueryData($queryData);


$null = null; $null = null;
Expand Down Expand Up @@ -875,7 +875,7 @@ function __filterResults(&$results, &$model, $filtered = array()) {
* @param integer $recursive Number of levels of association * @param integer $recursive Number of levels of association
* @param array $stack * @param array $stack
*/ */
function queryAssociation(&$model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) { public function queryAssociation(&$model, &$linkModel, $type, $association, $assocData, &$queryData, $external = false, &$resultSet, $recursive, $stack) {
if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) { if ($query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) {
if (!isset($resultSet) || !is_array($resultSet)) { if (!isset($resultSet) || !is_array($resultSet)) {
if (Configure::read() > 0) { if (Configure::read() > 0) {
Expand Down Expand Up @@ -1378,7 +1378,7 @@ public function getConstraint($type, $model, $linkModel, $alias, $assoc, $alias2
* @see DboSource::renderJoinStatement() * @see DboSource::renderJoinStatement()
* @see DboSource::buildStatement() * @see DboSource::buildStatement()
*/ */
function buildJoinStatement($join) { public function buildJoinStatement($join) {
$data = array_merge(array( $data = array_merge(array(
'type' => null, 'type' => null,
'alias' => null, 'alias' => null,
Expand All @@ -1404,7 +1404,7 @@ function buildJoinStatement($join) {
* @access public * @access public
* @see DboSource::renderStatement() * @see DboSource::renderStatement()
*/ */
function buildStatement($query, &$model) { public function buildStatement($query, &$model) {
$query = array_merge(array('offset' => null, 'joins' => array()), $query); $query = array_merge(array('offset' => null, 'joins' => array()), $query);
if (!empty($query['joins'])) { if (!empty($query['joins'])) {
$count = count($query['joins']); $count = count($query['joins']);
Expand Down Expand Up @@ -1862,7 +1862,7 @@ public function __scrubQueryData($data) {
* @param mixed $fields virtual fields to be used on query * @param mixed $fields virtual fields to be used on query
* @return array * @return array
*/ */
function _constructVirtualFields(&$model, $alias, $fields) { protected function _constructVirtualFields(&$model, $alias, $fields) {
$virtual = array(); $virtual = array();
foreach ($fields as $field) { foreach ($fields as $field) {
$virtualField = $this->name("{$alias}__{$field}"); $virtualField = $this->name("{$alias}__{$field}");
Expand Down Expand Up @@ -2527,7 +2527,7 @@ public function boolean($data) {
* @param string $fields * @param string $fields
* @param array $values * @param array $values
*/ */
protected function insertMulti($table, $fields, $values) { public function insertMulti($table, $fields, $values) {
$table = $this->fullTableName($table); $table = $this->fullTableName($table);
if (is_array($fields)) { if (is_array($fields)) {
$fields = implode(', ', array_map(array(&$this, 'name'), $fields)); $fields = implode(', ', array_map(array(&$this, 'name'), $fields));
Expand Down

0 comments on commit a4cf737

Please sign in to comment.