Merge pull request #21 from STJrInuyasha/master

fixes for random shit
This commit is contained in:
Alex (Xkeeper)
2016-01-29 17:58:39 -08:00
4 changed files with 33 additions and 6 deletions

View File

@@ -7,8 +7,11 @@
// Awful old legacy thing. Too much code relies on register globals,
// and doesn't distinguish between _GET and _POST, so we have to do it here. fun
$id = filter_int($_POST['id']) ? $_POST['id'] : filter_int($_GET['id']);
$id = filter_int($_POST['id']);
if ($id === null)
$id = filter_int($_GET['id']);
if ($id === null)
$id = 0;
// Wait for the midnight backup to finish...
if ((int)date("Gi") < 5) {
@@ -402,6 +405,12 @@ function dotags($msg, $user, &$tags = array()) {
$tags = json_decode($tags, true);
}
if (empty($tags) && empty($user)) {
// settags sent us here and we have nothing to go off of.
// Shrug our shoulders, and move on.
return $msg;
}
if (empty($tags)) {
$tags = array(
'/me ' => "*<b>". $user['username'] ."</b> ",