Changeset View
Changeset View
Standalone View
Standalone View
core/units/helpers/list_helper.php
Show First 20 Lines • Show All 145 Lines • ▼ Show 20 Line(s) | |||||
* @param kDBItem $object | * @param kDBItem $object | ||||
* @param string $list_prefix | * @param string $list_prefix | ||||
* @param bool $next | * @param bool $next | ||||
* @param string $select_fields | * @param string $select_fields | ||||
* @return int | * @return int | ||||
*/ | */ | ||||
function getNavigationResource(&$object, $list_prefix, $next = true, $select_fields = null) | function getNavigationResource(&$object, $list_prefix, $next = true, $select_fields = null) | ||||
{ | { | ||||
/** @var kDBList $list */ | |||||
$list = $this->Application->recallObject($list_prefix); | $list = $this->Application->recallObject($list_prefix); | ||||
/* @var $list kDBList */ | |||||
if ( !isset($select_fields) ) { | if ( !isset($select_fields) ) { | ||||
$select_fields = '%1$s.' . $object->IDField; | $select_fields = '%1$s.' . $object->IDField; | ||||
} | } | ||||
if ( is_array($select_fields) ) { | if ( is_array($select_fields) ) { | ||||
$select_fields = implode(', ', $select_fields); | $select_fields = implode(', ', $select_fields); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Line(s) | |||||
if ( $this->Application->isDebugMode() ) { | if ( $this->Application->isDebugMode() ) { | ||||
$this->Application->Debugger->appendHTML('Quering <strong>' . ($next ? 'next' : 'previous') . '</strong> item for "<strong>' . $list_prefix . '</strong>" list:'); | $this->Application->Debugger->appendHTML('Quering <strong>' . ($next ? 'next' : 'previous') . '</strong> item for "<strong>' . $list_prefix . '</strong>" list:'); | ||||
} | } | ||||
return $this->Conn->GetOne($sql); | return $this->Conn->GetOne($sql); | ||||
} | } | ||||
} | } | ||||
No newline at end of file | No newline at end of file |