Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LC_Page_Admin_*_Ex のクラスパスが正常に取得できないのを修正 #553

Merged
merged 3 commits into from
Aug 3, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion data/class/SC_ClassAutoloader.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ public static function autoload($class, $plugin_upload_realdir = PLUGIN_UPLOAD_R
$arrClassNamePartTemp = $arrClassNamePart;
// FIXME クラスファイルのディレクトリ命名が変。変な現状に合わせて強引な処理をしてる。
$arrClassNamePartTemp[1] = $arrClassNamePartTemp[1] . '_extends';
$classpath .= strtolower(implode('/', array_slice($arrClassNamePartTemp, 1, -2))) . '/';
if ($count <= 5 && $arrClassNamePart[2] === 'Admin') {
$classpath .= strtolower(implode('/', array_slice($arrClassNamePartTemp, 1, -1))) . '/';
} else {
$classpath .= strtolower(implode('/', array_slice($arrClassNamePartTemp, 1, -2))) . '/';
}
} elseif ($arrClassNamePart[0] === 'SC' && $is_ex === false && $count >= 3) {
$classpath .= strtolower(implode('/', array_slice($arrClassNamePart, 1, -1))) . '/';
} elseif ($arrClassNamePart[0] === 'SC') {
Expand Down