summaryrefslogtreecommitdiff
path: root/Contact.php
diff options
context:
space:
mode:
authorLester Caine ext:(%22) <lester@lsces.co.uk>2012-04-15 22:14:06 +0100
committerLester Caine ext:(%22) <lester@lsces.co.uk>2012-04-15 22:14:06 +0100
commitdb5b4ca3b928017e11c7a63d65e1e9b784a587d7 (patch)
tree884d2f965b943b6472e5e7555008880ed802eb9a /Contact.php
parentf35583f7c089b9ca39d6a4e3bb05e30cf4b6363e (diff)
downloadcontact-db5b4ca3b928017e11c7a63d65e1e9b784a587d7.tar.gz
contact-db5b4ca3b928017e11c7a63d65e1e9b784a587d7.tar.bz2
contact-db5b4ca3b928017e11c7a63d65e1e9b784a587d7.zip
Tidy up to remove 'STRICT' warnings
Split static and dynamic use of getDisplayUrl Create getContentUrl as the instantiated version load parameters need to be identical across all classes
Diffstat (limited to 'Contact.php')
-rw-r--r--Contact.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/Contact.php b/Contact.php
index d1fcb4a..ad1c017 100644
--- a/Contact.php
+++ b/Contact.php
@@ -67,7 +67,7 @@ class Contact extends LibertyContent {
*
* (Describe Contact object here )
*/
- function load($pContentId = NULL) {
+ function load( $pContentId = NULL, $pPluginParams = NULL ) {
if ( $pContentId ) $this->mContentId = (int)$pContentId;
if( $this->verifyId( $this->mContentId ) ) {
$query = "select con.*, lc.*,
@@ -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->getDisplayUrl();
+ $this->mInfo['display_url'] = $this->getContactUrl();
$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'] = ''; }
@@ -261,9 +261,9 @@ class Contact extends LibertyContent {
* @param array different possibilities depending on derived class
* @return string the link to display the page.
*/
- function getDisplayUrl( $pContentId=NULL ) {
+ function getContactUrl( $pContentId=NULL ) {
global $gBitSystem;
- if( empty( $pContentId ) ) {
+ if( empty( $pContentId ) and isset($this) ) {
$pContentId = $this->mContentId;
}
@@ -277,13 +277,13 @@ class Contact extends LibertyContent {
* @param array mInfo style array of content information
* @return the link to display the page.
*/
- function getDisplayLink( $pText, $aux ) {
- if ( $this->mContentId != $aux['content_id'] ) $this->load($aux['content_id']);
+ function getDisplayLink( $pTitle=NULL, $pMixed=NULL, $pAnchor=NULL ) {
+ if ( $this->mContentId != $pMixed['content_id'] ) $this->load($pMixed['content_id']);
if (empty($this->mInfo['content_id']) ) {
- $ret = '<a href="'.$this->getDisplayUrl($aux['content_id']).'">'.$aux['title'].'</a>';
+ $ret = '<a href="'.$this->getContactUrl($pMixed['content_id']).'">'.$pMixed['title'].'</a>';
} else {
- $ret = '<a href="'.$this->getDisplayUrl($aux['content_id']).'">'."Contact - ".$this->mInfo['title'].'</a>';
+ $ret = '<a href="'.$this->getContactUrl($pMixed['content_id']).'">'."Contact - ".$this->mInfo['title'].'</a>';
}
return $ret;
}
@@ -294,7 +294,7 @@ class Contact extends LibertyContent {
* @param array mInfo style array of content information
* @return string Text for the title description
*/
- function getTitle( $pHash = NULL ) {
+ function getTitle( $pHash = NULL, $pDefault=TRUE ) {
$ret = NULL;
if( empty( $pHash ) ) {
$pHash = &$this->mInfo;