RE: Remove zadmin_ prefix from database
06-09-2015, 06:28 AM
(This post was last modified: 06-09-2015, 06:33 AM by Rick.)
Hello,
https://github.com/sentora/sentora-core/...er.ext.php
This is where the databases are created, so also where the name is given to the database.
I will try to remove the prefix for you. Remember, when I remove it in the controller, it won't disappear in the page you see. The page is rendered based on another file.
In the file /modules/mysql_databases/code/controller.ext.php, you need to edit line 101.
Original:
Replacement:
To delete the prefix in the form, you need to edit this:
File: modules/mysql_databases/module.zpm. Line 72:
Original:
Replacement:
I am not responsible for every kind of disadvantages caused. You are trying this on your own risk. I haven't tested this code!
https://github.com/sentora/sentora-core/...er.ext.php
This is where the databases are created, so also where the name is given to the database.
I will try to remove the prefix for you. Remember, when I remove it in the controller, it won't disappear in the page you see. The page is rendered based on another file.
In the file /modules/mysql_databases/code/controller.ext.php, you need to edit line 101.
Original:
Code:
$db = $zdbh->mysqlRealEscapeString($currentuser['username'] . "_" . $databasename);
Code:
$db = $zdbh->mysqlRealEscapeString($databasename);
To delete the prefix in the form, you need to edit this:
File: modules/mysql_databases/module.zpm. Line 72:
Original:
Code:
<td nowrap="nowrap"><@ CurrentUserName @>_<input name="inDatabase" type="text" id="inDatabase" size="30" /></td>
Code:
<td nowrap="nowrap"><input name="inDatabase" type="text" id="inDatabase" size="30" /></td>
I am not responsible for every kind of disadvantages caused. You are trying this on your own risk. I haven't tested this code!
15 years old - HTML - CSS - PHP - Java - Android - jQuery - Javascript