2013-05-27 08:00:58 +00:00
|
|
|
<?php
|
|
|
|
class Reports {
|
|
|
|
/**
|
|
|
|
* This function formats a string containing a torrent's remaster information
|
|
|
|
* to be used in Reports v2.
|
|
|
|
*
|
|
|
|
* @param boolean $Remastered - whether the torrent contains remaster information
|
|
|
|
* @param string $RemasterTitle - the title of the remaster information
|
|
|
|
* @param string $RemasterYear - the year of the remaster information
|
|
|
|
*/
|
|
|
|
public static function format_reports_remaster_info($Remastered, $RemasterTitle, $RemasterYear) {
|
|
|
|
if ($Remastered) {
|
|
|
|
$RemasterDisplayString = ' <';
|
|
|
|
if ($RemasterTitle != '' && $RemasterYear != '') {
|
|
|
|
$RemasterDisplayString .= "$RemasterTitle - $RemasterYear";
|
2013-09-15 08:00:53 +00:00
|
|
|
} elseif ($RemasterTitle != '' && $RemasterYear == '') {
|
2013-05-27 08:00:58 +00:00
|
|
|
$RemasterDisplayString .= $RemasterTitle;
|
2013-09-15 08:00:53 +00:00
|
|
|
} elseif ($RemasterTitle == '' && $RemasterYear != '') {
|
2013-05-27 08:00:58 +00:00
|
|
|
$RemasterDisplayString .= $RemasterYear;
|
|
|
|
}
|
|
|
|
$RemasterDisplayString .= '>';
|
|
|
|
} else {
|
|
|
|
$RemasterDisplayString = '';
|
|
|
|
}
|
|
|
|
return $RemasterDisplayString;
|
|
|
|
}
|
|
|
|
}
|