api: add support for setting score (bump api level to 16)
This commit is contained in:
parent
c26f58d8a5
commit
ef03f8188c
|
@ -1,7 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
class API extends Handler {
|
class API extends Handler {
|
||||||
|
|
||||||
const API_LEVEL = 15;
|
const API_LEVEL = 16;
|
||||||
|
|
||||||
const STATUS_OK = 0;
|
const STATUS_OK = 0;
|
||||||
const STATUS_ERR = 1;
|
const STATUS_ERR = 1;
|
||||||
|
@ -258,6 +258,10 @@ class API extends Handler {
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
$field = "note";
|
$field = "note";
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
|
$field = "score";
|
||||||
|
break;
|
||||||
};
|
};
|
||||||
|
|
||||||
switch ($mode) {
|
switch ($mode) {
|
||||||
|
@ -273,6 +277,7 @@ class API extends Handler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($field == "note") $set_to = $this->pdo->quote($data);
|
if ($field == "note") $set_to = $this->pdo->quote($data);
|
||||||
|
if ($field == "score") $set_to = (int) $data;
|
||||||
|
|
||||||
if ($field && $set_to && count($article_ids) > 0) {
|
if ($field && $set_to && count($article_ids) > 0) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue