Procházet zdrojové kódy

:bug: 新建文集设置可见性

visuddhinanda před 4 roky
rodič
revize
b69902d8de

+ 2 - 3
app/article/collect_add_dlg.js

@@ -12,9 +12,8 @@ function collect_add_dlg_init(div) {
 	html += "<div style='display:flex;justify-content: space-between;padding-top: 1em;'>";
 	html += "<div>";
 	html += "<select id='collect_add_dlg_status'>";
-	html += "<option value='1'>" + gLocal.gui.private + "</option>";
-	html += "<option value='2'>" + gLocal.gui.unlisted + "</option>";
-	html += "<option value='3'>" + gLocal.gui.public + "</option>";
+	html += "<option value='10'>" + gLocal.gui.private + "</option>";
+	html += "<option value='30'>" + gLocal.gui.public + "</option>";
 	html += "</select>";
 
 	html += "</div>";

+ 1 - 1
app/article/my_collect_put.php

@@ -26,7 +26,7 @@ PDO_Connect(""._FILE_DB_USER_ARTICLE_);
 $query="INSERT INTO collect ( id,  title  , subtitle  , summary , article_list   , owner, lang  , status  , create_time , modify_time , receive_time   )  VALUES  ( ? , ? , ? , ?  , ? , ? , ? , ? , ? , ? , ? ) ";
 $sth = $PDO->prepare($query);
 $uuid = UUID::v4();
-$sth->execute(array($uuid , $_POST["title"] , "" ,"", "[]" ,  $_COOKIE["userid"] , "" , 10 , mTime() ,  mTime() , mTime() ));
+$sth->execute(array($uuid , $_POST["title"] , "" ,"", "[]" ,  $_COOKIE["userid"] , "" , $_POST["status"] , mTime() ,  mTime() , mTime() ));
 $respond=array("status"=>0,"message"=>"");
 if (!$sth || ($sth && $sth->errorCode() != 0)) {
 	$error = PDO_ErrorInfo();