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;
|
||||
}
|
||||
|
||||
//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 );
|
||||
},
|
||||
|
@ -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" ) ) {
|
||||
|
||||
|
@ -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 );
|
||||
|
@ -1,4 +1,3 @@
|
||||
<div id="installer">
|
||||
<?php
|
||||
|
||||
/*
|
||||
@ -10,35 +9,34 @@
|
||||
require_once( __DIR__ . "/install.php" );
|
||||
|
||||
$path = rtrim( str_replace("index.php", "", $_SERVER['SCRIPT_FILENAME']), "/");
|
||||
|
||||
$workspace = is_writable($path . "/workspace");
|
||||
$data = is_writable($path . "/data");
|
||||
$plugins = is_writable($path . "/plugins");
|
||||
$themes = is_writable($path . "/themes");
|
||||
$workspace = is_writable($path . "/workspace");
|
||||
|
||||
$conf = $path . '/config.php';
|
||||
|
||||
$config = is_writable(file_exists($conf) ? $conf : $path);
|
||||
|
||||
$date = new DateTime();
|
||||
$timeZone = $date->getTimezone()->getName();
|
||||
|
||||
|
||||
if ( ini_get('register_globals') == 1) {
|
||||
|
||||
$register = true;
|
||||
} else {
|
||||
|
||||
$register = false;
|
||||
}
|
||||
|
||||
if ( ini_get('newrelic.enabled') == 1 ) {
|
||||
|
||||
$newrelic = true;
|
||||
} else {
|
||||
|
||||
$newrelic = false;
|
||||
}
|
||||
|
||||
$query = $_SERVER['QUERY_STRING'];
|
||||
|
||||
$autocomplete = array(
|
||||
'username' => '',
|
||||
'password' => '',
|
||||
@ -56,65 +54,114 @@ $autocomplete = array(
|
||||
);
|
||||
|
||||
if ( ! empty( $query ) ) {
|
||||
|
||||
$params = explode('&', $query);
|
||||
foreach( $params as $param ) {
|
||||
|
||||
$param = explode( '=', $param );
|
||||
if( array_key_exists( $param[0], $autocomplete ) ) {
|
||||
|
||||
$autocomplete[$param[0]] = urldecode($param[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="installer">
|
||||
<?php
|
||||
if ( ! $workspace || ! $data || ! $config || $register || $newrelic ) {
|
||||
|
||||
?>
|
||||
<h1><?php i18n("Installation Error");?></h1>
|
||||
<p><?php i18n("Please make sure the following exist and are writeable:");?></p>
|
||||
<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>';
|
||||
} else {
|
||||
|
||||
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>';
|
||||
} else {
|
||||
|
||||
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>';
|
||||
} else {
|
||||
|
||||
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>';
|
||||
} else {
|
||||
|
||||
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>';
|
||||
} else {
|
||||
|
||||
echo '<font style="color:red">ERROR</font>';
|
||||
} ?></p>
|
||||
}
|
||||
?>
|
||||
</p>
|
||||
</div>
|
||||
<?php if ($register || $newrelic) { ?>
|
||||
<?php
|
||||
if( $register || $newrelic ) {
|
||||
|
||||
?>
|
||||
<p><?php i18n("Please make sure these environmental variables are set:");?></p>
|
||||
<div class="install_issues">
|
||||
<?php if ($register) {
|
||||
<?php
|
||||
if( $register ) {
|
||||
|
||||
echo '<p>register_globals: Off</p>';
|
||||
}
|
||||
if( $newrelic ) {
|
||||
echo '<p>newrelic.enabled: Off</p>';
|
||||
} ?>
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<button onclick="window.location.reload();">Re-Test</button>
|
||||
|
||||
<?php
|
||||
} else {
|
||||
|
||||
?>
|
||||
<form id="install">
|
||||
<h1><?php i18n("Initial Setup"); ?></h1>
|
||||
|
||||
<label><?php i18n("Dependencies"); ?></label>
|
||||
<div id="dependencies">
|
||||
<?php foreach ([
|
||||
|
@ -176,7 +176,6 @@
|
||||
},
|
||||
success: function( data ) {
|
||||
|
||||
console.log( `Update Option ( ${option} ): ` + data );
|
||||
_self.settings = null;
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
|
@ -347,7 +347,7 @@ class User {
|
||||
|
||||
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;
|
||||
position: relative;
|
||||
top: -30px;
|
||||
margin: -30px 8px 0 0;
|
||||
}
|
||||
|
||||
/* FORMS */
|
||||
|
Loading…
Reference in New Issue
Block a user