changeset 82:23b6bd897777 extractapp

book_id as string
author Zoe Hong <zhong@mpiwg-berlin.mpg.de>
date Thu, 23 Apr 2015 15:02:14 +0200
parents f1f849d31272
children 7b05275b7a70
files models/extractapp.php
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/models/extractapp.php	Thu Apr 23 14:58:27 2015 +0200
+++ b/models/extractapp.php	Thu Apr 23 15:02:14 2015 +0200
@@ -164,14 +164,16 @@
         }
         if (isset($_postdata['bookId'])) {
             $book_id = $_postdata['bookId'];
-            if ($book_id < 10000) {
+            if ($book_id > 10000) {
+                // pass
+            } else if ($book_id >= 1000) {
                 $book_id = '0'.(string)$book_id;
-            } else if ($book_id < 1000) {
+            } else {
                 $book_id = '00'.(string)$book_id;
             }
 
             $this->book_id = (string)$book_id;
-            
+
         }
         if (isset($_postdata['currentFileId'])) {
             $this->current_fileId = $_postdata['currentFileId'];