Skip to content

Commit

Permalink
Fixed broken connector save
Browse files Browse the repository at this point in the history
  • Loading branch information
mattlorimer committed Mar 14, 2014
1 parent 5ec143b commit 8983fdf
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions custom/modules/Connectors/controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,37 @@ function add_social_field($module, $field_name)

}

function action_SaveModifyProperties() {
require_once('include/connectors/sources/SourceFactory.php');
$sources = array();
$properties = array();
foreach($_REQUEST as $name=>$value) {
if(preg_match("/^source[0-9]+$/", $name, $matches)) {
$source_id = $value;
$properties = array();
foreach($_REQUEST as $arg=>$val) {
if(preg_match("/^{$source_id}_(.*?)$/", $arg, $matches2)) {
$properties[$matches2[1]] = $val;
}
}
$source = SourceFactory::getSource($source_id);
if(!empty($properties)) {
$source->setProperties($properties);
$source->saveConfig();
}
}
}

require_once('include/connectors/utils/ConnectorUtils.php');
ConnectorUtils::updateMetaDataFiles();
// BEGIN SUGAR INT
if(empty($_REQUEST['from_unit_test'])) {
// END SUGAR INT
header("Location: index.php?action=ConnectorSettings&module=Connectors");
// BEGIN SUGAR INT
}
}


private function create_panel_on_view($view, $field, $module, $panel_name){
//require and create object.
Expand Down
Binary file removed custom/themes/default/images/icon_jjwg_Maps.gif
Binary file not shown.
Binary file removed custom/themes/default/images/icon_jjwg_Maps.png
Binary file not shown.

0 comments on commit 8983fdf

Please sign in to comment.