mirror of
https://github.com/e107inc/e107.git
synced 2025-08-27 08:14:46 +02:00
Global shortcode override improvements, batch override examples added (phpDoc), work in progress, testing phase
This commit is contained in:
@@ -824,39 +824,38 @@ class system_tools
|
||||
$scList = '';
|
||||
|
||||
$fList = $f->get_files(e_CORE.'override/shortcodes/single', '\.php$');
|
||||
$scList = array();
|
||||
if(count($fList))
|
||||
{
|
||||
$tmp = array();
|
||||
foreach($fList as $file)
|
||||
{
|
||||
$tmp[] = strtoupper(substr($file['fname'], 0, -4));
|
||||
$scList[] = strtoupper(substr($file['fname'], 0, -4));
|
||||
}
|
||||
$scList = implode(',', $tmp);
|
||||
unset($tmp);
|
||||
$scList = implode(',', $scList);
|
||||
}
|
||||
$config->set('sc_override', $scList)->save(false);
|
||||
|
||||
|
||||
// core batch overrides
|
||||
$fList = $f->get_files(e_CORE.'override/shortcodes/batch', '\.php$');
|
||||
$scList = array();
|
||||
if(count($fList))
|
||||
{
|
||||
$tmp = array();
|
||||
foreach($fList as $file)
|
||||
{
|
||||
$tmp[] = substr($file['fname'], 0, -4);
|
||||
$scList[] = substr($file['fname'], 0, -4);
|
||||
}
|
||||
$scList = implode(',', $tmp);
|
||||
unset($tmp);
|
||||
$scList = implode(',', $scList);
|
||||
}
|
||||
|
||||
$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);
|
||||
// FIXME lan
|
||||
e107::getRender()->tablerender(
|
||||
DBLAN_56, DBLAN_57.': '
|
||||
'<strong>'.DBLAN_56, DBLAN_57.':</strong> '
|
||||
.($config->get('sc_override') ? '<br />'.$config->get('sc_override') : '(empty)')
|
||||
.'<br />Batch shortcodes: '
|
||||
.'<br /><br /><strong>Batch shortcodes:</strong>'
|
||||
.($config->get('sc_batch_override') ? '<br />'.$config->get('sc_batch_override') : '(empty)')
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user