Distributions don't have descriptions, so don't try to retrieve this entry from the database
row object. Call out to objectMakeUrl() instead of using its address. Fixes two errors exposed by the unit tests.
This commit is contained in:
@@ -10,7 +10,6 @@ require_once(BASE."include/util.php");
|
|||||||
class distribution {
|
class distribution {
|
||||||
var $iDistributionId;
|
var $iDistributionId;
|
||||||
var $sName;
|
var $sName;
|
||||||
var $sDescription;
|
|
||||||
var $sUrl;
|
var $sUrl;
|
||||||
var $sSubmitTime;
|
var $sSubmitTime;
|
||||||
var $iSubmitterId;
|
var $iSubmitterId;
|
||||||
@@ -37,7 +36,6 @@ class distribution {
|
|||||||
{
|
{
|
||||||
$this->iDistributionId = $iDistributionId;
|
$this->iDistributionId = $iDistributionId;
|
||||||
$this->sName = $oRow->name;
|
$this->sName = $oRow->name;
|
||||||
$this->sDescription = $oRow->description;
|
|
||||||
$this->sUrl = $oRow->url;
|
$this->sUrl = $oRow->url;
|
||||||
$this->sSubmitTime = $oRow->submitTime;
|
$this->sSubmitTime = $oRow->submitTime;
|
||||||
$this->iSubmitterId = $oRow->submitterId;
|
$this->iSubmitterId = $oRow->submitterId;
|
||||||
@@ -288,7 +286,7 @@ class distribution {
|
|||||||
{
|
{
|
||||||
$sSubject = "Distribution ".$this->sName." added by ".
|
$sSubject = "Distribution ".$this->sName." added by ".
|
||||||
$_SESSION['current']->sRealname;
|
$_SESSION['current']->sRealname;
|
||||||
$sMsg = $this->objectMakeUrl."\n";
|
$sMsg = $this->objectMakeUrl()."\n";
|
||||||
if($this->iSubmitterId)
|
if($this->iSubmitterId)
|
||||||
{
|
{
|
||||||
$oSubmitter = new User($this->iSubmitterId);
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
|
|||||||
Reference in New Issue
Block a user