Adding the IHP Kit.
This commit is contained in:
parent
fc8808c5c0
commit
55108689b4
11 changed files with 1047 additions and 0 deletions
26
sbin/Hourly/CleanLoginHistory.pm
Normal file
26
sbin/Hourly/CleanLoginHistory.pm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package Hourly::CleanLoginHistory;
|
||||
|
||||
my $ageToDelete = 90; # in days, time to wait before deleting from login log
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("delete from userLoginLog where timeStamp<".(time()-(86400*$ageToDelete)));
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
27
sbin/Hourly/DecayKarma.pm
Normal file
27
sbin/Hourly/DecayKarma.pm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package Hourly::DecayKarma;
|
||||
|
||||
my $minimumKarma = 0; # won't go below this number
|
||||
my $decayFactor = 1; # amount to remove per hour
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("update users set karma=karma-$decayFactor where karma>".$minimumKarma);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
26
sbin/Hourly/DeleteExpiredEvents.pm
Normal file
26
sbin/Hourly/DeleteExpiredEvents.pm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package Hourly::DeleteExpiredEvents;
|
||||
|
||||
my $offset = 0; # in days, time to wait before deleting
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("delete from EventsCalendar_event where endDate<".(time()-(86400*$offset)));
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
25
sbin/Hourly/DeleteExpiredGroupings.pm
Normal file
25
sbin/Hourly/DeleteExpiredGroupings.pm
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
package Hourly::DeleteExpiredGroupings;
|
||||
|
||||
my $offset = 0; # in seconds, time to wait before deleting
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("delete from groupings where expireDate<".(time()-(86400*$offset)));
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
27
sbin/Hourly/EmptyTrash.pm
Normal file
27
sbin/Hourly/EmptyTrash.pm
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
package Hourly::EmptyTrash;
|
||||
|
||||
#-----------------------------------------
|
||||
# Copyright 2002 Plain Black LLC
|
||||
#-----------------------------------------
|
||||
# Before using this software be sure you
|
||||
# agree to the terms of its license, which
|
||||
# can be found in docs/ihpkit.pdf of this
|
||||
# distribution.
|
||||
#-----------------------------------------
|
||||
# http://www.plainblack.com
|
||||
# info@plainblack.com
|
||||
#-----------------------------------------
|
||||
|
||||
|
||||
use strict;
|
||||
use WebGUI::Operation::Trash;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::Operation::Trash::www_purgeTrashConfirm();
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
26
sbin/Hourly/TrashExpiredContent.pm
Normal file
26
sbin/Hourly/TrashExpiredContent.pm
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
package Hourly::TrashExpiredContent;
|
||||
|
||||
my $offset = 0; # in seconds, time to wait before deleting
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2002 Plain Black LLC.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
# this software.
|
||||
#-------------------------------------------------------------------
|
||||
# http://www.plainblack.com info@plainblack.com
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-----------------------------------------
|
||||
sub process {
|
||||
WebGUI::SQL->write("update page set parentId=3, endDate=endDate+31536000 where endDate<".(time()-(86400*$offset)));
|
||||
WebGUI::SQL->write("update wobject set pageId=3, endDate=endDate+31536000 where endDate<".(time()-(86400*$offset)));
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue