Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. $input = JFactory::getApplication()->input;
  2. $db = JFactory::getDbo();
  3.  
  4. echo '<h2>Google Calendar Sync Scheduled Task</h2>';
  5.  
  6. //make sure it's a legit request
  7.  
  8. if (!isset($GLOBALS['com_pbbooking_data']['config']->google_cal_sync_secret) || $GLOBALS['com_pbbooking_data']['config']->google_cal_sync_secret != $google_cal_sync_secret)
  9. {
  10. die('Invalid secret.');
  11. }
  12.  
  13. if (!flock($fp, LOCK_EX)) {
  14. //could not get exclusive access to lock file
  15. fclose($fp);
  16. die('Process already running');
  17. }
  18. echo '<p>Starting Sync....</p>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement