Explorar o código

将路径反向

visuddhinanda@gmail.com %!s(int64=3) %!d(string=hai) anos
pai
achega
491fe01a5b
Modificáronse 1 ficheiros con 7 adicións e 1 borrados
  1. 7 1
      public/app/install/db_update_palitext_cli.php

+ 7 - 1
public/app/install/db_update_palitext_cli.php

@@ -226,6 +226,12 @@ for ($from=$_from-1; $from < $to; $from++) {
             $currParent = $title_data[$currParent-1]["parent"];
             $iLoop++;
         }
+        # 将路径反向
+        $path1 = [];
+        for ($i=count($path)-1; $i >=0 ; $i--) { 
+            # code...
+            $path1[] = $path[$i];
+        }
 
     $newData = array(
         $arrInserString[$iPar][3],
@@ -235,7 +241,7 @@ for ($from=$_from-1; $from < $to; $from++) {
         $prev,
         $parent,
         $iChapter_strlen,
-        json_encode($path),
+        json_encode($path1),
         $book,
         $paragraph,
     );