Changeset View
Changeset View
Standalone View
Standalone View
branches/5.2.x/core/units/helpers/brackets_helper.php
Show First 20 Lines • Show All 353 Lines • ▼ Show 20 Line(s) | |||||
else { // this is when ok - add to end_values list | else { // this is when ok - add to end_values list | ||||
$end_values[] = $record[$this->max_field]; | $end_values[] = $record[$this->max_field]; | ||||
} | } | ||||
} | } | ||||
// sort brackets by 2nd column (Max values) | // sort brackets by 2nd column (Max values) | ||||
uasort($temp, Array (&$this, 'compareBrackets')); | uasort($temp, Array (&$this, 'compareBrackets')); | ||||
reset($temp); | reset($temp); | ||||
$first_item = each($temp); | |||||
$first_item_key = $first_item['key']; | |||||
$linked_info = $object->getLinkedInfo(); | $linked_info = $object->getLinkedInfo(); | ||||
$sql = 'SELECT %s FROM %s WHERE %s = %s'; | $sql = 'SELECT %s FROM %s WHERE %s = %s'; | ||||
$ids = $this->Conn->GetCol( sprintf($sql, $object->IDField, $object->TableName, $linked_info['ForeignKey'], $linked_info['ParentId']) ); | $ids = $this->Conn->GetCol( sprintf($sql, $object->IDField, $object->TableName, $linked_info['ForeignKey'], $linked_info['ParentId']) ); | ||||
if ( is_array($ids) ) { | if ( is_array($ids) ) { | ||||
usort($ids, Array (&$this, 'sortBracketIDs')); | usort($ids, Array (&$this, 'sortBracketIDs')); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 105 Lines • Show Last 20 Lines |