mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +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);
|
// print_a($_GET);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if($this->getAction() == 'youtube')
|
if($this->getAction() == 'youtube')
|
||||||
{
|
{
|
||||||
$parm = array('search' => $tp->filter($_GET['search']));
|
$parm = array('search' => $tp->filter($_GET['search']));
|
||||||
|
@ -301,7 +301,15 @@ class theme_admin_ui extends e_admin_ui
|
|||||||
|
|
||||||
public function MainPage()
|
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()
|
public function AdminPage()
|
||||||
|
@ -1825,7 +1825,7 @@ class themeHandler
|
|||||||
$mes = e107::getMessage();
|
$mes = e107::getMessage();
|
||||||
$frm = e107::getForm();
|
$frm = e107::getForm();
|
||||||
$pref = e107::getConfig()->getPref();
|
$pref = e107::getConfig()->getPref();
|
||||||
$mes->addDebug("Rendering Theme Config");
|
e107::getDebug()->log("Rendering Theme Config");
|
||||||
|
|
||||||
$this->loadThemeConfig();
|
$this->loadThemeConfig();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user