1
0
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:
Cameron 2017-04-12 09:50:07 -07:00
parent fafb571bf3
commit 92323408dd
3 changed files with 15 additions and 2 deletions

View File

@ -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']));

View File

@ -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()

View File

@ -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();