You are here

function salesforce_log_manage_page in Salesforce Suite 5

delete or disable a logged item

1 string reference to 'salesforce_log_manage_page'
salesforce_menu in ./salesforce.module
Implementation of hook_menu().

File

./salesforce.module, line 379
Original Creator, Maintainer & Developer: Steve McKenzie (http://drupal.org/user/45890) Drupal and Salesforce.com (mainly only working with contacts / leads but can be extended to do anything the salesforce API version 6 can do) Current…

Code

function salesforce_log_manage_page() {
  $op = arg(3);
  $sid = arg(4);
  if (is_numeric($sid)) {
    switch ($op) {
      case 'disable':
        $disable = true;
        $message = t('disabled');
        break;
      case 'enable':
        $enable = true;
        $disable = false;
        $message = t('enabled');
        break;
      default:
        $disable = false;
        $message = t('deleted');
        break;
    }
    _salesforce_log_manage($sid, $disable, $enable);
    if (user_access('administer salesforce')) {
      drupal_set_message(t('%message log entry', array(
        '%message' => $message,
      )));
    }
    drupal_goto('admin/salesforce');
  }
}