@@ -26,12 +26,12 @@ discard block |
||
| 26 | 26 | |
| 27 | 27 | 'theme' => "evo", |
| 28 | 28 | |
| 29 | - 'uploadURL' => rtrim($modx->config['rb_base_url'],'/'), |
|
| 30 | - 'uploadDir' => rtrim($modx->config['rb_base_dir'],'/'), |
|
| 29 | + 'uploadURL' => rtrim($modx->config['rb_base_url'], '/'), |
|
| 30 | + 'uploadDir' => rtrim($modx->config['rb_base_dir'], '/'), |
|
| 31 | 31 | 'siteURL' => $modx->config['site_url'], |
| 32 | - 'assetsURL' => rtrim($modx->config['rb_base_url'],'/'), |
|
| 33 | - 'dirPerms' => intval($modx->config['new_folder_permissions'],8), |
|
| 34 | - 'filePerms' => intval($modx->config['new_file_permissions'],8), |
|
| 32 | + 'assetsURL' => rtrim($modx->config['rb_base_url'], '/'), |
|
| 33 | + 'dirPerms' => intval($modx->config['new_folder_permissions'], 8), |
|
| 34 | + 'filePerms' => intval($modx->config['new_file_permissions'], 8), |
|
| 35 | 35 | 'maxfilesize' => $settings['upload_maxsize'], |
| 36 | 36 | 'denyUpdateCheck' => true, |
| 37 | 37 | |
@@ -58,14 +58,14 @@ discard block |
||
| 58 | 58 | 'types' => array( |
| 59 | 59 | |
| 60 | 60 | // CKEditor & FCKEditor types |
| 61 | - 'files' => str_replace(',',' ',$modx->config['upload_files']), |
|
| 62 | - 'flash' => str_replace(',',' ',$modx->config['upload_flash']), |
|
| 63 | - 'images' => str_replace(',',' ',$modx->config['upload_images']), |
|
| 61 | + 'files' => str_replace(',', ' ', $modx->config['upload_files']), |
|
| 62 | + 'flash' => str_replace(',', ' ', $modx->config['upload_flash']), |
|
| 63 | + 'images' => str_replace(',', ' ', $modx->config['upload_images']), |
|
| 64 | 64 | |
| 65 | 65 | // TinyMCE types |
| 66 | - 'file' => str_replace(',',' ',$modx->config['upload_files']), |
|
| 67 | - 'media' => str_replace(',',' ',$modx->config['upload_media']), |
|
| 68 | - 'image' => str_replace(',',' ',$modx->config['upload_images']), |
|
| 66 | + 'file' => str_replace(',', ' ', $modx->config['upload_files']), |
|
| 67 | + 'media' => str_replace(',', ' ', $modx->config['upload_media']), |
|
| 68 | + 'image' => str_replace(',', ' ', $modx->config['upload_images']), |
|
| 69 | 69 | ), |
| 70 | 70 | 'dirnameChangeChars' => array( |
| 71 | 71 | ' ' => "_", |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | |
| 90 | 90 | // THE FOLLOWING SETTINGS CANNOT BE OVERRIDED WITH SESSION CONFIGURATION |
| 91 | 91 | '_check4htaccess' => false, |
| 92 | - '_tinyMCEPath' => MODX_BASE_URL . "assets/plugins/tinymce/tiny_mce", |
|
| 92 | + '_tinyMCEPath' => MODX_BASE_URL."assets/plugins/tinymce/tiny_mce", |
|
| 93 | 93 | |
| 94 | 94 | '_sessionVar' => &$_SESSION['KCFINDER'], |
| 95 | 95 | //'_sessionLifetime' => 30, |
@@ -14,14 +14,14 @@ |
||
| 14 | 14 | |
| 15 | 15 | require "core/autoload.php"; // Init MODX |
| 16 | 16 | |
| 17 | -function returnNoPermissionsMessage($role) { |
|
| 17 | +function returnNoPermissionsMessage($role){ |
|
| 18 | 18 | global $_lang; |
| 19 | 19 | echo sprintf($_lang['files_management_no_permission'], $role); |
| 20 | 20 | exit; |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | -if( $_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) returnNoPermissionsMessage('assets_images'); |
|
| 24 | -if( $_GET['type'] == 'files' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files')) returnNoPermissionsMessage('assets_files'); |
|
| 23 | +if ($_GET['type'] == 'images' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_images')) returnNoPermissionsMessage('assets_images'); |
|
| 24 | +if ($_GET['type'] == 'files' && !$modx->hasPermission('file_manager') && !$modx->hasPermission('assets_files')) returnNoPermissionsMessage('assets_files'); |
|
| 25 | 25 | |
| 26 | 26 | $browser = new browser($modx); |
| 27 | 27 | $browser->action(); |
@@ -1,15 +1,15 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | $modx->config['enable_filter'] = 1; |
| 3 | 3 | |
| 4 | -$modx->addSnippet('hasPermission','return $modx->hasPermission($key);');
|
|
| 4 | +$modx->addSnippet('hasPermission', 'return $modx->hasPermission($key);');
|
|
| 5 | 5 | |
| 6 | -if($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags'))
|
|
| 6 | +if ($modx->hasPermission('new_template') || $modx->hasPermission('edit_template') || $modx->hasPermission('new_snippet') || $modx->hasPermission('edit_snippet') || $modx->hasPermission('new_plugin') || $modx->hasPermission('edit_plugin') || $modx->hasPermission('manage_metatags'))
|
|
| 7 | 7 | $hasAnyPermission = 1; |
| 8 | 8 | else $hasAnyPermission = 0; |
| 9 | -$modx->addSnippet('hasAnyPermission','global $hasAnyPermission; return $hasAnyPermission;');
|
|
| 10 | -$modx->addSnippet('getLoginUserName','return $modx->getLoginUserName();');
|
|
| 9 | +$modx->addSnippet('hasAnyPermission', 'global $hasAnyPermission; return $hasAnyPermission;');
|
|
| 10 | +$modx->addSnippet('getLoginUserName', 'return $modx->getLoginUserName();');
|
|
| 11 | 11 | $code = 'global $_lang;return $_SESSION["nrtotalmessages"] ? sprintf($_lang["welcome_messages"], $_SESSION["nrtotalmessages"], \'<span style="color:red;">\' . $_SESSION["nrnewmessages"] . "</span>") : $_lang["messages_no_messages"];'; |
| 12 | -$modx->addSnippet('getMessageCount',$code);
|
|
| 12 | +$modx->addSnippet('getMessageCount', $code);
|
|
| 13 | 13 | |
| 14 | 14 | // Large Icons |
| 15 | 15 | $_style['icons_backup_large'] = 'fa fa-database fa-fw fa-2x'; |
@@ -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($_GET['a'] == 2) {
|
|
| 18 | +if ($_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>', |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | // using proxy, send entire URI |
| 150 | 150 | $this->_httprequest($URI, $fp, $URI, $this->_httpmethod); |
| 151 | 151 | } else { |
| 152 | - $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : ""); |
|
| 152 | + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); |
|
| 153 | 153 | // no proxy, send only the path |
| 154 | 154 | $this->_httprequest($path, $fp, $URI, $this->_httpmethod); |
| 155 | 155 | } |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | /* url was redirected, check if we've hit the max depth */ |
| 161 | 161 | if ($this->maxredirs > $this->_redirectdepth) { |
| 162 | 162 | // only follow redirect if it's on this site, or offsiteok is true |
| 163 | - if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) { |
|
| 163 | + if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) { |
|
| 164 | 164 | /* follow the redirect */ |
| 165 | 165 | $this->_redirectdepth++; |
| 166 | 166 | $this->lastredirectaddr = $this->_redirectaddr; |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | break; |
| 189 | 189 | default: |
| 190 | 190 | // not a valid protocol |
| 191 | - $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n'; |
|
| 191 | + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; |
|
| 192 | 192 | return false; |
| 193 | 193 | break; |
| 194 | 194 | } |
@@ -239,7 +239,7 @@ discard block |
||
| 239 | 239 | // using proxy, send entire URI |
| 240 | 240 | $this->_httprequest($URI, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); |
| 241 | 241 | } else { |
| 242 | - $path = $URI_PARTS["path"] . ($URI_PARTS["query"] ? "?" . $URI_PARTS["query"] : ""); |
|
| 242 | + $path = $URI_PARTS["path"].($URI_PARTS["query"] ? "?".$URI_PARTS["query"] : ""); |
|
| 243 | 243 | // no proxy, send only the path |
| 244 | 244 | $this->_httprequest($path, $fp, $URI, $this->_submit_method, $this->_submit_type, $postdata); |
| 245 | 245 | } |
@@ -249,11 +249,11 @@ discard block |
||
| 249 | 249 | if ($this->_redirectaddr) { |
| 250 | 250 | /* url was redirected, check if we've hit the max depth */ |
| 251 | 251 | if ($this->maxredirs > $this->_redirectdepth) { |
| 252 | - if (!preg_match("|^" . $URI_PARTS["scheme"] . "://|", $this->_redirectaddr)) |
|
| 253 | - $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"] . "://" . $URI_PARTS["host"]); |
|
| 252 | + if (!preg_match("|^".$URI_PARTS["scheme"]."://|", $this->_redirectaddr)) |
|
| 253 | + $this->_redirectaddr = $this->_expandlinks($this->_redirectaddr, $URI_PARTS["scheme"]."://".$URI_PARTS["host"]); |
|
| 254 | 254 | |
| 255 | 255 | // only follow redirect if it's on this site, or offsiteok is true |
| 256 | - if (preg_match("|^https?://" . preg_quote($this->host) . "|i", $this->_redirectaddr) || $this->offsiteok) { |
|
| 256 | + if (preg_match("|^https?://".preg_quote($this->host)."|i", $this->_redirectaddr) || $this->offsiteok) { |
|
| 257 | 257 | /* follow the redirect */ |
| 258 | 258 | $this->_redirectdepth++; |
| 259 | 259 | $this->lastredirectaddr = $this->_redirectaddr; |
@@ -285,7 +285,7 @@ discard block |
||
| 285 | 285 | break; |
| 286 | 286 | default: |
| 287 | 287 | // not a valid protocol |
| 288 | - $this->error = 'Invalid protocol "' . $URI_PARTS["scheme"] . '"\n'; |
|
| 288 | + $this->error = 'Invalid protocol "'.$URI_PARTS["scheme"].'"\n'; |
|
| 289 | 289 | return false; |
| 290 | 290 | break; |
| 291 | 291 | } |
@@ -585,9 +585,9 @@ discard block |
||
| 585 | 585 | $match = preg_replace("|/$|", "", $match); |
| 586 | 586 | $match_part = parse_url($match); |
| 587 | 587 | $match_root = |
| 588 | - $match_part["scheme"] . "://" . $match_part["host"]; |
|
| 588 | + $match_part["scheme"]."://".$match_part["host"]; |
|
| 589 | 589 | |
| 590 | - $search = array("|^http://" . preg_quote($this->host) . "|i", |
|
| 590 | + $search = array("|^http://".preg_quote($this->host)."|i", |
|
| 591 | 591 | "|^(\/)|i", |
| 592 | 592 | "|^(?!http://)(?!mailto:)|i", |
| 593 | 593 | "|/\./|", |
@@ -595,8 +595,8 @@ discard block |
||
| 595 | 595 | ); |
| 596 | 596 | |
| 597 | 597 | $replace = array("", |
| 598 | - $match_root . "/", |
|
| 599 | - $match . "/", |
|
| 598 | + $match_root."/", |
|
| 599 | + $match."/", |
|
| 600 | 600 | "/", |
| 601 | 601 | "/" |
| 602 | 602 | ); |
@@ -625,17 +625,17 @@ discard block |
||
| 625 | 625 | $URI_PARTS = parse_url($URI); |
| 626 | 626 | if (empty($url)) |
| 627 | 627 | $url = "/"; |
| 628 | - $headers = $http_method . " " . $url . " " . $this->_httpversion . "\r\n"; |
|
| 628 | + $headers = $http_method." ".$url." ".$this->_httpversion."\r\n"; |
|
| 629 | 629 | if (!empty($this->host) && !isset($this->rawheaders['Host'])) { |
| 630 | - $headers .= "Host: " . $this->host; |
|
| 630 | + $headers .= "Host: ".$this->host; |
|
| 631 | 631 | if (!empty($this->port) && $this->port != '80') |
| 632 | - $headers .= ":" . $this->port; |
|
| 632 | + $headers .= ":".$this->port; |
|
| 633 | 633 | $headers .= "\r\n"; |
| 634 | 634 | } |
| 635 | 635 | if (!empty($this->agent)) |
| 636 | - $headers .= "User-Agent: " . $this->agent . "\r\n"; |
|
| 636 | + $headers .= "User-Agent: ".$this->agent."\r\n"; |
|
| 637 | 637 | if (!empty($this->accept)) |
| 638 | - $headers .= "Accept: " . $this->accept . "\r\n"; |
|
| 638 | + $headers .= "Accept: ".$this->accept."\r\n"; |
|
| 639 | 639 | if ($this->use_gzip) { |
| 640 | 640 | // make sure PHP was built with --with-zlib |
| 641 | 641 | // and we can handle gzipp'ed data |
@@ -643,46 +643,46 @@ discard block |
||
| 643 | 643 | $headers .= "Accept-encoding: gzip\r\n"; |
| 644 | 644 | } else { |
| 645 | 645 | trigger_error( |
| 646 | - "use_gzip is on, but PHP was built without zlib support." . |
|
| 646 | + "use_gzip is on, but PHP was built without zlib support.". |
|
| 647 | 647 | " Requesting file(s) without gzip encoding.", |
| 648 | 648 | E_USER_NOTICE); |
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | if (!empty($this->referer)) |
| 652 | - $headers .= "Referer: " . $this->referer . "\r\n"; |
|
| 652 | + $headers .= "Referer: ".$this->referer."\r\n"; |
|
| 653 | 653 | if (!empty($this->cookies)) { |
| 654 | 654 | if (!is_array($this->cookies)) |
| 655 | - $this->cookies = (array)$this->cookies; |
|
| 655 | + $this->cookies = (array) $this->cookies; |
|
| 656 | 656 | |
| 657 | 657 | reset($this->cookies); |
| 658 | 658 | if (count($this->cookies) > 0) { |
| 659 | 659 | $cookie_headers .= 'Cookie: '; |
| 660 | 660 | foreach ($this->cookies as $cookieKey => $cookieVal) { |
| 661 | - $cookie_headers .= $cookieKey . "=" . urlencode($cookieVal) . "; "; |
|
| 661 | + $cookie_headers .= $cookieKey."=".urlencode($cookieVal)."; "; |
|
| 662 | 662 | } |
| 663 | - $headers .= substr($cookie_headers, 0, -2) . "\r\n"; |
|
| 663 | + $headers .= substr($cookie_headers, 0, -2)."\r\n"; |
|
| 664 | 664 | } |
| 665 | 665 | } |
| 666 | 666 | if (!empty($this->rawheaders)) { |
| 667 | 667 | if (!is_array($this->rawheaders)) |
| 668 | - $this->rawheaders = (array)$this->rawheaders; |
|
| 668 | + $this->rawheaders = (array) $this->rawheaders; |
|
| 669 | 669 | while (list($headerKey, $headerVal) = each($this->rawheaders)) |
| 670 | - $headers .= $headerKey . ": " . $headerVal . "\r\n"; |
|
| 670 | + $headers .= $headerKey.": ".$headerVal."\r\n"; |
|
| 671 | 671 | } |
| 672 | 672 | if (!empty($content_type)) { |
| 673 | 673 | $headers .= "Content-type: $content_type"; |
| 674 | 674 | if ($content_type == "multipart/form-data") |
| 675 | - $headers .= "; boundary=" . $this->_mime_boundary; |
|
| 675 | + $headers .= "; boundary=".$this->_mime_boundary; |
|
| 676 | 676 | $headers .= "\r\n"; |
| 677 | 677 | } |
| 678 | 678 | if (!empty($body)) |
| 679 | - $headers .= "Content-length: " . strlen($body) . "\r\n"; |
|
| 679 | + $headers .= "Content-length: ".strlen($body)."\r\n"; |
|
| 680 | 680 | if (!empty($this->user) || !empty($this->pass)) |
| 681 | - $headers .= "Authorization: Basic " . base64_encode($this->user . ":" . $this->pass) . "\r\n"; |
|
| 681 | + $headers .= "Authorization: Basic ".base64_encode($this->user.":".$this->pass)."\r\n"; |
|
| 682 | 682 | |
| 683 | 683 | //add proxy auth headers |
| 684 | 684 | if (!empty($this->proxy_user)) |
| 685 | - $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass) . "\r\n"; |
|
| 685 | + $headers .= 'Proxy-Authorization: '.'Basic '.base64_encode($this->proxy_user.':'.$this->proxy_pass)."\r\n"; |
|
| 686 | 686 | |
| 687 | 687 | |
| 688 | 688 | $headers .= "\r\n"; |
@@ -692,7 +692,7 @@ discard block |
||
| 692 | 692 | socket_set_timeout($fp, $this->read_timeout); |
| 693 | 693 | $this->timed_out = false; |
| 694 | 694 | |
| 695 | - fwrite($fp, $headers . $body, strlen($headers . $body)); |
|
| 695 | + fwrite($fp, $headers.$body, strlen($headers.$body)); |
|
| 696 | 696 | |
| 697 | 697 | $this->_redirectaddr = false; |
| 698 | 698 | unset($this->headers); |
@@ -716,10 +716,10 @@ discard block |
||
| 716 | 716 | // look for :// in the Location header to see if hostname is included |
| 717 | 717 | if (!preg_match("|\:\/\/|", $matches[2])) { |
| 718 | 718 | // no host in the path, so prepend |
| 719 | - $this->_redirectaddr = $URI_PARTS["scheme"] . "://" . $this->host . ":" . $this->port; |
|
| 719 | + $this->_redirectaddr = $URI_PARTS["scheme"]."://".$this->host.":".$this->port; |
|
| 720 | 720 | // eliminate double slash |
| 721 | 721 | if (!preg_match("|^/|", $matches[2])) |
| 722 | - $this->_redirectaddr .= "/" . $matches[2]; |
|
| 722 | + $this->_redirectaddr .= "/".$matches[2]; |
|
| 723 | 723 | else |
| 724 | 724 | $this->_redirectaddr .= $matches[2]; |
| 725 | 725 | } else |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | if (($this->_framedepth < $this->maxframes) && preg_match_all("'<frame\s+.*src[\s]*=[\'\"]?([^\'\"\>]+)'i", $results, $match)) { |
| 772 | 772 | $this->results[] = $results; |
| 773 | 773 | for ($x = 0; $x < count($match[1]); $x++) |
| 774 | - $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"] . "://" . $this->host); |
|
| 774 | + $this->_frameurls[] = $this->_expandlinks($match[1][$x], $URI_PARTS["scheme"]."://".$this->host); |
|
| 775 | 775 | } // have we already fetched framed content? |
| 776 | 776 | elseif (is_array($this->results)) |
| 777 | 777 | $this->results[] = $results; |
@@ -858,14 +858,14 @@ discard block |
||
| 858 | 858 | $context_opts['ssl']['capath'] = $this->capath; |
| 859 | 859 | } |
| 860 | 860 | |
| 861 | - $host = 'ssl://' . $host; |
|
| 861 | + $host = 'ssl://'.$host; |
|
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | $context = stream_context_create($context_opts); |
| 865 | 865 | |
| 866 | 866 | if (version_compare(PHP_VERSION, '5.0.0', '>')) { |
| 867 | - if($this->scheme == 'http') |
|
| 868 | - $host = "tcp://" . $host; |
|
| 867 | + if ($this->scheme == 'http') |
|
| 868 | + $host = "tcp://".$host; |
|
| 869 | 869 | $fp = stream_socket_client( |
| 870 | 870 | "$host:$port", |
| 871 | 871 | $errno, |
@@ -897,7 +897,7 @@ discard block |
||
| 897 | 897 | case -5: |
| 898 | 898 | $this->error = "connection refused or timed out (-5)"; |
| 899 | 899 | default: |
| 900 | - $this->error = "connection failed (" . $errno . ")"; |
|
| 900 | + $this->error = "connection failed (".$errno.")"; |
|
| 901 | 901 | } |
| 902 | 902 | return false; |
| 903 | 903 | } |
@@ -938,26 +938,26 @@ discard block |
||
| 938 | 938 | while (list($key, $val) = each($formvars)) { |
| 939 | 939 | if (is_array($val) || is_object($val)) { |
| 940 | 940 | while (list($cur_key, $cur_val) = each($val)) { |
| 941 | - $postdata .= urlencode($key) . "[]=" . urlencode($cur_val) . "&"; |
|
| 941 | + $postdata .= urlencode($key)."[]=".urlencode($cur_val)."&"; |
|
| 942 | 942 | } |
| 943 | 943 | } else |
| 944 | - $postdata .= urlencode($key) . "=" . urlencode($val) . "&"; |
|
| 944 | + $postdata .= urlencode($key)."=".urlencode($val)."&"; |
|
| 945 | 945 | } |
| 946 | 946 | break; |
| 947 | 947 | |
| 948 | 948 | case "multipart/form-data": |
| 949 | - $this->_mime_boundary = "Snoopy" . md5(uniqid(microtime())); |
|
| 949 | + $this->_mime_boundary = "Snoopy".md5(uniqid(microtime())); |
|
| 950 | 950 | |
| 951 | 951 | reset($formvars); |
| 952 | 952 | while (list($key, $val) = each($formvars)) { |
| 953 | 953 | if (is_array($val) || is_object($val)) { |
| 954 | 954 | while (list($cur_key, $cur_val) = each($val)) { |
| 955 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
| 955 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
| 956 | 956 | $postdata .= "Content-Disposition: form-data; name=\"$key\[\]\"\r\n\r\n"; |
| 957 | 957 | $postdata .= "$cur_val\r\n"; |
| 958 | 958 | } |
| 959 | 959 | } else { |
| 960 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
| 960 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
| 961 | 961 | $postdata .= "Content-Disposition: form-data; name=\"$key\"\r\n\r\n"; |
| 962 | 962 | $postdata .= "$val\r\n"; |
| 963 | 963 | } |
@@ -974,12 +974,12 @@ discard block |
||
| 974 | 974 | fclose($fp); |
| 975 | 975 | $base_name = basename($file_name); |
| 976 | 976 | |
| 977 | - $postdata .= "--" . $this->_mime_boundary . "\r\n"; |
|
| 977 | + $postdata .= "--".$this->_mime_boundary."\r\n"; |
|
| 978 | 978 | $postdata .= "Content-Disposition: form-data; name=\"$field_name\"; filename=\"$base_name\"\r\n\r\n"; |
| 979 | 979 | $postdata .= "$file_content\r\n"; |
| 980 | 980 | } |
| 981 | 981 | } |
| 982 | - $postdata .= "--" . $this->_mime_boundary . "--\r\n"; |
|
| 982 | + $postdata .= "--".$this->_mime_boundary."--\r\n"; |
|
| 983 | 983 | break; |
| 984 | 984 | } |
| 985 | 985 | |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$c = &$settings; |
|
| 3 | +$c = &$settings; |
|
| 4 | 4 | |
| 5 | 5 | $c['site_name'] = 'My MODX Site'; |
| 6 | 6 | $c['site_start'] = 1; |
@@ -12,7 +12,7 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | $sysMsgs = ""; |
| 14 | 14 | $limit = count($SystemAlertMsgQueque); |
| 15 | - for($i=0;$i<$limit;$i++) { |
|
| 15 | + for ($i = 0; $i < $limit; $i++) { |
|
| 16 | 16 | $sysMsgs .= $SystemAlertMsgQueque[$i]."<hr sys/>"; |
| 17 | 17 | } |
| 18 | 18 | // reset message queque |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | $_SESSION['SystemAlertMsgQueque'] = array(); |
| 21 | 21 | $SystemAlertMsgQueque = &$_SESSION['SystemAlertMsgQueque']; |
| 22 | 22 | |
| 23 | - if($sysMsgs!="") { |
|
| 23 | + if ($sysMsgs != "") { |
|
| 24 | 24 | ?> |
| 25 | 25 | |
| 26 | 26 | <?php // fetch the styles |
@@ -32,7 +32,7 @@ discard block |
||
| 32 | 32 | var sysAlert = new Element('div').setProperties({ |
| 33 | 33 | 'class': 'sysAlert' |
| 34 | 34 | }); |
| 35 | - sysAlert.innerHTML = '<?php echo $modx->db->escape($sysMsgs);?>'; |
|
| 35 | + sysAlert.innerHTML = '<?php echo $modx->db->escape($sysMsgs); ?>'; |
|
| 36 | 36 | var boxHtml = new MooPrompt('<?php echo $_lang['sys_alert']; ?>', sysAlert, { |
| 37 | 37 | buttons: 1, |
| 38 | 38 | button1: 'Ok', |
@@ -149,7 +149,7 @@ discard block |
||
| 149 | 149 | $username = '', |
| 150 | 150 | $password = '', |
| 151 | 151 | $debug_level = 0 |
| 152 | - ) { |
|
| 152 | + ){ |
|
| 153 | 153 | $pop = new self(); |
| 154 | 154 | |
| 155 | 155 | return $pop->authorise($host, $port, $timeout, $username, $password, $debug_level); |
@@ -288,11 +288,11 @@ discard block |
||
| 288 | 288 | } |
| 289 | 289 | |
| 290 | 290 | // Send the Username |
| 291 | - $this->sendString("USER $username" . static::LE); |
|
| 291 | + $this->sendString("USER $username".static::LE); |
|
| 292 | 292 | $pop3_response = $this->getResponse(); |
| 293 | 293 | if ($this->checkResponse($pop3_response)) { |
| 294 | 294 | // Send the Password |
| 295 | - $this->sendString("PASS $password" . static::LE); |
|
| 295 | + $this->sendString("PASS $password".static::LE); |
|
| 296 | 296 | $pop3_response = $this->getResponse(); |
| 297 | 297 | if ($this->checkResponse($pop3_response)) { |
| 298 | 298 | return true; |
@@ -412,7 +412,7 @@ discard block |
||
| 412 | 412 | protected function catchWarning($errno, $errstr, $errfile, $errline) |
| 413 | 413 | { |
| 414 | 414 | $this->setError( |
| 415 | - 'Connecting to the POP3 server raised a PHP warning:' . |
|
| 415 | + 'Connecting to the POP3 server raised a PHP warning:'. |
|
| 416 | 416 | "errno: $errno errstr: $errstr; errfile: $errfile; errline: $errline" |
| 417 | 417 | ); |
| 418 | 418 | } |
@@ -128,10 +128,10 @@ |
||
| 128 | 128 | } |
| 129 | 129 | |
| 130 | 130 | return base64_encode( |
| 131 | - 'user=' . |
|
| 132 | - $this->oauthUserEmail . |
|
| 133 | - "\001auth=Bearer " . |
|
| 134 | - $this->oauthToken . |
|
| 131 | + 'user='. |
|
| 132 | + $this->oauthUserEmail. |
|
| 133 | + "\001auth=Bearer ". |
|
| 134 | + $this->oauthToken. |
|
| 135 | 135 | "\001\001" |
| 136 | 136 | ); |
| 137 | 137 | } |