Continue MMC
This commit is contained in:
@@ -147,26 +147,29 @@ class AUKController extends Controller
|
||||
$auks = array();
|
||||
$MMC_PATH = $project->mmc_path;
|
||||
|
||||
$mmc_dir = scandir($MMC_PATH);
|
||||
if(is_dir($MMC_PATH))
|
||||
{
|
||||
$mmc_dir = scandir($MMC_PATH);
|
||||
|
||||
foreach ($mmc_dir as $entry) {
|
||||
$course_path = $MMC_PATH . '/' . $entry;
|
||||
if (is_dir($course_path)) {
|
||||
if (intval($entry) > 0 && intval($entry) < 99) {
|
||||
$tmp_array = array();
|
||||
$tmp_array['auk_name'] = "АУК " . $entry;
|
||||
$tmp_array['auk_path'] = $entry;
|
||||
$tmp_array['image_dir'] = "";
|
||||
$mmc_course_dir = scandir($course_path);
|
||||
foreach ($mmc_course_dir as $course_entry) {
|
||||
if (strcasecmp($course_entry, 'images') == 0) {
|
||||
$course_image_path = $course_path . '/' . $course_entry;
|
||||
if (is_dir($course_image_path)) {
|
||||
$tmp_array['image_dir'] = $course_entry;
|
||||
foreach ($mmc_dir as $entry) {
|
||||
$course_path = $MMC_PATH . '/' . $entry;
|
||||
if (is_dir($course_path)) {
|
||||
if (intval($entry) > 0 && intval($entry) < 99) {
|
||||
$tmp_array = array();
|
||||
$tmp_array['auk_name'] = "АУК " . $entry;
|
||||
$tmp_array['auk_path'] = $entry;
|
||||
$tmp_array['image_dir'] = "";
|
||||
$mmc_course_dir = scandir($course_path);
|
||||
foreach ($mmc_course_dir as $course_entry) {
|
||||
if (strcasecmp($course_entry, 'images') == 0) {
|
||||
$course_image_path = $course_path . '/' . $course_entry;
|
||||
if (is_dir($course_image_path)) {
|
||||
$tmp_array['image_dir'] = $course_entry;
|
||||
}
|
||||
}
|
||||
}
|
||||
array_push($auks, $tmp_array);
|
||||
}
|
||||
array_push($auks, $tmp_array);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -199,7 +202,7 @@ class AUKController extends Controller
|
||||
'auk_name' => $auk_name,
|
||||
'auk_path' => $auk_path,
|
||||
'image_dir' => $image_dir,
|
||||
'parent_id' => null,
|
||||
'parent_id' => 0,
|
||||
]);
|
||||
$i++;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user