Author: eschwert
Date: Thu Aug 23 21:01:17 2012
New Revision: 1376697
URL: http://svn.apache.org/viewvc?rev=1376697&view=rev
Log:
native methods for plugin configuration
Modified:
incubator/openmeetings/trunk/plugins/sugarcrm/SugarModules/modules/Administration/SaveOpenmeetings.php
Modified:
incubator/openmeetings/trunk/plugins/sugarcrm/SugarModules/modules/Administration/SaveOpenmeetings.php
URL:
http://svn.apache.org/viewvc/incubator/openmeetings/trunk/plugins/sugarcrm/SugarModules/modules/Administration/SaveOpenmeetings.php?rev=1376697&r1=1376696&r2=1376697&view=diff
==============================================================================
---
incubator/openmeetings/trunk/plugins/sugarcrm/SugarModules/modules/Administration/SaveOpenmeetings.php
(original)
+++
incubator/openmeetings/trunk/plugins/sugarcrm/SugarModules/modules/Administration/SaveOpenmeetings.php
Thu Aug 23 21:01:17 2012
@@ -48,28 +48,13 @@ $openmeetings_language = $_REQUEST["open
if(is_admin($current_user)){
- $sq = "update config set value='$openmeetings_url' where category='info' and
name='openmeetings_url'";
-global $db;
-$result= $db->query($sq, true);
-
-$sq = "update config set value='$openmeetings_http_port' where category='info'
and name='openmeetings_http_port'";
-global $db;
-$result= $db->query($sq, true);
-
-
-$sq = "update config set value='$openmeetings_username' where category='info'
and name='openmeetings_username'";
-global $db;
-$result= $db->query($sq, true);
-
-$sq = "update config set value='$openmeetings_password' where category='info'
and name='openmeetings_password'";
-global $db;
-$result= $db->query($sq, true);
-
-$sq = "update config set value='$openmeetings_language' where category='info'
and name='openmeetings_language'";
-global $db;
-$result= $db->query($sq, true);
-
+ $focus = new Administration();
+ $focus->saveSetting('info', 'openmeetings_url', $openmeetings_url);
+ $focus->saveSetting('info', 'openmeetings_http_port',
$openmeetings_http_port);
+ $focus->saveSetting('info', 'openmeetings_username',
$openmeetings_username);
+ $focus->saveSetting('info', 'openmeetings_password',
$openmeetings_password);
+ $focus->saveSetting('info', 'openmeetings_language',
$openmeetings_language);
}