forked from extern/egroupware
allow to specify grant host for database creation
This commit is contained in:
parent
68968db0e7
commit
f3574b59bc
@ -290,7 +290,8 @@ switch($GLOBALS['egw_info']['setup']['stage']['db'])
|
|||||||
switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi'])
|
switch ($GLOBALS['egw_info']['setup']['currentver']['phpgwapi'])
|
||||||
{
|
{
|
||||||
case 'dbcreate':
|
case 'dbcreate':
|
||||||
$GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'],'utf8'); // create all new db's with utf8
|
$GLOBALS['egw_setup']->db->create_database($_POST['db_root'], $_POST['db_pass'], 'utf8', // create all new db's with utf8
|
||||||
|
!preg_match('/^[0-9.a-z_]+$/i', $_POST['db_grant_host']) ? 'localhost' : $_POST['db_grant_host']);
|
||||||
break;
|
break;
|
||||||
case 'drop':
|
case 'drop':
|
||||||
$setup_info = $GLOBALS['egw_setup']->detection->get_versions($setup_info);
|
$setup_info = $GLOBALS['egw_setup']->detection->get_versions($setup_info);
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<!-- begin setup_db_blocks.tpl -->
|
<!-- begin setup_db_blocks.tpl -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_1 -->
|
<!-- BEGIN B_db_stage_1 -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -15,6 +15,7 @@
|
|||||||
<p>{createdb}<br />
|
<p>{createdb}<br />
|
||||||
DB root username: <input type="text" name="db_root" value="root" /><br />
|
DB root username: <input type="text" name="db_root" value="root" /><br />
|
||||||
DB root password: <input type="password" name="db_pass" /><br />
|
DB root password: <input type="password" name="db_pass" /><br />
|
||||||
|
DB grant host: <input type="text" name="db_grant_host" value="localhost" /><br />
|
||||||
<input type="hidden" name="action" value="Create Database" />
|
<input type="hidden" name="action" value="Create Database" />
|
||||||
<input type="submit" name="label" value="{create_database}" /></p>
|
<input type="submit" name="label" value="{create_database}" /></p>
|
||||||
</form>
|
</form>
|
||||||
@ -40,7 +41,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_1a -->
|
<!-- END B_db_stage_1a -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_2 -->
|
<!-- BEGIN B_db_stage_2 -->
|
||||||
|
|
||||||
@ -54,7 +55,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_2 -->
|
<!-- END B_db_stage_2 -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_3 -->
|
<!-- BEGIN B_db_stage_3 -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -79,7 +80,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_3 -->
|
<!-- END B_db_stage_3 -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_4 -->
|
<!-- BEGIN B_db_stage_4 -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -152,7 +153,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_5 -->
|
<!-- END B_db_stage_5 -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_6_pre -->
|
<!-- BEGIN B_db_stage_6_pre -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -180,7 +181,7 @@
|
|||||||
-->
|
-->
|
||||||
<!-- END B_db_stage_6_pre -->
|
<!-- END B_db_stage_6_pre -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_6_post -->
|
<!-- BEGIN B_db_stage_6_post -->
|
||||||
<tr bgcolor="#486591">
|
<tr bgcolor="#486591">
|
||||||
@ -201,7 +202,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_6_post -->
|
<!-- END B_db_stage_6_post -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_10 -->
|
<!-- BEGIN B_db_stage_10 -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -219,7 +220,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_10 -->
|
<!-- END B_db_stage_10 -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
<!-- BEGIN B_db_stage_default -->
|
<!-- BEGIN B_db_stage_default -->
|
||||||
<tr>
|
<tr>
|
||||||
@ -235,7 +236,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<!-- END B_db_stage_default -->
|
<!-- END B_db_stage_default -->
|
||||||
|
|
||||||
<!-- ================================== -->
|
<!-- ================================== -->
|
||||||
|
|
||||||
|
|
||||||
<!-- end setup_db_blocks.tpl -->
|
<!-- end setup_db_blocks.tpl -->
|
||||||
|
Loading…
Reference in New Issue
Block a user