global $current_user; if (!is_admin($current_user)) { sugar_die("Unauthorized access to administration."); } $_REQUEST['edit'] = 'true'; $header_text = ''; global $mod_strings; global $app_list_strings; global $app_strings; global $current_user; global $timedate; $email = new Email(); /* Start standard EditView setup logic */ $mod_strings = return_module_language($current_language, 'Schedulers'); $focus = new Scheduler(); $focus->checkCurl(); if (isset($_REQUEST['record'])) { Log::debug("In Scheduler edit view, about to retrieve record: " . $_REQUEST['record']); $result = $focus->retrieve($_REQUEST['record']); if ($result == null) { sugar_die($app_strings['ERROR_NO_RECORD']); } } if (isset($_REQUEST['isDuplicate']) && $_REQUEST['isDuplicate'] == 'true') { Log::debug("isDuplicate found - duplicating record of id: " . $focus->id); $focus->id = ""; } $params = array(); $params[] = "<a href='index.php?module=Schedulers&action=index'>{$mod_strings['LBL_MODULE_TITLE']}</a>"; if (empty($focus->id)) { $params[] = $GLOBALS['app_strings']['LBL_CREATE_BUTTON_LABEL'];
public function testcheckCurl() { $scheduler = new Scheduler(); //execute the method and test if it works and does not throws an exception. try { $scheduler->checkCurl(); $this->assertTrue(true); } catch (Exception $e) { $this->fail(); } }