?> </dl> </div> </body> </html> <?php die; } function numbat_session_stats() { $time = microtime(true) - $GLOBALS['numbat_start_time']; return 'Rendered in ' . round($time, 3) . ' seconds, with ' . Database::instance()->get_count() . ' queries'; } /** Load app configuration if it exists */ if (file_exists(NUMBAT_APPPATH . '/config.php')) { include NUMBAT_APPPATH . '/config.php'; } else { numbat_primative_die("Couldn't load configuration", 'config'); } /** Make sure constant is defined */ if (!defined('NUMBAT_SHOW_DB_ERRORS')) { define('NUMBAT_SHOW_DB_ERRORS', false); } /** Undo magic quotes **/ if (get_magic_quotes_gpc()) { list($_GET, $_POST, $_COOKIE, $_REQUEST) = stripslashes_deep(array($_GET, $_POST, $_COOKIE, $_REQUEST)); } // Connect to database Database::instance(Config::instance()->get('db')); Controller::parse(); Controller::handle();
public static function importFromMail($ical) { $args = Controller::parse(array('service' => 'iCal'), $data, $params); include ROOTPATH . '/Sync.php'; }
static function importCollection($url, $calendar) { ob_start(); require_once ROOTPATH . '/plugins/davicalCliente/caldav-client-v2.php'; $cal = new CalDAVClient(Config::service('CalDAV', 'url') . '/', Config::me('uid'), Config::me('password')); $events = $cal->GetCollectionETags($url); $args = array(); foreach ($events as $ie => $ve) { $cal->DoGETRequest($ie); $sync = Controller::parse(array('service' => 'iCal'), $cal->GetResponseBody(), array('calendar' => $calendar, 'owner' => Config::me('uidNumber'))); if (is_array($sync)) { $args = array_merge($args, $sync); } } include ROOTPATH . '/Sync.php'; ob_end_clean(); }
/** * @dataProvider responseTypeProvider */ public function testResponseType($path, $type) { $controller = new Controller($path); $request = $controller->parse(); $this->assertEquals($request->response_type, $type); }