Revision 3731:3770620079d4,
977 bytes
checked in by franck <carnet.franck.paul@…>, 7 years ago
(diff) |
Simplify licence block at the beginning of each file
|
Line | |
---|
1 | <?php |
---|
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 | |
---|
12 | if (!defined('DC_CONTEXT_ADMIN')) {return;} |
---|
13 | |
---|
14 | l10n::set(dirname(__FILE__) . '/locales/' . $_lang . '/main'); |
---|
15 | $css_file = path::real($core->blog->public_path) . '/custom_style.css'; |
---|
16 | |
---|
17 | if (!is_file($css_file) && !is_writable(dirname($css_file))) { |
---|
18 | throw new Exception( |
---|
19 | sprintf(__('File %s does not exist and directory %s is not writable.'), |
---|
20 | $css_file, dirname($css_file)) |
---|
21 | ); |
---|
22 | } |
---|
23 | |
---|
24 | if (isset($_POST['css'])) { |
---|
25 | @$fp = fopen($css_file, 'wb'); |
---|
26 | fwrite($fp, $_POST['css']); |
---|
27 | fclose($fp); |
---|
28 | |
---|
29 | dcPage::message(__('Style sheet upgraded.'), true, true); |
---|
30 | } |
---|
31 | |
---|
32 | $css_content = is_file($css_file) ? file_get_contents($css_file) : ''; |
---|
33 | |
---|
34 | echo |
---|
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.