2019-05-18 21:23:12 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Friendica\Module;
|
|
|
|
|
|
|
|
use Friendica\BaseModule;
|
2019-12-15 22:34:11 +01:00
|
|
|
use Friendica\DI;
|
2019-05-18 21:23:12 +02:00
|
|
|
use Friendica\Util\Strings;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* load view/theme/$current_theme/style.php with friendica context
|
|
|
|
*/
|
|
|
|
class Theme extends BaseModule
|
|
|
|
{
|
2019-11-05 22:48:54 +01:00
|
|
|
public static function rawContent(array $parameters = [])
|
2019-05-18 21:23:12 +02:00
|
|
|
{
|
|
|
|
header("Content-Type: text/css");
|
|
|
|
|
2019-12-15 22:34:11 +01:00
|
|
|
$a = DI::app();
|
2019-05-18 21:23:12 +02:00
|
|
|
|
|
|
|
if ($a->argc == 4) {
|
|
|
|
$theme = $a->argv[2];
|
|
|
|
$theme = Strings::sanitizeFilePathItem($theme);
|
|
|
|
|
|
|
|
// set the path for later use in the theme styles
|
|
|
|
$THEMEPATH = "view/theme/$theme";
|
|
|
|
if (file_exists("view/theme/$theme/style.php")) {
|
|
|
|
require_once("view/theme/$theme/style.php");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
exit();
|
|
|
|
}
|
|
|
|
}
|