Skip to content

Commit

Permalink
Update to 3.5.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
safronik authored and safronik committed Oct 19, 2021
1 parent 5d0430d commit b2c7a5e
Show file tree
Hide file tree
Showing 23 changed files with 1,095 additions and 1,031 deletions.
2 changes: 1 addition & 1 deletion uniforce/data/cron.php
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?php
$uniforce_tasks = array();
$uniforce_tasks = array ();
8 changes: 6 additions & 2 deletions uniforce/data/fw_nets_meta.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@
'description' => 'Test',
'indexes' =>
array (
'network' =>
0 =>
array (
'columns' =>
array (
0 => 'network',
),
'status' => false,
'type' => 'b_tree',
'type' => 'btree',
),
),
'cols_num' => 4,
Expand Down
10 changes: 3 additions & 7 deletions uniforce/inc/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ function usp_uninstall(){
}

// Deleting FW data
$db = new \Cleantalk\USP\File\FileStorage( 'fw_nets' );
$db = new \Cleantalk\USP\File\FileDB( 'fw_nets' );
$db->delete();

// Deleting options and their files
Expand Down Expand Up @@ -447,11 +447,7 @@ function usp_do_login($apikey, $password, $email ) {
setcookie('authentificated', State::getInstance()->data->security_key, 0, '/', null, false, true);
else
Err::add('Incorrect login or password');

// No password is set. Check only login (access key).
}elseif( Post::get( 'login' ) == $apikey ){
setcookie('authentificated', State::getInstance()->data->security_key, 0, '/', null, false, true);


// No match
}else
Err::add('Incorrect login');
Expand Down Expand Up @@ -556,7 +552,7 @@ function usp_do_save_settings() {
// Cleaning up Firewall data
} else {
// Deleting FW data
$db = new \Cleantalk\USP\File\FileStorage( 'fw_nets' );
$db = new \Cleantalk\USP\File\FileDB( 'fw_nets' );
$db->delete();
State::getInstance()->data->save();
Cron::removeTask( 'sfw_update' );
Expand Down
4 changes: 2 additions & 2 deletions uniforce/inc/common.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
*
* Sets all main constants
*
* Version: 3.4.0
* Version: 3.5.0
*/

use Cleantalk\USP\Variables\Server;
use Cleantalk\USP\Common\RemoteCalls;

if( ! defined( 'SPBCT_PLUGIN' ) ) define( 'SPBCT_PLUGIN', 'uniforce' );
if( ! defined( 'SPBCT_VERSION' ) ) define( 'SPBCT_VERSION', '3.4.0' );
if( ! defined( 'SPBCT_VERSION' ) ) define( 'SPBCT_VERSION', '3.5.0' );
if( ! defined( 'SPBCT_AGENT' ) ) define( 'SPBCT_AGENT', SPBCT_PLUGIN . '-' . str_replace( '.', '', SPBCT_VERSION ) );
if( ! defined( 'SPBCT_USER_AGENT' ) ) define( 'SPBCT_USER_AGENT', 'Cleantalk-Security-Universal-Plugin/' . SPBCT_VERSION );

Expand Down
4 changes: 2 additions & 2 deletions uniforce/inc/scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ function usp_scanner__display(){
echo '<p class="spbc_hint text-center">';
echo sprintf(
__('%sView all scan results for this website%s', 'security-malware-firewall'),
'<a target="blank" href="https://cleantalk.org/my/logs_mscan?service='.$usp->service_id.'">',
'<a target="blank" href="https://cleantalk.org/my/logs_mscan?service='.$usp->service_id . '&user_token='. Cleantalk\USP\Common\State::getInstance()->user_token .'">',
'</a>'
);
echo '</p>';
Expand Down Expand Up @@ -670,7 +670,7 @@ function usp_scanner__display___no_sql(){
echo '<p class="spbc_hint text-center">';
echo sprintf(
__('%sView all scan results for this website%s', 'security-malware-firewall'),
'<a target="blank" href="https://cleantalk.org/my/logs_mscan?service='.$usp->service_id.'">',
'<a target="blank" href="https://cleantalk.org/my/logs_mscan?service='.$usp->service_id . '&user_token='. Cleantalk\USP\Common\State::getInstance()->user_token .'">',
'</a>'
);
echo '</p>';
Expand Down
2 changes: 1 addition & 1 deletion uniforce/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* Version: 3.4.0
* Version: 3.5.0
*/
$file_availability = true;
$site_index_file = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '/index.php';
Expand Down
28 changes: 16 additions & 12 deletions uniforce/lib/Cleantalk/USP/Common/API.php
Original file line number Diff line number Diff line change
Expand Up @@ -600,24 +600,28 @@ static public function method__request_checksums($api_key, $plugins_and_themes_t

return $result;
}
/**
* DataBase Client 2 Client
* Creates remote database
*
* @param $api_key
* @param bool $do_check
*
* @return array|bool|mixed|string[] Returns the following data on success call db_name, db_user, db_password, db_host, created
*
*/
static public function method__dbc2c_get_info( $api_key, $do_check = true ) {
/**
* DataBase Client 2 Client
* Creates remote database
*
* @param string $api_key
* @param null $force
* @param bool $do_check
*
* @return array|bool|mixed|string[] Returns the following data on success call db_name, db_user, db_password, db_host, created
*/
static public function method__dbc2c_get_info( $api_key, $force = null, $do_check = true ) {

$request = array(
'method_name' => 'dbc2c_get_info',
'auth_key' => $api_key,
);

if( $force ){
$request['force'] = 1;
}

$result = static::send_request( $request );
$result = $do_check ? static::check_response( $result, 'dbc2c_get_info' ) : $result;

Expand Down
Loading

0 comments on commit b2c7a5e

Please sign in to comment.