Browse Source

Merge pull request #371 from visuddhinanda/master

修正链接复制功能
visuddhinanda 5 years ago
parent
commit
815ec404fc
2 changed files with 5 additions and 3 deletions
  1. 1 1
      app/article/my_article.js
  2. 4 2
      app/pali_text/function.php

+ 1 - 1
app/article/my_article.js

@@ -63,7 +63,7 @@ function my_article_list() {
 						html += "</a></div>";
 						html += "<div style='flex:1;'>";
 						html +=
-							"<button class='icon_btn' onclick=\"copy_to_clipboard('www.wikipali.org/mint/app/article/?id=" +
+							"<button class='icon_btn' onclick=\"copy_to_clipboard('www.wikipali.org/app/article/?id=" +
 							iterator.id +
 							"')\" title='" +
 							gLocal.gui.copy_link +

+ 4 - 2
app/pali_text/function.php

@@ -68,20 +68,22 @@ class PaliBook extends Table
     }
 	
 	public function getBookTitle($book,$para){
+		/*
 		if($this->redis!==false){
 			$result = $this->redis->hGet("pali_text://book",$book."-".$para);
 			if($result!==FALSE){
 				return $result;
 			}
 		}
+		*/
 		$query = "select title from books where \"book\" = ? and \"paragraph\" = ? limit 0,1";
 		$stmt = $this->dbh->prepare($query);
 		$stmt->execute(array($book, $para));
 		$book = $stmt->fetch(PDO::FETCH_ASSOC);
 		if($book){
 			if($this->redis){
-				$this->redis->hSet("pali_text://book",$book."-".$para,$book["title"]);
-			}			
+				//$this->redis->hSet("pali_text://book",$book."-".$para,$book["title"]);
+			}
 			return $book["title"];
 		}
 		else{