@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('array_unique_multi')) { |
|
2 | +if (!function_exists('array_unique_multi')) { |
|
3 | 3 | /** |
4 | 4 | * @param array $array |
5 | 5 | * @param string $checkKey |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | } |
28 | 28 | } |
29 | 29 | |
30 | -if(!function_exists('record_sort')) { |
|
30 | +if (!function_exists('record_sort')) { |
|
31 | 31 | /** |
32 | 32 | * @param array $array |
33 | 33 | * @param string $key |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('add_dot')) { |
|
2 | +if (!function_exists('add_dot')) { |
|
3 | 3 | /** |
4 | 4 | * @param array $array |
5 | 5 | * @return array |
@@ -8,14 +8,14 @@ discard block |
||
8 | 8 | { |
9 | 9 | $count = count($array); |
10 | 10 | for ($i = 0; $i < $count; $i++) { |
11 | - $array[$i] = '.' . strtolower(trim($array[$i])); // add a dot :) |
|
11 | + $array[$i] = '.'.strtolower(trim($array[$i])); // add a dot :) |
|
12 | 12 | } |
13 | 13 | |
14 | 14 | return $array; |
15 | 15 | } |
16 | 16 | } |
17 | 17 | |
18 | -if(!function_exists('determineIcon')) { |
|
18 | +if (!function_exists('determineIcon')) { |
|
19 | 19 | /** |
20 | 20 | * @param string $file |
21 | 21 | * @param string $selFile |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | $icon = isset($icons[$mode]) ? $icons[$mode] : $icons['default']; |
35 | 35 | } |
36 | 36 | |
37 | - return '<i class="' . $icon . ' FilesPage"></i>'; |
|
37 | + return '<i class="'.$icon.' FilesPage"></i>'; |
|
38 | 38 | } |
39 | 39 | } |
40 | 40 | |
41 | -if(!function_exists('markRow')) { |
|
41 | +if (!function_exists('markRow')) { |
|
42 | 42 | /** |
43 | 43 | * @param string $file |
44 | 44 | * @param string $selFile |
@@ -55,14 +55,14 @@ discard block |
||
55 | 55 | if ($file == $selFile) { |
56 | 56 | $class = isset($classNames[$mode]) ? $classNames[$mode] : $classNames['default']; |
57 | 57 | |
58 | - return ' class="' . $class . '"'; |
|
58 | + return ' class="'.$class.'"'; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | return ''; |
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | -if(!function_exists('ls')) { |
|
65 | +if (!function_exists('ls')) { |
|
66 | 66 | /** |
67 | 67 | * @param string $curpath |
68 | 68 | */ |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | global $excludes, $protected_path, $editablefiles, $inlineviewablefiles, $viewablefiles, $enablefileunzip, $enablefiledownload, $uploadablefiles, $folders, $files, $filesizes, $len, $dirs_array, $files_array, $webstart_path, $modx; |
73 | 73 | $dircounter = 0; |
74 | 74 | $filecounter = 0; |
75 | - $curpath = str_replace('//', '/', $curpath . '/'); |
|
75 | + $curpath = str_replace('//', '/', $curpath.'/'); |
|
76 | 76 | |
77 | 77 | if (!is_dir($curpath)) { |
78 | 78 | echo 'Invalid path "', $curpath, '"<br />'; |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | // first, get info |
85 | 85 | foreach ($dir as $file) { |
86 | - $newpath = $curpath . $file; |
|
86 | + $newpath = $curpath.$file; |
|
87 | 87 | if ($file === '..' || $file === '.') { |
88 | 88 | continue; |
89 | 89 | } |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | if ($file === '..' || $file === '.') { |
94 | 94 | continue; |
95 | 95 | } elseif (!in_array($file, $excludes) && !in_array($newpath, $protected_path)) { |
96 | - $dirs_array[$dircounter]['text'] = '<i class="' . $_style['files_folder'] . ' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path=' . urlencode($newpath) . '"><b>' . $file . '</b></a>'; |
|
96 | + $dirs_array[$dircounter]['text'] = '<i class="'.$_style['files_folder'].' FilesFolder"></i> <a href="index.php?a=31&mode=drill&path='.urlencode($newpath).'"><b>'.$file.'</b></a>'; |
|
97 | 97 | |
98 | 98 | $dfiles = scandir($newpath); |
99 | 99 | foreach ($dfiles as $i => $infile) { |
@@ -106,13 +106,13 @@ discard block |
||
106 | 106 | } |
107 | 107 | $file_exists = (0 < count($dfiles)) ? 'file_exists' : ''; |
108 | 108 | |
109 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\'' . urlencode($file) . '\',\'' . $file_exists . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></a>' : ''; |
|
109 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<a href="javascript: deleteFolder(\''.urlencode($file).'\',\''.$file_exists.'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></a>' : ''; |
|
110 | 110 | } else { |
111 | - $dirs_array[$dircounter]['text'] = '<span><i class="' . $_style['files_deleted_folder'] . ' FilesDeletedFolder"></i> ' . $file . '</span>'; |
|
112 | - $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_folder'] . '"></i></span>' : ''; |
|
111 | + $dirs_array[$dircounter]['text'] = '<span><i class="'.$_style['files_deleted_folder'].' FilesDeletedFolder"></i> '.$file.'</span>'; |
|
112 | + $dirs_array[$dircounter]['delete'] = is_writable($curpath) ? '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_folder'].'"></i></span>' : ''; |
|
113 | 113 | } |
114 | 114 | |
115 | - $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" title="' . $_lang['rename'] . '"></i></a> ' : ''; |
|
115 | + $dirs_array[$dircounter]['rename'] = is_writable($curpath) ? '<a href="javascript:renameFolder(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" title="'.$_lang['rename'].'"></i></a> ' : ''; |
|
116 | 116 | |
117 | 117 | // increment the counter |
118 | 118 | $dircounter++; |
@@ -121,24 +121,24 @@ discard block |
||
121 | 121 | $files_array[$filecounter]['file'] = $newpath; |
122 | 122 | $files_array[$filecounter]['stats'] = lstat($newpath); |
123 | 123 | $files_array[$filecounter]['text'] = determineIcon($newpath, $_REQUEST['path'], |
124 | - $_REQUEST['mode']) . ' ' . $file; |
|
124 | + $_REQUEST['mode']).' '.$file; |
|
125 | 125 | $files_array[$filecounter]['view'] = (in_array($type, |
126 | - $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\'' . $webstart_path . substr($newpath, |
|
126 | + $viewablefiles)) ? '<a href="javascript:;" onclick="viewfile(\''.$webstart_path.substr($newpath, |
|
127 | 127 | $len, |
128 | - strlen($newpath)) . '\');"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : (($enablefiledownload && in_array($type, |
|
129 | - $uploadablefiles)) ? '<a href="' . $webstart_path . implode('/', array_map('rawurlencode', |
|
128 | + strlen($newpath)).'\');"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : (($enablefiledownload && in_array($type, |
|
129 | + $uploadablefiles)) ? '<a href="'.$webstart_path.implode('/', array_map('rawurlencode', |
|
130 | 130 | explode('/', substr($newpath, $len, |
131 | - strlen($newpath))))) . '" style="cursor:pointer;"><i class="' . $_style['files_download'] . '" title="' . $_lang['file_download_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></span>'); |
|
131 | + strlen($newpath))))).'" style="cursor:pointer;"><i class="'.$_style['files_download'].'" title="'.$_lang['file_download_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></span>'); |
|
132 | 132 | $files_array[$filecounter]['view'] = (in_array($type, |
133 | - $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path=' . urlencode($newpath) . '"><i class="' . $_style['files_view'] . '" title="' . $_lang['files_viewfile'] . '"></i></a>' : $files_array[$filecounter]['view']; |
|
134 | - $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_unzip'] . '" title="' . $_lang['file_download_unzip'] . '"></i></a>' : ''; |
|
133 | + $inlineviewablefiles)) ? '<a href="index.php?a=31&mode=view&path='.urlencode($newpath).'"><i class="'.$_style['files_view'].'" title="'.$_lang['files_viewfile'].'"></i></a>' : $files_array[$filecounter]['view']; |
|
134 | + $files_array[$filecounter]['unzip'] = ($enablefileunzip && $type == '.zip') ? '<a href="javascript:unzipFile(\''.urlencode($file).'\');"><i class="'.$_style['files_unzip'].'" title="'.$_lang['file_download_unzip'].'"></i></a>' : ''; |
|
135 | 135 | $files_array[$filecounter]['edit'] = (in_array($type, |
136 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path=' . urlencode($newpath) . '#file_editfile"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_edit'] . '" title="' . $_lang['files_editfile'] . '"></i></span>'; |
|
136 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="index.php?a=31&mode=edit&path='.urlencode($newpath).'#file_editfile"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_edit'].'" title="'.$_lang['files_editfile'].'"></i></span>'; |
|
137 | 137 | $files_array[$filecounter]['duplicate'] = (in_array($type, |
138 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_duplicate'] . '" title="' . $_lang['duplicate'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_duplicate'] . '" align="absmiddle" title="' . $_lang['duplicate'] . '"></i></span>'; |
|
138 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:duplicateFile(\''.urlencode($file).'\');"><i class="'.$_style['files_duplicate'].'" title="'.$_lang['duplicate'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_duplicate'].'" align="absmiddle" title="'.$_lang['duplicate'].'"></i></span>'; |
|
139 | 139 | $files_array[$filecounter]['rename'] = (in_array($type, |
140 | - $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_rename'] . '" align="absmiddle" title="' . $_lang['rename'] . '"></i></span>'; |
|
141 | - $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\'' . urlencode($file) . '\');"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></a>' : '<span class="disabled"><i class="' . $_style['files_delete'] . '" title="' . $_lang['file_delete_file'] . '"></i></span>'; |
|
140 | + $editablefiles) && is_writable($curpath) && is_writable($newpath)) ? '<a href="javascript:renameFile(\''.urlencode($file).'\');"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_rename'].'" align="absmiddle" title="'.$_lang['rename'].'"></i></span>'; |
|
141 | + $files_array[$filecounter]['delete'] = is_writable($curpath) && is_writable($newpath) ? '<a href="javascript:deleteFile(\''.urlencode($file).'\');"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></a>' : '<span class="disabled"><i class="'.$_style['files_delete'].'" title="'.$_lang['file_delete_file'].'"></i></span>'; |
|
142 | 142 | |
143 | 143 | // increment the counter |
144 | 144 | $filecounter++; |
@@ -151,9 +151,9 @@ discard block |
||
151 | 151 | for ($i = 0; $i < $folders; $i++) { |
152 | 152 | $filesizes += $dirs_array[$i]['stats']['7']; |
153 | 153 | echo '<tr>'; |
154 | - echo '<td>' . $dirs_array[$i]['text'] . '</td>'; |
|
155 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($dirs_array[$i]['stats']['9']) . '</td>'; |
|
156 | - echo '<td class="text-right">' . $modx->nicesize($dirs_array[$i]['stats']['7']) . '</td>'; |
|
154 | + echo '<td>'.$dirs_array[$i]['text'].'</td>'; |
|
155 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($dirs_array[$i]['stats']['9']).'</td>'; |
|
156 | + echo '<td class="text-right">'.$modx->nicesize($dirs_array[$i]['stats']['7']).'</td>'; |
|
157 | 157 | echo '<td class="actions text-right">'; |
158 | 158 | echo $dirs_array[$i]['rename']; |
159 | 159 | echo $dirs_array[$i]['delete']; |
@@ -166,10 +166,10 @@ discard block |
||
166 | 166 | sort($files_array); // sorting the array alphabetically (Thanks pxl8r!) |
167 | 167 | for ($i = 0; $i < $files; $i++) { |
168 | 168 | $filesizes += $files_array[$i]['stats']['7']; |
169 | - echo '<tr ' . markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']) . '>'; |
|
170 | - echo '<td>' . $files_array[$i]['text'] . '</td>'; |
|
171 | - echo '<td class="text-nowrap">' . $modx->toDateFormat($files_array[$i]['stats']['9']) . '</td>'; |
|
172 | - echo '<td class="text-right">' . $modx->nicesize($files_array[$i]['stats']['7']) . '</td>'; |
|
169 | + echo '<tr '.markRow($files_array[$i]['file'], $_REQUEST['path'], $_REQUEST['mode']).'>'; |
|
170 | + echo '<td>'.$files_array[$i]['text'].'</td>'; |
|
171 | + echo '<td class="text-nowrap">'.$modx->toDateFormat($files_array[$i]['stats']['9']).'</td>'; |
|
172 | + echo '<td class="text-right">'.$modx->nicesize($files_array[$i]['stats']['7']).'</td>'; |
|
173 | 173 | echo '<td class="actions text-right">'; |
174 | 174 | echo $files_array[$i]['unzip']; |
175 | 175 | echo $files_array[$i]['view']; |
@@ -185,7 +185,7 @@ discard block |
||
185 | 185 | } |
186 | 186 | } |
187 | 187 | |
188 | -if(!function_exists('removeLastPath')) { |
|
188 | +if (!function_exists('removeLastPath')) { |
|
189 | 189 | /** |
190 | 190 | * @param string $string |
191 | 191 | * @return bool|string |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | } |
204 | 204 | } |
205 | 205 | |
206 | -if(!function_exists('getExtension')) { |
|
206 | +if (!function_exists('getExtension')) { |
|
207 | 207 | /** |
208 | 208 | * @param string $string |
209 | 209 | * @return bool|string |
@@ -222,7 +222,7 @@ discard block |
||
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
225 | -if(!function_exists('checkExtension')) { |
|
225 | +if (!function_exists('checkExtension')) { |
|
226 | 226 | /** |
227 | 227 | * @param string $path |
228 | 228 | * @return bool |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | } |
240 | 240 | } |
241 | 241 | |
242 | -if(!function_exists('mkdirs')) { |
|
242 | +if (!function_exists('mkdirs')) { |
|
243 | 243 | /** |
244 | 244 | * recursive mkdir function |
245 | 245 | * |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | } |
262 | 262 | } |
263 | 263 | |
264 | -if(!function_exists('logFileChange')) { |
|
264 | +if (!function_exists('logFileChange')) { |
|
265 | 265 | /** |
266 | 266 | * @param string $type |
267 | 267 | * @param string $filename |
@@ -297,7 +297,7 @@ discard block |
||
297 | 297 | } |
298 | 298 | } |
299 | 299 | |
300 | -if(!function_exists('unzip')) { |
|
300 | +if (!function_exists('unzip')) { |
|
301 | 301 | /** |
302 | 302 | * by patrick_allaert - php user notes |
303 | 303 | * |
@@ -321,17 +321,17 @@ discard block |
||
321 | 321 | $zip = zip_open($file); |
322 | 322 | if ($zip) { |
323 | 323 | $old_umask = umask(0); |
324 | - $path = rtrim($path, '/') . '/'; |
|
324 | + $path = rtrim($path, '/').'/'; |
|
325 | 325 | while ($zip_entry = zip_read($zip)) { |
326 | 326 | if (zip_entry_filesize($zip_entry) > 0) { |
327 | 327 | // str_replace must be used under windows to convert "/" into "\" |
328 | 328 | $zip_entry_name = zip_entry_name($zip_entry); |
329 | - $complete_path = $path . str_replace('\\', '/', dirname($zip_entry_name)); |
|
330 | - $complete_name = $path . str_replace('\\', '/', $zip_entry_name); |
|
329 | + $complete_path = $path.str_replace('\\', '/', dirname($zip_entry_name)); |
|
330 | + $complete_name = $path.str_replace('\\', '/', $zip_entry_name); |
|
331 | 331 | if (!file_exists($complete_path)) { |
332 | 332 | $tmp = ''; |
333 | 333 | foreach (explode('/', $complete_path) AS $k) { |
334 | - $tmp .= $k . '/'; |
|
334 | + $tmp .= $k.'/'; |
|
335 | 335 | if (!is_dir($tmp)) { |
336 | 336 | mkdir($tmp, 0777); |
337 | 337 | } |
@@ -352,14 +352,14 @@ discard block |
||
352 | 352 | } |
353 | 353 | } |
354 | 354 | |
355 | -if(!function_exists('rrmdir')) { |
|
355 | +if (!function_exists('rrmdir')) { |
|
356 | 356 | /** |
357 | 357 | * @param string $dir |
358 | 358 | * @return bool |
359 | 359 | */ |
360 | 360 | function rrmdir($dir) |
361 | 361 | { |
362 | - foreach (glob($dir . '/*') as $file) { |
|
362 | + foreach (glob($dir.'/*') as $file) { |
|
363 | 363 | if (is_dir($file)) { |
364 | 364 | rrmdir($file); |
365 | 365 | } else { |
@@ -371,7 +371,7 @@ discard block |
||
371 | 371 | } |
372 | 372 | } |
373 | 373 | |
374 | -if(!function_exists('fileupload')) { |
|
374 | +if (!function_exists('fileupload')) { |
|
375 | 375 | /** |
376 | 376 | * @return string |
377 | 377 | */ |
@@ -401,13 +401,13 @@ discard block |
||
401 | 401 | $userfile['type'] = $_FILES['userfile']['type'][$i]; |
402 | 402 | |
403 | 403 | // this seems to be an upload action. |
404 | - $path = $modx->config['site_url'] . substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
405 | - $path = rtrim($path, '/') . '/' . $userfile['name']; |
|
404 | + $path = $modx->config['site_url'].substr($startpath, strlen($filemanager_path), strlen($startpath)); |
|
405 | + $path = rtrim($path, '/').'/'.$userfile['name']; |
|
406 | 406 | $msg .= $path; |
407 | 407 | if ($userfile['error'] == 0) { |
408 | 408 | $img = (strpos($userfile['type'], |
409 | - 'image') !== false) ? '<br /><img src="' . $path . '" height="75" />' : ''; |
|
410 | - $msg .= "<p>" . $_lang['files_file_type'] . $userfile['type'] . ", " . $modx->nicesize(filesize($userfile['tmp_name'])) . $img . '</p>'; |
|
409 | + 'image') !== false) ? '<br /><img src="'.$path.'" height="75" />' : ''; |
|
410 | + $msg .= "<p>".$_lang['files_file_type'].$userfile['type'].", ".$modx->nicesize(filesize($userfile['tmp_name'])).$img.'</p>'; |
|
411 | 411 | } |
412 | 412 | |
413 | 413 | $userfilename = $userfile['tmp_name']; |
@@ -415,15 +415,15 @@ discard block |
||
415 | 415 | if (is_uploaded_file($userfilename)) { |
416 | 416 | // file is uploaded file, process it! |
417 | 417 | if (!checkExtension($userfile['name'])) { |
418 | - $msg .= '<p><span class="warning">' . $_lang['files_filetype_notok'] . '</span></p>'; |
|
418 | + $msg .= '<p><span class="warning">'.$_lang['files_filetype_notok'].'</span></p>'; |
|
419 | 419 | } else { |
420 | - if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'] . '/' . $userfile['name'])) { |
|
420 | + if (@move_uploaded_file($userfile['tmp_name'], $_POST['path'].'/'.$userfile['name'])) { |
|
421 | 421 | // Ryan: Repair broken permissions issue with file manager |
422 | 422 | if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') { |
423 | - @chmod($_POST['path'] . "/" . $userfile['name'], $new_file_permissions); |
|
423 | + @chmod($_POST['path']."/".$userfile['name'], $new_file_permissions); |
|
424 | 424 | } |
425 | 425 | // Ryan: End |
426 | - $msg .= '<p><span class="success">' . $_lang['files_upload_ok'] . '</span></p><hr/>'; |
|
426 | + $msg .= '<p><span class="success">'.$_lang['files_upload_ok'].'</span></p><hr/>'; |
|
427 | 427 | |
428 | 428 | // invoke OnFileManagerUpload event |
429 | 429 | $modx->invokeEvent('OnFileManagerUpload', array( |
@@ -431,13 +431,13 @@ discard block |
||
431 | 431 | 'filename' => $userfile['name'] |
432 | 432 | )); |
433 | 433 | // Log the change |
434 | - logFileChange('upload', $_POST['path'] . '/' . $userfile['name']); |
|
434 | + logFileChange('upload', $_POST['path'].'/'.$userfile['name']); |
|
435 | 435 | } else { |
436 | - $msg .= '<p><span class="warning">' . $_lang['files_upload_copyfailed'] . '</span> ' . $_lang["files_upload_permissions_error"] . '</p>'; |
|
436 | + $msg .= '<p><span class="warning">'.$_lang['files_upload_copyfailed'].'</span> '.$_lang["files_upload_permissions_error"].'</p>'; |
|
437 | 437 | } |
438 | 438 | } |
439 | 439 | } else { |
440 | - $msg .= '<br /><span class="warning"><b>' . $_lang['files_upload_error'] . ':</b>'; |
|
440 | + $msg .= '<br /><span class="warning"><b>'.$_lang['files_upload_error'].':</b>'; |
|
441 | 441 | switch ($userfile['error']) { |
442 | 442 | case 0: //no error; possible file attack! |
443 | 443 | $msg .= $_lang['files_upload_error0']; |
@@ -462,11 +462,11 @@ discard block |
||
462 | 462 | } |
463 | 463 | } |
464 | 464 | |
465 | - return $msg . '<br/>'; |
|
465 | + return $msg.'<br/>'; |
|
466 | 466 | } |
467 | 467 | } |
468 | 468 | |
469 | -if(!function_exists('textsave')) { |
|
469 | +if (!function_exists('textsave')) { |
|
470 | 470 | /** |
471 | 471 | * @return string |
472 | 472 | */ |
@@ -480,9 +480,9 @@ discard block |
||
480 | 480 | |
481 | 481 | // Write $content to our opened file. |
482 | 482 | if (file_put_contents($filename, $content) === false) { |
483 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_saved'] . '</b></span><br /><br />'; |
|
483 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_saved'].'</b></span><br /><br />'; |
|
484 | 484 | } else { |
485 | - $msg .= '<span class="success"><b>' . $_lang['file_saved'] . '</b></span><br /><br />'; |
|
485 | + $msg .= '<span class="success"><b>'.$_lang['file_saved'].'</b></span><br /><br />'; |
|
486 | 486 | $_REQUEST['mode'] = 'edit'; |
487 | 487 | } |
488 | 488 | // Log the change |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | } |
493 | 493 | } |
494 | 494 | |
495 | -if(!function_exists('delete_file')) { |
|
495 | +if (!function_exists('delete_file')) { |
|
496 | 496 | /** |
497 | 497 | * @return string |
498 | 498 | */ |
@@ -504,9 +504,9 @@ discard block |
||
504 | 504 | |
505 | 505 | $file = $_REQUEST['path']; |
506 | 506 | if (!$token_check || !@unlink($file)) { |
507 | - $msg .= '<span class="warning"><b>' . $_lang['file_not_deleted'] . '</b></span><br /><br />'; |
|
507 | + $msg .= '<span class="warning"><b>'.$_lang['file_not_deleted'].'</b></span><br /><br />'; |
|
508 | 508 | } else { |
509 | - $msg .= '<span class="success"><b>' . $_lang['file_deleted'] . '</b></span><br /><br />'; |
|
509 | + $msg .= '<span class="success"><b>'.$_lang['file_deleted'].'</b></span><br /><br />'; |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | // Log the change |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | } |
517 | 517 | } |
518 | 518 | |
519 | -if(!function_exists('parsePlaceholder')) { |
|
519 | +if (!function_exists('parsePlaceholder')) { |
|
520 | 520 | /** |
521 | 521 | * @param string $tpl |
522 | 522 | * @param array $ph |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | } |
534 | 534 | } |
535 | 535 | |
536 | -if(!function_exists('checkToken')) { |
|
536 | +if (!function_exists('checkToken')) { |
|
537 | 537 | /** |
538 | 538 | * @return bool |
539 | 539 | */ |
@@ -558,7 +558,7 @@ discard block |
||
558 | 558 | } |
559 | 559 | } |
560 | 560 | |
561 | -if(!function_exists('makeToken')) { |
|
561 | +if (!function_exists('makeToken')) { |
|
562 | 562 | /** |
563 | 563 | * @return string |
564 | 564 | */ |
@@ -1,5 +1,5 @@ discard block |
||
1 | 1 | <?php |
2 | -if(!function_exists('import_sql')) { |
|
2 | +if (!function_exists('import_sql')) { |
|
3 | 3 | /** |
4 | 4 | * @param string $source |
5 | 5 | * @param string $result_code |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | } |
41 | 41 | } |
42 | 42 | |
43 | -if(!function_exists('dumpSql')) { |
|
43 | +if (!function_exists('dumpSql')) { |
|
44 | 44 | /** |
45 | 45 | * @param string $dumpstring |
46 | 46 | * @return bool |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | } |
67 | 67 | } |
68 | 68 | |
69 | -if(!function_exists('snapshot')) { |
|
69 | +if (!function_exists('snapshot')) { |
|
70 | 70 | /** |
71 | 71 | * @param string $dumpstring |
72 | 72 | * @return bool |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | -if(!function_exists('getSettings')) { |
|
83 | +if (!function_exists('getSettings')) { |
|
84 | 84 | /** |
85 | 85 | * @return array |
86 | 86 | */ |
@@ -107,7 +107,7 @@ discard block |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | -if(!function_exists('restoreSettings')) { |
|
110 | +if (!function_exists('restoreSettings')) { |
|
111 | 111 | /** |
112 | 112 | * @param array $settings |
113 | 113 | */ |
@@ -122,7 +122,7 @@ discard block |
||
122 | 122 | } |
123 | 123 | } |
124 | 124 | |
125 | -if(!function_exists('parsePlaceholder')) { |
|
125 | +if (!function_exists('parsePlaceholder')) { |
|
126 | 126 | /** |
127 | 127 | * @param string $tpl |
128 | 128 | * @param array $ph |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -if(!function_exists('render_form')) { |
|
3 | +if (!function_exists('render_form')) { |
|
4 | 4 | /** |
5 | 5 | * @param string $name |
6 | 6 | * @param string $label |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -1,3 +1,3 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -include_once MODX_MANAGER_PATH . 'includes/functions/tv.php'; |
|
3 | +include_once MODX_MANAGER_PATH.'includes/functions/tv.php'; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | $msg = ''; |
39 | -$pth = dirname(dirname(__DIR__)) . '/install/'; |
|
39 | +$pth = dirname(dirname(__DIR__)).'/install/'; |
|
40 | 40 | $pth = str_replace('\\', '/', $pth); |
41 | 41 | |
42 | 42 | if (isset($_GET['rminstall'])) { |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | } |
48 | 48 | } |
49 | 49 | if ($msg) { |
50 | - echo "<script>alert('" . addslashes($msg) . "');</script>"; |
|
50 | + echo "<script>alert('".addslashes($msg)."');</script>"; |
|
51 | 51 | } |
52 | 52 | |
53 | 53 | echo "<script>window.location='../index.php?a=2';</script>"; |
@@ -8,19 +8,19 @@ discard block |
||
8 | 8 | * Version: 1.1 |
9 | 9 | * MODX version: 1.0.3 |
10 | 10 | */ |
11 | -$style_path = 'media/style/' . $modx->config['manager_theme'] . '/images/'; |
|
11 | +$style_path = 'media/style/'.$modx->config['manager_theme'].'/images/'; |
|
12 | 12 | $modx->config['mgr_date_picker_path'] = 'media/calendar/datepicker.inc.php'; |
13 | -if(!$modx->config['lang_code']) { |
|
13 | +if (!$modx->config['lang_code']) { |
|
14 | 14 | global $modx_lang_attribute; |
15 | 15 | $modx->config['lang_code'] = !$modx_lang_attribute ? 'en' : $modx_lang_attribute; |
16 | 16 | } |
17 | 17 | |
18 | -if(!empty($_GET['a']) && $_GET['a'] == 2) { |
|
18 | +if (!empty($_GET['a']) && $_GET['a'] == 2) { |
|
19 | 19 | include_once('welcome.php'); |
20 | 20 | } |
21 | 21 | |
22 | 22 | // Favicon |
23 | -$_style['favicon'] = (file_exists(MODX_BASE_PATH . 'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/' . $modx->config['manager_theme'] . '/images/favicon.ico'); |
|
23 | +$_style['favicon'] = (file_exists(MODX_BASE_PATH.'favicon.ico') ? MODX_SITE_URL . 'favicon.ico' : 'media/style/'.$modx->config['manager_theme'].'/images/favicon.ico'); |
|
24 | 24 | |
25 | 25 | //Main Menu |
26 | 26 | $_style['menu_search'] = '<i class="fa fa-search"></i>'; |
@@ -99,10 +99,10 @@ discard block |
||
99 | 99 | $_style['tree_page_word'] = "<i class='fa fa-file-word-o'></i>"; |
100 | 100 | $_style['tree_page_excel'] = "<i class='fa fa-file-excel-o'></i>"; |
101 | 101 | |
102 | -$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>";//$style_path.'tree/angle-down.png'; |
|
103 | -$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>";//$style_path.'tree/angle-right.png'; |
|
102 | +$_style['tree_minusnode'] = "<i class='fa fa-angle-down'></i>"; //$style_path.'tree/angle-down.png'; |
|
103 | +$_style['tree_plusnode'] = "<i class='fa fa-angle-right'></i>"; //$style_path.'tree/angle-right.png'; |
|
104 | 104 | $_style['tree_weblink'] = $style_path.'tree/link.png'; |
105 | -$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>";//$style_path.'icons/eye.png'; |
|
105 | +$_style['tree_preview_resource'] = "<i class='fa fa-eye'></i>"; //$style_path.'icons/eye.png'; |
|
106 | 106 | |
107 | 107 | $_style['tree_showtree'] = '<i class="fa fa-sitemap"></i>'; |
108 | 108 | $_style['tree_working'] = '<i class="fa fa-warning"></i>'; |
@@ -137,8 +137,8 @@ discard block |
||
137 | 137 | $_style['icons_edit_document'] = $style_path.'icons/save.png'; |
138 | 138 | $_style['icons_delete_document'] = $style_path.'icons/trash.png'; |
139 | 139 | //locks |
140 | -$_style['icons_preview_resource'] = $style_path.'icons/eye.png';//$style_path.'icons/eye.png'; |
|
141 | -$_style['icons_secured'] = "<i class='fa fa-lock'></i>";//$style_path.'icons/lock.png'; |
|
140 | +$_style['icons_preview_resource'] = $style_path.'icons/eye.png'; //$style_path.'icons/eye.png'; |
|
141 | +$_style['icons_secured'] = "<i class='fa fa-lock'></i>"; //$style_path.'icons/lock.png'; |
|
142 | 142 | |
143 | 143 | //file manager icons |
144 | 144 | $_style['files_save'] = 'fa fa-floppy-o'; |
@@ -213,7 +213,7 @@ discard block |
||
213 | 213 | $_style['icons_set_parent'] = $style_path.'icons/folder-open.png'; |
214 | 214 | |
215 | 215 | //modules |
216 | -$_style['icons_module'] = 'fa fa-cube'; |
|
216 | +$_style['icons_module'] = 'fa fa-cube'; |
|
217 | 217 | $_style['icons_modules'] = 'fa fa-cubes'; //$style_path.'icons/modules.png'; |
218 | 218 | $_style['icons_run'] = $style_path.'icons/play.png'; |
219 | 219 | |
@@ -273,57 +273,57 @@ discard block |
||
273 | 273 | $stay = isset($_REQUEST['stay']) ? $_REQUEST['stay'] : ''; |
274 | 274 | $addnew = 0; |
275 | 275 | $run = 0; |
276 | -switch($action) { |
|
276 | +switch ($action) { |
|
277 | 277 | case '3': |
278 | 278 | case '4': |
279 | 279 | case '27': |
280 | 280 | case '72': |
281 | - if($modx->hasPermission('new_document')) { |
|
281 | + if ($modx->hasPermission('new_document')) { |
|
282 | 282 | $addnew = 1; |
283 | 283 | } |
284 | 284 | break; |
285 | 285 | case '16': |
286 | 286 | case '19': |
287 | - if($modx->hasPermission('new_template')) { |
|
287 | + if ($modx->hasPermission('new_template')) { |
|
288 | 288 | $addnew = 1; |
289 | 289 | } |
290 | 290 | break; |
291 | 291 | case '300': |
292 | 292 | case '301': |
293 | - if($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
293 | + if ($modx->hasPermission('new_snippet') && $modx->hasPermission('new_chunk') && $modx->hasPermission('new_plugin')) { |
|
294 | 294 | $addnew = 1; |
295 | 295 | } |
296 | 296 | break; |
297 | 297 | case '77': |
298 | 298 | case '78': |
299 | - if($modx->hasPermission('new_chunk')) { |
|
299 | + if ($modx->hasPermission('new_chunk')) { |
|
300 | 300 | $addnew = 1; |
301 | 301 | } |
302 | 302 | break; |
303 | 303 | case '22': |
304 | 304 | case '23': |
305 | - if($modx->hasPermission('new_snippet')) { |
|
305 | + if ($modx->hasPermission('new_snippet')) { |
|
306 | 306 | $addnew = 1; |
307 | 307 | } |
308 | 308 | break; |
309 | 309 | case '101': |
310 | 310 | case '102': |
311 | - if($modx->hasPermission('new_plugin')) { |
|
311 | + if ($modx->hasPermission('new_plugin')) { |
|
312 | 312 | $addnew = 1; |
313 | 313 | } |
314 | 314 | break; |
315 | 315 | case '106': |
316 | 316 | case '107': |
317 | 317 | case '108': |
318 | - if($modx->hasPermission('new_module')) { |
|
318 | + if ($modx->hasPermission('new_module')) { |
|
319 | 319 | $addnew = 1; |
320 | 320 | } |
321 | - if($modx->hasPermission('exec_module')) { |
|
321 | + if ($modx->hasPermission('exec_module')) { |
|
322 | 322 | $run = 1; |
323 | 323 | } |
324 | 324 | break; |
325 | 325 | case '88': |
326 | - if($modx->hasPermission('new_web_user')) { |
|
326 | + if ($modx->hasPermission('new_web_user')) { |
|
327 | 327 | $addnew = 1; |
328 | 328 | } |
329 | 329 | break; |
@@ -337,30 +337,30 @@ discard block |
||
337 | 337 | <div class="btn-group"> |
338 | 338 | <div class="btn-group"> |
339 | 339 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
340 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
340 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
341 | 341 | </a> |
342 | 342 | <span class="btn btn-success plus dropdown-toggle"></span> |
343 | 343 | <select id="stay" name="stay"> |
344 | 344 | ' . ($addnew ? ' |
345 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
346 | - ' : '') . ' |
|
347 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
348 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
345 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
346 | + ' : '').' |
|
347 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
348 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
349 | 349 | </select> |
350 | 350 | </div>' . |
351 | 351 | ($addnew ? ' |
352 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
352 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
353 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
354 | 354 | </a> |
355 | - ' : '') . ' |
|
356 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
357 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
355 | + ' : '').' |
|
356 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
357 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
358 | 358 | </a> |
359 | 359 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
360 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
360 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
361 | 361 | </a> |
362 | 362 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
363 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
363 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
364 | 364 | </a> |
365 | 365 | </div> |
366 | 366 | </div>', |
@@ -368,22 +368,22 @@ discard block |
||
368 | 368 | <div class="btn-group"> |
369 | 369 | <div class="btn-group"> |
370 | 370 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
371 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
371 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
372 | 372 | </a> |
373 | 373 | <span class="btn btn-success plus dropdown-toggle"></span> |
374 | 374 | <select id="stay" name="stay"> |
375 | 375 | ' . ($addnew ? ' |
376 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
377 | - ' : '') . ' |
|
378 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
379 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
376 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
377 | + ' : '').' |
|
378 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
379 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
380 | 380 | </select> |
381 | 381 | </div> |
382 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
383 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
382 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
383 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
384 | 384 | </a> |
385 | 385 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
386 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
386 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
387 | 387 | </a> |
388 | 388 | </div> |
389 | 389 | </div>', |
@@ -391,86 +391,86 @@ discard block |
||
391 | 391 | <div class="btn-group"> |
392 | 392 | <div class="btn-group"> |
393 | 393 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
394 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
394 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
395 | 395 | </a> |
396 | 396 | <span class="btn btn-success plus dropdown-toggle"></span> |
397 | 397 | <select id="stay" name="stay"> |
398 | 398 | ' . ($addnew ? ' |
399 | - <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '') . '>' . $_lang['stay_new'] . '</option> |
|
400 | - ' : '') . ' |
|
401 | - <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '') . '>' . $_lang['stay'] . '</option> |
|
402 | - <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '') . '>' . $_lang['close'] . '</option> |
|
399 | + <option id="stay1" value="1" ' . ($stay == '1' ? ' selected="selected"' : '').'>'.$_lang['stay_new'].'</option> |
|
400 | + ' : '').' |
|
401 | + <option id="stay2" value="2" ' . ($stay == '2' ? ' selected="selected"' : '').'>'.$_lang['stay'].'</option> |
|
402 | + <option id="stay3" value="" ' . ($stay == '' ? ' selected="selected"' : '').'>'.$_lang['close'].'</option> |
|
403 | 403 | </select> |
404 | 404 | </div> |
405 | 405 | ' . ($addnew ? ' |
406 | - <a id="Button6" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
406 | + <a id="Button6" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.duplicate();"> |
|
407 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
408 | 408 | </a> |
409 | - ' : '') . ' |
|
410 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
411 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
409 | + ' : '').' |
|
410 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
411 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
412 | 412 | </a> |
413 | 413 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
414 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
414 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
415 | 415 | </a> |
416 | 416 | ' . ($run ? ' |
417 | - <a id="Button4" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.run();"> |
|
418 | - <i class="' . $_style["actions_run"] . '"></i><span>' . $_lang['run_module'] . '</span> |
|
417 | + <a id="Button4" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.run();"> |
|
418 | + <i class="' . $_style["actions_run"].'"></i><span>'.$_lang['run_module'].'</span> |
|
419 | 419 | </a> |
420 | - ' : '') . ' |
|
420 | + ' : '').' |
|
421 | 421 | </div> |
422 | 422 | </div>', |
423 | 423 | 'newmodule' => ($addnew ? '<div id="actions"> |
424 | 424 | <div class="btn-group"> |
425 | 425 | <a id="newModule" class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
426 | - <i class="' . $_style["actions_new"] . '"></i><span>' . $_lang['new_module'] . '</span> |
|
426 | + <i class="' . $_style["actions_new"].'"></i><span>'.$_lang['new_module'].'</span> |
|
427 | 427 | </a> |
428 | 428 | </div> |
429 | 429 | </div>' : ''), |
430 | 430 | 'close' => '<div id="actions"> |
431 | 431 | <div class="btn-group"> |
432 | 432 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.close();"> |
433 | - <i class="' . $_style["actions_close"] . '"></i><span>' . $_lang['close'] . '</span> |
|
433 | + <i class="' . $_style["actions_close"].'"></i><span>'.$_lang['close'].'</span> |
|
434 | 434 | </a> |
435 | 435 | </div> |
436 | 436 | </div>', |
437 | 437 | 'save' => '<div id="actions"> |
438 | 438 | <div class="btn-group"> |
439 | 439 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
440 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
440 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
441 | 441 | </a> |
442 | 442 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
443 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
443 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
444 | 444 | </a> |
445 | 445 | </div> |
446 | 446 | </div>', |
447 | 447 | 'savedelete' => '<div id="actions"> |
448 | 448 | <div class="btn-group"> |
449 | 449 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.save();"> |
450 | - <i class="' . $_style["actions_save"] . '"></i><span>' . $_lang['save'] . '</span> |
|
450 | + <i class="' . $_style["actions_save"].'"></i><span>'.$_lang['save'].'</span> |
|
451 | 451 | </a> |
452 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
453 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
452 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
453 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
454 | 454 | </a> |
455 | 455 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
456 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
456 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
457 | 457 | </a> |
458 | 458 | </div> |
459 | 459 | </div>', |
460 | 460 | 'cancel' => '<div id="actions"> |
461 | 461 | <div class="btn-group"> |
462 | 462 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
463 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
463 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
464 | 464 | </a> |
465 | 465 | </div> |
466 | 466 | </div>', |
467 | 467 | 'canceldelete' => '<div id="actions"> |
468 | 468 | <div class="btn-group"> |
469 | - <a id="Button3" class="btn btn-secondary' . $disabled . '" href="javascript:;" onclick="actions.delete();"> |
|
470 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
469 | + <a id="Button3" class="btn btn-secondary' . $disabled.'" href="javascript:;" onclick="actions.delete();"> |
|
470 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
471 | 471 | </a> |
472 | 472 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
473 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
473 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
474 | 474 | </a> |
475 | 475 | </div> |
476 | 476 | </div>', |
@@ -480,33 +480,33 @@ discard block |
||
480 | 480 | <div class="btn-group">' . |
481 | 481 | ($addnew ? ' |
482 | 482 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.new();"> |
483 | - <i class="' . $_style["icons_new_document"] . '"></i><span>' . $_lang['create_resource_here'] . '</span> |
|
483 | + <i class="' . $_style["icons_new_document"].'"></i><span>'.$_lang['create_resource_here'].'</span> |
|
484 | 484 | </a> |
485 | 485 | <a class="btn btn-secondary" href="javascript:;" onclick="actions.newlink();"> |
486 | - <i class="' . $_style["icons_new_weblink"] . '"></i><span>' . $_lang['create_weblink_here'] . '</span> |
|
486 | + <i class="' . $_style["icons_new_weblink"].'"></i><span>'.$_lang['create_weblink_here'].'</span> |
|
487 | 487 | </a> |
488 | - ' : '') . ' |
|
488 | + ' : '').' |
|
489 | 489 | <a id="Button1" class="btn btn-success" href="javascript:;" onclick="actions.edit();"> |
490 | - <i class="' . $_style["actions_edit"] . '"></i><span>' . $_lang['edit'] . '</span> |
|
490 | + <i class="' . $_style["actions_edit"].'"></i><span>'.$_lang['edit'].'</span> |
|
491 | 491 | </a> |
492 | 492 | <a id="Button2" class="btn btn-secondary" href="javascript:;" onclick="actions.move();"> |
493 | - <i class="' . $_style["actions_move"] . '"></i><span>' . $_lang['move'] . '</span> |
|
493 | + <i class="' . $_style["actions_move"].'"></i><span>'.$_lang['move'].'</span> |
|
494 | 494 | </a> |
495 | 495 | <a id="Button6" class="btn btn-secondary" href="javascript:;" onclick="actions.duplicate();"> |
496 | - <i class="' . $_style["actions_duplicate"] . '"></i><span>' . $_lang['duplicate'] . '</span> |
|
496 | + <i class="' . $_style["actions_duplicate"].'"></i><span>'.$_lang['duplicate'].'</span> |
|
497 | 497 | </a> |
498 | 498 | <a id="Button3" class="btn btn-secondary" href="javascript:;" onclick="actions.delete();"> |
499 | - <i class="' . $_style["actions_delete"] . '"></i><span>' . $_lang['delete'] . '</span> |
|
499 | + <i class="' . $_style["actions_delete"].'"></i><span>'.$_lang['delete'].'</span> |
|
500 | 500 | </a> |
501 | 501 | <a id="Button4" class="btn btn-secondary" href="javascript:;" onclick="actions.view();"> |
502 | - <i class="' . $_style["actions_preview"] . '"></i><span>' . $_lang['preview'] . '</span> |
|
502 | + <i class="' . $_style["actions_preview"].'"></i><span>'.$_lang['preview'].'</span> |
|
503 | 503 | </a> |
504 | 504 | </div> |
505 | 505 | </div>', |
506 | 506 | 'cancel' => '<div id="actions"> |
507 | 507 | <div class="btn-group"> |
508 | 508 | <a id="Button5" class="btn btn-secondary" href="javascript:;" onclick="actions.cancel();"> |
509 | - <i class="' . $_style["actions_cancel"] . '"></i><span>' . $_lang['cancel'] . '</span> |
|
509 | + <i class="' . $_style["actions_cancel"].'"></i><span>'.$_lang['cancel'].'</span> |
|
510 | 510 | </a> |
511 | 511 | </div> |
512 | 512 | </div>', |