Skip to content

Commit

Permalink
Add a manual stats update button to the plugin config.
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismeller committed May 18, 2011
1 parent 7f3b2ba commit a44c594
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cwm_companion.plugin.php
Expand Up @@ -27,6 +27,7 @@ public function filter_plugin_config ( $actions, $plugin_id ) {
if ( $plugin_id == $this->plugin_id() ) {

$actions[] = _t('Update Flickr Cache');
$actions[] = _t('Update Commit Stats Cache');
$actions[] = _t('Configure');

}
Expand All @@ -50,6 +51,15 @@ public function action_plugin_ui ( $plugin_id, $action ) {

break;

case _t('Update Commit Stats Cache'):

self::update_commit_stats();

Session::notice( _t('Commit stats updated!') );
Utils::redirect( URL::get( 'admin', 'page=plugins' ) );

break;

case _t('Configure'):

$ui = new FormUI( 'cwm_companion' );
Expand Down

0 comments on commit a44c594

Please sign in to comment.