mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Merge branch 'develop' into db-search-operator
This commit is contained in:
commit
f8ed3b49f2
22 changed files with 132 additions and 81 deletions
|
|
@ -420,6 +420,11 @@ class DB
|
|||
$output = $this->setError(-1, $e->getMessage());
|
||||
return $output;
|
||||
}
|
||||
catch (\PDOException $e)
|
||||
{
|
||||
$output = $this->setError(-1, $e->getMessage());
|
||||
return $output;
|
||||
}
|
||||
|
||||
// Collect various counts used in the page calculation.
|
||||
list($is_expression, $list_count) = $query->navigation->list_count->getValue($args);
|
||||
|
|
@ -477,17 +482,24 @@ class DB
|
|||
return $stmt;
|
||||
}
|
||||
|
||||
$result = array();
|
||||
$index = $last_index;
|
||||
$step = $last_index !== 0 ? -1 : 1;
|
||||
|
||||
while ($row = $stmt->fetchObject())
|
||||
try
|
||||
{
|
||||
$result[$index] = $row;
|
||||
$index += $step;
|
||||
$result = array();
|
||||
$index = $last_index;
|
||||
$step = $last_index !== 0 ? -1 : 1;
|
||||
|
||||
while ($row = $stmt->fetchObject())
|
||||
{
|
||||
$result[$index] = $row;
|
||||
$index += $step;
|
||||
}
|
||||
|
||||
$stmt->closeCursor();
|
||||
}
|
||||
catch (\PDOException $e)
|
||||
{
|
||||
throw new Exceptions\DBError($e->getMessage(), 0, $e);
|
||||
}
|
||||
|
||||
$stmt->closeCursor();
|
||||
|
||||
if ($result_type === 'auto' && $last_index === 0 && count($result) === 1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -294,6 +294,11 @@ class VariableBase
|
|||
{
|
||||
list($is_expression, $value) = $this->getDefaultValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
$is_expression = null;
|
||||
$value = null;
|
||||
}
|
||||
|
||||
return [$is_expression, $value];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue