[Vtigercrm-commits] [vtiger-commits] r9136 - in /vtigercrm/trunk: Smarty/templates/MigrationStep1.tpl modules/Migration/MigrationCheck.php modules/Migration/MigrationStep1.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Aug 25 07:07:58 EDT 2006
Author: saraj
Date: Fri Aug 25 05:07:51 2006
New Revision: 9136
Log:
* Added changes to avoid to get the MySQL server path for the option 3 and added check user_privileges folder write permission
Modified:
vtigercrm/trunk/Smarty/templates/MigrationStep1.tpl
vtigercrm/trunk/modules/Migration/MigrationCheck.php
vtigercrm/trunk/modules/Migration/MigrationStep1.php
Modified: vtigercrm/trunk/Smarty/templates/MigrationStep1.tpl
==============================================================================
--- vtigercrm/trunk/Smarty/templates/MigrationStep1.tpl (original)
+++ vtigercrm/trunk/Smarty/templates/MigrationStep1.tpl Fri Aug 25 05:07:51 2006
@@ -264,6 +264,18 @@
document.getElementById('mnuTab1').style.display = 'none';
document.getElementById('mnuTab2').style.display = 'block';
{rdelim}
+
+ //show/hide MySQL server path
+ if(document.getElementById('getmysqlpath').value == 1 && document.getElementById('mnuTab2').style.display == 'none')
+ {ldelim}
+ //show MySQL server path
+ document.getElementById('mnuTab3').style.display = 'block';
+ {rdelim}
+ else
+ {ldelim}
+ //hide MySQL server path
+ document.getElementById('mnuTab3').style.display = 'none';
+ {rdelim}
{rdelim}
//function to validate the input values based on the radio option selected
@@ -343,7 +355,7 @@
//this is added to check whether the getmysql path is true and the user has entered the path or not
if(error != true)
{ldelim}
- if(document.getElementById("getmysqlpath").value == 1 && trim(formname.server_mysql_path.value) == '')
+ if(document.getElementById("getmysqlpath").value == 1 && trim(formname.server_mysql_path.value) == '' && document.getElementById("alter_db_details").checked != true)
{ldelim}
//alert(document.getElementById("getmysqlpath").value+" Enter the mysql path");
error_msg = "Please enter the Correct MySQL Path";
Modified: vtigercrm/trunk/modules/Migration/MigrationCheck.php
==============================================================================
--- vtigercrm/trunk/modules/Migration/MigrationCheck.php (original)
+++ vtigercrm/trunk/modules/Migration/MigrationCheck.php Fri Aug 25 05:07:51 2006
@@ -20,6 +20,14 @@
$new_mysql_password = $dbconfig['db_password'];
$new_dbname = $dbconfig['db_name'];
+//this is to check whether the user_privileges folder has write permission
+if(!is_writable($root_directory."user_privileges/"))
+{
+ echo "<br><font color='red'><b>Please give read/write permission to user_privileges folder.</b></font>";
+ include("modules/Migration/MigrationStep1.php");
+ exit;
+}
+
//this is to check whether the mysql path is needed and has been entered or not
if($_REQUEST['getmysqlpath'] == 1 && $_REQUEST['server_mysql_path'] != '')
{
@@ -40,7 +48,7 @@
$migration_log .='MySQL Dump file has found in ==> '.$server_mysql_path;
}
- if(!$mysql_path_found)
+ if(!$mysql_path_found && $_REQUEST['migration_option'] != 'alter_db_details')
{
//header("Location: index.php?module=Migration&action=MigrationStep1&parenttab=Settings");
echo '<br><font color="red"><b>MySQL dump file is not exist in the specified MySQL Server Path</b></font>';
Modified: vtigercrm/trunk/modules/Migration/MigrationStep1.php
==============================================================================
--- vtigercrm/trunk/modules/Migration/MigrationStep1.php (original)
+++ vtigercrm/trunk/modules/Migration/MigrationStep1.php Fri Aug 25 05:07:51 2006
@@ -41,6 +41,11 @@
else
{
$getmysqlpath = 1;
+
+ if($_REQUEST['migration_option'] == 'alter_db_details')
+ $showmysqlpath = 'none';
+ else
+ $showmysqlpath = 'block';
}
@@ -69,6 +74,7 @@
//Based on this $getmysqlpath variable we should get the mysql path from the user
$smarty->assign("GET_MYSQL_PATH",$getmysqlpath);
+$smarty->assign("SHOW_MYSQL_PATH",$showmysqlpath);
//this is to set the entered values when we could not proceed the migration and return to step1
if($_REQUEST['migration_option'] != '')
More information about the vtigercrm-commits
mailing list