1
0
mirror of https://github.com/e107inc/e107.git synced 2025-09-08 21:30:54 +02:00

Scan overrides looking at the proper location for override batch/shortcode; shortcode handler now respects override settings; admin shortcodes are not auto loaded anymore

This commit is contained in:
SecretR
2013-02-08 16:49:57 +02:00
parent d6825155ea
commit 65d8985571
2 changed files with 84 additions and 38 deletions

View File

@@ -819,24 +819,46 @@ class system_tools
$mes = e107::getMessage();
$f = e107::getFile();
$config = e107::getConfig();
$scList = '';
$fList = $f->get_files(e_CORE.'override/shortcodes', '\.sc$');
$fList = $f->get_files(e_CORE.'override/shortcodes/single', '\.php$');
if(count($fList))
{
$tmp = array();
foreach($fList as $file)
{
$tmp[] = strtoupper(substr($file['fname'], 0, -3));
$tmp[] = strtoupper(substr($file['fname'], 0, -4));
}
$scList = implode(',', $tmp);
unset($tmp);
}
$pref['sc_override'] = $scList;
save_prefs();
$config->set('sc_override', $scList)->save(false);
$fList = $f->get_files(e_CORE.'override/shortcodes/batch', '\.php$');
if(count($fList))
{
$tmp = array();
foreach($fList as $file)
{
$tmp[] = substr($file['fname'], 0, -4);
}
$scList = implode(',', $tmp);
unset($tmp);
}
$config->set('sc_batch_override', $scList)->save(false);
//$pref['sc_override'] = $scList;
//save_prefs();
// $mes->add(DBLAN_57.':<br />'.$pref['sc_override'], E_MESSAGE_SUCCESS);
e107::getRender()->tablerender(DBLAN_56, DBLAN_57.':<br />'.$pref['sc_override']);
// FIXME lan
e107::getRender()->tablerender(
DBLAN_56, DBLAN_57.': '
.($config->get('sc_override') ? '<br />'.$config->get('sc_override') : '(empty)')
.'<br />Batch shortcodes: '
.($config->get('sc_batch_override') ? '<br />'.$config->get('sc_batch_override') : '(empty)')
);
}
/**