mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +09:00
Remove reference to old themes in layout module
This commit is contained in:
parent
18401d2688
commit
d47dd2d824
1 changed files with 4 additions and 26 deletions
|
|
@ -81,11 +81,7 @@ class LayoutModel extends Layout
|
||||||
}
|
}
|
||||||
|
|
||||||
$token = explode('|@|', $val->layout);
|
$token = explode('|@|', $val->layout);
|
||||||
if(count($token) == 2)
|
if($layoutType == 'M')
|
||||||
{
|
|
||||||
$thumbnailPath = sprintf('./themes/%s/layouts/%s/thumbnail.png' , $token[0], $token[1]);
|
|
||||||
}
|
|
||||||
else if($layoutType == 'M')
|
|
||||||
{
|
{
|
||||||
$thumbnailPath = sprintf('./m.layouts/%s/thumbnail.png' , $val->layout);
|
$thumbnailPath = sprintf('./m.layouts/%s/thumbnail.png' , $val->layout);
|
||||||
}
|
}
|
||||||
|
|
@ -227,26 +223,13 @@ class LayoutModel extends Layout
|
||||||
*/
|
*/
|
||||||
public static function isExistsLayoutFile($layout, $layoutType)
|
public static function isExistsLayoutFile($layout, $layoutType)
|
||||||
{
|
{
|
||||||
//TODO If remove a support themes, remove this codes also.
|
|
||||||
if($layoutType == 'P')
|
if($layoutType == 'P')
|
||||||
{
|
{
|
||||||
$pathPrefix = RX_BASEDIR . 'layouts/';
|
$path = RX_BASEDIR . 'layouts/' . $layout;
|
||||||
$themePathFormat = RX_BASEDIR . 'themes/%s/layouts/%s';
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$pathPrefix = RX_BASEDIR . 'm.layouts/';
|
$path = RX_BASEDIR . 'm.layouts/' . $layout;
|
||||||
$themePathFormat = RX_BASEDIR . 'themes/%s/m.layouts/%s';
|
|
||||||
}
|
|
||||||
|
|
||||||
if(strpos($layout, '|@|') !== FALSE)
|
|
||||||
{
|
|
||||||
list($themeName, $layoutName) = explode('|@|', $layout);
|
|
||||||
$path = sprintf($themePathFormat, $themeName, $layoutName);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
$path = $pathPrefix . $layout;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file_exists($path . '/layout.html') && is_readable($path . '/layout.html'))
|
if (file_exists($path . '/layout.html') && is_readable($path . '/layout.html'))
|
||||||
|
|
@ -333,12 +316,7 @@ class LayoutModel extends Layout
|
||||||
*/
|
*/
|
||||||
public function getLayoutPath($layout_name = "", $layout_type = "P")
|
public function getLayoutPath($layout_name = "", $layout_type = "P")
|
||||||
{
|
{
|
||||||
$layout_parse = explode('|@|', $layout_name ?? '');
|
if($layout_name == 'faceoff')
|
||||||
if(count($layout_parse) > 1)
|
|
||||||
{
|
|
||||||
$class_path = './themes/'.$layout_parse[0].'/layouts/'.$layout_parse[1].'/';
|
|
||||||
}
|
|
||||||
else if($layout_name == 'faceoff')
|
|
||||||
{
|
{
|
||||||
$class_path = './modules/layout/faceoff/';
|
$class_path = './modules/layout/faceoff/';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue