Merge pull request #1150 from zklosko/libraries

Refocus: Cleaning up libraries
This commit is contained in:
Lucas Bickel 2021-01-05 14:08:28 +01:00 committed by GitHub
commit ecd302068c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 5 additions and 45432 deletions

View file

@ -1573,68 +1573,6 @@ class Application_Model_Preference
self::setValue("station_podcast_privacy", $value);
}
/**
* Accessors for station bandwidth limit.
*/
public static function getBandwidthLimit() {
return self::getValue("bandwidth_limit");
}
public static function setBandwidthLimit($value) {
self::setValue("bandwidth_limit", $value);
}
/**
* Accessors for bandwidth limit counter.
* Tracks bandwidth usage.
*
* @see ApiController::bandwidthUsageAction()
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitCounter() {
return self::getValue("bandwidth_limit_counter");
}
public static function incrementBandwidthLimitCounter($value) {
$counter = intval(self::getValue("bandwidth_limit_counter"));
self::setValue("bandwidth_limit_counter", $counter + intval($value));
}
public static function resetBandwidthLimitCounter() {
self::setValue("bandwidth_limit_counter", 0);
}
/**
* Accessors for bandwidth limit reset timer.
* Used to determine when to reset the bandwidth counter for the station.
*
* @see BandwidthLimitTask
*/
public static function getBandwidthLimitResetTimer() {
return self::getValue("bandwidth_limit_reset_timer");
}
public static function setBandwidthLimitResetTimer($value) {
self::setValue("bandwidth_limit_reset_timer", $value);
}
/**
* Accessors for bandwidth limit update timer.
* Used to determine when the bandwidth was last updated for this station.
*
* @see ApiController::bandwidthUsageAction()
*/
public static function getBandwidthLimitUpdateTimer() {
return self::getValue("bandwidth_limit_update_timer");
}
public static function setBandwidthLimitUpdateTimer() {
self::setValue("bandwidth_limit_update_timer", microtime(true));
}
/**
* Getter for CORS URLs
*