Skip to content

Commit

Permalink
Expand on IN_SESSION
Browse files Browse the repository at this point in the history
IN_SESSION was covering both "the legislature has convened" and "legislative stuff is happening." Breaking it out into IN_SESSION and LEGISLATIVE_SEASON means that we can be finer-grained about which functions run when.
  • Loading branch information
waldoj committed Jan 8, 2024
1 parent b95cf2e commit 679edd0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cron/checks.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @usage Must be invoked from within update.php.
*/

if (IN_SESSION == 'Y')
if (LEGISLATIVE_SEASON == true)
{

/*
Expand Down
2 changes: 1 addition & 1 deletion cron/cleanup.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
# it's not in session, we based it on the past three days. The formula itself is based on five
# factors: comments, views, Photosynthesis adds, poll votes, and subscriptions to comments.
###
if (IN_SESSION == 'y')
if (LEGISLATIVE_SEASON == true)
{
$days = 1;
}
Expand Down
2 changes: 1 addition & 1 deletion cron/copatrons-manual.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
include_once(__DIR__ . '/../includes/settings.inc.php');
include_once(__DIR__ . '/../includes/functions.inc.php');

if (IN_SESSION == 'N')
if (LEGISLATIVE_SEASON == false)
{
die('The General Assembly is not in session.');
}
Expand Down
5 changes: 4 additions & 1 deletion cron/ps_send_emails.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
require_once __DIR__ . '/../includes/phpmailer/class.phpmailer.php';

# Don't bother to run this if the General Assembly isn't in session.
if (IN_SESSION == 'n') exit();
if (LEGISLATIVE_SEASON == false)
{
exit();
}

# DECLARATIVE FUNCTIONS
# Run those functions that are necessary prior to loading this specific
Expand Down
2 changes: 1 addition & 1 deletion cron/update.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
$log = new Log;

# Don't bother to run this if the General Assembly isn't in session.
if (IN_SESSION == 'N')
if (LEGISLATIVE_SEASON == false)
{
exit();
}
Expand Down
2 changes: 1 addition & 1 deletion cron/vote.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

# Don't bother to run this if the General Assembly isn't in session.
if (IN_SESSION == 'n')
if (IN_SESSION == false)
{
return FALSE;
}
Expand Down

0 comments on commit 679edd0

Please sign in to comment.