diff --git a/components/active/init.js b/components/active/init.js index 1316699..428053a 100755 --- a/components/active/init.js +++ b/components/active/init.js @@ -1008,8 +1008,6 @@ return; } - //console.log( codiad.active.position_timer, path, JSON.stringify( position ) ); - $.ajax({ type: 'POST', url: codiad.active.controller + '?action=save_position', @@ -1020,7 +1018,6 @@ success: function( data ) { codiad.active.position_timer = Date.now(); - //console.log( "called save position: ", data ); }, }); }, 500); @@ -1039,8 +1036,6 @@ for( let i = codiad.editor.instances.length;i--; ) { - //console.log( codiad.editor.instances[i].getSession().path, path, ( codiad.editor.instances[i].getSession().path == path ) ); - if( codiad.editor.instances[i].getSession().path == path ) { editor = codiad.editor.instances[i]; @@ -1069,8 +1064,6 @@ cursor = this.getPosition(); } - console.log( "setting position", cursor ); - editor.scrollToLine( cursor.row, true, true, function() {}); editor.moveCursorTo( cursor.row, cursor.column ); }, diff --git a/components/filemanager/class.filemanager.php b/components/filemanager/class.filemanager.php index 4d2585f..8946de7 100755 --- a/components/filemanager/class.filemanager.php +++ b/components/filemanager/class.filemanager.php @@ -774,7 +774,7 @@ class Filemanager extends Common { * trying to rename or delete it, allow the actual file name. */ - $invalid_characters = preg_match( '/[^A-Za-z0-9\-\._\/\ ]/', $path ); + $invalid_characters = preg_match( '/[^A-Za-z0-9\-\._@\/\ ]/', $path ); if( $invalid_characters && ! ( $_GET['action'] == "modify" || $_GET['action'] == "delete" ) ) { diff --git a/components/install/install.php b/components/install/install.php index 568bf31..a51e2fd 100644 --- a/components/install/install.php +++ b/components/install/install.php @@ -88,7 +88,7 @@ class Install { function clean_username( $username ) { - return strtolower( preg_replace( '#[^A-Za-z0-9' . preg_quote( '-_@. ').']#', '', $username ) ); + return strtolower( preg_replace( '/[^\w\-\._@]/', '-', $username ) ); } function create_config() { @@ -162,7 +162,7 @@ define("WSURL", BASE_URL . "/workspace"); if ( ! $this->is_abs_path( $project_path ) ) { - $project_path = str_replace( " ", "_", preg_replace( '/[^\w-\.]/', '', $project_path ) ); + $project_path = preg_replace( '/[^\w-._@]/', '-', $project_path ); if( ! is_dir( $this->workspace . "/" . $project_path ) ) { mkdir( $this->workspace . "/" . $project_path ); diff --git a/components/install/view.php b/components/install/view.php index 6fc1e26..119cf4c 100755 --- a/components/install/view.php +++ b/components/install/view.php @@ -1,4 +1,3 @@ -
[SYSTEM]/config.php - PASSED'; -} else { - echo 'ERROR'; -} ?>
-[SYSTEM]/workspace - PASSED'; -} else { - echo 'ERROR'; -} ?>
-[SYSTEM]/plugins - PASSED'; -} else { - echo 'ERROR'; -} ?>
-[SYSTEM]/themes - PASSED'; -} else { - echo 'ERROR'; -} ?>
-[SYSTEM]/data - PASSED'; -} else { - echo 'ERROR'; -} ?>
-newrelic.enabled: Off
'; -} ?> -+ [SYSTEM]/config.php - + PASSED'; + } else { + + echo 'ERROR'; + } + ?> +
++ [SYSTEM]/workspace - + PASSED'; + } else { + + echo 'ERROR'; + } + ?> +
++ [SYSTEM]/plugins - + PASSED'; + } else { + + echo 'ERROR'; + } + ?> +
++ [SYSTEM]/themes - + PASSED'; + } else { + + echo 'ERROR'; + } + ?> +
++ [SYSTEM]/data - + PASSED'; + } else { + + echo 'ERROR'; + } + ?> +
+newrelic.enabled: Off
'; + } + ?> +