|
From: Sven <bra...@us...> - 2005-01-07 11:16:48
|
Update of /cvsroot/osbb/osbb/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5107 Modified Files: functions.inc.php Log Message: -Some little bugfixes -removed some old code parts/functions which arent needed anymore Index: functions.inc.php =================================================================== RCS file: /cvsroot/osbb/osbb/lib/functions.inc.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** functions.inc.php 7 Jan 2005 11:09:41 -0000 1.17 --- functions.inc.php 7 Jan 2005 11:16:39 -0000 1.18 *************** *** 74,78 **** */ function myEsacpeNoAddslashes($string){ - //return stripslashes(myEscape($string)); //removed addslashes from myEscape return myEscape($string); } --- 74,77 ---- *************** *** 389,408 **** } - /* name: trimExtraChars - params: var $var - return: var - desc: replaces some german extra characters - */ - function trimExtraChars($var){ - $var = str_replace(chr(196),'Ä',$var); - $var = str_replace(chr(228),'ä',$var); - $var = str_replace(chr(214),'Ö',$var); - $var = str_replace(chr(246),'ö',$var); - $var = str_replace(chr(220),'Ü',$var); - $var = str_replace(chr(252),'ü',$var); - $var = str_replace(chr(223),'ß',$var); - return $var; - } - /* name: makeBoards params: [int $boardpid [,int $depth]] --- 388,391 ---- *************** *** 462,466 **** while(list($boardid,$row) = each($res)){ //start while 2 if(!checkBoardPermission('can_see_board',$boardid,0)) continue; //ignore this board if the user cant see it ! $depthmark = repeateChar('-',$depth); $return .= '<option value="'.$boardid.'">'.$depthmark.killHTML($row['boardname']).(($row['boardtype'] == BOARD_CAT) ? '*' : '').'</option>'."\r\n"; if($row['boardsubboards'] != '') $return .= makeBoardSelection($boardarray,$boardid,($depth+1)); --- 445,449 ---- while(list($boardid,$row) = each($res)){ //start while 2 if(!checkBoardPermission('can_see_board',$boardid,0)) continue; //ignore this board if the user cant see it ! $depthmark = str_repeat('-',$depth); $return .= '<option value="'.$boardid.'">'.$depthmark.killHTML($row['boardname']).(($row['boardtype'] == BOARD_CAT) ? '*' : '').'</option>'."\r\n"; if($row['boardsubboards'] != '') $return .= makeBoardSelection($boardarray,$boardid,($depth+1)); *************** *** 470,485 **** } - - /* name: repeateChar - params: var $char, int $count - return: var - desc: repeares the charachter $char for $count - */ - function repeateChar($char,$count){ - $return = ''; - for($x=0;$x<$count;$x++) $return .= $char; - return $return; - } - /* name: makeLastPost params: int $authorid, var $authorname, int $time, int $boardid --- 453,456 ---- *************** *** 506,510 **** if(empty($userdata['userdateformat'])) $userdata['userdateformat'] = $config['dateformat']; if(empty($userdata['usertimeformat'])) $userdata['usertimeformat'] = $config['timeformat']; - //$timezone = 3600*intval($userdata['usertimezone']); $timezone = 3600*(intval($userdata['usertimezone'])+date("I")); $time = $time+$timezone; --- 477,480 ---- *************** *** 983,989 **** params: var $url return: var ! desc: checks if the var $url start with http */ function checkURL($url){ if(substr($url,0,7) != 'http://' && substr($url,0,8) != 'https://') $url = 'http://'.$url; return $url; --- 953,960 ---- params: var $url return: var ! desc: checks if the var $url start with http(s) */ function checkURL($url){ + if(substr($url,0,6) == 'ftp://') return ''; if(substr($url,0,7) != 'http://' && substr($url,0,8) != 'https://') $url = 'http://'.$url; return $url; *************** *** 1057,1085 **** } - /* name: getHeader - params: var $title [, int $close] - return: var - desc: prepares the template header.tpl - */ - /*function getHeader($title,$close=1){ - global $header_user,$header_guest,$css,$lang,$config,$template,$userdata,$userid,$locator,$s; - if($title == '') $title = $config['boardname']; - else $title = $config['boardname'].' '.$config['titleseperator'].' '.$title; - eval("\$header = \"".$template->get('head')."\";"); - if($close == 1) eval("\$header .= \"".$template->get('header')."\";"); - return $header; - }*/ - - /* name: closeHeader - params: none - return: var - desc: closes the header - */ - /*function closeHeader(){ - global $header_user,$header_guest,$css,$lang,$config,$template,$userdata,$userid,$locator,$s; - eval("\$header = \"".$template->get('header')."\";"); - return $header; - }*/ - // sha1 function for old php versions if(!function_exists('sha1')) require('./lib/sha1.php'); --- 1028,1031 ---- |