This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Remove zadmin_ prefix from database
#2
RE: Remove zadmin_ prefix from database
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:
Code:
$db = $zdbh->mysqlRealEscapeString($currentuser['username'] . "_" . $databasename);
Replacement:
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>
Replacement:
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
Reply
Thanks given by: apinto


Messages In This Thread
Remove zadmin_ prefix from database - by vuks89 - 06-09-2015, 06:01 AM
RE: Remove zadmin_ prefix from database - by Rick - 06-09-2015, 06:28 AM
RE: Remove zadmin_ prefix from database - by Rick - 06-10-2015, 03:14 AM
RE: Remove zadmin_ prefix from database - by Rick - 06-11-2015, 01:58 AM
RE: Remove zadmin_ prefix from database - by Me.B - 09-17-2015, 10:57 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
MySQL Database user prefix MosleyCale 1 5 ,657 10-17-2020, 09:11 PM
Last Post: Ron-e
Critical Error: [0100] - Unable to connect or authenticate to the Sentora database whatshisface77 1 4 ,448 07-31-2020, 10:58 AM
Last Post: whatshisface77
repo browser Critical Error: [0144] - Sentora database 'query' error (42000). zustudios 0 4 ,462 12-21-2019, 08:08 AM
Last Post: zustudios

Forum Jump:


Users browsing this thread: 6 Guest(s)