From 37336e8a5f090e608edfb73aa938df95a0c16bc3 Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 6 Jul 2003 22:31:14 +0000 Subject: [PATCH] - New Link model (uses Apache's PATH_INFO). - Updated examples. - Updated ROADMAP. --- Doxyfile | 2 +- ROADMAP | 13 ++++--------- examples/{index.php => bife.php} | 5 +++-- examples/index.xbf | 2 +- examples/link.xbf | 4 ++-- package.xml | 2 +- src/BIFE/Link.php | 6 +----- 7 files changed, 13 insertions(+), 21 deletions(-) rename examples/{index.php => bife.php} (94%) diff --git a/Doxyfile b/Doxyfile index af31650..c2bb34d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -4,7 +4,7 @@ # General configuration options #--------------------------------------------------------------------------- PROJECT_NAME = "BIFE Base" -PROJECT_NUMBER = 0.11 +PROJECT_NUMBER = 0.12 OUTPUT_DIRECTORY = api OUTPUT_LANGUAGE = English USE_WINDOWS_ENCODING = NO diff --git a/ROADMAP b/ROADMAP index bbb24a2..12d5f97 100644 --- a/ROADMAP +++ b/ROADMAP @@ -1,13 +1,6 @@ $Id$ -Version 0.12 -============ - - - Look if using $_SERVER['PATH_INFO'] in Link is viable. - - Preserve .xbf file when no bife attribute is specified in Link. - - Version 0.13 ============ @@ -15,8 +8,10 @@ Version 0.13 ... -Version 0.x -============ +Version 1.0.0 +============= + - Make a way to put all classes in a package together in a single file to avoid overhead in require_once calls (to be reviewed). + - Write more documentation. diff --git a/examples/index.php b/examples/bife.php similarity index 94% rename from examples/index.php rename to examples/bife.php index 656561b..cf2b2f6 100644 --- a/examples/index.php +++ b/examples/bife.php @@ -36,8 +36,9 @@ require_once 'BIFE/Translate.php'; // }}} // Selects the file to view {{{ -$file = isset($_REQUEST['BIFE']) ? $_REQUEST['BIFE'] : 'index.xbf'; -#$file = isset($_SERVER['PATH_INFO']) ? ".{$_SERVER['PATH_INFO']}" : 'index.xbf'; +$file = (@$_SERVER['PATH_INFO'] and ($_SERVER['PATH_INFO'] != '/')) + ? ".{$_SERVER['PATH_INFO']}" + : 'index.xbf'; // }}} // Looks if we want to show the source {{{ diff --git a/examples/index.xbf b/examples/index.xbf index 9b25516..87606e8 100644 --- a/examples/index.xbf +++ b/examples/index.xbf @@ -4,7 +4,7 @@

Translate Fallback is working too!

This is a very bad use for BIFE, because I'm writing HTML :-P

A little of 'real' use -

Here's a link to another BIFE file

+

Here's a link to another BIFE file


View BIFE (xbf) source | View PHP source diff --git a/examples/link.xbf b/examples/link.xbf index 41cef67..a1d42dd 100644 --- a/examples/link.xbf +++ b/examples/link.xbf @@ -1,8 +1,8 @@ BIFE Links are working too! -

Go back.

+

Go back.


- View BIFE (xbf) source | + View BIFE (xbf) source | View PHP source
diff --git a/package.xml b/package.xml index dee90dd..79496c2 100644 --- a/package.xml +++ b/package.xml @@ -16,7 +16,7 @@ - 0.11 + 0.12 2003-06-29 beta Check http://bife.llucax.hn.org/ for details. diff --git a/src/BIFE/Link.php b/src/BIFE/Link.php index 8204db0..65a134b 100644 --- a/src/BIFE/Link.php +++ b/src/BIFE/Link.php @@ -86,10 +86,6 @@ class BIFE_Link extends BIFE_Container { { $url = @$attrs['URL']; unset($attrs['URL']); - if (isset($attrs['BIFE'])) { - $attrs['DATA-BIFE'] = $attrs['BIFE']; - unset($attrs['BIFE']); - } $query = array(); foreach($attrs as $name => $value) { if (substr($name, 0, 5) === 'DATA-') { @@ -123,4 +119,4 @@ class BIFE_Link extends BIFE_Container { } // -X2C Class :Link -?> \ No newline at end of file +?> -- 2.43.0