Skip to content
Permalink
Browse files

Merge branch 'master' into server-fix-ip-address-display

  • Loading branch information...
andygrunwald committed Feb 20, 2019
2 parents 548d635 + 0754a13 commit e66aa780f0232a5f8890bf53c84d83e478657001
@@ -22,9 +22,11 @@ class Discord {
public function __construct($discordServerId = ''){
global $cfg,$func;
//Have a look first, if OpenSSL is enabled as module...
if (extension_loaded('openssl'))
{
if (!extension_loaded('openssl')) {
$func->error('OpenSSL-Modul nicht geladen!');
} else if (!ini_get('allow_url_fopen')) {
$func->error('allow_url_fopen nicht aktiv');
} else {
//Check if server id was passed via constructor, use configuration value otherwise
if ($discordServerId!=''){
$this->discordServerId = $disordServerId;
@@ -33,9 +35,6 @@ public function __construct($discordServerId = ''){
} else {
$func->error(t('Es wurde keine Discord Server ID konfiguriert oder übergeben'));
}
}
else {
$func->error('OpenSSL-Modul nicht geladen!');
}
}
@@ -795,6 +795,22 @@ public function envcheck()
}
$dsp->AddDoubleRow("FTP Library", $ftp_check);
// OpenSSL
if (extension_loaded('openssl')) {
$openssl_check = $ok;
} else {
$openssl_check = $not_possible . t('Auf deinem System konnte das PHP-Modul <b>OpenSSL</b> nicht gefunden werden. Dies hat zur Folge dass Module, die HTTPS Verbindungen zu anderen Servern aufbauen, nicht funktionieren');
}
$dsp->AddDoubleRow("OpenSSL", $openssl_check);
// allow_url_fopen
if (ini_get('allow_url_fopen')) {
$allowurlfopen_check = $ok;
} else {
$allowurlfopen_check = $not_possible . t('In deiner PHP Konfiguration ist <b>allow_url_fopen</b> nicht aktiviert. Dadurch können einige Module (z.B. Discord, Partylist) keine externen Verbindungen aufbauen und werden daher nicht funktionieren');
}
$dsp->AddDoubleRow("allow_url_fopen", $allowurlfopen_check);
$dsp->AddFieldSetEnd();
// Information
@@ -3559,116 +3559,26 @@
<it>Dettagli</it>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id></id>
<org></org>
<file>install</file>
</entry>
<entry>
<id>6907ea946b45f307548691a0a7d6f105</id>
<org>Auf deinem System konnte das PHP-Modul &lt;b&gt;OpenSSL&lt;/b&gt; nicht gefunden werden. Dies hat zur Folge dass Module, die HTTPS Verbindungen zu anderen Servern aufbauen, nicht funktionieren</org>
<en>The &lt;b&gt;OpenSSL&lt;/b&gt; PHP module was not found on your system. This will cause issues with modules that establish HTTPS connections to other servers</en>
<es>The &lt;b&gt;OpenSSL&lt;/b&gt; PHP module was not found on your system. This will cause issues with modules that establish HTTPS connections to other servers</es>
<fr>The &lt;b&gt;OpenSSL&lt;/b&gt; PHP module was not found on your system. This will cause issues with modules that establish HTTPS connections to other servers</fr>
<nl>The &lt;b&gt;OpenSSL&lt;/b&gt; PHP module was not found on your system. This will cause issues with modules that establish HTTPS connections to other servers</nl>
<it>The &lt;b&gt;OpenSSL&lt;/b&gt; PHP module was not found on your system. This will cause issues with modules that establish HTTPS connections to other servers</it>
<file>install</file>
</entry>
<entry>
<id>29a2d7fdd3ed7396ad1a30993edf6597</id>
<org>In deiner PHP Konfiguration ist &lt;b&gt;allow_url_fopen&lt;/b&gt; nicht aktiviert. Dadurch können einige Module (z.B. Discord, Partylist) keine externen Verbindungen aufbauen und werden daher nicht funktionieren</org>
<en>In your PHP configuration the setting &lt;b&gt;allow_url_fopen&lt;/b&gt; is not enabled. This will cause issues with modules (such as Discord, Partylist) that attempt to connect to external sites</en>
<es>In your PHP configuration the setting &lt;b&gt;allow_url_fopen&lt;/b&gt; is not enabled. This will cause issues with modules (such as Discord, Partylist) that attempt to connect to external sites</es>
<fr>In your PHP configuration the setting &lt;b&gt;allow_url_fopen&lt;/b&gt; is not enabled. This will cause issues with modules (such as Discord, Partylist) that attempt to connect to external sites</fr>
<nl>In your PHP configuration the setting &lt;b&gt;allow_url_fopen&lt;/b&gt; is not enabled. This will cause issues with modules (such as Discord, Partylist) that attempt to connect to external sites</nl>
<it>In your PHP configuration the setting &lt;b&gt;allow_url_fopen&lt;/b&gt; is not enabled. This will cause issues with modules (such as Discord, Partylist) that attempt to connect to external sites</it>
<file>install</file>
</entry>
</content>
</table>
</lansuite>
@@ -7,19 +7,26 @@
*/
function AddSignonStatus($lsurl, $show_history = 0)
{
global $xml, $dsp, $HTTPHeader, $func;
global $xml, $dsp, $func;
if (substr($lsurl, strlen($lsurl) - 1, 1) != '/') {
$lsurl .= '/';
}
if (substr($lsurl, 0, 7) != 'http://') {
if (substr($lsurl, 0, 7) != 'http://' && substr($lsurl, 0, 8) != 'https://') {
$lsurl = 'http://'. $lsurl;
}
$lsurl .= 'ext_inc/party_infos/infos.xml';
$content = GetSite($lsurl);
if (!$content) {
return '<div class="infolink" style="display:inline">'. t('infos.xml fehlt') .'<span class="infobox">'. $lsurl .HTML_NEWLINE.HTML_NEWLINE. str_replace("'", "\\'", str_replace('"', "'", str_replace("\r\n", HTML_NEWLINE, $HTTPHeader))) .'</span></div>';
$content_error = '';
if (!extension_loaded('openssl') && strpos($lsurl, 'https://')!==false) {
$content_error .= HTML_NEWLINE.t('Konfigurationsproblem: OpenSSL-Modul nicht geladen');
}
if (!ini_get('allow_url_fopen')) {
$content_error .= HTML_NEWLINE.t('Konfigurationsproblem: allow_url_fopen nicht aktiv');
}
return '<div class="infolink" style="display:inline">'. t('Fehler beim Datenabruf') . $content_error .'<span class="infobox">'. $lsurl .'</span></div>';
} else {
$system = $xml->get_tag_content_array('system', $content);
// Version 3.0 XML-File
@@ -3,51 +3,8 @@
/**
* @param string $url
* @return bool|string
* @todo fix this to use fopen or similar to handle HTTPS and redirects
*/
function GetSite($url)
{
global $HTTPHeader;
$url = @parse_url($url);
if (!$url['port']) {
$url['port'] = 80;
}
$url['host'] = trim($url['host']);
$url['path'] = trim($url['path']);
if (!$url['host'] or !$url['path']) {
$HTTPHeader = t('Hostname, oder Pfad fehlt');
return '';
}
try {
$fp = @fsockopen($url['host'], $url['port'], $errno, $errstr, 1);
} catch (Exception $e) {
// Ignore connection errors
}
if (!$fp) {
$HTTPHeader = $errno.': '.$errstr;
return '';
} else {
$cont = '';
fputs($fp, "GET {$url['path']} HTTP/1.0\r\nHost: {$url['host']}\r\n\r\n");
while (!feof($fp)) {
$line = fgets($fp, 128);
if ($line == '') {
break;
}
$cont .= $line;
}
fclose($fp);
$HTTPHeader = substr($cont, 0, strpos($cont, "\r\n\r\n"));
$StatusCode = substr($HTTPHeader, strpos($HTTPHeader, ' ') + 1, 3);
if ($StatusCode != 200) {
return '';
}
return substr($cont, strpos($cont, "\r\n\r\n") + 4);
}
return @file_get_contents($url, false, stream_context_create(array('http' => array('timeout' => 10))));
}
@@ -262,16 +262,6 @@
<it>Hostname o il percorso è mancante</it>
<file>partylist</file>
</entry>
<entry>
<id>e878032d6b4bb38bb67c824033583c2d</id>
<org>infos.xml fehlt</org>
<en>infos.xml missing</en>
<es>infos.xml desaparecidos</es>
<fr>infos.xml disparus</fr>
<nl>infos.xml vermist</nl>
<it>infos.xml mancanti</it>
<file>partylist</file>
</entry>
<entry>
<id>92b414b968c001a1d8358de2438d37d5</id>
<org>Noch keine Party angelegt</org>
@@ -392,6 +382,37 @@
<it>Nessuna voce</it>
<file>partylist</file>
</entry>
<entry>
<id>31c82656054fa9ec750f5deedccec884</id>
<org>Fehler beim Datenabruf</org>
<en>Error while retrieving data</en>
<es>Error al recuperar datos</es>
<fr>Erreur lors de la récupération des données</fr>
<nl>Fout tijdens het ophalen van gegevens</nl>
<it>Errore durante il recupero dei dati</it>
<file>partylist</file>
</entry>
<entry>
<id>f0fb3c160b2babab82fef748e09411a3</id>
<org>Konfigurationsproblem: OpenSSL-Modul nicht geladen</org>
<en>Configuration problem: OpenSSL module not loaded</en>
<es>Configuration problem: OpenSSL module not loaded</es>
<fr>Configuration problem: OpenSSL module not loaded</fr>
<nl>Configuration problem: OpenSSL module not loaded</nl>
<it>Configuration problem: OpenSSL module not loaded</it>
<file>partylist</file>
</entry>
<entry>
<id>b52e743a00f414c366f87db86928e143</id>
<org>Konfigurationsproblem: allow_url_fopen nicht aktiv</org>
<en>Configuration problem: allow_url_fopen not enabled</en>
<es>Configuration problem: allow_url_fopen not enabled</es>
<fr>Configuration problem: allow_url_fopen not enabled</fr>
<nl>Configuration problem: allow_url_fopen not enabled</nl>
<it>Configuration problem: allow_url_fopen not enabled</it>
<file>partylist</file>
</entry>

</content>
</table>
</lansuite>
@@ -8,7 +8,7 @@
if (substr($row['ls_url'], strlen($row['ls_url']) - 1, 1) != '/') {
$row['ls_url'] .= '/';
}
if (substr($row['ls_url'], 0, 7) != 'http://') {
if (substr($row['ls_url'], 0, 7) != 'http://' && substr($row['ls_url'], 0, 8) != 'https://') {
$row['ls_url'] = 'http://'. $row['ls_url'];
}
header('Location: '. $row['ls_url'] . 'index.php?mod=signon');
@@ -62,7 +62,7 @@
p.partyid = %int%", $_GET['partyid']);
$framework->AddToPageTitle($row["name"]);
if (substr($row['url'], 0, 7) != 'http://') {
if (substr($row['url'], 0, 7) != 'http://' && substr($row['url'], 0, 8) != 'https://') {
$row['url'] = 'http://'. $row['url'];
}
@@ -404,7 +404,7 @@
$dl_button = $dsp->FetchIcon("fullscreen", $js_full_link, t('Vollbild'));
}
$full_button = $dsp->FetchIcon("download", "index.php?mod=picgallery&action=download&design=base&picurl={$_GET["file"]}", t('Bild herrunterladen'));
($auth[type] > "1") ? $del_button = $dsp->FetchIcon("delete", "index.php?mod=picgallery&action=delete&file={$_GET["file"]}", t('Bild l&ouml;schen')) : $del_button = "";
($auth['type'] > "1") ? $del_button = $dsp->FetchIcon("delete", "index.php?mod=picgallery&action=delete&file={$_GET["file"]}", t('Bild l&ouml;schen')) : $del_button = "";
$note_button = $dsp->FetchIcon("add", "index.php?mod=picgallery&action=download&design=base&picurl={$_GET["file"]}", t('Verlinkung hinzufügen'));

0 comments on commit e66aa78

Please sign in to comment.
You can’t perform that action at this time.