Continued bug fixes for next update

This commit is contained in:
xevidos 2019-12-22 02:57:43 -05:00
parent 28a441d1f3
commit 8c62326875
8 changed files with 30 additions and 13 deletions

View file

@ -270,8 +270,13 @@ class Common {
Common::construct();
//Set a Session Name
session_name( md5( BASE_PATH ) );
session_save_path( SESSIONS_PATH );
try {
session_name( md5( BASE_PATH ) );
session_save_path( SESSIONS_PATH );
} catch( exception $e ) {
}
session_start();
if( ! defined( 'SESSION_ID' ) ) {

View file

@ -6,9 +6,9 @@
* [root]/license.txt for more. This information must remain intact.
*/
require_once('../../lib/diff_match_patch.php');
require_once('../../common.php');
require_once('./class.archive.php');
require_once( '../../lib/diff_match_patch.php' );
require_once( '../../common.php' );
require_once( __DIR__ . '/class.archive.php' );
class Filemanager extends Common {

View file

@ -85,7 +85,6 @@
// Load uploader
$.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.fileupload_data.js", true );
$( document ).on( 'dragenter', function( e ) {
@ -665,7 +664,7 @@
//Add Legacy support for new file layout
for( let i = files.length;i--; ) {
files[i].name = files[i].basename;
files[i].name = files[i].path;
}
console.log( file, files );

View file

@ -224,7 +224,7 @@ class Market extends Common
}
} else {
$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'))) {
$zip = new ZipArchive;

View file

@ -7,6 +7,7 @@
*/
require_once( '../../common.php' );
require_once( '../filemanager/class.filemanager.php' );
class Project extends Common {

View file

@ -41,7 +41,7 @@ class User {
$this->set_default_options( $username );
$pass = true;
}
return false;
return $pass;
}
public function delete_user( $username ) {
@ -323,10 +323,10 @@ class User {
public function Password() {
global $sql;
$this->EncryptPassword();
$password = $this->encrypt_password( $this->password );
$query = "UPDATE users SET password=? WHERE username=?;";
$bind_variables = array( $this->password, $this->username );
$return = $sql->query( $query, $bind_variables, 0, "rowCount" );
$bind_variables = array( $password, $this->username );
$return = $sql->query( $query, $bind_variables, 0, "rowCount", "exception" );
if( $return > 0 ) {

View file

@ -142,6 +142,9 @@ if( $_GET['action'] == 'create' ) {
if( $result ) {
exit( formatJSEND( "success", "User successfully created." ) );
} else {
exit( formatJSEND( "error", "User could not be created." ) );
}
}
}

View file

@ -159,6 +159,9 @@
codiad.message.success( i18n( 'User Account Created' ) )
_this.list();
} else {
console.log( createResponse, data );
}
});
}
@ -183,6 +186,9 @@
if(deleteResponse != 'error') {
codiad.message.success(i18n('Account Deleted'))
_this.list();
} else {
console.log( deleteResponse, data );
}
});
});
@ -252,6 +258,9 @@
if(passwordResponse != 'error') {
codiad.message.success(i18n('Password Changed'));
codiad.modal.unload();
} else {
console.log( passwordResponse, data );
}
});
}