diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-10-31 10:39:08 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-10-31 10:39:08 +0000 |
| commit | c39d829f43de634de4565d785052861c3a0ee455 (patch) | |
| tree | adfa1867b4df1f4db7eaf0f10f9e3403a1446be4 /liberty_lib.php | |
| parent | c3758edf57b42d3a7348ab3c55284385474d5dd5 (diff) | |
| download | liberty-c39d829f43de634de4565d785052861c3a0ee455.tar.gz liberty-c39d829f43de634de4565d785052861c3a0ee455.tar.bz2 liberty-c39d829f43de634de4565d785052861c3a0ee455.zip | |
add some docs and clean up code a bit
Diffstat (limited to 'liberty_lib.php')
| -rw-r--r-- | liberty_lib.php | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/liberty_lib.php b/liberty_lib.php index 09fe3e3..795c9ce 100644 --- a/liberty_lib.php +++ b/liberty_lib.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_liberty/liberty_lib.php,v 1.14 2007/10/03 09:34:44 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_liberty/liberty_lib.php,v 1.15 2007/10/31 10:39:08 squareing Exp $ * @package liberty * @subpackage functions */ @@ -781,18 +781,29 @@ function get_image_size_options( $pEmptyOption = 'Disable this feature' ) { return $ret; } -function get_subtitle( $pTitle ) { +/** + * get_leadtitle will fetch the string before the liberty_subtitle_delimiter + * + * @param string $pString string that should be checked for the delimiter + * @access public + * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure + */ +function get_leadtitle( $pString ) { global $gBitSystem; - if( ($start = strpos( $pTitle, $gBitSystem->getConfig( 'libety_subtitle_delimiter',':' ) )) !== FALSE ) { - return( substr( $pTitle, ($start+1) ) ); - } + return( substr( $pString, 0, strpos( $pString, $gBitSystem->getConfig( 'liberty_subtitle_delimiter', ':' )))); } - -function get_leadtitle( $pTitle ) { +/** + * get_subtitle will fetch the string after the liberty_subtitle_delimiter + * + * @param string $pString string that should be checked for the delimiter + * @access public + * @return TRUE on success, FALSE on failure - mErrors will contain reason for failure + */ +function get_subtitle( $pString ) { global $gBitSystem; - return( substr( $pTitle, 0, strpos( $pTitle, $gBitSystem->getConfig( 'libety_subtitle_delimiter',':' ) ) ) ); + if(( $start = strpos( $pString, $gBitSystem->getConfig( 'liberty_subtitle_delimiter', ':' ))) !== FALSE ) { + return( substr( $pString, ( $start + 1 ))); + } } - - ?> |
