remove abort(); change lang-def de => de-de; cleanup
This commit is contained in:
@@ -90,8 +90,7 @@ class MatrixConnection
|
||||
return $this->exec_curl_request($handle);
|
||||
}
|
||||
|
||||
function exec_curl_request($handle)
|
||||
{
|
||||
function exec_curl_request($handle) {
|
||||
$response = curl_exec($handle);
|
||||
|
||||
if ($response === false) {
|
||||
|
||||
3
cron.php
3
cron.php
@@ -1,6 +1,4 @@
|
||||
<?php
|
||||
// This file is meant to do tasks that failed on the first attempt
|
||||
|
||||
require_once("config.php");
|
||||
require_once("mail_templates.php");
|
||||
require_once("database.php");
|
||||
@@ -13,7 +11,6 @@ $sql = "SELECT id, first_name, last_name, username, email, state, verify_token F
|
||||
. " OR state = " . RegisterState::RegistrationDeclined
|
||||
. " OR state = " . RegisterState::AllDone . ";";
|
||||
foreach ($db->query($sql) as $row) {
|
||||
// will only be executed once
|
||||
$first_name = $row["first_name"];
|
||||
$last_name = $row["last_name"];
|
||||
$username = $row["username"];
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
function abort($msg="Unknown")
|
||||
{
|
||||
header("403 Forbidden");
|
||||
$response = array(
|
||||
"success" => false,
|
||||
"message" => $msg
|
||||
);
|
||||
echo json_encode($response);
|
||||
print("\n");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
11
language.php
11
language.php
@@ -1,7 +1,12 @@
|
||||
<?php
|
||||
$lang = "de";
|
||||
$lang = "de-de";
|
||||
if(isset($_GET['lang'])){
|
||||
$lang = $_GET['lang'];
|
||||
$lang = filter_var($_GET['lang'], FILTER_SANITIZE_STRING);
|
||||
}
|
||||
require_once("lang/lang.".$lang.".php");
|
||||
$lang_file = "lang/lang.".$lang.".php";
|
||||
if (!file_exists($lang_file)) {
|
||||
throw new Exception("Translation for " . $lang . " not found");
|
||||
}
|
||||
require_once($lang_file);
|
||||
unset($lang_file);
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user