Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $input = JFactory::getApplication()->input;
- $db = JFactory::getDbo();
- echo '<h2>Google Calendar Sync Scheduled Task</h2>';
- //make sure it's a legit request
- if (!isset($GLOBALS['com_pbbooking_data']['config']->google_cal_sync_secret) || $GLOBALS['com_pbbooking_data']['config']->google_cal_sync_secret != $google_cal_sync_secret)
- {
- die('Invalid secret.');
- }
- if (!flock($fp, LOCK_EX)) {
- //could not get exclusive access to lock file
- fclose($fp);
- die('Process already running');
- }
- echo '<p>Starting Sync....</p>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement