|
4 | 4 | use ChamiloSession as Session; |
5 | 5 |
|
6 | 6 | /** |
7 | | - * This file allows creating audio files from a text. |
| 7 | + * This file allows creating audio files from a text. |
8 | 8 | * |
9 | | - * @package chamilo.document |
| 9 | + * @package chamilo.document |
10 | 10 | * |
11 | 11 | * @author Juan Carlos Raña Trabado |
12 | 12 | * @since 30/January/2011 |
13 | 13 | * @todo clean all file |
14 | 14 | */ |
15 | 15 |
|
16 | 16 | require_once __DIR__.'/../inc/global.inc.php'; |
17 | | -$_SESSION['whereami'] = 'document/createpaint'; |
18 | 17 | $this_section = SECTION_COURSES; |
19 | 18 | $nameTools = get_lang('PhotoRetouching'); |
20 | 19 | $groupRights = Session::read('group_member_with_upload_rights'); |
|
43 | 42 | $is_allowed_to_edit = api_is_allowed_to_edit(null, true); |
44 | 43 |
|
45 | 44 | //path for pixlr save |
46 | | -$_SESSION['paint_dir'] = Security::remove_XSS($dir); |
47 | | -if ($_SESSION['paint_dir'] == '/') { |
48 | | - $_SESSION['paint_dir'] = ''; |
| 45 | +$paintDir = Security::remove_XSS($dir); |
| 46 | +if ($paintDir == '/') { |
| 47 | + $paintDir = ''; |
49 | 48 | } |
50 | | -$_SESSION['paint_file'] = get_lang('NewImage'); |
| 49 | +Session::write('paint_dir', $paintDir); |
| 50 | +Session::write('paint_file', get_lang('NewImage')); |
51 | 51 |
|
52 | 52 | // Please, do not modify this dirname formatting |
53 | | - |
54 | 53 | if (strstr($dir, '..')) { |
55 | 54 | $dir = '/'; |
56 | 55 | } |
|
116 | 115 |
|
117 | 116 | // Interbreadcrumb for the current directory root path |
118 | 117 | if (empty($document_data['parents'])) { |
119 | | - $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
| 118 | + $interbreadcrumb[] = array('url' => '#', 'name' => $document_data['title']); |
120 | 119 | } else { |
121 | 120 | foreach ($document_data['parents'] as $document_sub_data) { |
122 | | - $interbreadcrumb[] = array('url' => $document_sub_data['document_url'], 'name' => $document_sub_data['title']); |
| 121 | + $interbreadcrumb[] = array( |
| 122 | + 'url' => $document_sub_data['document_url'], |
| 123 | + 'name' => $document_sub_data['title'] |
| 124 | + ); |
123 | 125 | } |
124 | 126 | } |
125 | 127 | Display :: display_header($nameTools, 'Doc'); |
126 | 128 |
|
127 | 129 | echo '<div class="actions">'; |
128 | 130 | echo '<a href="document.php?id='.$document_id.'">'. |
129 | | - Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('DocumentsOverview'), '', ICON_SIZE_MEDIUM).'</a>'; |
| 131 | + Display::return_icon( |
| 132 | + 'back.png', |
| 133 | + get_lang('BackTo').' '.get_lang('DocumentsOverview'), |
| 134 | + '', |
| 135 | + ICON_SIZE_MEDIUM |
| 136 | + ). |
| 137 | + '</a>'; |
130 | 138 | echo '</div>'; |
131 | 139 |
|
132 | 140 | // pixlr |
|
141 | 149 | $loc = $langpixlr; // deprecated ?? TODO:check pixlr read user browser |
142 | 150 |
|
143 | 151 | $exit_path = api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; |
144 | | -$_SESSION['exit_pixlr'] = $document_data['path']; |
| 152 | +Session::write('exit_pixlr', $document_data['path']); |
145 | 153 | $referrer = "Chamilo"; |
146 | 154 | $target_path = api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; |
147 | 155 | $target = $target_path; |
|
164 | 172 | } else { |
165 | 173 | $credentials = "false"; |
166 | 174 | } |
167 | | -$pixlr_url = api_get_protocol().'://pixlr.com/editor/?title='.$title.'&image='.$image.'&loc='.$loc.'&referrer='.$referrer.'&target='.$target.'&exit='.$exit_path.'&locktarget='.$locktarget.'&locktitle='.$locktitle.'&credentials='.$credentials; |
| 175 | +$pixlr_url = '//pixlr.com/editor/?title='.$title.'&image='.$image.'&loc='.$loc.'&referrer='.$referrer.'&target='.$target.'&exit='.$exit_path.'&locktarget='.$locktarget.'&locktitle='.$locktitle.'&credentials='.$credentials; |
168 | 176 | ?> |
169 | 177 | <script> |
170 | 178 |
|
|
0 commit comments