diff options
| author | spiderr <spiderr@bitweaver.org> | 2021-01-31 15:48:40 -0500 |
|---|---|---|
| committer | spiderr <spiderr@bitweaver.org> | 2021-01-31 15:48:40 -0500 |
| commit | 2175a98906031fff0d8932acaef2996dd09c42fe (patch) | |
| tree | 8621987a926f52e423599422423b02c7e71cb9cb | |
| parent | 9b49585a9b0393e9a90f911c38565e88f98dfe0d (diff) | |
| download | boards-2175a98906031fff0d8932acaef2996dd09c42fe.tar.gz boards-2175a98906031fff0d8932acaef2996dd09c42fe.tar.bz2 boards-2175a98906031fff0d8932acaef2996dd09c42fe.zip | |
PHP7 clean up dual static + object use of parseData, and create ->getParsedData & ::filterDataHash
| -rw-r--r-- | BitBoard.php | 4 | ||||
| -rw-r--r-- | BitBoardPost.php | 4 | ||||
| -rw-r--r-- | boards_comments_inc.php | 2 | ||||
| -rw-r--r-- | boards_rss.php | 3 | ||||
| -rw-r--r-- | user_preferences_inc.php | 1 |
5 files changed, 6 insertions, 8 deletions
diff --git a/BitBoard.php b/BitBoard.php index 50c5ec0..91f8352 100644 --- a/BitBoard.php +++ b/BitBoard.php @@ -89,7 +89,7 @@ class BitBoard extends LibertyMime { $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['parsed_data'] = $this->parseData(); + $this->parseData(); LibertyMime::load(); } @@ -572,7 +572,7 @@ WHERE map.`board_content_id`=lc.`content_id` AND ((s_lc.`user_id` < 0) AND (s.`i $res['track']['on'] = false; } unset($res['track_count']); - $res['parsed_data']=$this->parseData($res); + $res['parsed_data'] = LibertyContent::parseDataHash( $res ); $res['last'] = $this->getLastTopic($res); } $ret[] = $res; diff --git a/BitBoardPost.php b/BitBoardPost.php index 7997417..65d0743 100644 --- a/BitBoardPost.php +++ b/BitBoardPost.php @@ -212,7 +212,7 @@ class BitBoardPost extends LibertyComment { } $row['data'] = trim( $row['data'] ); $row['user_url'] = BitUser::getDisplayUrlFromHash( $row ); - $row['parsed_data'] = $this->parseData( $row ); + $row['parsed_data'] = self::parseDataHash( $row ); $row['level'] = substr_count ( $row['thread_forward_sequence'], '.' ) - 1; $c = new LibertyComment(); $c->mInfo=$row; @@ -330,7 +330,7 @@ class BitBoardPost extends LibertyComment { } $row['data'] = trim($row['data']); $row['user_url']=BitUser::getDisplayUrlFromHash($row); - $row['parsed_data'] = $this->parseData( $row ); + $row['parsed_data'] = self::parseDataHash( $row ); $row['level'] = substr_count ( $row['thread_forward_sequence'], '.' ) - 1; $row['topic_id'] = boards_get_topic_comment( $row['thread_forward_sequence'] ); $row['display_url'] = static::getDisplayUrlFromHash( $row ); diff --git a/boards_comments_inc.php b/boards_comments_inc.php index 121ebd5..7978ab2 100644 --- a/boards_comments_inc.php +++ b/boards_comments_inc.php @@ -41,7 +41,7 @@ if (!function_exists("send_board_email")) { $headerHash['sender'] = $userInfo['email']; } $headerHash['x_headers']['X-BitBoards-Comment'] = $storeComment->mCommentId; - $messageId = $bitMailer->sendEmail( $storeComment->getTitle(), $storeComment->parseData(), $email, $headerHash ); + $messageId = $bitMailer->sendEmail( $storeComment->getTitle(), $storeComment->getParsedData(), $email, $headerHash ); $storeComment->storeMessageId( $messageId ); } } diff --git a/boards_rss.php b/boards_rss.php index 1de8151..a266cc1 100644 --- a/boards_rss.php +++ b/boards_rss.php @@ -53,9 +53,8 @@ $rss->useCached( $rss_version_name, $cacheFile, $gBitSystem->getConfig( 'rssfeed $title = tra("Recent Discussions"); $description = tra("All recent forum discussions on ".$gBitSystem->getConfig( 'site_title' ) ); if( $gContent->isValid() ){ - $gContent->parseData(); $title = $gContent->getField( 'title' )." Feed"; - $description = $gContent->getField( 'parsed_data' ); + $description = $gContent->getParsedData(); } $rss->title = $title; $rss->description = $description; diff --git a/user_preferences_inc.php b/user_preferences_inc.php index 2f175a2..201acd9 100644 --- a/user_preferences_inc.php +++ b/user_preferences_inc.php @@ -47,7 +47,6 @@ if( isset( $_REQUEST["format_guid"] ) ) { if( isset( $_REQUEST['bitboarduprefs']["edit"] ) ) { $signatureContent->mInfo["data"] = $_REQUEST['bitboarduprefs']["edit"]; - $signatureContent->mInfo['parsed_data'] = $signatureContent->parseData(); } // If we are in preview mode then preview it! |
