mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 12:48:24 +01:00
Developer/Debug mode media auto-scan added to theme configuration page. Checks and adds new theme images to media-manager.
This commit is contained in:
parent
fafb571bf3
commit
92323408dd
@ -934,6 +934,11 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
// print_a($_GET);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if($this->getAction() == 'youtube')
|
||||
{
|
||||
$parm = array('search' => $tp->filter($_GET['search']));
|
||||
|
@ -301,7 +301,15 @@ class theme_admin_ui extends e_admin_ui
|
||||
|
||||
public function MainPage()
|
||||
{
|
||||
return $this->renderThemeConfig('front');
|
||||
if(empty($_POST) && deftrue('e_DEVELOPER') || deftrue('e_DEBUG')) // check for new theme media and import.
|
||||
{
|
||||
$name = e107::getPref('sitetheme');
|
||||
e107::getMedia()->import('_common_image', e_THEME.$name, '', 'min-size=10000');
|
||||
e107::getMessage()->addInfo('Developer/Debug Mode: Scanning theme images folder for new media to import. ');
|
||||
}
|
||||
|
||||
$message = e107::getMessage()->render();
|
||||
return $message.$this->renderThemeConfig('front');
|
||||
}
|
||||
|
||||
public function AdminPage()
|
||||
|
@ -1825,7 +1825,7 @@ class themeHandler
|
||||
$mes = e107::getMessage();
|
||||
$frm = e107::getForm();
|
||||
$pref = e107::getConfig()->getPref();
|
||||
$mes->addDebug("Rendering Theme Config");
|
||||
e107::getDebug()->log("Rendering Theme Config");
|
||||
|
||||
$this->loadThemeConfig();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user