Browse Source

Fixed some typos

master
giuliof 5 years ago
parent
commit
e0f6e5da99
  1. 16
      main.php
  2. 3
      shared.php

16
main.php

@ -100,13 +100,13 @@ if (isset ($row->callback_query)) {
switch ($callback_data){
case MSG_DELETE:
$sql = new mysqli('localhost', MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
$IDdelete = $mc->get($chatID.MC_DELETE_SCHEDULED_ID);
$IDdelete = $mc->get($chatID.MC_DELETE_SCHEDULED_ID) or error("No ID to delete");
$sql->query("DELETE FROM ".MYSQL_TABLE." WHERE ID=$IDdelete")
or error("Can't make the query, SQL error ".$sql->error);
$sql->close();
editMessageText($chatID, $inlineID, "Rimosso correttamente");
die();
break;
case '>':
$sql = new mysqli('localhost', MYSQL_USER, MYSQL_PASSWORD, MYSQL_DB);
@ -606,20 +606,18 @@ elseif (isset($row->message)) {
"inline_keyboard" => $container);
$reply = json_encode($resp);
if ($row[Text] != ''){
if ($row['Text'] != ''){
$text="$row[Text]\n_$row[Author]_"; // NOME CANALE ".API_CHANNEL_ID."?";
}
else
$text="Non testo puro";
$query = API_URL.API_TOKEN."/sendmessage?chat_id=".($chatID).
"&text=".urlencode($text).
"&parse_mode=".urlencode("Markdown").
"&reply_markup=".$reply;
$answer = file_get_contents($query);
$answer = sendMessage($chatID, $text, "Markdown", false, false, null, $reply);
$answer = json_decode($answer);
// Should forward the message if is not pure text
//forwardMessage($chatID, $row['ChatID'], $row['MessageID']);
forwardMessage(API_CHANNEL_ID, $row['ChatID'], $row['MessageID']);
$mc->set($chatID.MC_INLINE_ID, $answer->result->message_id)
or $mc->replace($chatID.MC_INLINE_ID, $answer->result->message_id);

3
shared.php

@ -98,7 +98,8 @@
"&message_id=" . urlencode($message_id).
"&text=" . urlencode($text);
if ($disable_web_page_preview != null) $query .= "&disable_web_page_preview=$disable_web_page_preview";
if ($parse_mode != null) $query .= "&parse_mode=$parse_mode";
if ($disable_web_page_preview != false) $query .= "&disable_web_page_preview=$disable_web_page_preview";
if ($reply_markup != null) $query .= "&reply_markup=$reply_markup";
$answer = file_get_contents($query);

Loading…
Cancel
Save