|
From: Christian O. <chr...@us...> - 2010-03-09 18:40:05
|
Update of /cvsroot/bbps/bbps In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv27624 Modified Files: firefox_search.php support_functions.php Log Message: - added HTTPS functionality - fixed some search engine stuff (esp. a bit clean up and generating a host based name) Index: support_functions.php =================================================================== RCS file: /cvsroot/bbps/bbps/support_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** support_functions.php 9 Sep 2005 14:44:14 -0000 1.3 --- support_functions.php 9 Mar 2010 18:39:54 -0000 1.4 *************** *** 152,157 **** } ! $location = "Location: http://".$_SERVER['HTTP_HOST'].$dir."/".$page; return $location; - } --- 152,161 ---- } ! if ($_SERVER['HTTPS']) { ! $protocol="https"; ! } else { ! $protocol="http"; ! } ! $location = "Location: ".$protocol."://".$_SERVER['HTTP_HOST'].$dir."/".$page; return $location; } Index: firefox_search.php =================================================================== RCS file: /cvsroot/bbps/bbps/firefox_search.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** firefox_search.php 9 Apr 2006 16:05:32 -0000 1.1 --- firefox_search.php 9 Mar 2010 18:39:54 -0000 1.2 *************** *** 1,4 **** ! /* TODO: generate a unique file name for this domain/directory ! ! * clean up the whole search engine stuff and commit to cvs ... once sourceforge is working again */ <html> --- 1,6 ---- ! /* TODO: ! * generate a unique file name for this domain/directory? ! * clean up the whole search engine stuff ! * solve caching problem with generated file */ <html> *************** *** 9,13 **** <?php function get_base() { ! return "http://" . $_SERVER['HTTP_HOST'] . ":" . $_SERVER['SERVER_PORT'] . dirname($_SERVER['PHP_SELF']) . "/"; } ?> --- 11,20 ---- <?php function get_base() { ! if ($_SERVER['HTTPS']) { ! $protocol="https"; ! } else { ! $protocol="http"; ! } ! return $protocol . "://" . $_SERVER['HTTP_HOST'] . ":" . $_SERVER['SERVER_PORT'] . dirname($_SERVER['PHP_SELF']) . "/"; } ?> *************** *** 19,23 **** while (!feof($fi)) { $line=fgets($fi); ! $line=str_replace('$NAME$','bbps',$line); $line=str_replace('$DESCRIPTION$','BBPS Search at ' . $_SERVER['HTTP_HOST'],$line); $line=str_replace('$ACTION$',get_base() . 'index.php',$line); --- 26,30 ---- while (!feof($fi)) { $line=fgets($fi); ! $line=str_replace('$NAME$','bbps@' . $_SERVER['HTTP_HOST'],$line); $line=str_replace('$DESCRIPTION$','BBPS Search at ' . $_SERVER['HTTP_HOST'],$line); $line=str_replace('$ACTION$',get_base() . 'index.php',$line); *************** *** 30,36 **** ?> <form> ! <input type="button" value="Install Search Engine" onClick="javascript:addEngine( ! '<?php echo get_base(); ?>', ! 'bbps_search','png','Web',0); window.close()" /> </form> </body> --- 37,43 ---- ?> <form> ! <input type="button" value="Install Search Engine" ! onClick="javascript:if (addEngine('<?php echo get_base(); ?>','bbps_search','png','Web',0)) {window.close()}" ! /> </form> </body> |