From c471ac4bfecd86b753b246ec3737e0d7c19130e3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Nana?= <sebastien.nana@maarch.org>
Date: Fri, 20 Jan 2017 17:14:35 +0000
Subject: [PATCH] FIX

---
 attachments/trunk/frame_list_attachments.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/attachments/trunk/frame_list_attachments.php b/attachments/trunk/frame_list_attachments.php
index 7ff647d8fd7..2551142804b 100644
--- a/attachments/trunk/frame_list_attachments.php
+++ b/attachments/trunk/frame_list_attachments.php
@@ -103,14 +103,14 @@ if (isset($whereAttach) && $whereAttach <> '') $where .= $whereAttach;
     $order_field = $list->getOrderField();
     if (!empty($order_field) && !empty($order)){
         if($_REQUEST['order_field'] == 'identifier'){
-	        $orderstr = "order by regexp_replace(identifier, '[^a-zA-Z]', '', 'g') ".$order.", regexp_replace(identifier, '[^0-9]', '', 'g')::int"." ".$order;
+	        $orderstr = "order by regexp_replace(identifier, '[^a-zA-Z]', '', 'g') ".$order.", regexp_replace(identifier, '[^0-9]', '', 'g')::bigint"." ".$order;
 	    }else{
 	        $orderstr = "order by ".$order_field." ".$order;
 	    }
     } else  {
         $list->setOrder();
         $list->setOrderField('identifier');
-        $orderstr = "order by attachment_type asc, regexp_replace(identifier, '[^a-zA-Z]', '', 'g') DESC, regexp_replace(identifier, '[^0-9]', '', 'g')::int DESC";
+        $orderstr = "order by attachment_type asc, regexp_replace(identifier, '[^a-zA-Z]', '', 'g') DESC, regexp_replace(identifier, '[^0-9]', '', 'g')::bigint DESC";
     }
 
 $parameters = '';
@@ -380,4 +380,4 @@ if (isset($_REQUEST['load'])) {
 	$status = 0;
 
 	echo "{status : " . $status . ", content : '" . addslashes($debug.$content) . "', error : '" . addslashes($error) . "'}";
-}
\ No newline at end of file
+}
-- 
GitLab