summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2013-07-11 22:05:40 +0100
committerlsces <lester@lsces.co.uk>2013-07-11 22:05:40 +0100
commit98cc3118e7f767cbad646a891916e33cb923ba73 (patch)
tree4b9241514c7df4218b4937349ac8256943cfb9b6
parent093a35dc9e26063669cdee75007cc8e4457b49ef (diff)
downloadboards-98cc3118e7f767cbad646a891916e33cb923ba73.tar.gz
boards-98cc3118e7f767cbad646a891916e33cb923ba73.tar.bz2
boards-98cc3118e7f767cbad646a891916e33cb923ba73.zip
Tidy up commenting for phpdoc manual
-rw-r--r--BitBoardPost.php34
-rw-r--r--BitBoardTopic.php35
2 files changed, 41 insertions, 28 deletions
diff --git a/BitBoardPost.php b/BitBoardPost.php
index fa5ca40..07addde 100644
--- a/BitBoardPost.php
+++ b/BitBoardPost.php
@@ -22,8 +22,8 @@ require_once( BOARDS_PKG_PATH.'BitBoardTopic.php' );
*/
class BitBoardPost extends LibertyComment {
/**
- * During initialisation, be sure to call our base constructors
- **/
+ * During initialisation, be sure to call our base constructors
+ */
function BitBoardPost($pCommentId = NULL, $pContentId = NULL, $pInfo = NULL) {
parent::__construct($pCommentId,$pContentId,$pInfo);
@@ -33,6 +33,9 @@ class BitBoardPost extends LibertyComment {
$this->mAdminContentPerm = 'p_boards_admin';
}
+ /**
+ * This function verifies the data for a post
+ */
function verify( &$pParamHash ) {
if( isset( $pParamHash['is_approved'] ) ) {
if( !is_numeric( $pParamHash['is_approved'] ) || $pParamHash['is_approved'] > 1 || $pParamHash['is_approved'] < 0 ) {
@@ -62,8 +65,8 @@ class BitBoardPost extends LibertyComment {
}
/**
- * This function stores a post
- **/
+ * This function stores a post
+ */
function store( &$pParamHash ) {
global $gBitSystem;
$ret = FALSE;
@@ -83,6 +86,9 @@ class BitBoardPost extends LibertyComment {
return $ret;
}
+ /**
+ * This function gets the meta data relating to a post
+ */
function loadMetaData() {
if ($this->isValid()) {
if (!isset($this->mInfo['accepted'])) {
@@ -121,6 +127,9 @@ class BitBoardPost extends LibertyComment {
return $ret;
}
+ /**
+ * This function gets all the post relating to a topic
+ */
function getComments( $pContentId = NULL, $pMaxComments = NULL, $pOffset = NULL, $pSortOrder = NULL, $pDisplayMode = NULL ) {
global $gBitUser, $gBitSystem;
@@ -241,6 +250,9 @@ class BitBoardPost extends LibertyComment {
return $ret;
}
+ /**
+ * This function gets a list of posts
+ */
function getList( &$pListHash ) {
global $gBitUser, $gBitSystem;
@@ -333,6 +345,9 @@ class BitBoardPost extends LibertyComment {
return $ret;
}
+ /**
+ * This function counts the posts relating to a topic
+ */
function getNumComments($pContentId = NULL) {
$ret = 0;
@@ -357,6 +372,9 @@ class BitBoardPost extends LibertyComment {
return $ret;
}
+ /**
+ * This function generates a valid lookup URL
+ */
function getDisplayUrl() {
$ret = NULL;
if( $this->isValid() ) {
@@ -368,16 +386,16 @@ class BitBoardPost extends LibertyComment {
}
/**
- * Generates the URL to the bitboard page
- * @return the link to display the page.
- */
+ * Generates the URL to the bitboard page
+ * @return the link to display the page.
+ */
public static function getDisplayUrlFromHash( &$pParamHash ) {
global $gBitSystem;
$ret = NULL;
if( static::verifyId( $pParamHash['comment_id'] ) ) {
if( $gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ) {
- $rewrite_tag = $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ? 'view/':'';
+ $rewrite_tag = $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ? 'view/' : '';
$ret = BOARDS_PKG_URL.$rewrite_tag."topic/".$pParamHash['topic_id'];
} else {
$ret = BOARDS_PKG_URL."index.php?t=".$pParamHash['topic_id'];
diff --git a/BitBoardTopic.php b/BitBoardTopic.php
index 69d5cd0..9370dce 100644
--- a/BitBoardTopic.php
+++ b/BitBoardTopic.php
@@ -23,8 +23,8 @@ require_once( BOARDS_PKG_PATH.'BitBoardPost.php' );
define( 'BITBOARDTOPIC_CONTENT_TYPE_GUID', 'bitboardtopic' );
/**
- * @package boards
* expunge is handled explicitly in LibertyComment::expunge
+ * @package boards
*/
class BitBoardTopic extends LibertyMime {
/**
@@ -189,8 +189,8 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * This function stickies a topic
- **/
+ * This function stickies a topic
+ */
function store( &$pParamHash ) {
global $gBitSystem;
$ret = FALSE;
@@ -210,8 +210,8 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * This function locks a topic
- **/
+ * This function locks a topic
+ */
function lock($state) {
global $gBitSystem;
$ret = FALSE;
@@ -234,8 +234,8 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * This function stickies a topic
- **/
+ * This function stickies a topic
+ */
function sticky($state) {
global $gBitSystem;
$ret = FALSE;
@@ -258,8 +258,8 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * This function moves a topic to a new messageboard
- **/
+ * This function moves a topic to a new messageboard
+ */
function moveTo($board_id) {
$ret = FALSE;
// start transaction
@@ -307,8 +307,8 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * This function generates a list of records from the liberty_content database for use in a list page
- **/
+ * This function generates a list of records from the liberty_content database for use in a list page
+ */
function getList( &$pParamHash ) {
global $gBitSystem, $gBitUser;
$BIT_DB_PREFIX = BIT_DB_PREFIX;
@@ -485,21 +485,16 @@ class BitBoardTopic extends LibertyMime {
}
/**
- * Generates the URL to the bitboard page
- * @return the link to display the page.
-
- if( empty( $pTopicId ) ) {
- $pTopicId = $this->mRootId;
- }
-
- */
+ * Generates the URL to the bitboard page
+ * @return the link to display the page.
+ */
public static function getDisplayUrlFromHash( &$pParamHash ) {
global $gBitSystem;
$ret = NULL;
if( !empty( $pParamHash['topic_id'] ) && static::verifyId( $pParamHash['topic_id'] ) ) {
if( $gBitSystem->isFeatureActive( 'pretty_urls' ) || $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ) {
- $rewrite_tag = $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ? 'view/':'';
+ $rewrite_tag = $gBitSystem->isFeatureActive( 'pretty_urls_extended' ) ? 'view/' : '';
$ret = BOARDS_PKG_URL.$rewrite_tag."topic/".$pParamHash['topic_id'];
} else {
$ret=BOARDS_PKG_URL."index.php?t=".$pParamHash['topic_id'];