1
0
Fork 0

optimize for php8

Dieser Commit ist enthalten in:
o.pinke 2023-07-19 18:59:11 +02:00
Ursprung e9d44453fb
Commit 606b832ce8
3 geänderte Dateien mit 27 neuen und 49 gelöschten Zeilen

Datei anzeigen

@ -77,17 +77,9 @@ class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract {
return;
}
if ($type == 'restrictive') {
$source = $this->_htaccessRestrictive;
} else {
$source = $this->_htaccessSimple;
}
$source = $type == 'restrictive' ? $this->_htaccessRestrictive : $this->_htaccessSimple;
if ($copy == 'contenido') {
$dest = $aInfo['contenido_full_path'] . '.htaccess';
} else {
$dest = $aInfo['client_full_path'] . '.htaccess';
}
$dest = $copy == 'contenido' ? $aInfo['contenido_full_path'] . '.htaccess' : $aInfo['client_full_path'] . '.htaccess';
if (!$result = @copy($source, $dest)) {
$this->_oView->content_before = $this->_notifyBox('info', 'Die .htaccess konnte nicht von ' . $source . ' nach ' . $dest . ' kopiert werden!');
@ -108,16 +100,12 @@ class ModRewrite_ContentExpertController extends ModRewrite_ControllerAbstract {
return;
}
if ($type == 'restrictive') {
$source = $this->_htaccessRestrictive;
} else {
$source = $this->_htaccessSimple;
}
$source = $type == 'restrictive' ? $this->_htaccessRestrictive : $this->_htaccessSimple;
$this->_oView->content = file_get_contents($source);
header('Content-Type: text/plain');
header('Etag: ' . md5(mt_rand()));
header('Etag: ' . md5(random_int(0, mt_getrandmax())));
header('Content-Disposition: attachment; filename="' . $type . '.htaccess"');
$this->render('{CONTENT}');
}