public
Description: Git mirror of the CMS Made Simple 2.0 rewrite
Homepage: http://cmsmadesimple.org
Clone URL: git://github.com/tedkulp/cmsmadesimple-2-0.git
Search Repo:
Fix the test button in the installer using CmsAjax classes

Signed-off-by: Ted Kulp <ted@cmsmadesimple.org>


git-svn-id: http://svn.cmsmadesimple.org/svn/cmsmadesimple/trunk@4455 
3d254a34-79dc-0310-9e5f-be208747d8a0
tedkulp (author)
Sat Apr 26 13:21:56 -0700 2008
commit  70bf6724fdaa23598c17553a84853459a89d3e65
tree    a1bb7a93bb948d8e984a1839308102791d3a12ab
parent  2c131ae62d96e4a7fe458c135f0443a40a3188dc
...
41
42
43
44
45
46
47
48
...
202
203
204
205
 
206
 
 
207
208
209
210
...
211
212
213
214
215
216
 
 
 
217
218
 
219
220
221
...
41
42
43
 
44
45
46
47
...
201
202
203
 
204
205
206
207
208
209
210
211
...
212
213
214
 
 
 
215
216
217
218
 
219
220
221
222
0
@@ -41,7 +41,6 @@
0
 $smarty->template_dir = cms_join_path(dirname(dirname(__FILE__)),'install','templates'.DS);
0
 $smarty->plugins_dir = array(cms_join_path(dirname(dirname(__FILE__)),'lib','smarty','plugins'.DS), cms_join_path(dirname(__FILE__),'plugins'.DS));
0
 
0
-require_once(cms_join_path(dirname(dirname(__FILE__)), 'lib', 'classes','ajax','class.cms_ajax.php'));
0
 $xajax = new CmsAjax();
0
 $xajax->register_function('test_connection');
0
 $xajax->process_requests();
0
0
@@ -202,8 +201,10 @@
0
 {
0
   global $smarty; //Too lazy to set it all up again
0
 
0
- $objResponse = new CmsAjaxResponse();
0
+ $response = new CmsAjaxResponse();
0
   
0
+ $result = CmsInstallOperations::test_database_connection($params['connection']['driver'], $params['connection']['hostname'], $params['connection']['username'], $params['connection']['password'], $params['connection']['dbname']);
0
+
0
   $result = CmsInstallOperations::test_database_connection($params['connection']['driver'],
0
                                $params['connection']['hostname'],
0
                                $params['connection']['username'],
0
0
@@ -211,11 +212,11 @@
0
                                $params['connection']['dbname']);
0
 
0
   $smarty->assign('databasetestresult', $result);
0
- $objResponse->modify_html("#connection_options", $smarty->fetch('databaseinsert.tpl'));
0
- //$objResponse->script("alert('test');");
0
- $objResponse->script("$('#connection_options').slideDown('slow');");
0
+ $response->modify_html("#connection_options", $smarty->fetch('databaseinsert.tpl'));
0
+
0
+ $response->script("$('#connection_options').slideDown('slow');");
0
 
0
- return $objResponse->get_result();
0
+ return $response->get_result();
0
 }
0
 
0
 # vim:ts=4 sw=4 noet
...
72
73
74
75
 
76
77
78
...
72
73
74
 
75
76
77
78
0
@@ -72,7 +72,7 @@
0
         {tr}Click here to test your connection settings{/tr}:
0
       </span>
0
       <span class="go_right">
0
- <input type="submit" name="test_connection" value="{tr}Test{/tr}" onclick="{literal}$('#connection_options').hide(); cms_ajax_test_connection(ajax.getFormValues('connectionform')); return false;{/literal}" />
0
+ <input type="submit" name="test_connection" value="{tr}Test{/tr}" onclick="{literal}$('#connection_options').hide(); cms_ajax_test_connection($('#connectionform').serializeForCmsAjax()); return false;{/literal}" />
0
       </span>
0
     </p>
0
     <input type="hidden" name="action" value="database" />

Comments

    No one has commented yet.