mirror of
https://github.com/claudehohl/Stikked.git
synced 2025-04-25 12:31:06 -05:00
fix codemirror syntax js
This commit is contained in:
parent
1fbcfb670f
commit
a928368479
@ -684,13 +684,22 @@ class Main extends CI_Controller
|
||||
$lang = $this->uri->segment(3);
|
||||
$this->load->config('codemirror_languages');
|
||||
$cml = $this->config->item('codemirror_languages');
|
||||
|
||||
//file path
|
||||
$file_path = 'themes/' . config_item('theme') . '/js/';
|
||||
|
||||
if (!file_exists($file_path))
|
||||
{
|
||||
$file_path = 'themes/default/js/';
|
||||
}
|
||||
|
||||
if (isset($cml[$lang]) && gettype($cml[$lang]) == 'array')
|
||||
{
|
||||
header('Content-Type: application/x-javascript; charset=utf-8');
|
||||
header('Expires: ' . gmdate('D, d M Y H:i:s \G\M\T', time() + 60 * 60 * 24 * 30));
|
||||
foreach ($cml[$lang]['js'] as $js)
|
||||
{
|
||||
echo file_get_contents('./static/js/' . $js[0]);
|
||||
echo file_get_contents($file_path . $js[0]);
|
||||
}
|
||||
}
|
||||
exit;
|
||||
|
Loading…
x
Reference in New Issue
Block a user