Perform regex check in is_valid_receipt (#655)

This commit is contained in:
jekkos committed 2016-06-16 17:40:26 +02:00
1 parent 86b22e7987
commit 9e675e81ec
2 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -6,7 +6,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
php5-apcu
RUN a2enmod rewrite
RUN docker-php-ext-install mysql mysqli
RUN docker-php-ext-install mysql mysqli bcmath
WORKDIR /app
COPY . /app
+3 -3
View File
@@ -251,9 +251,9 @@ class Receiving_lib
function is_valid_receipt($receipt_receiving_id)
{
//RECV #
$pieces = explode(' ',$receipt_receiving_id);
$pieces = explode(' ', $receipt_receiving_id);
if(count($pieces)==2)
if(count($pieces) == 2 && preg_match('/(RECV|KIT)/', $pieces[1]);
{
return $this->CI->Receiving->exists($pieces[1]);
}
@@ -262,7 +262,7 @@ class Receiving_lib
return $this->CI->Receiving->get_receiving_by_invoice_number($receipt_receiving_id)->num_rows() > 0;
}
return false;
return FALSE;
}
function is_valid_item_kit($item_kit_id)