1
0
Fork 0

Move mod/pretheme to src/Module/ThemeDetails

This commit is contained in:
Philipp Holzer 2019-05-05 19:23:03 +02:00
commit 3f71a51d21
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
3 changed files with 34 additions and 25 deletions

View file

@ -1,25 +0,0 @@
<?php
use Friendica\App;
use Friendica\Core\Theme;
function pretheme_init(App $a) {
if ($_REQUEST['theme']) {
$theme = $_REQUEST['theme'];
$info = Theme::getInfo($theme);
if ($info) {
// unfortunately there will be no translation for this string
$desc = $info['description'];
$version = $info['version'];
$credits = $info['credits'];
} else {
$desc = '';
$version = '';
$credits = '';
}
echo json_encode(['img' => Theme::getScreenshot($theme), 'desc' => $desc, 'version' => $version, 'credits' => $credits]);
}
exit();
}