Add edit_base* with admin/frontend folder file listing

Before it only listed files in current directory. Because of the hard
split select from both.
Add hostname/folder input (optional) to prefix files outside the same
folder.

Note: If no hostname/folder is set and two files in admin and frontend
have the same name they will be both highlighted as the point to the
same place.
This commit is contained in:
Clemens Schwaighofer
2019-12-11 16:08:00 +09:00
parent 8223441ca9
commit e439945a54
9 changed files with 110 additions and 35 deletions

View File

@@ -287,7 +287,11 @@ class Backend extends \CoreLibs\DB\IO
}
}
}
$url = isset($data['filename']) ? $data['filename'] : '';
$url = '';
if (isset($data['hostname']) && $data['hostname']) {
$url .= $data['hostname'];
}
$url .= isset($data['filename']) ? $data['filename'] : '';
if (strlen($query_string)) {
$url .= '?'.$query_string;
}
@@ -295,7 +299,11 @@ class Backend extends \CoreLibs\DB\IO
// if page name matchs -> set selected flag
$selected = 0;
if (isset($data['filename']) &&
$this->getPageName() == $data['filename']
$this->getPageName() == $data['filename'] &&
(!isset($data['hostname']) || (
isset($data['hostname']) &&
(!$data['hostname'] || strstr($data['hostname'], CONTENT_PATH) !== false)
))
) {
$selected = 1;
$this->page_name = $name;