Skip to content

Commit

Permalink
BackwardsCompatibilityBreak - Changed the separator between the table…
Browse files Browse the repository at this point in the history
… name and column name for related form inputs from . back to :: because PHP converts . to _ - this reverts changes in r264.
  • Loading branch information
wbond committed Apr 12, 2012
1 parent e36e968 commit fc757f0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions classes/fORMRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,14 @@ static public function determineRequestFilter($class, $related_class, $route)
$filter_table = $related_table;
$filter_table_with_route = $related_table . '{' . $route_name . '}';

$pk_field = $filter_table . '.' . $first_pk_column;
$pk_field_with_route = $filter_table_with_route . '.' . $first_pk_column;
$pk_field = $filter_table . '::' . $first_pk_column;
$pk_field_with_route = $filter_table_with_route . '::' . $first_pk_column;

if (!fRequest::check($pk_field) && fRequest::check($pk_field_with_route)) {
$filter_table = $filter_table_with_route;
}

return $filter_table . '.';
return $filter_table . '::';
}


Expand Down Expand Up @@ -309,7 +309,7 @@ static public function linkRecords($class, &$related_records, $related_class, $r
$relationship = fORMSchema::getRoute($table, $related_table, $route, 'many-to-many');

$field_table = $relationship['related_table'];
$field_column = '.' . $relationship['related_column'];
$field_column = '::' . $relationship['related_column'];

$field = $field_table . $field_column;
$field_with_route = $field_table . '{' . $route_name . '}' . $field_column;
Expand All @@ -322,7 +322,7 @@ static public function linkRecords($class, &$related_records, $related_class, $r
$record_set = fRecordSet::build(
$related_class,
array(
$field_with_route . '=' => fRequest::get($field, 'array', array())
str_replace('::', '.', $field_with_route) . '=' => fRequest::get($field, 'array', array())
)
);

Expand Down

0 comments on commit fc757f0

Please sign in to comment.