Second implementation with matrix_synapse_rest_auth #2

Merged
krombel merged 51 commits from second_implementation into master 2018-03-19 13:57:16 +01:00
5 changed files with 9 additions and 21 deletions
Showing only changes of commit b2842308b3 - Show all commits

View File

@@ -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) {

View File

@@ -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, note, verify_t
. " 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"];

View File

@@ -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();
}
?>

View File

@@ -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);
?>