summaryrefslogtreecommitdiff
path: root/Contact.php
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2012-08-06 15:12:43 +0100
committerlsces <lester@lsces.co.uk>2012-08-06 15:12:43 +0100
commit5cb254fbb1af3ae0372fc79c231088a31e397e38 (patch)
tree5657fe8e3e37261c856ed46ee2b7f3f7f57b8f36 /Contact.php
parent71b81ea184bc96e6615dc346e88aad80f5cdc063 (diff)
downloadcontact-5cb254fbb1af3ae0372fc79c231088a31e397e38.tar.gz
contact-5cb254fbb1af3ae0372fc79c231088a31e397e38.tar.bz2
contact-5cb254fbb1af3ae0372fc79c231088a31e397e38.zip
Bring in line with getDisplayUrl changes
Diffstat (limited to 'Contact.php')
-rw-r--r--Contact.php18
1 files changed, 10 insertions, 8 deletions
diff --git a/Contact.php b/Contact.php
index 6f80ffc..05b031b 100644
--- a/Contact.php
+++ b/Contact.php
@@ -97,7 +97,7 @@ class Contact extends LibertyContent {
$this->mContactName = $result->fields['title'];
$this->mInfo['creator'] = (isset( $result->fields['creator_real_name'] ) ? $result->fields['creator_real_name'] : $result->fields['creator_user'] );
$this->mInfo['editor'] = (isset( $result->fields['modifier_real_name'] ) ? $result->fields['modifier_real_name'] : $result->fields['modifier_user'] );
- $this->mInfo['display_url'] = $this->getContactUrl();
+ $this->mInfo['display_url'] = $this->getDisplayUrl();
$this->mInfo['organisation'] = trim($this->mInfo['organisation']);
$name = explode( '|', $this->mInfo['name'] );
if ( isset( $name[0] ) ) { $this->mInfo['prefix'] = $name[0]; } else { $this->mInfo['prefix'] = ''; }
@@ -153,7 +153,9 @@ class Contact extends LibertyContent {
unset( $pParamHash['content_id'] );
}
- $pParamHash['name'] = $pParamHash['prefix'].'|'.$pParamHash['forename'].'|'.$pParamHash['surname'].'|'.$pParamHash['suffix'];
+ if( isset( $pParamHash['surname'] ) ) {
+ $pParamHash['name'] = $pParamHash['prefix'].'|'.$pParamHash['forename'].'|'.$pParamHash['surname'].'|'.$pParamHash['suffix'];
+ }
$pParamHash['title'] = $pParamHash['organisation'];
if ( strlen($pParamHash['surname']) > 0 ) {
@@ -261,9 +263,9 @@ class Contact extends LibertyContent {
* @param array different possibilities depending on derived class
* @return string the link to display the page.
*/
- function getContactUrl( $pContentId=NULL ) {
+ function getDisplayUrl( $pContentId=NULL ) {
global $gBitSystem;
- if( empty( $pContentId ) and isset($this) ) {
+ if( empty( $pContentId ) ) {
$pContentId = $this->mContentId;
}
@@ -277,13 +279,13 @@ class Contact extends LibertyContent {
* @param array mInfo style array of content information
* @return the link to display the page.
*/
- function getDisplayLink( $pTitle=NULL, $pMixed=NULL, $pAnchor=NULL ) {
- if ( $this->mContentId != $pMixed['content_id'] ) $this->load($pMixed['content_id']);
+ function getDisplayLink( $pLinkText=NULL, $pMixed=NULL, $pAnchor=NULL ) {
+ if ( $this->mContentId != $pMixed['content_id'] ) $this->load($aux['content_id']);
if (empty($this->mInfo['content_id']) ) {
- $ret = '<a href="'.$this->getContactUrl($pMixed['content_id']).'">'.$pMixed['title'].'</a>';
+ $ret = '<a href="'.$this->getDisplayUrl($pMixed['content_id']).'">'.$pMixed['title'].'</a>';
} else {
- $ret = '<a href="'.$this->getContactUrl($pMixed['content_id']).'">'."Contact - ".$this->mInfo['title'].'</a>';
+ $ret = '<a href="'.$this->getDisplayUrl($pMixed['content_id']).'">'."Contact - ".$this->mInfo['title'].'</a>';
}
return $ret;
}