Skip to content
Extraits de code Groupes Projets
Valider 0595d8b7 rédigé par Benaka Moorthi's avatar Benaka Moorthi
Parcourir les fichiers

Fixing build.

parent ad685e9f
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -45,10 +45,6 @@ class Limit extends Filter
*/
public function filter($table)
{
if ($this->limit <= 0) {
return;
}
$table->setRowsCountBeforeLimitFilter();
if ($this->keepSummaryRow) {
......
......@@ -705,6 +705,12 @@ class ViewDataTable
$requestArray = array_merge($requestArray, $this->request_parameters_to_modify);
if (!empty($requestArray['filter_limit'])
&& $requestArray['filter_limit'] === 0
) {
unset($requestArray['filter_limit']);
}
return $requestArray;
}
......@@ -1254,4 +1260,4 @@ class ViewDataTable
{
return is_bool($value) ? (int)$value : $value;
}
}
}
\ No newline at end of file
......@@ -140,6 +140,11 @@ class SegmentEditorTest extends DatabaseTestCase
);
$newSegment = API::getInstance()->get($idSegment2);
// avoid test failures for when ts_created/ts_last_edit are different by between 1/2 secs
$this->removeSecondsFromSegmentInfo($updatedSegment);
$this->removeSecondsFromSegmentInfo($newSegment);
$this->assertEquals($newSegment, $updatedSegment);
// Check the other segmenet was not updated
......@@ -164,4 +169,14 @@ class SegmentEditorTest extends DatabaseTestCase
// and this should work
API::getInstance()->get($idSegment1);
}
private function removeSecondsFromSegmentInfo(&$segmentInfo)
{
$timestampProperties = array('ts_last_edit', 'ts_created');
foreach ($timestampProperties as $propertyName) {
if (isset($segmentInfo[$propertyName])) {
$segmentInfo[$propertyName] = substr($segmentInfo[$propertyName], 0, strlen($segmentInfo[$propertyName] - 2));
}
}
}
}
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter