/[drupal]/contributions/modules/poormanscron/poormanscron.module
ViewVC logotype

Diff of /contributions/modules/poormanscron/poormanscron.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.22.2.1, Tue Sep 29 22:31:58 2009 UTC revision 1.22.2.2, Tue Sep 29 22:36:15 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: poormanscron.module,v 1.21.2.2 2009/05/06 05:07:08 robloach Exp $ $Name:  $  // $Id: poormanscron.module,v 1.22.2.1 2009/09/29 22:31:58 davereid Exp $ $Name:  $
3    
4  /**  /**
5   * @file   * @file
# Line 53  function poormanscron_run_cron_check_acc Line 53  function poormanscron_run_cron_check_acc
53   * @see poormanscron_run_cron_check_access()   * @see poormanscron_run_cron_check_access()
54   */   */
55  function poormanscron_run_cron_check() {  function poormanscron_run_cron_check() {
56    // Because we don't have a good way to disable a page from being cached    // Because we don't have a good way to disable a page from being cached (like
57    // (like using page_is_cacheable in Drupal 7), we have to use this ugly hack.    // using page_is_cacheable() in Drupal 7), we have to use this ugly hack.
58    $_SERVER['REQUEST_METHOD'] = 'POST';    $_SERVER['REQUEST_METHOD'] = 'POST';
59    
60    $cron_run = FALSE;    $cron_run = FALSE;
# Line 63  function poormanscron_run_cron_check() { Line 63  function poormanscron_run_cron_check() {
63    // Cron threshold semaphore is used to avoid errors every time the image    // Cron threshold semaphore is used to avoid errors every time the image
64    // callback is displayed when a previous cron is still running.    // callback is displayed when a previous cron is still running.
65    $threshold_semaphore = variable_get('cron_threshold_semaphore', FALSE);    $threshold_semaphore = variable_get('cron_threshold_semaphore', FALSE);
66    if ($threshold_semaphore) {    if ($threshold_semaphore = variable_get('cron_threshold_semaphore', FALSE)) {
67      if ($time - $threshold_semaphore > 3600) {      if ($time - $threshold_semaphore > 3600) {
68        // Either cron has been running for more than an hour or the semaphore        // Either cron has been running for more than an hour or the semaphore
69        // was not reset due to a database error.        // was not reset due to a database error.

Legend:
Removed from v.1.22.2.1  
changed lines
  Added in v.1.22.2.2

  ViewVC Help
Powered by ViewVC 1.1.2