Просмотр исходного кода

Merge branch 'master' of https://github.com/iapt-platform/mint

bhikkhu-kosalla-china 4 лет назад
Родитель
Сommit
a16f32c28d
1 измененных файлов с 1 добавлено и 27 удалено
  1. 1 27
      app/studio/get_res_json.php

+ 1 - 27
app/studio/get_res_json.php

@@ -43,33 +43,7 @@ PDO_Connect(_FILE_DB_RESRES_INDEX_);
 
 
 $res = array();
 $res = array();
 //查书
 //查书
-if ($paragraph == -1) {
-    //相关专辑
-    $query = "select * from album where album.book='$book' ";
-    $Fetch_ather = PDO_FetchAll($query);
-    $iFetchAther = count($Fetch_ather);
-    if ($iFetchAther > 0) {
-        foreach ($Fetch_ather as $one_album) {
-            array_push($res, array("book" => $book,
-                "album_id" => $one_album["id"],
-                "paragraph" => -1,
-                "type" => $one_album["type"],
-                "title" => $one_album["title"],
-                "author" => $one_album["author"],
-            ));
-            if ($one_album["type"] == 1) {
-                array_push($res, array("book" => $book,
-                    "album_id" => $one_album["id"],
-                    "paragraph" => -1,
-                    "type" => 6,
-                    "title" => $one_album["title"],
-                    "author" => $one_album["author"],
-                ));
-            }
-        }
-    }
-    //相关专辑结束
-} else {
+if ($paragraph > 0){
     //查书中的一个段
     //查书中的一个段
     PDO_Connect(_FILE_DB_RESRES_INDEX_);
     PDO_Connect(_FILE_DB_RESRES_INDEX_);
     $query = "SELECT * from \""._TABLE_RES_INDEX_."\" where book='{$book}' and paragraph='{$paragraph}' and type < '5' ";
     $query = "SELECT * from \""._TABLE_RES_INDEX_."\" where book='{$book}' and paragraph='{$paragraph}' and type < '5' ";