mirror of
https://github.com/xevidos/codiad.git
synced 2024-09-21 10:21:32 +02:00
Modified in input icon class, Removed debug code, Modified regex expressions,
This commit is contained in:
parent
9b452b33bd
commit
7b95a73088
@ -1008,8 +1008,6 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log( codiad.active.position_timer, path, JSON.stringify( position ) );
|
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
url: codiad.active.controller + '?action=save_position',
|
url: codiad.active.controller + '?action=save_position',
|
||||||
@ -1020,7 +1018,6 @@
|
|||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
|
|
||||||
codiad.active.position_timer = Date.now();
|
codiad.active.position_timer = Date.now();
|
||||||
//console.log( "called save position: ", data );
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
@ -1039,8 +1036,6 @@
|
|||||||
|
|
||||||
for( let i = codiad.editor.instances.length;i--; ) {
|
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 ) {
|
if( codiad.editor.instances[i].getSession().path == path ) {
|
||||||
|
|
||||||
editor = codiad.editor.instances[i];
|
editor = codiad.editor.instances[i];
|
||||||
@ -1069,8 +1064,6 @@
|
|||||||
cursor = this.getPosition();
|
cursor = this.getPosition();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log( "setting position", cursor );
|
|
||||||
|
|
||||||
editor.scrollToLine( cursor.row, true, true, function() {});
|
editor.scrollToLine( cursor.row, true, true, function() {});
|
||||||
editor.moveCursorTo( cursor.row, cursor.column );
|
editor.moveCursorTo( cursor.row, cursor.column );
|
||||||
},
|
},
|
||||||
|
@ -774,7 +774,7 @@ class Filemanager extends Common {
|
|||||||
* trying to rename or delete it, allow the actual file name.
|
* 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" ) ) {
|
if( $invalid_characters && ! ( $_GET['action'] == "modify" || $_GET['action'] == "delete" ) ) {
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ class Install {
|
|||||||
|
|
||||||
function clean_username( $username ) {
|
function clean_username( $username ) {
|
||||||
|
|
||||||
return strtolower( preg_replace( '#[^A-Za-z0-9' . preg_quote( '-_@. ').']#', '', $username ) );
|
return strtolower( preg_replace( '/[^\w\-\._@]/', '-', $username ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
function create_config() {
|
function create_config() {
|
||||||
@ -162,7 +162,7 @@ define("WSURL", BASE_URL . "/workspace");
|
|||||||
|
|
||||||
if ( ! $this->is_abs_path( $project_path ) ) {
|
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 ) ) {
|
if( ! is_dir( $this->workspace . "/" . $project_path ) ) {
|
||||||
|
|
||||||
mkdir( $this->workspace . "/" . $project_path );
|
mkdir( $this->workspace . "/" . $project_path );
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
<div id="installer">
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -10,35 +9,34 @@
|
|||||||
require_once( __DIR__ . "/install.php" );
|
require_once( __DIR__ . "/install.php" );
|
||||||
|
|
||||||
$path = rtrim( str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']), "/");
|
$path = rtrim( str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']), "/");
|
||||||
|
|
||||||
$workspace = is_writable($path . "/workspace");
|
$workspace = is_writable($path . "/workspace");
|
||||||
$data = is_writable($path . "/data");
|
$data = is_writable($path . "/data");
|
||||||
$plugins = is_writable($path . "/plugins");
|
$plugins = is_writable($path . "/plugins");
|
||||||
$themes = is_writable($path . "/themes");
|
$themes = is_writable($path . "/themes");
|
||||||
$workspace = is_writable($path . "/workspace");
|
$workspace = is_writable($path . "/workspace");
|
||||||
|
|
||||||
$conf = $path . '/config.php';
|
$conf = $path . '/config.php';
|
||||||
|
|
||||||
$config = is_writable(file_exists($conf) ? $conf : $path);
|
$config = is_writable(file_exists($conf) ? $conf : $path);
|
||||||
|
|
||||||
$date = new DateTime();
|
$date = new DateTime();
|
||||||
$timeZone = $date->getTimezone()->getName();
|
$timeZone = $date->getTimezone()->getName();
|
||||||
|
|
||||||
|
|
||||||
if ( ini_get('register_globals') == 1) {
|
if ( ini_get('register_globals') == 1) {
|
||||||
|
|
||||||
$register = true;
|
$register = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$register = false;
|
$register = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ini_get('newrelic.enabled') == 1 ) {
|
if ( ini_get('newrelic.enabled') == 1 ) {
|
||||||
|
|
||||||
$newrelic = true;
|
$newrelic = true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$newrelic = false;
|
$newrelic = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$query = $_SERVER['QUERY_STRING'];
|
$query = $_SERVER['QUERY_STRING'];
|
||||||
|
|
||||||
$autocomplete = array(
|
$autocomplete = array(
|
||||||
'username' => '',
|
'username' => '',
|
||||||
'password' => '',
|
'password' => '',
|
||||||
@ -56,65 +54,114 @@ $autocomplete = array(
|
|||||||
);
|
);
|
||||||
|
|
||||||
if ( ! empty( $query ) ) {
|
if ( ! empty( $query ) ) {
|
||||||
|
|
||||||
$params = explode('&', $query);
|
$params = explode('&', $query);
|
||||||
foreach( $params as $param ) {
|
foreach( $params as $param ) {
|
||||||
|
|
||||||
$param = explode( '=', $param );
|
$param = explode( '=', $param );
|
||||||
if( array_key_exists( $param[0], $autocomplete ) ) {
|
if( array_key_exists( $param[0], $autocomplete ) ) {
|
||||||
|
|
||||||
$autocomplete[$param[0]] = urldecode($param[1]);
|
$autocomplete[$param[0]] = urldecode($param[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
<div id="installer">
|
||||||
|
<?php
|
||||||
if ( ! $workspace || ! $data || ! $config || $register || $newrelic ) {
|
if ( ! $workspace || ! $data || ! $config || $register || $newrelic ) {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h1><?php i18n("Installation Error");?></h1>
|
<h1><?php i18n("Installation Error");?></h1>
|
||||||
<p><?php i18n("Please make sure the following exist and are writeable:");?></p>
|
<p><?php i18n("Please make sure the following exist and are writeable:");?></p>
|
||||||
<div class="install_issues">
|
<div class="install_issues">
|
||||||
<p>[SYSTEM]/config.php - <?php if ($config) {
|
<p>
|
||||||
|
[SYSTEM]/config.php -
|
||||||
|
<?php
|
||||||
|
if( $config ) {
|
||||||
|
|
||||||
echo '<font style="color:green">PASSED</font>';
|
echo '<font style="color:green">PASSED</font>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<font style="color:red">ERROR</font>';
|
echo '<font style="color:red">ERROR</font>';
|
||||||
} ?></p>
|
}
|
||||||
<p>[SYSTEM]/workspace - <?php if ($workspace) {
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
[SYSTEM]/workspace -
|
||||||
|
<?php
|
||||||
|
if ( $workspace ) {
|
||||||
|
|
||||||
echo '<font style="color:green">PASSED</font>';
|
echo '<font style="color:green">PASSED</font>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<font style="color:red">ERROR</font>';
|
echo '<font style="color:red">ERROR</font>';
|
||||||
} ?></p>
|
}
|
||||||
<p>[SYSTEM]/plugins - <?php if ($plugins) {
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
[SYSTEM]/plugins -
|
||||||
|
<?php
|
||||||
|
if( $plugins ) {
|
||||||
|
|
||||||
echo '<font style="color:green">PASSED</font>';
|
echo '<font style="color:green">PASSED</font>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<font style="color:red">ERROR</font>';
|
echo '<font style="color:red">ERROR</font>';
|
||||||
} ?></p>
|
}
|
||||||
<p>[SYSTEM]/themes - <?php if ($themes) {
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
[SYSTEM]/themes -
|
||||||
|
<?php
|
||||||
|
if( $themes ) {
|
||||||
|
|
||||||
echo '<font style="color:green">PASSED</font>';
|
echo '<font style="color:green">PASSED</font>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<font style="color:red">ERROR</font>';
|
echo '<font style="color:red">ERROR</font>';
|
||||||
} ?></p>
|
}
|
||||||
<p>[SYSTEM]/data - <?php if ($data) {
|
?>
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
[SYSTEM]/data -
|
||||||
|
<?php
|
||||||
|
if( $data ) {
|
||||||
|
|
||||||
echo '<font style="color:green">PASSED</font>';
|
echo '<font style="color:green">PASSED</font>';
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
echo '<font style="color:red">ERROR</font>';
|
echo '<font style="color:red">ERROR</font>';
|
||||||
} ?></p>
|
}
|
||||||
|
?>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($register || $newrelic) { ?>
|
<?php
|
||||||
|
if( $register || $newrelic ) {
|
||||||
|
|
||||||
|
?>
|
||||||
<p><?php i18n("Please make sure these environmental variables are set:");?></p>
|
<p><?php i18n("Please make sure these environmental variables are set:");?></p>
|
||||||
<div class="install_issues">
|
<div class="install_issues">
|
||||||
<?php if ($register) {
|
<?php
|
||||||
|
if( $register ) {
|
||||||
|
|
||||||
echo '<p>register_globals: Off</p>';
|
echo '<p>register_globals: Off</p>';
|
||||||
}
|
}
|
||||||
if( $newrelic ) {
|
if( $newrelic ) {
|
||||||
echo '<p>newrelic.enabled: Off</p>';
|
echo '<p>newrelic.enabled: Off</p>';
|
||||||
} ?>
|
}
|
||||||
|
?>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
<button onclick="window.location.reload();">Re-Test</button>
|
<button onclick="window.location.reload();">Re-Test</button>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<form id="install">
|
<form id="install">
|
||||||
<h1><?php i18n("Initial Setup"); ?></h1>
|
<h1><?php i18n("Initial Setup"); ?></h1>
|
||||||
|
|
||||||
<label><?php i18n("Dependencies"); ?></label>
|
<label><?php i18n("Dependencies"); ?></label>
|
||||||
<div id="dependencies">
|
<div id="dependencies">
|
||||||
<?php foreach ([
|
<?php foreach ([
|
||||||
|
@ -176,7 +176,6 @@
|
|||||||
},
|
},
|
||||||
success: function( data ) {
|
success: function( data ) {
|
||||||
|
|
||||||
console.log( `Update Option ( ${option} ): ` + data );
|
|
||||||
_self.settings = null;
|
_self.settings = null;
|
||||||
},
|
},
|
||||||
error: function(jqXHR, textStatus, errorThrown) {
|
error: function(jqXHR, textStatus, errorThrown) {
|
||||||
|
@ -347,7 +347,7 @@ class User {
|
|||||||
|
|
||||||
public static function CleanUsername( $username ) {
|
public static function CleanUsername( $username ) {
|
||||||
|
|
||||||
return strtolower( preg_replace( '#[^A-Za-z0-9' . preg_quote( '-_@. ').']#', '', $username ) );
|
return strtolower( preg_replace( '/[^\w\-\._@]/', '-', $username ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////
|
||||||
|
@ -134,7 +134,7 @@ a:hover,a:active {;
|
|||||||
|
|
||||||
float: right;
|
float: right;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: -30px;
|
margin: -30px 8px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* FORMS */
|
/* FORMS */
|
||||||
|
Loading…
Reference in New Issue
Block a user