Revision 3731:3770620079d4,
977 bytes
checked in by franck <carnet.franck.paul@…>, 8 years ago
(diff) |
Simplify licence block at the beginning of each file
|
Rev | Line | |
---|
[0] | 1 | <?php |
---|
[3731] | 2 | /** |
---|
| 3 | * @brief Custom, a theme for Dotclear 2 |
---|
| 4 | * |
---|
| 5 | * @package Dotclear |
---|
| 6 | * @subpackage Themes |
---|
| 7 | * |
---|
| 8 | * @copyright Olivier Meunier & Association Dotclear |
---|
| 9 | * @copyright GPL-2.0-only |
---|
| 10 | */ |
---|
| 11 | |
---|
[3730] | 12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
[0] | 13 | |
---|
[3730] | 14 | l10n::set(dirname(__FILE__) . '/locales/' . $_lang . '/main'); |
---|
| 15 | $css_file = path::real($core->blog->public_path) . '/custom_style.css'; |
---|
[0] | 16 | |
---|
| 17 | if (!is_file($css_file) && !is_writable(dirname($css_file))) { |
---|
[3730] | 18 | throw new Exception( |
---|
| 19 | sprintf(__('File %s does not exist and directory %s is not writable.'), |
---|
| 20 | $css_file, dirname($css_file)) |
---|
| 21 | ); |
---|
[0] | 22 | } |
---|
| 23 | |
---|
[3730] | 24 | if (isset($_POST['css'])) { |
---|
| 25 | @$fp = fopen($css_file, 'wb'); |
---|
| 26 | fwrite($fp, $_POST['css']); |
---|
| 27 | fclose($fp); |
---|
[2566] | 28 | |
---|
[3730] | 29 | dcPage::message(__('Style sheet upgraded.'), true, true); |
---|
[0] | 30 | } |
---|
| 31 | |
---|
| 32 | $css_content = is_file($css_file) ? file_get_contents($css_file) : ''; |
---|
| 33 | |
---|
| 34 | echo |
---|
[3730] | 35 | '<p class="area"><label>' . __('Style sheet:') . '</label> ' . |
---|
| 36 | form::textarea('css', 60, 20, html::escapeHTML($css_content)) . '</p>'; |
---|
Note: See
TracBrowser
for help on using the repository browser.