mirror of
https://github.com/friendica/friendica
synced 2025-04-19 07:50:12 +00:00
Move mod/view to src/Module/View
This commit is contained in:
parent
d252598821
commit
d1d7fa394a
3 changed files with 33 additions and 27 deletions
32
src/Module/Theme.php
Normal file
32
src/Module/Theme.php
Normal file
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace Friendica\Module;
|
||||
|
||||
use Friendica\BaseModule;
|
||||
use Friendica\Util\Strings;
|
||||
|
||||
/**
|
||||
* load view/theme/$current_theme/style.php with friendica context
|
||||
*/
|
||||
class Theme extends BaseModule
|
||||
{
|
||||
public static function rawContent()
|
||||
{
|
||||
header("Content-Type: text/css");
|
||||
|
||||
$a = self::getApp();
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue