Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../var/softacul.../yeti
File: Db.php
<?php
[0] Fix | Delete
[1] Fix | Delete
/**
[2] Fix | Delete
* Configuration file.
[3] Fix | Delete
* This file is auto-generated.
[4] Fix | Delete
*
[5] Fix | Delete
* @package Config
[6] Fix | Delete
*
[7] Fix | Delete
* @copyright YetiForce S.A.
[8] Fix | Delete
* @license YetiForce Public License 7.0 (licenses/LicenseEN.txt or yetiforce.com)
[9] Fix | Delete
*/
[10] Fix | Delete
[11] Fix | Delete
namespace Config;
[12] Fix | Delete
[13] Fix | Delete
/**
[14] Fix | Delete
* Configuration file: Config\Db.
[15] Fix | Delete
*/
[16] Fix | Delete
class Db
[17] Fix | Delete
{
[18] Fix | Delete
/** Gets the database server */
[19] Fix | Delete
public static $db_server = '[[softdbhost]]';
[20] Fix | Delete
[21] Fix | Delete
/** Gets the database port */
[22] Fix | Delete
public static $db_port = '3306';
[23] Fix | Delete
[24] Fix | Delete
/** Gets the database user name */
[25] Fix | Delete
public static $db_username = '[[softdbuser]]';
[26] Fix | Delete
[27] Fix | Delete
/** Gets the database password */
[28] Fix | Delete
public static $db_password = '[[softdbpass]]';
[29] Fix | Delete
[30] Fix | Delete
/** Gets the database name */
[31] Fix | Delete
public static $db_name = '[[softdb]]';
[32] Fix | Delete
[33] Fix | Delete
/** Gets the database type */
[34] Fix | Delete
public static $db_type = 'mysql';
[35] Fix | Delete
[36] Fix | Delete
/** Gets the mongo database server */
[37] Fix | Delete
public static $mongo_server = '';
[38] Fix | Delete
[39] Fix | Delete
/** Gets the mongo database port */
[40] Fix | Delete
public static $mongo_port = '';
[41] Fix | Delete
[42] Fix | Delete
/** Gets the mongo database user name */
[43] Fix | Delete
public static $mongo_username = '';
[44] Fix | Delete
[45] Fix | Delete
/** Gets the mongo database password */
[46] Fix | Delete
public static $mongo_password = '';
[47] Fix | Delete
[48] Fix | Delete
/** Gets the mongo database name */
[49] Fix | Delete
public static $mongo_name = '';
[50] Fix | Delete
[51] Fix | Delete
/** Gets the mongo database type */
[52] Fix | Delete
public static $mongo_type = 'mongodb';
[53] Fix | Delete
[54] Fix | Delete
[55] Fix | Delete
/**
[56] Fix | Delete
* Gets host name.
[57] Fix | Delete
*/
[58] Fix | Delete
public static function db_hostname()
[59] Fix | Delete
{
[60] Fix | Delete
return self::$db_server . ':' . self::$db_port;
[61] Fix | Delete
}
[62] Fix | Delete
[63] Fix | Delete
[64] Fix | Delete
/**
[65] Fix | Delete
* Basic database configuration.
[66] Fix | Delete
*/
[67] Fix | Delete
public static function base()
[68] Fix | Delete
{
[69] Fix | Delete
return [
[70] Fix | Delete
'dsn' => self::$db_type . ':host=' . self::$db_server . ';dbname=' . self::$db_name . ';port=' . self::$db_port,
[71] Fix | Delete
'host' => self::$db_server,
[72] Fix | Delete
'port' => self::$db_port,
[73] Fix | Delete
'username' => self::$db_username,
[74] Fix | Delete
'password' => self::$db_password,
[75] Fix | Delete
'dbName' => self::$db_name,
[76] Fix | Delete
'tablePrefix' => 'yf_',
[77] Fix | Delete
'charset' => 'utf8',
[78] Fix | Delete
];
[79] Fix | Delete
}
[80] Fix | Delete
[81] Fix | Delete
[82] Fix | Delete
/**
[83] Fix | Delete
* Mongo database configuration.
[84] Fix | Delete
*/
[85] Fix | Delete
public static function mongo()
[86] Fix | Delete
{
[87] Fix | Delete
if (!self::$mongo_username) {
[88] Fix | Delete
return null;
[89] Fix | Delete
}
[90] Fix | Delete
return [
[91] Fix | Delete
'dsn' => sprintf('%s://%s:%s@%s:%d/%s', self::$mongo_type, urlencode(self::$mongo_username), urlencode(self::$mongo_password), self::$mongo_server, self::$mongo_port, self::$mongo_name),
[92] Fix | Delete
'tablePrefix' => 'yf_',
[93] Fix | Delete
];
[94] Fix | Delete
}
[95] Fix | Delete
}
[96] Fix | Delete
[97] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function