Skip to content

Commit

Permalink
Adding active plugins to API version call. Closes Ushahidi_Web Redmin…
Browse files Browse the repository at this point in the history
…e ticket Feature number 2336
  • Loading branch information
brianherbert committed Oct 17, 2011
1 parent ba2f145 commit dff5a16
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion application/libraries/api/MY_System_Api_Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,25 @@ public function get_version_number()
$this->replar[] = 'version';
}

// Get Active Plugins
$plugins = ORM::factory('plugin')
->where('plugin_active = 1')
->orderby('plugin_name', 'ASC')
->find_all();
$active_plugins = array();
foreach($plugins as $plugin){
$active_plugins[] = $plugin->plugin_name;
}

// Create the json array
$data = array(
"payload" => array(
"domain" => $this->domain,
"version" => $json_version,
"checkins" => Kohana::config('settings.checkins'),
"email" => Kohana::config('settings.site_email'),
"sms" => Kohana::config('settings.sms_no1')
"sms" => Kohana::config('settings.sms_no1'),
"plugins" => $active_plugins
),
"error" => $this->api_service->get_error_msg(0)
);
Expand Down

0 comments on commit dff5a16

Please sign in to comment.