Skip to content

Commit 85a77e6

Browse files
committed
Rename timedecay to unspentdecay
1 parent 311bd3d commit 85a77e6

5 files changed

Lines changed: 26 additions & 26 deletions

File tree

core/apas/apa_timedecay_current.class.php renamed to core/apas/apa_unspentdecay_current.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
die('Do not access this file directly.');
2424
}
2525

26-
if ( !class_exists( "apa_timedecay_current" ) ) {
27-
class apa_timedecay_current extends apa_type_generic {
26+
if ( !class_exists( "apa_unspentdecay_current" ) ) {
27+
class apa_unspentdecay_current extends apa_type_generic {
2828
public static $shortcuts = array('apa' => 'auto_point_adjustments');
2929

3030
protected $ext_options = array(
@@ -47,7 +47,7 @@ class apa_timedecay_current extends apa_type_generic {
4747
),
4848
);
4949

50-
private $modules_affected = array('current_timedecay');
50+
private $modules_affected = array('current_unspentdecay');
5151

5252
private $cached_data = array();
5353

@@ -84,7 +84,7 @@ public function get_value($apa_id, $cache_date, $module, $dkp_id, $data, $refdat
8484
$itempool_id = $data['itempool_id'];
8585
$with_twink = $data['with_twink'];
8686

87-
// The time decay works as follows:
87+
// The unspent decay works as follows:
8888
// We decay any positive earnings after a decay period if these earnings have not been spent.
8989
// The spending of points works in a first in, first out basis, i.e., the earliest earnings are spent first.
9090
// The main assumption is that the given event ID is *only* used for these automatic adjustments.

core/auto_point_adjustments.class.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class auto_point_adjustments extends gen_class {
3737
private $cap_pools = array();
3838
private $hardcap_pools = array();
3939
private $currentcap_pools = array();
40-
private $timedecay_pools = array();
40+
private $unspentdecay_pools = array();
4141

4242
private $apa_types_inst = array();
4343

@@ -206,8 +206,8 @@ public function is_decay($module, $pool) {
206206
if(empty($this->apa_tab)) return false;
207207
if(empty($this->decayed_pools)) {
208208
foreach($this->apa_tab as $apa_id=> $apa) {
209-
// Exclude timedecay here.
210-
if(stripos($apa['type'], 'decay') === false || stripos($apa['type'], 'timedecay') !== false) continue;
209+
// Exclude unspentdecay here.
210+
if(stripos($apa['type'], 'decay') === false || stripos($apa['type'], 'unspentdecay') !== false) continue;
211211
$modules = $this->get_apa_type($apa['type'])->modules_affected($apa_id);
212212
foreach($apa['pools'] as $dkp_id) {
213213
foreach($modules as $_module) {
@@ -273,21 +273,21 @@ public function is_currentcap($module, $pool) {
273273
return false;
274274
}
275275

276-
public function is_timedecay($module, $pool) {
276+
public function is_unspentdecay($module, $pool) {
277277
if(empty($this->apa_tab)) return false;
278-
if(empty($this->timedecay_pools)) {
278+
if(empty($this->unspentdecay_pools)) {
279279
foreach($this->apa_tab as $apa_id=> $apa) {
280280

281-
if(stripos($apa['type'], 'timedecay') === false) continue;
281+
if(stripos($apa['type'], 'unspentdecay') === false) continue;
282282
$modules = $this->get_apa_type($apa['type'])->modules_affected($apa_id);
283283
foreach($apa['pools'] as $dkp_id) {
284284
foreach($modules as $_module) {
285-
$this->timedecay_pools[$dkp_id][] = $_module;
285+
$this->unspentdecay_pools[$dkp_id][] = $_module;
286286
}
287287
}
288288
}
289289
}
290-
if(!empty($this->timedecay_pools[$pool]) && in_array($module, $this->timedecay_pools[$pool])) return true;
290+
if(!empty($this->unspentdecay_pools[$pool]) && in_array($module, $this->unspentdecay_pools[$pool])) return true;
291291
return false;
292292
}
293293

core/data_handler/includes/modules/read/points/pdh_r_points.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class pdh_r_points extends pdh_r_generic{
3636
private $hardcap = array();
3737
private $currentcap = array();
3838
private $riadecayed = array();
39-
private $timedecayed = array();
39+
private $unspentdecayed = array();
4040
private $arrCalculatedSingle = array();
4141
private $arrCalculatedMulti = array();
4242
private $arrSnapshotTime = array();
@@ -398,7 +398,7 @@ public function get_current($member_id, $multidkp_id, $event_id=0, $itempool_id=
398398
if(!isset($this->decayed[$multidkp_id])) $this->decayed[$multidkp_id] = $this->apa->is_decay('current', $multidkp_id);
399399
if(!isset($this->hardcap[$multidkp_id])) $this->hardcap[$multidkp_id] = $this->apa->is_hardcap('current_hardcap', $multidkp_id);
400400
if(!isset($this->currentcap[$multidkp_id])) $this->currentcap[$multidkp_id] = $this->apa->is_currentcap('current_currentcap', $multidkp_id);
401-
if(!isset($this->timedecayed[$multidkp_id])) $this->timedecayed[$multidkp_id] = $this->apa->is_timedecay('current_timedecay', $multidkp_id);
401+
if(!isset($this->unspentdecayed[$multidkp_id])) $this->unspentdecayed[$multidkp_id] = $this->apa->is_unspentdecay('current_unspentdecay', $multidkp_id);
402402

403403
if($with_apa && $this->decayed[$multidkp_id]) {
404404
$data = array(
@@ -416,7 +416,7 @@ public function get_current($member_id, $multidkp_id, $event_id=0, $itempool_id=
416416
$value = ($this->get_earned($member_id, $multidkp_id, $event_id, $with_twink) - $this->get_spent($member_id, $multidkp_id, $event_id, $itempool_id, $with_twink) + $this->get_adjustment($member_id, $multidkp_id, $event_id, $with_twink));
417417
}
418418

419-
if($with_apa && $this->timedecayed[$multidkp_id]){
419+
if($with_apa && $this->unspentdecayed[$multidkp_id]){
420420
$data = array(
421421
'id' => $multidkp_id.'_'.$member_id.'_'.(($with_twink) ? 1 : 0),
422422
'val' => $value,
@@ -426,7 +426,7 @@ public function get_current($member_id, $multidkp_id, $event_id=0, $itempool_id=
426426
'itempool_id' => $itempool_id,
427427
'with_twink' => ($with_twink) ? true : false,
428428
);
429-
$value = $this->apa->get_value('current_timedecay', $multidkp_id, $this->time->time, $data);
429+
$value = $this->apa->get_value('current_unspentdecay', $multidkp_id, $this->time->time, $data);
430430
}
431431

432432
if($with_apa && $this->currentcap[$multidkp_id]){

language/english/lang_admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -824,7 +824,7 @@
824824
"apa_of_type" => 'of type',
825825
"apa_start_date" => 'Start date',
826826
"apa_decay_ria_start_date_help" => 'Only raids/items/adjustments after this date will be considered.',
827-
"apa_timedecay_current_start_date_help" => 'Only earnings after this date will be considered.',
827+
"apa_unspentdecay_current_start_date_help" => 'Only earnings after this date will be considered.',
828828
"apa_exectime" => 'time of execution',
829829
"apa_pools" => 'Point accounts',
830830
"apa_zero_time" => 'Period, after the points become 0.',
@@ -847,15 +847,15 @@
847847
"apa_cap_current_interval" => "Check point cap every x days",
848848
"apa_cap_current_event" => "Event for the adjustment",
849849
"apa_cap_current_twinks" => "Check twinks separately?",
850-
"apa_timedecay_current_decay_time_help" => "Remove unspent points x days after earning them (points are spent on the first non-decayed points earned).",
851-
"apa_timedecay_current_event" => "Event for the adjustment",
852-
"apa_timedecay_current_event_help" => "Make sure this is a separate event that is only used by this decay mechanism.",
850+
"apa_unspentdecay_current_decay_time_help" => "Remove unspent points x days after earning them (points are spent on the first non-decayed points earned).",
851+
"apa_unspentdecay_current_event" => "Event for the adjustment",
852+
"apa_unspentdecay_current_event_help" => "Make sure this is a separate event that is only used by this decay mechanism.",
853853
"apa_type_decay_ria" => 'Decay on Raids, Items and Adjustments',
854854
"apa_type_decay_current" => 'Decay on Current',
855855
"apa_type_cap_current" => 'Maximum points (repeating)',
856856
"apa_type_hardcap_current" => "Maximum points (visible)",
857857
"apa_type_currentcap_current" => "Maximum points (hard)",
858-
"apa_type_timedecay_current" => "Decay unspent",
858+
"apa_type_unspentdecay_current" => "Decay unspent",
859859
"apa_type_startpoints" => 'Start points',
860860
"apa_type_onetime_current" => "Onetime adjustment",
861861
"apa_type_inactivity" => 'Inactivity',

language/german/lang_admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -821,7 +821,7 @@
821821
"apa_of_type" => "vom Typ",
822822
"apa_start_date" => "Startdatum",
823823
"apa_decay_ria_start_date_help" => "Nur Raids/Items/Korrekturen nach diesem Datum werden berücksichtigt.",
824-
"apa_timedecay_current_start_date_help" => "Nur Punkte ab diesem Datum können verfallen.",
824+
"apa_unspentdecay_current_start_date_help" => "Nur Punkte ab diesem Datum können verfallen.",
825825
"apa_exectime" => "Ausführzeit (HH:MM)",
826826
"apa_pools" => "Punktekonten",
827827
"apa_zero_time" => "Zeitraum, nach dem Punkte 0 werden.",
@@ -850,10 +850,10 @@
850850
"apa_hardcap_current_lower_cap" => "Unteres Punktelimit",
851851
"apa_onetime_current_event" => "Ereignis für die Korrektur",
852852
"apa_onetime_current_twinks" => "Twinks separat behandeln?",
853-
"apa_type_timedecay_current" => "Verfall ungenutzter Punkte",
854-
"apa_timedecay_current_decay_time_help" => "Entferne nicht verbrauchte Punkte x Tage nachdem sie gutgeschrieben wurden (Punkte werden mit frühsten, nicht verfallenen Gutschriften verrechnet).",
855-
"apa_timedecay_current_event" => "Ereignis für die Korrektur",
856-
"apa_timedecay_current_event_help" => "Stelle sicher, dass dies ein separates Event ist, welches nur für den Verfallsmechanismus verwendet wird.",
853+
"apa_type_unspentdecay_current" => "Verfall ungenutzter Punkte",
854+
"apa_unspentdecay_current_decay_time_help" => "Entferne nicht verbrauchte Punkte x Tage nachdem sie gutgeschrieben wurden (Punkte werden mit frühsten, nicht verfallenen Gutschriften verrechnet).",
855+
"apa_unspentdecay_current_event" => "Ereignis für die Korrektur",
856+
"apa_unspentdecay_current_event_help" => "Stelle sicher, dass dies ein separates Event ist, welches nur für den Verfallsmechanismus verwendet wird.",
857857
"apa_type_startpoints" => "Startpunkte",
858858
"apa_type_inactivity" => "Inaktivität",
859859
"apa_type_activity" => "Aktivität",

0 commit comments

Comments
 (0)