|
|
|
|
@ -198,15 +198,15 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', ' |
|
|
|
|
break; |
|
|
|
|
case 'textarea': |
|
|
|
|
if ($row['variable'] == 'header_extra_content') { |
|
|
|
|
$file = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content'; |
|
|
|
|
$value = ''; |
|
|
|
|
if (file_exists($file)) { |
|
|
|
|
$value = file_get_contents($file); |
|
|
|
|
} |
|
|
|
|
$form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme); |
|
|
|
|
$file = api_get_path(SYS_PATH).api_get_home_path().'header_extra_content.txt'; |
|
|
|
|
$value = ''; |
|
|
|
|
if (file_exists($file)) { |
|
|
|
|
$value = file_get_contents($file); |
|
|
|
|
} |
|
|
|
|
$form->addElement('textarea', $row['variable'], array(get_lang($row['title']), get_lang($row['comment'])) , array('rows'=>'10','cols'=>'50'), $hideme); |
|
|
|
|
$default_values[$row['variable']] = $value; |
|
|
|
|
} elseif ($row['variable'] == 'footer_extra_content') { |
|
|
|
|
$file = api_get_path(SYS_PATH).api_get_home_path().'footer_extra_content'; |
|
|
|
|
$file = api_get_path(SYS_PATH).api_get_home_path().'footer_extra_content.txt'; |
|
|
|
|
$value = ''; |
|
|
|
|
if (file_exists($file)) { |
|
|
|
|
$value = file_get_contents($file); |
|
|
|
|
@ -422,12 +422,12 @@ if (!empty($_GET['category']) && !in_array($_GET['category'], array('Plugins', ' |
|
|
|
|
|
|
|
|
|
switch ($key) { |
|
|
|
|
case 'header_extra_content': |
|
|
|
|
file_put_contents(api_get_path(SYS_PATH).api_get_home_path().'/header_extra_content', $value); |
|
|
|
|
$value = api_get_home_path().'/header_extra_content'; |
|
|
|
|
file_put_contents(api_get_path(SYS_PATH).api_get_home_path().'/header_extra_content.txt', $value); |
|
|
|
|
$value = api_get_home_path().'/header_extra_content.txt'; |
|
|
|
|
break; |
|
|
|
|
case 'footer_extra_content': |
|
|
|
|
file_put_contents(api_get_path(SYS_PATH).api_get_home_path().'/footer_extra_content', $value); |
|
|
|
|
$value = api_get_home_path().'/footer_extra_content'; |
|
|
|
|
file_put_contents(api_get_path(SYS_PATH).api_get_home_path().'/footer_extra_content.txt', $value); |
|
|
|
|
$value = api_get_home_path().'/footer_extra_content.txt'; |
|
|
|
|
break; |
|
|
|
|
// URL validation for some settings. |
|
|
|
|
case 'InstitutionUrl': |
|
|
|
|
|