mirror of
https://github.com/xevidos/codiad.git
synced 2024-11-10 21:26:35 +01:00
Continued bug fixes for next update
This commit is contained in:
parent
28a441d1f3
commit
8c62326875
11
common.php
11
common.php
@ -270,8 +270,13 @@ class Common {
|
|||||||
Common::construct();
|
Common::construct();
|
||||||
|
|
||||||
//Set a Session Name
|
//Set a Session Name
|
||||||
session_name( md5( BASE_PATH ) );
|
try {
|
||||||
session_save_path( SESSIONS_PATH );
|
|
||||||
|
session_name( md5( BASE_PATH ) );
|
||||||
|
session_save_path( SESSIONS_PATH );
|
||||||
|
} catch( exception $e ) {
|
||||||
|
}
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
if( ! defined( 'SESSION_ID' ) ) {
|
if( ! defined( 'SESSION_ID' ) ) {
|
||||||
@ -296,7 +301,7 @@ class Common {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static function return( $output, $action = "return" ) {
|
public static function return( $output, $action = "return" ) {
|
||||||
|
|
||||||
switch( $action ) {
|
switch( $action ) {
|
||||||
|
|
||||||
case( "exit" ):
|
case( "exit" ):
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
* [root]/license.txt for more. This information must remain intact.
|
* [root]/license.txt for more. This information must remain intact.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once('../../lib/diff_match_patch.php');
|
require_once( '../../lib/diff_match_patch.php' );
|
||||||
require_once('../../common.php');
|
require_once( '../../common.php' );
|
||||||
require_once('./class.archive.php');
|
require_once( __DIR__ . '/class.archive.php' );
|
||||||
|
|
||||||
class Filemanager extends Common {
|
class Filemanager extends Common {
|
||||||
|
|
||||||
|
@ -85,7 +85,6 @@
|
|||||||
// Load uploader
|
// Load uploader
|
||||||
$.loadScript( "components/filemanager/upload_scripts/jquery.ui.widget.js", true );
|
$.loadScript( "components/filemanager/upload_scripts/jquery.ui.widget.js", true );
|
||||||
$.loadScript( "components/filemanager/upload_scripts/jquery.iframe-transport.js", true );
|
$.loadScript( "components/filemanager/upload_scripts/jquery.iframe-transport.js", true );
|
||||||
$.loadScript( "components/filemanager/upload_scripts/jquery.fileupload_data.js", true );
|
|
||||||
|
|
||||||
$( document ).on( 'dragenter', function( e ) {
|
$( document ).on( 'dragenter', function( e ) {
|
||||||
|
|
||||||
@ -665,7 +664,7 @@
|
|||||||
//Add Legacy support for new file layout
|
//Add Legacy support for new file layout
|
||||||
for( let i = files.length;i--; ) {
|
for( let i = files.length;i--; ) {
|
||||||
|
|
||||||
files[i].name = files[i].basename;
|
files[i].name = files[i].path;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log( file, files );
|
console.log( file, files );
|
||||||
|
@ -224,7 +224,7 @@ class Market extends Common
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$reponame = explode('/', $repo);
|
$reponame = explode('/', $repo);
|
||||||
$tmp = file_get_contents($this->url.'/?t='.rtrim($type, "s").'&i='.str_replace("-master", "", $reponame[sizeof($repo)-1]));
|
$tmp = file_get_contents($this->url.'/?t='.rtrim($type, "s").'&i='.str_replace("-master", "", $reponame[@sizeof($repo)-1]));
|
||||||
}
|
}
|
||||||
if (file_put_contents(BASE_PATH.'/'.$type.'/'.$name.'.zip', fopen($repo.'/archive/master.zip', 'r'))) {
|
if (file_put_contents(BASE_PATH.'/'.$type.'/'.$name.'.zip', fopen($repo.'/archive/master.zip', 'r'))) {
|
||||||
$zip = new ZipArchive;
|
$zip = new ZipArchive;
|
||||||
|
@ -7,6 +7,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
require_once( '../../common.php' );
|
require_once( '../../common.php' );
|
||||||
|
require_once( '../filemanager/class.filemanager.php' );
|
||||||
|
|
||||||
class Project extends Common {
|
class Project extends Common {
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ class User {
|
|||||||
$this->set_default_options( $username );
|
$this->set_default_options( $username );
|
||||||
$pass = true;
|
$pass = true;
|
||||||
}
|
}
|
||||||
return false;
|
return $pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function delete_user( $username ) {
|
public function delete_user( $username ) {
|
||||||
@ -323,10 +323,10 @@ class User {
|
|||||||
public function Password() {
|
public function Password() {
|
||||||
|
|
||||||
global $sql;
|
global $sql;
|
||||||
$this->EncryptPassword();
|
$password = $this->encrypt_password( $this->password );
|
||||||
$query = "UPDATE users SET password=? WHERE username=?;";
|
$query = "UPDATE users SET password=? WHERE username=?;";
|
||||||
$bind_variables = array( $this->password, $this->username );
|
$bind_variables = array( $password, $this->username );
|
||||||
$return = $sql->query( $query, $bind_variables, 0, "rowCount" );
|
$return = $sql->query( $query, $bind_variables, 0, "rowCount", "exception" );
|
||||||
|
|
||||||
if( $return > 0 ) {
|
if( $return > 0 ) {
|
||||||
|
|
||||||
|
@ -142,6 +142,9 @@ if( $_GET['action'] == 'create' ) {
|
|||||||
if( $result ) {
|
if( $result ) {
|
||||||
|
|
||||||
exit( formatJSEND( "success", "User successfully created." ) );
|
exit( formatJSEND( "success", "User successfully created." ) );
|
||||||
|
} else {
|
||||||
|
|
||||||
|
exit( formatJSEND( "error", "User could not be created." ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -159,6 +159,9 @@
|
|||||||
|
|
||||||
codiad.message.success( i18n( 'User Account Created' ) )
|
codiad.message.success( i18n( 'User Account Created' ) )
|
||||||
_this.list();
|
_this.list();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
console.log( createResponse, data );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -183,6 +186,9 @@
|
|||||||
if(deleteResponse != 'error') {
|
if(deleteResponse != 'error') {
|
||||||
codiad.message.success(i18n('Account Deleted'))
|
codiad.message.success(i18n('Account Deleted'))
|
||||||
_this.list();
|
_this.list();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
console.log( deleteResponse, data );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@ -252,6 +258,9 @@
|
|||||||
if(passwordResponse != 'error') {
|
if(passwordResponse != 'error') {
|
||||||
codiad.message.success(i18n('Password Changed'));
|
codiad.message.success(i18n('Password Changed'));
|
||||||
codiad.modal.unload();
|
codiad.modal.unload();
|
||||||
|
} else {
|
||||||
|
|
||||||
|
console.log( passwordResponse, data );
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user