Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
b8019981
Commit
b8019981
authored
Nov 13, 2009
by
Nigel McNie
Browse files
Only insert the institution expiries cronjob if it hasn't been before.
Signed-off-by:
Nigel McNie
<
nigel@catalyst.net.nz
>
parent
483912a8
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/lib/db/upgrade.php
View file @
b8019981
...
...
@@ -889,14 +889,16 @@ function xmldb_core_upgrade($oldversion=0) {
add_field
(
$table
,
$suspended
);
// Insert a cron job to check for soon expiring and expired institutions
$cron
=
new
StdClass
;
$cron
->
callfunction
=
'auth_handle_institution_expiries'
;
$cron
->
minute
=
'5'
;
$cron
->
hour
=
'9'
;
$cron
->
day
=
'*'
;
$cron
->
month
=
'*'
;
$cron
->
dayofweek
=
'*'
;
insert_record
(
'cron'
,
$cron
);
if
(
!
record_exists
(
'cron'
,
'callfunction'
,
'auth_handle_institution_expiries'
))
{
$cron
=
new
StdClass
;
$cron
->
callfunction
=
'auth_handle_institution_expiries'
;
$cron
->
minute
=
'5'
;
$cron
->
hour
=
'9'
;
$cron
->
day
=
'*'
;
$cron
->
month
=
'*'
;
$cron
->
dayofweek
=
'*'
;
insert_record
(
'cron'
,
$cron
);
}
}
if
(
$oldversion
<
2009031800
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment