Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Thu, Aug 28, 2:30 AM

in-portal

This document is not UTF8. It was detected as Shift JIS and converted to UTF8 for display.
Index: branches/unlabeled/unlabeled-1.8.58/obscure.php
===================================================================
--- branches/unlabeled/unlabeled-1.8.58/obscure.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.8.58/obscure.php (nonexistent)
@@ -1,274 +0,0 @@
-#!/usr/local/bin/php
-
-<?php
-
- if (isset($argv[2]) && $argv[2] != '') {
- define('SEED', $argv[2]);
- }
- else {
- define('SEED', rand(0, 100000));
- }
-
- function gen_name($old)
- {
- return md5($old.SEED);
- //return '_n_'.$old;
- }
-
- $functions = array();
-
- $php = file($argv[1]);
- $n = 1;
- for($x=0;$x<count($php);$x++)
- {
- $line = $php[$x];
-
- if ( preg_match("/^[ ]*\/\/.*?$/", trim($line)) ) {
- //echo "SKIPPING ".$php[$x];
- $php[$x] = "";
- continue; //cut comments
- }
-
- if ( preg_match("/^\/\*.*\*\/$/", trim($line)) ) {
- //echo "SKIPPING ".$php[$x];
- $php[$x] = "";
- continue; //cut comments
- }
-
- if(substr($line,0,10)=="function _")
- {
- $dec_parts = explode(" ",$line,2);
- $pp = explode("(",$dec_parts[1]);
- $name = $pp[0];
- $attribs="(".$pp[1];
-
- //echo "found func $name attribs: $attribs\n";
-
- $start = $x;
- for($f=$x;$f<count($php);$f++)
- {
- if(substr($php[$f],0,1)=="}")
- {
- $end = $f;
- break;
- }
- }
- if($start && $end && strlen($name))
- {
- $newname = "_".gen_name($n);
- $n++;
- $functions[$name] = array("start"=>$start,"end"=>$end,"attribs"=>$attribs,"newname"=>$newname);
- }
- }
- }
-// print_r($functions);
- //echo "<PRE>"; print_r($functions); echo "</PRE>";
-
- function GetVarName($s)
- {
- $alphabet = "abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
- $name = "";
- $var_end = 0;
- $char = substr($s,$var_end,1);
- if(substr($s,0,1)=="$")
- {
- $var_end++;
- $char = substr($s,$var_end,1);
- }
- while(is_numeric(strpos($alphabet,$char)) && strlen($char))
- {
- $name .= $char;
- $var_end++;
- $char = substr($s,$var_end,1);
- }
- return $name;
- }
-
- function obscure_func($NewName,$Attribs,$code)
- {
- global $functions;
-
- $globals = array();
-
- $globals[] = '$this';
- $globals[] = '$_GET';
- $globals[] = '$_FILES';
- $globals[] = '$_POST';
- $globals[] = '$_COOKIE';
- $globals[] = '$_SERVER';
-
- $variables = array();
-
- $new_code = array();
- for($x=0;$x<=count($code);$x++)
- {
- $line = $code[$x];
- $line = ltrim($line);
- $line = str_replace("\t","",$line);
- $g = strpos($line,"global");
- if(is_numeric($g))
- {
- $vars = trim(substr($line,$g+7));
- $vars = substr($vars,0,-1);
- $v = explode(",",$vars);
- for($z=0;$z<count($v);$z++)
- $globals[] = ltrim($v[$z]);
- }
- $new_code[$x] = $line;
- }
- $code = $new_code;
- for($x=0;$x<count($code);$x++)
- {
- foreach($functions as $name=>$attr)
- {
- $line = $code[$x];
- $code[$x] = str_replace($name,$attr["newname"],$line);
- }
- }
-
- $VarCount =0;
- if(strlen($Attribs)>3)
- {
- $Attribs = trim($Attribs);
- $Attribs = str_replace("\t","",$Attribs);
- //echo "getting attribs from $Attribs\n";
- $a = explode(",",substr($Attribs,1,-1));
-// echo "got attribs for func [$Attribs]:\n";
-// var_dump($a);
- if (is_array($a) && $a[0] != '') {
- foreach($a as $attr)
- {
- list($attr,$default) = explode('=', $attr);
- //echo "attr: $attr / def = $default\n";
- if ($default != '') {
- $defaults[$attr] = $default;
- //echo "stored defaults for $attr\n";
- }
- $variables[$attr] = '$_'.gen_name($VarCount++);
- }
- }
- }
-
- for($x=0;$x<count($code);$x++)
- {
- $line = $code[$x];
- if(!strlen($line))
- continue;
- $p = strpos($line,"$");
- while($p>0)
- {
- if(substr($line,$p,2)!="$$")
- {
- $name=GetVarName(substr($line,$p));
- if(strlen($name))
- {
- $name = "$".trim($name);
- if(!in_array($name,$globals) && !array_key_exists($name,$variables))
- $variables[$name] = '$_'.gen_name($VarCount++);
- }
- }
- $p = strpos($line,"$",$p+1);
- }
- }
-
- for($x=0;$x<count($code);$x++)
- {
-// print_r($variables);
- foreach($variables as $v=>$varname)
- {
- //echo "strpos ".$code[$x].', '.$v."\n";
- $p = strpos($code[$x],$v);
- while(is_numeric($p))
- {
- $t = GetVarName(substr($code[$x],$p));
- if('$'.$t == $v)
- {
- $code[$x] = substr_replace($code[$x],$varname,$p,strlen($t)+1);
- }
- $p = strpos($code[$x],$v,$p+1);
- }
- }
- }
-
- $o = "function $NewName"."(";
- if (is_array($a)) {
- foreach($a as $attr)
- {
- list($attr,$default) = explode('=', $attr);
- $av[] = ($variables[$attr].(isset($defaults[$attr]) ? '='.$defaults[$attr] : ''));
- }
- }
- if(count($av)>0)
- $o .= implode(",",$av);
- $o .= ")";
- //echo "reversed: $o\n";
- $o .= implode(" ",$code);
- //$o = str_replace("\n","",$o);
- return $o;
- }
-
- $out = "";
- $outline = 0;
-
- $shuffled = array_rand($functions, count($functions));
-// print_r($shuffled);
-
- foreach ($shuffled as $name) {
- $pos = $functions[$name];
-
- //foreach($functions as $name =>$pos)
- //{
- $dest = $pos["start"];
- $newname = $pos["newname"];
- if(!$outline)
- $outline = $dest;
-
-
- unset($code);
- for($x=$dest+1;$x<=$pos["end"];$x++)
- {
- $code[] = $php[$x];
- }
- $newcode = obscure_func($newname,$pos["attribs"],$code);
- $out .= $newcode;
- }
- foreach($functions as $name=>$pos)
- {
- for($x=$pos["start"];$x<=$pos["end"];$x++)
- {
- $php[$x] = "";
- }
- }
-
- $code =array();
- for($x=0;$x<count($php);$x++) {
- $line = $php[$x];
- foreach($functions as $name=>$attr)
- {
- $line = str_replace($name,$attr["newname"],$line);
- }
- $code[$x] = $line;
- }
- $php = $code;
-
- $line=1;
-
- $tmp_file = fopen($argv[1].'_', 'w');
-
- for($x=0;$x<count($php);$x++)
- {
- if($x==$outline) {
- //echo "$line: ".$out;
- fwrite($tmp_file, $out);
- }
- if(strlen($php[$x])) {
- //echo "$line: ".ltrim($php[$x]);
- fwrite($tmp_file, ltrim($php[$x]));
- }
- $line++;
- }
- fclose($tmp_file);
- rename($argv[1].'_', $argv[1]);
-
-?>
Property changes on: branches/unlabeled/unlabeled-1.8.58/obscure.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.8
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.11.48/new_phrases.txt
===================================================================
--- branches/unlabeled/unlabeled-1.11.48/new_phrases.txt (revision 6980)
+++ branches/unlabeled/unlabeled-1.11.48/new_phrases.txt (nonexistent)
@@ -1,75 +0,0 @@
-la_permtype_$permmodule
-la_text_datatype_
-la_text_
-la_description_
-lu_ferror_email_duplicate
-la_review_pending
-lu_already_suggested
-lu_hello_world
-lu_searchtitle_
-lu_
-la_admin
-la_title_edit_ban
-la_tooltip_prev
-lu_prompt_email
-lu_getting_rated
-lu_shoppingcart,lu_comm_shippinginfo,lu_comm_billinginfo,lu_comm_orderpreview,lu_comm_confirmation
-lu_shoppingcart,lu_comm_billinginfo,lu_comm_orderpreview,lu_comm_confirmation
-la_empty_file
-la_emptyfile
-la_done
-la_exportfoldernotwritable
-la_text_translation
-la_baseselectors
-la_blockselectors
-lu_no_permissions
-la_title_generalfields
-la_col_tablename
-la_col_simplesearch
-la_invalid_state
-la_desc_emailevent_
-la_updating_manufacturers
-la_updating_email_config
-la_updating_contacts_config
-la_tab_tagtest
-la_invalid
-la_verified
-la_penging
-la_fields
-la_value
-la_tooltip_resettoshipping
-la_tooltip_goto
-lu_getting_rated_text
-lu_comm_returningcustomers
-lu_comm_pleaselogin
-lu_comm_indicatedrequired
-lu_comm_forgotpassword
-lu_comm_password
-lu_comm_register
-lu_comm_home
-lu_comm_youraccount
-lu_comm_shoppingcart
-lu_comm_help
-lu_comm_poweredby
-lu_comm_lu_allrightsreserved
-lu_comm_yourlanguage
-lu_comm_yourcurrency
-lu_comm_mailinglist
-lu_comm_registration
-lu_select_username
-lu_comm_shippingemail
-lu_comm_other
-lu_create_password
-lu_address_line_1
-lu_comm_newcustomers
-lu_your_email
-lu_comm_rateexcellent,lu_comm_rateverygood,lu_comm_rategood,lu_comm_rateaverage,lu_comm_ratefair,lu_comm_ratepoor
-lu_comm_removfromfav
-lu_comm_verifypassword
-lu_comm_phone
-lu_comm_email
-lu_register_autopasswd
-lu_comm_pleaseregister
-lu_comm_pleaseenterfollowing
-lu_comm_addtofav
-lu_ferror_
Property changes on: branches/unlabeled/unlabeled-1.11.48/new_phrases.txt
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.11
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/var_export.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/var_export.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/var_export.php (revision 6981)
@@ -0,0 +1,103 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: var_export.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace var_export()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.var_export
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('var_export'))
+{
+ function var_export ($array, $return = false)
+ {
+ // Common output variables
+ $indent = ' ';
+ $doublearrow = ' => ';
+ $lineend = ",\n";
+ $stringdelim = '\'';
+ $newline = "\n";
+
+ // Check the export isn't a simple string / int
+ if (is_string($array)) {
+ $out = $stringdelim . $array . $stringdelim;
+ }
+ elseif (is_int($array)) {
+ $out = (string)$array;
+ }
+
+ // Begin the array export
+ else
+ {
+ // Start the string
+ $out = "array (\n";
+
+ // Loop through each value in array
+ foreach ($array as $key => $value)
+ {
+ // If the key is a string, delimit it
+ if (is_string($key)) {
+ $key = $stringdelim . addslashes($key) . $stringdelim;
+ }
+
+ // If the value is a string, delimit it
+ if (is_string($value)) {
+ $value = $stringdelim . addslashes($value) . $stringdelim;
+ }
+
+ // We have an array, so do some recursion
+ elseif (is_array($value))
+ {
+ // Do some basic recursion while increasing the indent
+ $recur_array = explode($newline, var_export($value, true));
+ $recur_newarr = array ();
+ foreach ($recur_array as $recur_line) {
+ $recur_newarr[] = $indent . $recur_line;
+ }
+ $recur_array = implode($newline, $recur_newarr);
+ $value = $newline . $recur_array;
+ }
+
+ // Piece together the line
+ $out .= $indent . $key . $doublearrow . $value . $lineend;
+ }
+
+ // End our string
+ $out .= ")";
+ }
+
+
+ // Decide method of output
+ if ($return === true) {
+ return $out;
+ } else {
+ echo $out;
+ return null;
+ }
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/var_export.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/constant.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/constant.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/constant.php (revision 6981)
@@ -0,0 +1,50 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: constant.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace constant()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/constant
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.0.4
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('constant'))
+{
+ function constant ($constant)
+ {
+ if (!defined($constant)) {
+ $error = sprintf('constant() Couldn\'t find constant %s', $constant);
+ trigger_error($error, E_USER_WARNING);
+ return false;
+ }
+
+ eval("\$value=$constant;");
+
+ return $value;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/constant.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/version_compare.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/version_compare.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/version_compare.php (revision 6981)
@@ -0,0 +1,170 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Philippe Jausions <Philippe.Jausions@11abacus.com> |
+// | Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: version_compare.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace version_compare()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/version_compare
+ * @author Philippe Jausions <Philippe.Jausions@11abacus.com>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.1.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('version_compare')) {
+
+ function version_compare ($version1, $version2, $operator = '<')
+ {
+ // Check input
+ if (!is_scalar($version1)) {
+ trigger_error('version_compare() expects parameter 1 to be string, ' . gettype($version1) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_scalar($version2)) {
+ trigger_error('version_compare() expects parameter 2 to be string, ' . gettype($version2) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_scalar($operator)) {
+ trigger_error('version_compare() expects parameter 3 to be string, ' . gettype($operator) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ // Standardise versions
+ $v1 = explode('.',
+ str_replace('..', '.',
+ preg_replace('/([^0-9\.]+)/', '.$1.',
+ str_replace(array('-', '_', '+'), '.',
+ trim($version1)))));
+
+ $v2 = explode('.',
+ str_replace('..', '.',
+ preg_replace('/([^0-9\.]+)/', '.$1.',
+ str_replace(array('-', '_', '+'), '.',
+ trim($version2)))));
+
+ // Replace empty entries at the start of the array
+ while (empty($v1[0]) && array_shift($v1)) {}
+ while (empty($v2[0]) && array_shift($v2)) {}
+
+ // Describe our release states
+ $versions = array(
+ 'dev' => 0,
+ 'alpha' => 1,
+ 'a' => 1,
+ 'beta' => 2,
+ 'b' => 2,
+ 'RC' => 3,
+ 'pl' => 4);
+
+ // Loop through each segment in the version string
+ $compare = 0;
+ for ($i = 0, $x = min(count($v1), count($v2)); $i < $x; $i++)
+ {
+ if ($v1[$i] == $v2[$i]) {
+ continue;
+ }
+ if (is_numeric($v1[$i]) && is_numeric($v2[$i])) {
+ $compare = ($v1[$i] < $v2[$i]) ? -1 : 1;
+ }
+ elseif (is_numeric($v1[$i])) {
+ $compare = 1;
+ }
+ elseif (is_numeric($v2[$i])) {
+ $compare = -1;
+ }
+ elseif (isset($versions[$v1[$i]]) && isset($versions[$v2[$i]])) {
+ $compare = ($versions[$v1[$i]] < $versions[$v2[$i]]) ? -1 : 1;
+ }
+ else {
+ $compare = strcmp($v2[$i], $v1[$i]);
+ }
+
+ break;
+ }
+
+ // If previous loop didn't find anything, compare the "extra" segments
+ if ($compare == 0) {
+ if (count($v2) > count($v1))
+ {
+ if (isset($versions[$v2[$i]])) {
+ $compare = ($versions[$v2[$i]] < 4) ? 1 : -1;
+ } else {
+ $compare = -1;
+ }
+ }
+ elseif (count($v2) < count($v1))
+ {
+ if (isset($versions[$v1[$i]])) {
+ $compare = ($versions[$v1[$i]] < 4) ? -1 : 1;
+ } else {
+ $compare = 1;
+ }
+ }
+ }
+
+ // Compare the versions
+ if (func_num_args() > 2)
+ {
+ switch ($operator)
+ {
+ case '>':
+ case 'gt':
+ return (bool) ($compare > 0);
+ break;
+ case '>=':
+ case 'ge':
+ return (bool) ($compare >= 0);
+ break;
+ case '<=':
+ case 'le':
+ return (bool) ($compare <= 0);
+ break;
+ case '==':
+ case '=':
+ case 'eq':
+ return (bool) ($compare == 0);
+ break;
+ case '<>':
+ case '!=':
+ case 'ne':
+ return (bool) ($compare != 0);
+ break;
+ case '':
+ case '<':
+ case 'lt':
+ return (bool) ($compare < 0);
+ break;
+ default:
+ return null;
+ }
+ }
+
+ return $compare;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/version_compare.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff.php (revision 6981)
@@ -0,0 +1,84 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Stephan Schmidt <schst@php.net> |
+// | Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_udiff.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_udiff()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.array_udiff
+ * @author Stephan Schmidt <schst@php.net>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_udiff'))
+{
+ function array_udiff ()
+ {
+ $args = func_get_args();
+
+ if (count($args) < 3) {
+ trigger_error('Wrong parameter count for array_udiff()', E_USER_WARNING);
+ return null;
+ }
+
+ // Get compare function
+ $compare_func = array_pop($args);
+ if (!is_callable($compare_func)) {
+ if (is_array($compare_func)) {
+ $compare_func = $compare_func[0] . '::' . $compare_func[1];
+ }
+ trigger_error('array_udiff() Not a valid callback ' . $compare_func, E_USER_WARNING);
+ return null;
+ }
+
+ // Check arrays
+ $cnt = count($args);
+ for ($i = 0; $i < $cnt; $i++) {
+ if (!is_array($args[$i])) {
+ trigger_error('array_udiff() Argument #' . ($i + 1). ' is not an array', E_USER_WARNING);
+ return null;
+ }
+ }
+
+ $diff = array ();
+ // Traverse values of the first array
+ foreach ($args[0] as $key => $value) {
+ // Check all arrays
+ for ($i = 1; $i < $cnt; $i++) {
+ foreach ($args[$i] as $cmp_value) {
+ $result = call_user_func($compare_func, $value, $cmp_value);
+ if ($result === 0) {
+ continue 3;
+ }
+ }
+ }
+ $diff[$key] = $value;
+ }
+ return $diff;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_get_contents.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_get_contents.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_get_contents.php (revision 6981)
@@ -0,0 +1,61 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: file_get_contents.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace file_get_contents()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.file_get_contents
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @internal resource_context is not supported
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('file_get_contents'))
+{
+ function file_get_contents ($filename, $incpath = false, $resource_context = null)
+ {
+ if (false === $fh = fopen($filename, 'rb', $incpath)) {
+ trigger_error('file_get_contents() failed to open stream: No such file or directory', E_USER_WARNING);
+ return false;
+ }
+
+ clearstatcache();
+ if ($fsize = filesize($filename)) {
+ $data = fread($fh, $fsize);
+ }
+
+ else {
+ while (!feof($fh)) {
+ $data .= fread($fh, 8192);
+ }
+ }
+
+ fclose($fh);
+
+ return $data;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_get_contents.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/image_type_to_mime_type.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/image_type_to_mime_type.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/image_type_to_mime_type.php (revision 6981)
@@ -0,0 +1,128 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: image_type_to_mime_type.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+if (!defined('IMAGETYPE_GIF')) {
+ define('IMAGETYPE_GIF', 0);
+}
+
+if (!defined('IMAGETYPE_JPEG')) {
+ define('IMAGETYPE_JPEG', 1);
+}
+
+if (!defined('IMAGETYPE_PNG')) {
+ define('IMAGETYPE_PNG', 2);
+}
+
+if (!defined('IMAGETYPE_SWF')) {
+ define('IMAGETYPE_SWF', 3);
+}
+
+if (!defined('IMAGETYPE_PSD')) {
+ define('IMAGETYPE_PSD', 4);
+}
+
+if (!defined('IMAGETYPE_BMP')) {
+ define('IMAGETYPE_BMP', 5);
+}
+
+if (!defined('IMAGETYPE_TIFF_II')) {
+ define('IMAGETYPE_TIFF_II', 6);
+}
+
+if (!defined('IMAGETYPE_TIFF_MM')) {
+ define('IMAGETYPE_TIFF_MM', 7);
+}
+
+if (!defined('IMAGETYPE_JPC')) {
+ define('IMAGETYPE_JPC', 8);
+}
+
+if (!defined('IMAGETYPE_JP2')) {
+ define('IMAGETYPE_JP2', 9);
+}
+
+if (!defined('IMAGETYPE_JPX')) {
+ define('IMAGETYPE_JPX', 10);
+}
+
+if (!defined('IMAGETYPE_JB2')) {
+ define('IMAGETYPE_JB2', 11);
+}
+
+if (!defined('IMAGETYPE_SWC')) {
+ define('IMAGETYPE_SWC', 12);
+}
+
+if (!defined('IMAGETYPE_IFF')) {
+ define('IMAGETYPE_IFF', 13);
+}
+
+if (!defined('IMAGETYPE_WBMP')) {
+ define('IMAGETYPE_WBMP', 14);
+}
+
+if (!defined('IMAGETYPE_XBM')) {
+ define('IMAGETYPE_XBM', 15);
+}
+
+
+/**
+ * Replace image_type_to_mime_type()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.image_type_to_mime_type
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.3.0
+ * @require PHP 3
+ */
+if (!function_exists('image_type_to_mime_type'))
+{
+ function image_type_to_mime_type ($imagetype)
+ {
+ static $image_type_to_mime_type = array (
+ IMAGETYPE_GIF => 'image/gif',
+ IMAGETYPE_JPEG => 'image/jpeg',
+ IMAGETYPE_PNG => 'image/png',
+ IMAGETYPE_SWF => 'application/x-shockwave-flash',
+ IMAGETYPE_PSD => 'image/psd',
+ IMAGETYPE_BMP => 'image/bmp',
+ IMAGETYPE_TIFF_II => 'image/tiff',
+ IMAGETYPE_TIFF_MM => 'image/tiff',
+ IMAGETYPE_JPC => 'application/octet-stream',
+ IMAGETYPE_JP2 => 'image/jp2',
+ IMAGETYPE_JPX => 'application/octet-stream',
+ IMAGETYPE_JB2 => 'application/octet-stream',
+ IMAGETYPE_SWC => 'application/x-shockwave-flash',
+ IMAGETYPE_IFF => 'image/iff',
+ IMAGETYPE_WBMP => 'image/vnd.wap.wbmp',
+ IMAGETYPE_XBM => 'image/xbm',
+ );
+
+ return (isset($image_type_to_mime_type[$imagetype]) ?
+ $image_type_to_mime_type[$imagetype] :
+ $image_type_to_mime_type[IMAGETYPE_JPC]);
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/image_type_to_mime_type.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_diff_assoc.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_diff_assoc.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_diff_assoc.php (revision 6981)
@@ -0,0 +1,80 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_diff_assoc.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_diff_assoc()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.array_diff_assoc
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.3.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_diff_assoc'))
+{
+ function array_diff_assoc ()
+ {
+ // Check we have enough arguments
+ $args = func_get_args();
+ $count = count($args);
+ if (count($args) < 2) {
+ trigger_error('Wrong parameter count for array_diff_assoc()', E_USER_WARNING);
+ return null;
+ }
+
+ // Check arrays
+ for ($i = 0; $i < $count; $i++)
+ {
+ if (!is_array($args[$i])) {
+ trigger_error('array_diff_assoc() Argument #' . ($i + 1) . ' is not an array', E_USER_WARNING);
+ return null;
+ }
+ }
+
+ // Get the comparison array
+ $array_comp = array_shift($args);
+ --$count;
+
+ // Traverse values of the first array
+ foreach ($array_comp as $key => $value)
+ {
+ // Loop through the other arrays
+ for ($i = 0; $i < $count; $i++)
+ {
+ // Loop through this arrays key/value pairs and compare
+ foreach ($args[$i] as $comp_key => $comp_value)
+ {
+ if ((string)$key === (string)$comp_key &&
+ (string)$value === (string)$comp_value) {
+
+ unset($array_comp[$key]);
+ }
+ }
+ }
+ }
+
+ return $array_comp;
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_diff_assoc.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_flush.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_flush.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_flush.php (revision 6981)
@@ -0,0 +1,49 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: ob_get_flush.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace ob_get_flush()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/ob_get_flush
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com/)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.3.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('ob_get_flush'))
+{
+ function ob_get_flush ()
+ {
+ $contents = ob_get_contents();
+
+ if ($contents !== false) {
+ ob_end_flush();
+ }
+
+ return $contents;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_flush.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_clean.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_clean.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_clean.php (revision 6981)
@@ -0,0 +1,49 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: ob_get_clean.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace ob_get_clean()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/ob_get_clean
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com/)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.3.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('ob_get_clean'))
+{
+ function ob_get_clean ()
+ {
+ $contents = ob_get_contents();
+
+ if ($contents !== false) {
+ ob_end_clean();
+ }
+
+ return $contents;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_get_clean.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_flush.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_flush.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_flush.php (revision 6981)
@@ -0,0 +1,49 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: ob_flush.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace ob_flush()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/ob_flush
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com/)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('ob_flush'))
+{
+ function ob_flush ()
+ {
+ if (@ob_end_flush()) {
+ return ob_start();
+ }
+
+ trigger_error("ob_flush() Failed to flush buffer. No buffer to flush.", E_USER_NOTICE);
+
+ return false;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_flush.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_clean.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_clean.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_clean.php (revision 6981)
@@ -0,0 +1,49 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: ob_clean.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace ob_clean()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/ob_clean
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com/)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('ob_clean'))
+{
+ function ob_clean ()
+ {
+ if (@ob_end_clean()) {
+ return ob_start();
+ }
+
+ trigger_error("ob_clean() failed to delete buffer. No buffer to delete.", E_USER_NOTICE);
+
+ return false;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/ob_clean.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/stripos.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/stripos.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/stripos.php (revision 6981)
@@ -0,0 +1,71 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: stripos.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace stripos()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.stripos
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('stripos'))
+{
+ function stripos ($haystack, $needle, $offset = null)
+ {
+ if (!is_scalar($haystack)) {
+ trigger_error('stripos() expects parameter 1 to be string, ' . gettype($haystack) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ if (!is_scalar($needle)) {
+ trigger_error('stripos() needle is not a string or an integer.', E_USER_WARNING);
+ return false;
+ }
+
+ if (!is_null($offset) && !is_numeric($offset)) {
+ trigger_error('stripos() expects parameter 3 to be long, ' . gettype($offset) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ // Manipulate the string if there is an offset
+ $fix = 0;
+ if (!is_null($offset))
+ {
+ if ($offset > 0)
+ {
+ $haystack = substr($haystack, $offset, strlen($haystack) - $offset);
+ $fix = $offset;
+ }
+ }
+
+ $segments = explode (strtolower($needle), strtolower($haystack), 2);
+ $position = strlen($segments[0]) + $fix;
+
+ return $position;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/stripos.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_search.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_search.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_search.php (revision 6981)
@@ -0,0 +1,54 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_search.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_search()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/array_search
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com/)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.0.5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_search'))
+{
+ function array_search ($needle, $haystack, $strict = false)
+ {
+ if (!is_array($haystack)) {
+ trigger_error("array_search() Wrong datatype for second argument", E_USER_WARNING);
+ return false;
+ }
+
+ foreach ($haystack as $key => $value) {
+ if ($strict ? $value === $needle : $value == $needle) {
+ return $key;
+ }
+ }
+
+ return false;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_search.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/html_entity_decode.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/html_entity_decode.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/html_entity_decode.php (revision 6981)
@@ -0,0 +1,74 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: David Irvine <dave@codexweb.co.za> |
+// | Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: html_entity_decode.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+if (!defined('ENT_NOQUOTES')) {
+ define('ENT_NOQUOTES', 0);
+}
+
+if (!defined('ENT_COMPAT')) {
+ define('ENT_COMPAT', 2);
+}
+
+if (!defined('ENT_QUOTES')) {
+ define('ENT_QUOTES', 3);
+}
+
+
+/**
+ * Replace html_entity_decode()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.html_entity_decode
+ * @author David Irvine <dave@codexweb.co.za>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.3.0
+ * @internal Setting the charset will not do anything
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('html_entity_decode'))
+{
+ function html_entity_decode ($string, $quote_style = ENT_COMPAT, $charset = null)
+ {
+ if (!is_int($quote_style)) {
+ trigger_error('html_entity_decode() expects parameter 2 to be long, ' . gettype($quote_style) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ $trans_tbl = get_html_translation_table(HTML_ENTITIES);
+ $trans_tbl = array_flip($trans_tbl);
+
+ // Add single quote to translation table;
+ $trans_tbl['&#039;'] = '\'';
+
+ // Not translating double quotes
+ if ($quote_style & ENT_NOQUOTES) {
+ // Remove double quote from translation table
+ unset($trans_tbl['&quot;']);
+ }
+
+ return strtr($string, $trans_tbl);
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/html_entity_decode.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_chunk.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_chunk.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_chunk.php (revision 6981)
@@ -0,0 +1,76 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_chunk.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_combine()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.array_chunk
+ * @author Aidan Lister <aidan@php.net>
+ * @author Thiemo M舩tig (http://maettig.com)
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_chunk'))
+{
+ function array_chunk ($input, $size, $preserve_keys = false)
+ {
+ if (!is_array($input)) {
+ trigger_error('array_chunk() expects parameter 1 to be array, ' . gettype($input) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_numeric($size)) {
+ trigger_error('array_chunk() expects parameter 2 to be long, ' . gettype($size) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ $size = (int)$size;
+ if ($size <= 0)
+ {
+ trigger_error('array_chunk() Size parameter expected to be greater than 0', E_USER_WARNING);
+ return null;
+ }
+
+ $chunks = array();
+ $i = 0;
+
+ if ($preserve_keys !== false)
+ {
+ foreach ($input as $key => $value) {
+ $chunks[(int)($i++ / $size)][$key] = $value;
+ }
+ }
+ else
+ {
+ foreach ($input as $value) {
+ $chunks[(int)($i++ / $size)][] = $value;
+ }
+ }
+
+ return $chunks;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_chunk.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/fprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/fprintf.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/fprintf.php (revision 6981)
@@ -0,0 +1,56 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: fprintf.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace fprintf()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.fprintf
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('fprintf'))
+{
+ function fprintf () {
+ $args = func_get_args();
+
+ if (count($args) < 2) {
+ trigger_error ('Wrong parameter count for fprintf()', E_USER_WARNING);
+ return null;
+ }
+
+ $resource_handle = array_shift($args);
+ $format = array_shift($args);
+
+ if (!is_resource($resource_handle)) {
+ trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING);
+ return false;
+ }
+
+ return fwrite($resource_handle, vsprintf($format, $args));
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/fprintf.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_combine.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_combine.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_combine.php (revision 6981)
@@ -0,0 +1,71 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_combine.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_combine()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.array_combine
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_combine'))
+{
+ function array_combine ($keys, $values)
+ {
+ if (!is_array($keys)) {
+ trigger_error('array_combine() expects parameter 1 to be array, ' . gettype($keys) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_array($values)) {
+ trigger_error('array_combine() expects parameter 2 to be array, ' . gettype($values) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (count($keys) !== count($values)) {
+ trigger_error('array_combine() Both parameters should have equal number of elements', E_USER_WARNING);
+ return false;
+ }
+
+ if (count($keys) === 0 || count($values) === 0) {
+ trigger_error('array_combine() Both parameters should have number of elements at least 0', E_USER_WARNING);
+ return false;
+ }
+
+ $keys = array_values($keys);
+ $values = array_values($values);
+
+ $combined = array ();
+
+ for ($i = 0, $cnt = count($values); $i < $cnt; $i++) {
+ $combined[$keys[$i]] = $values[$i];
+ }
+
+ return $combined;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_combine.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/is_a.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/is_a.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/is_a.php (revision 6981)
@@ -0,0 +1,48 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: is_a.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace function is_a()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.is_a
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.0 (is_subclass_of)
+ */
+if (!function_exists('is_a'))
+{
+ function is_a ($object, $class)
+ {
+ if (get_class($object) == strtolower($class)) {
+ return true;
+ }
+
+ else {
+ return is_subclass_of($object, $class);
+ }
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/is_a.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vsprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vsprintf.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vsprintf.php (revision 6981)
@@ -0,0 +1,47 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: vsprintf.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace vsprintf()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.vsprintf
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.1.0
+ * @require PHP 4.0.4 (call_user_func_array)
+ */
+if (!function_exists('vsprintf'))
+{
+ function vsprintf ($format, $args)
+ {
+ if (count($args) < 2) {
+ trigger_error('vsprintf() Too few arguments', E_USER_WARNING);
+ return null;
+ }
+
+ array_unshift($args, $format);
+ return call_user_func_array('sprintf', $args);
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vsprintf.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_ireplace.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_ireplace.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_ireplace.php (revision 6981)
@@ -0,0 +1,119 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: str_ireplace.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace str_ireplace()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.str_ireplace
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @internal count not by returned by reference - not possible in php4
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('str_ireplace'))
+{
+ function str_ireplace ($search, $replace, $subject, $count = null)
+ {
+ if (is_string($search) && is_array($replace)) {
+ trigger_error('Array to string conversion', E_USER_NOTICE);
+ $replace = (string) $replace;
+ }
+
+ // If search isn't an array, make it one
+ if (!is_array($search)) {
+ $search = array ($search);
+ }
+
+ // If replace isn't an array, make it one, and pad it to the length of search
+ if (!is_array($replace))
+ {
+ $replace_string = $replace;
+
+ $replace = array ();
+ for ($i = 0, $c = count($search); $i < $c; $i++)
+ {
+ $replace[$i] = $replace_string;
+ }
+ }
+
+ // Check the replace array is padded to the correct length
+ $length_replace = count($replace);
+ $length_search = count($search);
+ if ($length_replace < $length_search)
+ {
+ for ($i = $length_replace; $i < $length_search; $i++)
+ {
+ $replace[$i] = '';
+ }
+ }
+
+ // If subject is not an array, make it one
+ $was_array = false;
+ if (!is_array($subject)) {
+ $was_array = true;
+ $subject = array ($subject);
+ }
+
+ // Loop through each subject
+ $count = 0;
+ foreach ($subject as $subject_key => $subject_value)
+ {
+ // Loop through each search
+ foreach ($search as $search_key => $search_value)
+ {
+ // Split the array into segments, in between each part is our search
+ $segments = explode(strtolower($search_value), strtolower($subject_value));
+
+ // The number of replacements done is the number of segments minus the first
+ $count += count($segments) - 1;
+ $pos = 0;
+
+ // Loop through each segment
+ foreach ($segments as $segment_key => $segment_value)
+ {
+ // Replace the lowercase segments with the upper case versions
+ $segments[$segment_key] = substr($subject_value, $pos, strlen($segment_value));
+ // Increase the position relative to the initial string
+ $pos += strlen($segment_value) + strlen($search_value);
+ }
+
+ // Put our original string back together
+ $subject_value = implode($replace[$search_key], $segments);
+ }
+
+ $result[$subject_key] = $subject_value;
+ }
+
+ // Check if subject was initially a string and return it as a string
+ if ($was_array === true) {
+ return $result[0];
+ }
+
+ // Otherwise, just return the array
+ return $result;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_ireplace.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/call_user_func_array.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/call_user_func_array.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/call_user_func_array.php (revision 6981)
@@ -0,0 +1,80 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: call_user_func_array.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace call_user_func_array()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/call_user_func_array
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.0.4
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('call_user_func_array'))
+{
+ function call_user_func_array ($function, $param_arr)
+ {
+ $param_arr = (array) $param_arr;
+
+ // Sanity check
+ if (!is_callable($function))
+ {
+ if (is_array($function) && count($function) > 2) {
+ $function = $function[0] . '::' . $function[1];
+ }
+ $error = sprintf('call_user_func_array() First argument is expected to be a valid callback, \'%s\' was given', $function);
+ trigger_error($error, E_USER_WARNING);
+ return null;
+ }
+
+ // Build argument string
+ $arg_string = '';
+ $comma = '';
+ for ($i = 0, $x = count($param_arr); $i < $x; $i++) {
+ $arg_string .= $comma . "\$param_arr[$i]";
+ $comma = ', ';
+ }
+
+ // Determine method of calling function
+ if (is_array($function))
+ {
+ $object =& $function[0];
+ $method = $function[1];
+
+ // Static vs method call
+ if (is_string($function[0])) {
+ eval("\$retval = $object::\$method($arg_string);");
+ } else {
+ eval("\$retval = \$object->\$method($arg_string);");
+ }
+ }
+ else {
+ eval("\$retval = \$function($arg_string);");
+ }
+
+ return $retval;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/call_user_func_array.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/http_build_query.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/http_build_query.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/http_build_query.php (revision 6981)
@@ -0,0 +1,101 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Stephan Schmidt <schst@php.net> |
+// | Aidan Lister <aidan@php.net>
+// +----------------------------------------------------------------------+
+//
+// $Id: http_build_query.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace function http_build_query()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.http-build-query
+ * @author Stephan Schmidt <schst@php.net>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('http_build_query'))
+{
+ function http_build_query ($formdata, $numeric_prefix = null)
+ {
+ // If $formdata is an object, convert it to an array
+ if (is_object($formdata)) {
+ $formdata = get_object_vars($formdata);
+ }
+
+ // Check we have an array to work with
+ if (!is_array($formdata)) {
+ trigger_error('http_build_query() Parameter 1 expected to be Array or Object. Incorrect value given.', E_USER_WARNING);
+ return false;
+ }
+
+ // If the array is empty, return null
+ if (empty($formdata)) {
+ return null;
+ }
+
+ // Start building the query
+ $tmp = array ();
+ foreach ($formdata as $key => $val)
+ {
+ if (is_integer($key) && $numeric_prefix != null) {
+ $key = $numeric_prefix . $key;
+ }
+
+ if (is_scalar($val)) {
+ array_push($tmp, urlencode($key).'='.urlencode($val));
+ continue;
+ }
+
+ // If the value is an array, recursively parse it
+ if (is_array($val)) {
+ array_push($tmp, __http_build_query($val, urlencode($key)));
+ continue;
+ }
+ }
+
+ return implode('&', $tmp);
+ }
+
+ // Helper function
+ function __http_build_query ($array, $name)
+ {
+ $tmp = array ();
+ foreach ($array as $key => $value)
+ {
+ if (is_array($value)) {
+ array_push($tmp, __http_build_query($value, sprintf('%s[%s]', $name, $key)));
+ }
+
+ elseif (is_scalar($value)) {
+ array_push($tmp, sprintf('%s[%s]=%s', $name, urlencode($key), urlencode($value)));
+ }
+
+ elseif (is_object($value)) {
+ array_push($tmp, __http_build_query(get_object_vars($value), sprintf('%s[%s]', $name, $key)));
+ }
+ }
+
+ return implode('&', $tmp);
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/http_build_query.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff_assoc.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff_assoc.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff_assoc.php (revision 6981)
@@ -0,0 +1,90 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Stephan Schmidt <schst@php.net> |
+// | Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_udiff_assoc.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_udiff_assoc()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @author Stephan Schmidt <schst@php.net>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @link http://php.net/function.array-udiff-assoc
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_udiff_assoc'))
+{
+ function array_udiff_assoc ()
+ {
+ $args = func_get_args();
+ if (count($args) < 3) {
+ trigger_error('Wrong parameter count for array_udiff()', E_USER_WARNING);
+ return null;
+ }
+
+ // Get compare function
+ $compare_func = array_pop($args);
+ if (!is_callable($compare_func))
+ {
+ if (is_array($compare_func)) {
+ $compare_func = $compare_func[0].'::'.$compare_func[1];
+ }
+ trigger_error('array_udiff() Not a valid callback ' . $compare_func, E_USER_WARNING);
+ return null;
+ }
+
+ // Check arrays
+ $count = count($args);
+ for ($i = 0; $i < $count; $i++)
+ {
+ if (!is_array($args[$i])) {
+ trigger_error('array_udiff() Argument #' . ($i + 1) . ' is not an array', E_USER_WARNING);
+ return null;
+ }
+ }
+
+ $diff = array ();
+ // Traverse values of the first array
+ foreach ($args[0] as $key => $value)
+ {
+ // Check all arrays
+ for ($i = 1; $i < $count; $i++)
+ {
+ if (!isset($args[$i][$key])) {
+ continue;
+ }
+ $result = call_user_func($compare_func, $value, $args[$i][$key]);
+ if ($result === 0) {
+ continue 2;
+ }
+ }
+
+ $diff[$key] = $value;
+ }
+
+ return $diff;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_udiff_assoc.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/scandir.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/scandir.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/scandir.php (revision 6981)
@@ -0,0 +1,70 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: scandir.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace scandir()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.scandir
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('scandir'))
+{
+ function scandir ($directory, $sorting_order = 0)
+ {
+ if (!is_string($directory)) {
+ trigger_error('scandir() expects parameter 1 to be string, ' . gettype($directory) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_int($sorting_order)) {
+ trigger_error('scandir() expects parameter 2 to be long, ' . gettype($sorting_order) . ' given', E_USER_WARNING);
+ return null;
+ }
+
+ if (!is_dir($directory) || (false === $fh = @opendir($directory))) {
+ trigger_error('scandir() failed to open dir: Invalid argument', E_USER_WARNING);
+ return false;
+ }
+
+ $files = array ();
+ while (false !== ($filename = readdir($fh))) {
+ $files[] = $filename;
+ }
+
+ closedir($fh);
+
+ if ($sorting_order == 1) {
+ rsort($files);
+ } else {
+ sort($files);
+ }
+
+ return $files;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/scandir.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_split.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_split.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_split.php (revision 6981)
@@ -0,0 +1,53 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: str_split.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace str_split()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.str_split
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('str_split'))
+{
+ function str_split ($string, $split_length = 1)
+ {
+ if (!is_numeric($split_length)) {
+ trigger_error('str_split() expects parameter 2 to be long, ' . gettype($split_length) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ if ($split_length < 1) {
+ trigger_error('str_split() The the length of each segment must be greater then zero', E_USER_WARNING);
+ return false;
+ }
+
+ preg_match_all('/.{1,' . $split_length . '}/s', $string, $matches);
+ return $matches[0];
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/str_split.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_put_contents.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_put_contents.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_put_contents.php (revision 6981)
@@ -0,0 +1,105 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: file_put_contents.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+if (!defined('FILE_USE_INCLUDE_PATH')) {
+ define('FILE_USE_INCLUDE_PATH', 1);
+}
+
+if (!defined('FILE_APPEND')) {
+ define('FILE_APPEND', 8);
+}
+
+
+/**
+ * Replace file_put_contents()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.file_put_contents
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @internal $resource_context is not supported
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('file_put_contents'))
+{
+ function file_put_contents ($filename, $content, $flags = null, $resource_context = null)
+ {
+ // If $content is an array, convert it to a string
+ if (is_array($content)) {
+ $content = implode('', $content);
+ }
+
+ // If we don't have a string, throw an error
+ if (!is_string($content)) {
+ trigger_error('file_put_contents() The 2nd parameter should be either a string or an array', E_USER_WARNING);
+ return false;
+ }
+
+ // Get the length of date to write
+ $length = strlen($content);
+
+ // Check what mode we are using
+ $mode = ($flags & FILE_APPEND) ?
+ $mode = 'a' :
+ $mode = 'w';
+
+ // Check if we're using the include path
+ $use_inc_path = ($flags & FILE_USE_INCLUDE_PATH) ?
+ true :
+ false;
+
+ // Open the file for writing
+ if (($fh = @fopen($filename, $mode, $use_inc_path)) === false) {
+ trigger_error('file_put_contents() failed to open stream: Permission denied', E_USER_WARNING);
+ return false;
+ }
+
+ // Write to the file
+ $bytes = 0;
+ if (($bytes = @fwrite($fh, $content)) === false) {
+ $errormsg = sprintf('file_put_contents() Failed to write %d bytes to %s',
+ $length,
+ $filename);
+ trigger_error($errormsg, E_USER_WARNING);
+ return false;
+ }
+
+ // Close the handle
+ @fclose($fh);
+
+ // Check all the data was written
+ if ($bytes != $length) {
+ $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space.',
+ $bytes,
+ $length);
+ trigger_error($errormsg, E_USER_WARNING);
+ return false;
+ }
+
+ // Return length
+ return $bytes;
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/file_put_contents.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_key_exists.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_key_exists.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_key_exists.php (revision 6981)
@@ -0,0 +1,56 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_key_exists.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+/**
+ * Replace array_key_exists()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/array_key_exists
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.1.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_key_exists'))
+{
+ function array_key_exists ($key, $search)
+ {
+ if (!is_scalar($key)) {
+ trigger_error('array_key_exists() The first argument should be either a string or an integer', E_USER_WARNING);
+ return false;
+ }
+
+ if (is_object($search)) {
+ $search = get_object_vars($search);
+ }
+
+ if (!is_array($search)) {
+ trigger_error('array_key_exists() The second argument should be either an array or an object', E_USER_WARNING);
+ return false;
+ }
+
+ return in_array($key, array_keys($search));
+ }
+}
+
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_key_exists.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/strripos.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/strripos.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/strripos.php (revision 6981)
@@ -0,0 +1,83 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// | Stephan Schmidt <schst@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: strripos.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace strripos()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.strripos
+ * @author Aidan Lister <aidan@php.net>
+ * @author Stephan Schmidt <schst@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 5
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('strripos'))
+{
+ function strripos ($haystack, $needle, $offset = null)
+ {
+ if (!is_scalar($haystack)) {
+ trigger_error('strripos() expects parameter 1 to be scalar, ' . gettype($haystack) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ if (!is_scalar($needle)) {
+ trigger_error('strripos() expects parameter 2 to be scalar, ' . gettype($needle) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ if (!is_null($offset) && !is_numeric($offset)) {
+ trigger_error('strripos() expects parameter 3 to be long, ' . gettype($offset) . ' given', E_USER_WARNING);
+ return false;
+ }
+
+ // Manipulate the string if there is an offset
+ $fix = 0;
+ if (!is_null($offset))
+ {
+ // If the offset is larger than the haystack, return
+ if (abs($offset) >= strlen($haystack)) {
+ return false;
+ }
+
+ // Check whether offset is negative or positive
+ if ($offset > 0) {
+ $haystack = substr($haystack, $offset, strlen($haystack) - $offset);
+ // We need to add this to the position of the needle
+ $fix = $offset;
+ }
+ else {
+ $haystack = substr($haystack, 0, strlen($haystack) + $offset);
+ }
+ }
+
+ $segments = explode(strtolower($needle), strtolower($haystack));
+
+ $last_seg = count($segments) - 1;
+ $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle);
+
+ return $position;
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/strripos.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_change_key_case.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_change_key_case.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_change_key_case.php (revision 6981)
@@ -0,0 +1,65 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Stephan Schmidt <schst@php.net> |
+// | Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: array_change_key_case.php,v 1.1.2.1 2006-12-12 08:16:41 alex Exp $
+//
+
+
+if (!defined('CASE_LOWER')) {
+ define('CASE_LOWER', 0);
+}
+
+if (!defined('CASE_UPPER')) {
+ define('CASE_UPPER', 1);
+}
+
+
+/**
+ * Replace array_change_key_case()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.array_change_key_case
+ * @author Stephan Schmidt <schst@php.net>
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.2.0
+ * @require PHP 4.0.1 (trigger_error)
+ */
+if (!function_exists('array_change_key_case'))
+{
+ function array_change_key_case ($input, $case = CASE_LOWER)
+ {
+ if (!is_array($input)) {
+ trigger_error('array_change_key_case(): The argument should be an array', E_USER_WARNING);
+ return false;
+ }
+
+ $output = array ();
+ $keys = array_keys($input);
+ $casefunc = ($case == CASE_LOWER) ? 'strtolower' : 'strtoupper';
+
+ foreach ($keys as $key) {
+ $output[$casefunc($key)] = $input[$key];
+ }
+
+ return $output;
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/array_change_key_case.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vprintf.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vprintf.php (revision 6981)
@@ -0,0 +1,47 @@
+<?php
+/* vim: set expandtab tabstop=4 shiftwidth=4: */
+// +----------------------------------------------------------------------+
+// | PHP Version 4 |
+// +----------------------------------------------------------------------+
+// | Copyright (c) 1997-2004 The PHP Group |
+// +----------------------------------------------------------------------+
+// | This source file is subject to version 3.0 of the PHP license, |
+// | that is bundled with this package in the file LICENSE, and is |
+// | available at through the world-wide-web at |
+// | http://www.php.net/license/3_0.txt. |
+// | If you did not receive a copy of the PHP license and are unable to |
+// | obtain it through the world-wide-web, please send a note to |
+// | license@php.net so we can mail you a copy immediately. |
+// +----------------------------------------------------------------------+
+// | Authors: Aidan Lister <aidan@php.net> |
+// +----------------------------------------------------------------------+
+//
+// $Id: vprintf.php,v 1.1.2.1 2006-12-12 08:16:42 alex Exp $
+//
+
+
+/**
+ * Replace vprintf()
+ *
+ * @category PHP
+ * @package PHP_Compat
+ * @link http://php.net/function.vprintf
+ * @author Aidan Lister <aidan@php.net>
+ * @version $Revision: 1.1.2.1 $
+ * @since PHP 4.1.0
+ * @require PHP 4.0.4 (call_user_func_array)
+ */
+if (!function_exists('vprintf'))
+{
+ function vprintf ($format, $args)
+ {
+ if (count($args) < 2) {
+ trigger_error('vprintf() Too few arguments', E_USER_WARNING);
+ return null;
+ }
+
+ array_unshift($args, $format);
+ return call_user_func_array('printf', $args);
+ }
+}
+?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat/vprintf.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/obscure.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/obscure.php (nonexistent)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/obscure.php (revision 6981)
@@ -0,0 +1,274 @@
+#!/usr/local/bin/php
+
+<?php
+
+ if (isset($argv[2]) && $argv[2] != '') {
+ define('SEED', $argv[2]);
+ }
+ else {
+ define('SEED', rand(0, 100000));
+ }
+
+ function gen_name($old)
+ {
+ return md5($old.SEED);
+ //return '_n_'.$old;
+ }
+
+ $functions = array();
+
+ $php = file($argv[1]);
+ $n = 1;
+ for($x=0;$x<count($php);$x++)
+ {
+ $line = $php[$x];
+
+ if ( preg_match("/^[ ]*\/\/.*?$/", trim($line)) ) {
+ //echo "SKIPPING ".$php[$x];
+ $php[$x] = "";
+ continue; //cut comments
+ }
+
+ if ( preg_match("/^\/\*.*\*\/$/", trim($line)) ) {
+ //echo "SKIPPING ".$php[$x];
+ $php[$x] = "";
+ continue; //cut comments
+ }
+
+ if(substr($line,0,10)=="function _")
+ {
+ $dec_parts = explode(" ",$line,2);
+ $pp = explode("(",$dec_parts[1]);
+ $name = $pp[0];
+ $attribs="(".$pp[1];
+
+ //echo "found func $name attribs: $attribs\n";
+
+ $start = $x;
+ for($f=$x;$f<count($php);$f++)
+ {
+ if(substr($php[$f],0,1)=="}")
+ {
+ $end = $f;
+ break;
+ }
+ }
+ if($start && $end && strlen($name))
+ {
+ $newname = "_".gen_name($n);
+ $n++;
+ $functions[$name] = array("start"=>$start,"end"=>$end,"attribs"=>$attribs,"newname"=>$newname);
+ }
+ }
+ }
+// print_r($functions);
+ //echo "<PRE>"; print_r($functions); echo "</PRE>";
+
+ function GetVarName($s)
+ {
+ $alphabet = "abcdefghijklmnopqrstuvwxyz_ABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+ $name = "";
+ $var_end = 0;
+ $char = substr($s,$var_end,1);
+ if(substr($s,0,1)=="$")
+ {
+ $var_end++;
+ $char = substr($s,$var_end,1);
+ }
+ while(is_numeric(strpos($alphabet,$char)) && strlen($char))
+ {
+ $name .= $char;
+ $var_end++;
+ $char = substr($s,$var_end,1);
+ }
+ return $name;
+ }
+
+ function obscure_func($NewName,$Attribs,$code)
+ {
+ global $functions;
+
+ $globals = array();
+
+ $globals[] = '$this';
+ $globals[] = '$_GET';
+ $globals[] = '$_FILES';
+ $globals[] = '$_POST';
+ $globals[] = '$_COOKIE';
+ $globals[] = '$_SERVER';
+
+ $variables = array();
+
+ $new_code = array();
+ for($x=0;$x<=count($code);$x++)
+ {
+ $line = $code[$x];
+ $line = ltrim($line);
+ $line = str_replace("\t","",$line);
+ $g = strpos($line,"global");
+ if(is_numeric($g))
+ {
+ $vars = trim(substr($line,$g+7));
+ $vars = substr($vars,0,-1);
+ $v = explode(",",$vars);
+ for($z=0;$z<count($v);$z++)
+ $globals[] = ltrim($v[$z]);
+ }
+ $new_code[$x] = $line;
+ }
+ $code = $new_code;
+ for($x=0;$x<count($code);$x++)
+ {
+ foreach($functions as $name=>$attr)
+ {
+ $line = $code[$x];
+ $code[$x] = str_replace($name,$attr["newname"],$line);
+ }
+ }
+
+ $VarCount =0;
+ if(strlen($Attribs)>3)
+ {
+ $Attribs = trim($Attribs);
+ $Attribs = str_replace("\t","",$Attribs);
+ //echo "getting attribs from $Attribs\n";
+ $a = explode(",",substr($Attribs,1,-1));
+// echo "got attribs for func [$Attribs]:\n";
+// var_dump($a);
+ if (is_array($a) && $a[0] != '') {
+ foreach($a as $attr)
+ {
+ list($attr,$default) = explode('=', $attr);
+ //echo "attr: $attr / def = $default\n";
+ if ($default != '') {
+ $defaults[$attr] = $default;
+ //echo "stored defaults for $attr\n";
+ }
+ $variables[$attr] = '$_'.gen_name($VarCount++);
+ }
+ }
+ }
+
+ for($x=0;$x<count($code);$x++)
+ {
+ $line = $code[$x];
+ if(!strlen($line))
+ continue;
+ $p = strpos($line,"$");
+ while($p>0)
+ {
+ if(substr($line,$p,2)!="$$")
+ {
+ $name=GetVarName(substr($line,$p));
+ if(strlen($name))
+ {
+ $name = "$".trim($name);
+ if(!in_array($name,$globals) && !array_key_exists($name,$variables))
+ $variables[$name] = '$_'.gen_name($VarCount++);
+ }
+ }
+ $p = strpos($line,"$",$p+1);
+ }
+ }
+
+ for($x=0;$x<count($code);$x++)
+ {
+// print_r($variables);
+ foreach($variables as $v=>$varname)
+ {
+ //echo "strpos ".$code[$x].', '.$v."\n";
+ $p = strpos($code[$x],$v);
+ while(is_numeric($p))
+ {
+ $t = GetVarName(substr($code[$x],$p));
+ if('$'.$t == $v)
+ {
+ $code[$x] = substr_replace($code[$x],$varname,$p,strlen($t)+1);
+ }
+ $p = strpos($code[$x],$v,$p+1);
+ }
+ }
+ }
+
+ $o = "function $NewName"."(";
+ if (is_array($a)) {
+ foreach($a as $attr)
+ {
+ list($attr,$default) = explode('=', $attr);
+ $av[] = ($variables[$attr].(isset($defaults[$attr]) ? '='.$defaults[$attr] : ''));
+ }
+ }
+ if(count($av)>0)
+ $o .= implode(",",$av);
+ $o .= ")";
+ //echo "reversed: $o\n";
+ $o .= implode(" ",$code);
+ //$o = str_replace("\n","",$o);
+ return $o;
+ }
+
+ $out = "";
+ $outline = 0;
+
+ $shuffled = array_rand($functions, count($functions));
+// print_r($shuffled);
+
+ foreach ($shuffled as $name) {
+ $pos = $functions[$name];
+
+ //foreach($functions as $name =>$pos)
+ //{
+ $dest = $pos["start"];
+ $newname = $pos["newname"];
+ if(!$outline)
+ $outline = $dest;
+
+
+ unset($code);
+ for($x=$dest+1;$x<=$pos["end"];$x++)
+ {
+ $code[] = $php[$x];
+ }
+ $newcode = obscure_func($newname,$pos["attribs"],$code);
+ $out .= $newcode;
+ }
+ foreach($functions as $name=>$pos)
+ {
+ for($x=$pos["start"];$x<=$pos["end"];$x++)
+ {
+ $php[$x] = "";
+ }
+ }
+
+ $code =array();
+ for($x=0;$x<count($php);$x++) {
+ $line = $php[$x];
+ foreach($functions as $name=>$attr)
+ {
+ $line = str_replace($name,$attr["newname"],$line);
+ }
+ $code[$x] = $line;
+ }
+ $php = $code;
+
+ $line=1;
+
+ $tmp_file = fopen($argv[1].'_', 'w');
+
+ for($x=0;$x<count($php);$x++)
+ {
+ if($x==$outline) {
+ //echo "$line: ".$out;
+ fwrite($tmp_file, $out);
+ }
+ if(strlen($php[$x])) {
+ //echo "$line: ".ltrim($php[$x]);
+ fwrite($tmp_file, ltrim($php[$x]));
+ }
+ $line++;
+ }
+ fclose($tmp_file);
+ rename($argv[1].'_', $argv[1]);
+
+?>
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/obscure.php
___________________________________________________________________
Added: cvs2svn:cvs-rev
## -0,0 +1 ##
+1.1.2.1
\ No newline at end of property
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.2/kernel/include/compat.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.2/kernel/include/compat.php (revision 6981)
@@ -1,18 +1,14 @@
<?php
- $dir = FULL_PATH.'/compat/';
-
- if (is_dir($dir))
- {
- if ($dh = opendir($dir))
- {
- while (($file = readdir($dh)) !== false)
- {
- if($file != "." && $file != ".." && substr($file,-3)=="php")
- {
- require_once($dir.$file);
- }
- }
- closedir($dh);
- }
- }
+ $dir = FULL_PATH.'/kernel/include/compat/';
+
+ if (is_dir($dir)) {
+ if ($dh = opendir($dir)) {
+ while (($file = readdir($dh)) !== false) {
+ if ($file != '.' && $file != '..' && substr($file,-3) == 'php') {
+ require_once($dir.$file);
+ }
+ }
+ closedir($dh);
+ }
+ }
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.2/kernel/include/compat.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.1
\ No newline at end of property
+1.1.2.2
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/png_replace.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/png_replace.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/png_replace.php (nonexistent)
@@ -1,93 +0,0 @@
-<?php
-/*
-* replacePngTags - Justin Koivisto [W.A. Fisher Interactive] 7/1/2003 10:45AM
-* Modified: 2/11/2004 10:18AM
-*
-* Modifies IMG tags for MSIE5+ browsers to ensure that PNG-24 transparencies
-* are displayed correctly. Replaces original SRC attribute with a transparent
-* GIF file (spacer.gif) that is located in the same directory as the orignal
-* image, and adds the STYLE attribute needed to for the browser. (Matching
-* is case-insensitive. However, the width attribute should come before height.
-*
-* Also replaces code for PNG images specified as backgrounds via:
-* background-image: url('image.png'); When using PNG images in the background,
-* there is no need to use a spacer.gif image.
-*
-* @param $x String containing the content to search and replace in.
-* @result Returns the modified string.
-*/
-function replacePngTags($x,$spacer="images/spacer.gif")
-{
- // make sure that we are only replacing for the Windows versions of Internet
- // Explorer 5+, and not Opera identified as MSIE
- $msie='/msie\s([5-9])\.?[0-9]*.*(win)/i';
- $opera='/opera\s+[0-9]+/i';
- if(!isset($_SERVER['HTTP_USER_AGENT']) ||
- !preg_match($msie,$_SERVER['HTTP_USER_AGENT']) ||
- preg_match($opera,$_SERVER['HTTP_USER_AGENT']))
- return $x;
-
- // find all the png images in backgrounds
- preg_match_all('/background-image:\s*url\(\'(.*\.png)\'\);/Uis',$x,$background);
- for($i=0;$i<count($background[0]);$i++){
- // simply replace:
- // "background-image: url('image.png');"
- // with:
- // "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(
- // enabled=true, sizingMethod=scale src='image.png');"
- // haven't tested to see if background-repeat styles work...
- $x=str_replace($background[0][$i],'filter:progid:DXImageTransform.'.
- 'Microsoft.AlphaImageLoader(enabled=true, sizingMethod=scale'.
- ' src=\''.$background[1][$i].'\');',$x);
- }
-
- // OK, time to find all the IMG tags with ".png" in them
- preg_match_all('/(<img.*\.png.*>|<input.*type=([\'"])image\\2.*\.png.*>)/Uis',$x,$images);
- while(list($imgnum,$v)=@each($images[0])){
- $original=$v;
- $atts=''; $width=0; $height=0;
- // If the size is defined by styles, find
- preg_match_all('/style=".*(width: ([0-9]+))px.*'.
- '(height: ([0-9]+))px.*"/Ui',$v,$arr2);
- if(is_array($arr2) && count($arr2[0])){
- // size was defined by styles, get values
- $width=$arr2[2][0];
- $height=$arr2[4][0];
- }
- // size was not defined by styles, get values
- preg_match_all('/width=\"?([0-9]+)\"?/i',$v,$arr2);
- if(is_array($arr2) && count($arr2[0])){
- $width=$arr2[1][0];
- }
- preg_match_all('/height=\"?([0-9]+)\"?/i',$v,$arr2);
- if(is_array($arr2) && count($arr2[0])){
- $height=$arr2[1][0];
- }
- preg_match_all('/src=\"([^\"]+\.png)\"/i',$v,$arr2);
- if(isset($arr2[1][0]) && !empty($arr2[1][0]))
- $image=$arr2[1][0];
- else
- $image=NULL;
-
- // We do this so that we can put our spacer.gif image in the same
- // directory as the image
- $tmp=split('[\\/]',$image);
- array_pop($tmp);
- $image_path=join('/',$tmp);
- if(strlen($image_path)) $image_path.='/';
-
- // end quote is already supplied by originial src attribute
- $replace_src_with=$spacer.'" style="width: '.$width.
- 'px; height: '.$height.'px; filter: progid:DXImageTransform.'.
- 'Microsoft.AlphaImageLoader(src=\''.$image.'\', sizingMethod='.
- '\'scale\')';
-
- // now create the new tag from the old
- $new_tag=str_replace($image,$replace_src_with,$original);
-
- // now place the new tag into the content
- $x=str_replace($original,$new_tag,$x);
- }
- return $x;
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/png_replace.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_search.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_search.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_search.php (nonexistent)
@@ -1,54 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_search.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_search()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/array_search
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com/)
- * @version $Revision: 1.1 $
- * @since PHP 4.0.5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_search'))
-{
- function array_search ($needle, $haystack, $strict = false)
- {
- if (!is_array($haystack)) {
- trigger_error("array_search() Wrong datatype for second argument", E_USER_WARNING);
- return false;
- }
-
- foreach ($haystack as $key => $value) {
- if ($strict ? $value === $needle : $value == $needle) {
- return $key;
- }
- }
-
- return false;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_search.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/html_entity_decode.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/html_entity_decode.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/html_entity_decode.php (nonexistent)
@@ -1,74 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: David Irvine <dave@codexweb.co.za> |
-// | Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: html_entity_decode.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-if (!defined('ENT_NOQUOTES')) {
- define('ENT_NOQUOTES', 0);
-}
-
-if (!defined('ENT_COMPAT')) {
- define('ENT_COMPAT', 2);
-}
-
-if (!defined('ENT_QUOTES')) {
- define('ENT_QUOTES', 3);
-}
-
-
-/**
- * Replace html_entity_decode()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.html_entity_decode
- * @author David Irvine <dave@codexweb.co.za>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.3.0
- * @internal Setting the charset will not do anything
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('html_entity_decode'))
-{
- function html_entity_decode ($string, $quote_style = ENT_COMPAT, $charset = null)
- {
- if (!is_int($quote_style)) {
- trigger_error('html_entity_decode() expects parameter 2 to be long, ' . gettype($quote_style) . ' given', E_USER_WARNING);
- return null;
- }
-
- $trans_tbl = get_html_translation_table(HTML_ENTITIES);
- $trans_tbl = array_flip($trans_tbl);
-
- // Add single quote to translation table;
- $trans_tbl['&#039;'] = '\'';
-
- // Not translating double quotes
- if ($quote_style & ENT_NOQUOTES) {
- // Remove double quote from translation table
- unset($trans_tbl['&quot;']);
- }
-
- return strtr($string, $trans_tbl);
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/html_entity_decode.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/version_compare.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/version_compare.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/version_compare.php (nonexistent)
@@ -1,170 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Philippe Jausions <Philippe.Jausions@11abacus.com> |
-// | Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: version_compare.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace version_compare()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/version_compare
- * @author Philippe Jausions <Philippe.Jausions@11abacus.com>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.1.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('version_compare')) {
-
- function version_compare ($version1, $version2, $operator = '<')
- {
- // Check input
- if (!is_scalar($version1)) {
- trigger_error('version_compare() expects parameter 1 to be string, ' . gettype($version1) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_scalar($version2)) {
- trigger_error('version_compare() expects parameter 2 to be string, ' . gettype($version2) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_scalar($operator)) {
- trigger_error('version_compare() expects parameter 3 to be string, ' . gettype($operator) . ' given', E_USER_WARNING);
- return null;
- }
-
- // Standardise versions
- $v1 = explode('.',
- str_replace('..', '.',
- preg_replace('/([^0-9\.]+)/', '.$1.',
- str_replace(array('-', '_', '+'), '.',
- trim($version1)))));
-
- $v2 = explode('.',
- str_replace('..', '.',
- preg_replace('/([^0-9\.]+)/', '.$1.',
- str_replace(array('-', '_', '+'), '.',
- trim($version2)))));
-
- // Replace empty entries at the start of the array
- while (empty($v1[0]) && array_shift($v1)) {}
- while (empty($v2[0]) && array_shift($v2)) {}
-
- // Describe our release states
- $versions = array(
- 'dev' => 0,
- 'alpha' => 1,
- 'a' => 1,
- 'beta' => 2,
- 'b' => 2,
- 'RC' => 3,
- 'pl' => 4);
-
- // Loop through each segment in the version string
- $compare = 0;
- for ($i = 0, $x = min(count($v1), count($v2)); $i < $x; $i++)
- {
- if ($v1[$i] == $v2[$i]) {
- continue;
- }
- if (is_numeric($v1[$i]) && is_numeric($v2[$i])) {
- $compare = ($v1[$i] < $v2[$i]) ? -1 : 1;
- }
- elseif (is_numeric($v1[$i])) {
- $compare = 1;
- }
- elseif (is_numeric($v2[$i])) {
- $compare = -1;
- }
- elseif (isset($versions[$v1[$i]]) && isset($versions[$v2[$i]])) {
- $compare = ($versions[$v1[$i]] < $versions[$v2[$i]]) ? -1 : 1;
- }
- else {
- $compare = strcmp($v2[$i], $v1[$i]);
- }
-
- break;
- }
-
- // If previous loop didn't find anything, compare the "extra" segments
- if ($compare == 0) {
- if (count($v2) > count($v1))
- {
- if (isset($versions[$v2[$i]])) {
- $compare = ($versions[$v2[$i]] < 4) ? 1 : -1;
- } else {
- $compare = -1;
- }
- }
- elseif (count($v2) < count($v1))
- {
- if (isset($versions[$v1[$i]])) {
- $compare = ($versions[$v1[$i]] < 4) ? -1 : 1;
- } else {
- $compare = 1;
- }
- }
- }
-
- // Compare the versions
- if (func_num_args() > 2)
- {
- switch ($operator)
- {
- case '>':
- case 'gt':
- return (bool) ($compare > 0);
- break;
- case '>=':
- case 'ge':
- return (bool) ($compare >= 0);
- break;
- case '<=':
- case 'le':
- return (bool) ($compare <= 0);
- break;
- case '==':
- case '=':
- case 'eq':
- return (bool) ($compare == 0);
- break;
- case '<>':
- case '!=':
- case 'ne':
- return (bool) ($compare != 0);
- break;
- case '':
- case '<':
- case 'lt':
- return (bool) ($compare < 0);
- break;
- default:
- return null;
- }
- }
-
- return $compare;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/version_compare.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/ob_flush.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/ob_flush.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/ob_flush.php (nonexistent)
@@ -1,49 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: ob_flush.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace ob_flush()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/ob_flush
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com/)
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('ob_flush'))
-{
- function ob_flush ()
- {
- if (@ob_end_flush()) {
- return ob_start();
- }
-
- trigger_error("ob_flush() Failed to flush buffer. No buffer to flush.", E_USER_NOTICE);
-
- return false;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/ob_flush.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_change_key_case.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_change_key_case.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_change_key_case.php (nonexistent)
@@ -1,65 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stephan Schmidt <schst@php.net> |
-// | Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_change_key_case.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-if (!defined('CASE_LOWER')) {
- define('CASE_LOWER', 0);
-}
-
-if (!defined('CASE_UPPER')) {
- define('CASE_UPPER', 1);
-}
-
-
-/**
- * Replace array_change_key_case()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_change_key_case
- * @author Stephan Schmidt <schst@php.net>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_change_key_case'))
-{
- function array_change_key_case ($input, $case = CASE_LOWER)
- {
- if (!is_array($input)) {
- trigger_error('array_change_key_case(): The argument should be an array', E_USER_WARNING);
- return false;
- }
-
- $output = array ();
- $keys = array_keys($input);
- $casefunc = ($case == CASE_LOWER) ? 'strtolower' : 'strtoupper';
-
- foreach ($keys as $key) {
- $output[$casefunc($key)] = $input[$key];
- }
-
- return $output;
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_change_key_case.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/str_ireplace.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/str_ireplace.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/str_ireplace.php (nonexistent)
@@ -1,119 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: str_ireplace.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace str_ireplace()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.str_ireplace
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @internal count not by returned by reference - not possible in php4
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('str_ireplace'))
-{
- function str_ireplace ($search, $replace, $subject, $count = null)
- {
- if (is_string($search) && is_array($replace)) {
- trigger_error('Array to string conversion', E_USER_NOTICE);
- $replace = (string) $replace;
- }
-
- // If search isn't an array, make it one
- if (!is_array($search)) {
- $search = array ($search);
- }
-
- // If replace isn't an array, make it one, and pad it to the length of search
- if (!is_array($replace))
- {
- $replace_string = $replace;
-
- $replace = array ();
- for ($i = 0, $c = count($search); $i < $c; $i++)
- {
- $replace[$i] = $replace_string;
- }
- }
-
- // Check the replace array is padded to the correct length
- $length_replace = count($replace);
- $length_search = count($search);
- if ($length_replace < $length_search)
- {
- for ($i = $length_replace; $i < $length_search; $i++)
- {
- $replace[$i] = '';
- }
- }
-
- // If subject is not an array, make it one
- $was_array = false;
- if (!is_array($subject)) {
- $was_array = true;
- $subject = array ($subject);
- }
-
- // Loop through each subject
- $count = 0;
- foreach ($subject as $subject_key => $subject_value)
- {
- // Loop through each search
- foreach ($search as $search_key => $search_value)
- {
- // Split the array into segments, in between each part is our search
- $segments = explode(strtolower($search_value), strtolower($subject_value));
-
- // The number of replacements done is the number of segments minus the first
- $count += count($segments) - 1;
- $pos = 0;
-
- // Loop through each segment
- foreach ($segments as $segment_key => $segment_value)
- {
- // Replace the lowercase segments with the upper case versions
- $segments[$segment_key] = substr($subject_value, $pos, strlen($segment_value));
- // Increase the position relative to the initial string
- $pos += strlen($segment_value) + strlen($search_value);
- }
-
- // Put our original string back together
- $subject_value = implode($replace[$search_key], $segments);
- }
-
- $result[$subject_key] = $subject_value;
- }
-
- // Check if subject was initially a string and return it as a string
- if ($was_array === true) {
- return $result[0];
- }
-
- // Otherwise, just return the array
- return $result;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/str_ireplace.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_diff_assoc.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_diff_assoc.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_diff_assoc.php (nonexistent)
@@ -1,80 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_diff_assoc.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_diff_assoc()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_diff_assoc
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.3.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_diff_assoc'))
-{
- function array_diff_assoc ()
- {
- // Check we have enough arguments
- $args = func_get_args();
- $count = count($args);
- if (count($args) < 2) {
- trigger_error('Wrong parameter count for array_diff_assoc()', E_USER_WARNING);
- return null;
- }
-
- // Check arrays
- for ($i = 0; $i < $count; $i++)
- {
- if (!is_array($args[$i])) {
- trigger_error('array_diff_assoc() Argument #' . ($i + 1) . ' is not an array', E_USER_WARNING);
- return null;
- }
- }
-
- // Get the comparison array
- $array_comp = array_shift($args);
- --$count;
-
- // Traverse values of the first array
- foreach ($array_comp as $key => $value)
- {
- // Loop through the other arrays
- for ($i = 0; $i < $count; $i++)
- {
- // Loop through this arrays key/value pairs and compare
- foreach ($args[$i] as $comp_key => $comp_value)
- {
- if ((string)$key === (string)$comp_key &&
- (string)$value === (string)$comp_value) {
-
- unset($array_comp[$key]);
- }
- }
- }
- }
-
- return $array_comp;
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_diff_assoc.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/http_build_query.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/http_build_query.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/http_build_query.php (nonexistent)
@@ -1,101 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stephan Schmidt <schst@php.net> |
-// | Aidan Lister <aidan@php.net>
-// +----------------------------------------------------------------------+
-//
-// $Id: http_build_query.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace function http_build_query()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.http-build-query
- * @author Stephan Schmidt <schst@php.net>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('http_build_query'))
-{
- function http_build_query ($formdata, $numeric_prefix = null)
- {
- // If $formdata is an object, convert it to an array
- if (is_object($formdata)) {
- $formdata = get_object_vars($formdata);
- }
-
- // Check we have an array to work with
- if (!is_array($formdata)) {
- trigger_error('http_build_query() Parameter 1 expected to be Array or Object. Incorrect value given.', E_USER_WARNING);
- return false;
- }
-
- // If the array is empty, return null
- if (empty($formdata)) {
- return null;
- }
-
- // Start building the query
- $tmp = array ();
- foreach ($formdata as $key => $val)
- {
- if (is_integer($key) && $numeric_prefix != null) {
- $key = $numeric_prefix . $key;
- }
-
- if (is_scalar($val)) {
- array_push($tmp, urlencode($key).'='.urlencode($val));
- continue;
- }
-
- // If the value is an array, recursively parse it
- if (is_array($val)) {
- array_push($tmp, __http_build_query($val, urlencode($key)));
- continue;
- }
- }
-
- return implode('&', $tmp);
- }
-
- // Helper function
- function __http_build_query ($array, $name)
- {
- $tmp = array ();
- foreach ($array as $key => $value)
- {
- if (is_array($value)) {
- array_push($tmp, __http_build_query($value, sprintf('%s[%s]', $name, $key)));
- }
-
- elseif (is_scalar($value)) {
- array_push($tmp, sprintf('%s[%s]=%s', $name, urlencode($key), urlencode($value)));
- }
-
- elseif (is_object($value)) {
- array_push($tmp, __http_build_query(get_object_vars($value), sprintf('%s[%s]', $name, $key)));
- }
- }
-
- return implode('&', $tmp);
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/http_build_query.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/constant.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/constant.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/constant.php (nonexistent)
@@ -1,50 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: constant.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace constant()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/constant
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.0.4
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('constant'))
-{
- function constant ($constant)
- {
- if (!defined($constant)) {
- $error = sprintf('constant() Couldn\'t find constant %s', $constant);
- trigger_error($error, E_USER_WARNING);
- return false;
- }
-
- eval("\$value=$constant;");
-
- return $value;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/constant.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/scandir.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/scandir.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/scandir.php (nonexistent)
@@ -1,70 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: scandir.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace scandir()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.scandir
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('scandir'))
-{
- function scandir ($directory, $sorting_order = 0)
- {
- if (!is_string($directory)) {
- trigger_error('scandir() expects parameter 1 to be string, ' . gettype($directory) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_int($sorting_order)) {
- trigger_error('scandir() expects parameter 2 to be long, ' . gettype($sorting_order) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_dir($directory) || (false === $fh = @opendir($directory))) {
- trigger_error('scandir() failed to open dir: Invalid argument', E_USER_WARNING);
- return false;
- }
-
- $files = array ();
- while (false !== ($filename = readdir($fh))) {
- $files[] = $filename;
- }
-
- closedir($fh);
-
- if ($sorting_order == 1) {
- rsort($files);
- } else {
- sort($files);
- }
-
- return $files;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/scandir.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/fprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/fprintf.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/fprintf.php (nonexistent)
@@ -1,56 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: fprintf.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace fprintf()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.fprintf
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('fprintf'))
-{
- function fprintf () {
- $args = func_get_args();
-
- if (count($args) < 2) {
- trigger_error ('Wrong parameter count for fprintf()', E_USER_WARNING);
- return null;
- }
-
- $resource_handle = array_shift($args);
- $format = array_shift($args);
-
- if (!is_resource($resource_handle)) {
- trigger_error ('fprintf(): supplied argument is not a valid stream resource', E_USER_WARNING);
- return false;
- }
-
- return fwrite($resource_handle, vsprintf($format, $args));
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/fprintf.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/file_get_contents.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/file_get_contents.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/file_get_contents.php (nonexistent)
@@ -1,61 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: file_get_contents.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace file_get_contents()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.file_get_contents
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @internal resource_context is not supported
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('file_get_contents'))
-{
- function file_get_contents ($filename, $incpath = false, $resource_context = null)
- {
- if (false === $fh = fopen($filename, 'rb', $incpath)) {
- trigger_error('file_get_contents() failed to open stream: No such file or directory', E_USER_WARNING);
- return false;
- }
-
- clearstatcache();
- if ($fsize = filesize($filename)) {
- $data = fread($fh, $fsize);
- }
-
- else {
- while (!feof($fh)) {
- $data .= fread($fh, 8192);
- }
- }
-
- fclose($fh);
-
- return $data;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/file_get_contents.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/image_type_to_mime_type.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/image_type_to_mime_type.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/image_type_to_mime_type.php (nonexistent)
@@ -1,128 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: image_type_to_mime_type.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-if (!defined('IMAGETYPE_GIF')) {
- define('IMAGETYPE_GIF', 0);
-}
-
-if (!defined('IMAGETYPE_JPEG')) {
- define('IMAGETYPE_JPEG', 1);
-}
-
-if (!defined('IMAGETYPE_PNG')) {
- define('IMAGETYPE_PNG', 2);
-}
-
-if (!defined('IMAGETYPE_SWF')) {
- define('IMAGETYPE_SWF', 3);
-}
-
-if (!defined('IMAGETYPE_PSD')) {
- define('IMAGETYPE_PSD', 4);
-}
-
-if (!defined('IMAGETYPE_BMP')) {
- define('IMAGETYPE_BMP', 5);
-}
-
-if (!defined('IMAGETYPE_TIFF_II')) {
- define('IMAGETYPE_TIFF_II', 6);
-}
-
-if (!defined('IMAGETYPE_TIFF_MM')) {
- define('IMAGETYPE_TIFF_MM', 7);
-}
-
-if (!defined('IMAGETYPE_JPC')) {
- define('IMAGETYPE_JPC', 8);
-}
-
-if (!defined('IMAGETYPE_JP2')) {
- define('IMAGETYPE_JP2', 9);
-}
-
-if (!defined('IMAGETYPE_JPX')) {
- define('IMAGETYPE_JPX', 10);
-}
-
-if (!defined('IMAGETYPE_JB2')) {
- define('IMAGETYPE_JB2', 11);
-}
-
-if (!defined('IMAGETYPE_SWC')) {
- define('IMAGETYPE_SWC', 12);
-}
-
-if (!defined('IMAGETYPE_IFF')) {
- define('IMAGETYPE_IFF', 13);
-}
-
-if (!defined('IMAGETYPE_WBMP')) {
- define('IMAGETYPE_WBMP', 14);
-}
-
-if (!defined('IMAGETYPE_XBM')) {
- define('IMAGETYPE_XBM', 15);
-}
-
-
-/**
- * Replace image_type_to_mime_type()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.image_type_to_mime_type
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.3.0
- * @require PHP 3
- */
-if (!function_exists('image_type_to_mime_type'))
-{
- function image_type_to_mime_type ($imagetype)
- {
- static $image_type_to_mime_type = array (
- IMAGETYPE_GIF => 'image/gif',
- IMAGETYPE_JPEG => 'image/jpeg',
- IMAGETYPE_PNG => 'image/png',
- IMAGETYPE_SWF => 'application/x-shockwave-flash',
- IMAGETYPE_PSD => 'image/psd',
- IMAGETYPE_BMP => 'image/bmp',
- IMAGETYPE_TIFF_II => 'image/tiff',
- IMAGETYPE_TIFF_MM => 'image/tiff',
- IMAGETYPE_JPC => 'application/octet-stream',
- IMAGETYPE_JP2 => 'image/jp2',
- IMAGETYPE_JPX => 'application/octet-stream',
- IMAGETYPE_JB2 => 'application/octet-stream',
- IMAGETYPE_SWC => 'application/x-shockwave-flash',
- IMAGETYPE_IFF => 'image/iff',
- IMAGETYPE_WBMP => 'image/vnd.wap.wbmp',
- IMAGETYPE_XBM => 'image/xbm',
- );
-
- return (isset($image_type_to_mime_type[$imagetype]) ?
- $image_type_to_mime_type[$imagetype] :
- $image_type_to_mime_type[IMAGETYPE_JPC]);
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/image_type_to_mime_type.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/var_export.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/var_export.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/var_export.php (nonexistent)
@@ -1,103 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: var_export.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace var_export()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.var_export
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('var_export'))
-{
- function var_export ($array, $return = false)
- {
- // Common output variables
- $indent = ' ';
- $doublearrow = ' => ';
- $lineend = ",\n";
- $stringdelim = '\'';
- $newline = "\n";
-
- // Check the export isn't a simple string / int
- if (is_string($array)) {
- $out = $stringdelim . $array . $stringdelim;
- }
- elseif (is_int($array)) {
- $out = (string)$array;
- }
-
- // Begin the array export
- else
- {
- // Start the string
- $out = "array (\n";
-
- // Loop through each value in array
- foreach ($array as $key => $value)
- {
- // If the key is a string, delimit it
- if (is_string($key)) {
- $key = $stringdelim . addslashes($key) . $stringdelim;
- }
-
- // If the value is a string, delimit it
- if (is_string($value)) {
- $value = $stringdelim . addslashes($value) . $stringdelim;
- }
-
- // We have an array, so do some recursion
- elseif (is_array($value))
- {
- // Do some basic recursion while increasing the indent
- $recur_array = explode($newline, var_export($value, true));
- $recur_newarr = array ();
- foreach ($recur_array as $recur_line) {
- $recur_newarr[] = $indent . $recur_line;
- }
- $recur_array = implode($newline, $recur_newarr);
- $value = $newline . $recur_array;
- }
-
- // Piece together the line
- $out .= $indent . $key . $doublearrow . $value . $lineend;
- }
-
- // End our string
- $out .= ")";
- }
-
-
- // Decide method of output
- if ($return === true) {
- return $out;
- } else {
- echo $out;
- return null;
- }
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/var_export.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/strripos.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/strripos.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/strripos.php (nonexistent)
@@ -1,83 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// | Stephan Schmidt <schst@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: strripos.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace strripos()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.strripos
- * @author Aidan Lister <aidan@php.net>
- * @author Stephan Schmidt <schst@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('strripos'))
-{
- function strripos ($haystack, $needle, $offset = null)
- {
- if (!is_scalar($haystack)) {
- trigger_error('strripos() expects parameter 1 to be scalar, ' . gettype($haystack) . ' given', E_USER_WARNING);
- return false;
- }
-
- if (!is_scalar($needle)) {
- trigger_error('strripos() expects parameter 2 to be scalar, ' . gettype($needle) . ' given', E_USER_WARNING);
- return false;
- }
-
- if (!is_null($offset) && !is_numeric($offset)) {
- trigger_error('strripos() expects parameter 3 to be long, ' . gettype($offset) . ' given', E_USER_WARNING);
- return false;
- }
-
- // Manipulate the string if there is an offset
- $fix = 0;
- if (!is_null($offset))
- {
- // If the offset is larger than the haystack, return
- if (abs($offset) >= strlen($haystack)) {
- return false;
- }
-
- // Check whether offset is negative or positive
- if ($offset > 0) {
- $haystack = substr($haystack, $offset, strlen($haystack) - $offset);
- // We need to add this to the position of the needle
- $fix = $offset;
- }
- else {
- $haystack = substr($haystack, 0, strlen($haystack) + $offset);
- }
- }
-
- $segments = explode(strtolower($needle), strtolower($haystack));
-
- $last_seg = count($segments) - 1;
- $position = strlen($haystack) + $fix - strlen($segments[$last_seg]) - strlen($needle);
-
- return $position;
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/strripos.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_udiff_assoc.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_udiff_assoc.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_udiff_assoc.php (nonexistent)
@@ -1,90 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stephan Schmidt <schst@php.net> |
-// | Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_udiff_assoc.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_udiff_assoc()
- *
- * @category PHP
- * @package PHP_Compat
- * @author Stephan Schmidt <schst@php.net>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @link http://php.net/function.array-udiff-assoc
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_udiff_assoc'))
-{
- function array_udiff_assoc ()
- {
- $args = func_get_args();
- if (count($args) < 3) {
- trigger_error('Wrong parameter count for array_udiff()', E_USER_WARNING);
- return null;
- }
-
- // Get compare function
- $compare_func = array_pop($args);
- if (!is_callable($compare_func))
- {
- if (is_array($compare_func)) {
- $compare_func = $compare_func[0].'::'.$compare_func[1];
- }
- trigger_error('array_udiff() Not a valid callback ' . $compare_func, E_USER_WARNING);
- return null;
- }
-
- // Check arrays
- $count = count($args);
- for ($i = 0; $i < $count; $i++)
- {
- if (!is_array($args[$i])) {
- trigger_error('array_udiff() Argument #' . ($i + 1) . ' is not an array', E_USER_WARNING);
- return null;
- }
- }
-
- $diff = array ();
- // Traverse values of the first array
- foreach ($args[0] as $key => $value)
- {
- // Check all arrays
- for ($i = 1; $i < $count; $i++)
- {
- if (!isset($args[$i][$key])) {
- continue;
- }
- $result = call_user_func($compare_func, $value, $args[$i][$key]);
- if ($result === 0) {
- continue 2;
- }
- }
-
- $diff[$key] = $value;
- }
-
- return $diff;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_udiff_assoc.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/ob_get_clean.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/ob_get_clean.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/ob_get_clean.php (nonexistent)
@@ -1,49 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: ob_get_clean.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace ob_get_clean()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/ob_get_clean
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com/)
- * @version $Revision: 1.1 $
- * @since PHP 4.3.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('ob_get_clean'))
-{
- function ob_get_clean ()
- {
- $contents = ob_get_contents();
-
- if ($contents !== false) {
- ob_end_clean();
- }
-
- return $contents;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/ob_get_clean.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/file_put_contents.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/file_put_contents.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/file_put_contents.php (nonexistent)
@@ -1,105 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: file_put_contents.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-if (!defined('FILE_USE_INCLUDE_PATH')) {
- define('FILE_USE_INCLUDE_PATH', 1);
-}
-
-if (!defined('FILE_APPEND')) {
- define('FILE_APPEND', 8);
-}
-
-
-/**
- * Replace file_put_contents()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.file_put_contents
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @internal $resource_context is not supported
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('file_put_contents'))
-{
- function file_put_contents ($filename, $content, $flags = null, $resource_context = null)
- {
- // If $content is an array, convert it to a string
- if (is_array($content)) {
- $content = implode('', $content);
- }
-
- // If we don't have a string, throw an error
- if (!is_string($content)) {
- trigger_error('file_put_contents() The 2nd parameter should be either a string or an array', E_USER_WARNING);
- return false;
- }
-
- // Get the length of date to write
- $length = strlen($content);
-
- // Check what mode we are using
- $mode = ($flags & FILE_APPEND) ?
- $mode = 'a' :
- $mode = 'w';
-
- // Check if we're using the include path
- $use_inc_path = ($flags & FILE_USE_INCLUDE_PATH) ?
- true :
- false;
-
- // Open the file for writing
- if (($fh = @fopen($filename, $mode, $use_inc_path)) === false) {
- trigger_error('file_put_contents() failed to open stream: Permission denied', E_USER_WARNING);
- return false;
- }
-
- // Write to the file
- $bytes = 0;
- if (($bytes = @fwrite($fh, $content)) === false) {
- $errormsg = sprintf('file_put_contents() Failed to write %d bytes to %s',
- $length,
- $filename);
- trigger_error($errormsg, E_USER_WARNING);
- return false;
- }
-
- // Close the handle
- @fclose($fh);
-
- // Check all the data was written
- if ($bytes != $length) {
- $errormsg = sprintf('file_put_contents() Only %d of %d bytes written, possibly out of free disk space.',
- $bytes,
- $length);
- trigger_error($errormsg, E_USER_WARNING);
- return false;
- }
-
- // Return length
- return $bytes;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/file_put_contents.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_udiff.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_udiff.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_udiff.php (nonexistent)
@@ -1,84 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Stephan Schmidt <schst@php.net> |
-// | Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_udiff.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_udiff()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_udiff
- * @author Stephan Schmidt <schst@php.net>
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_udiff'))
-{
- function array_udiff ()
- {
- $args = func_get_args();
-
- if (count($args) < 3) {
- trigger_error('Wrong parameter count for array_udiff()', E_USER_WARNING);
- return null;
- }
-
- // Get compare function
- $compare_func = array_pop($args);
- if (!is_callable($compare_func)) {
- if (is_array($compare_func)) {
- $compare_func = $compare_func[0] . '::' . $compare_func[1];
- }
- trigger_error('array_udiff() Not a valid callback ' . $compare_func, E_USER_WARNING);
- return null;
- }
-
- // Check arrays
- $cnt = count($args);
- for ($i = 0; $i < $cnt; $i++) {
- if (!is_array($args[$i])) {
- trigger_error('array_udiff() Argument #' . ($i + 1). ' is not an array', E_USER_WARNING);
- return null;
- }
- }
-
- $diff = array ();
- // Traverse values of the first array
- foreach ($args[0] as $key => $value) {
- // Check all arrays
- for ($i = 1; $i < $cnt; $i++) {
- foreach ($args[$i] as $cmp_value) {
- $result = call_user_func($compare_func, $value, $cmp_value);
- if ($result === 0) {
- continue 3;
- }
- }
- }
- $diff[$key] = $value;
- }
- return $diff;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_udiff.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/str_split.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/str_split.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/str_split.php (nonexistent)
@@ -1,53 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: str_split.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace str_split()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.str_split
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('str_split'))
-{
- function str_split ($string, $split_length = 1)
- {
- if (!is_numeric($split_length)) {
- trigger_error('str_split() expects parameter 2 to be long, ' . gettype($split_length) . ' given', E_USER_WARNING);
- return false;
- }
-
- if ($split_length < 1) {
- trigger_error('str_split() The the length of each segment must be greater then zero', E_USER_WARNING);
- return false;
- }
-
- preg_match_all('/.{1,' . $split_length . '}/s', $string, $matches);
- return $matches[0];
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/str_split.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_combine.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_combine.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_combine.php (nonexistent)
@@ -1,71 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_combine.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_combine()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_combine
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_combine'))
-{
- function array_combine ($keys, $values)
- {
- if (!is_array($keys)) {
- trigger_error('array_combine() expects parameter 1 to be array, ' . gettype($keys) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_array($values)) {
- trigger_error('array_combine() expects parameter 2 to be array, ' . gettype($values) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (count($keys) !== count($values)) {
- trigger_error('array_combine() Both parameters should have equal number of elements', E_USER_WARNING);
- return false;
- }
-
- if (count($keys) === 0 || count($values) === 0) {
- trigger_error('array_combine() Both parameters should have number of elements at least 0', E_USER_WARNING);
- return false;
- }
-
- $keys = array_values($keys);
- $values = array_values($values);
-
- $combined = array ();
-
- for ($i = 0, $cnt = count($values); $i < $cnt; $i++) {
- $combined[$keys[$i]] = $values[$i];
- }
-
- return $combined;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_combine.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/vsprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/vsprintf.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/vsprintf.php (nonexistent)
@@ -1,47 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: vsprintf.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace vsprintf()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.vsprintf
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.1.0
- * @require PHP 4.0.4 (call_user_func_array)
- */
-if (!function_exists('vsprintf'))
-{
- function vsprintf ($format, $args)
- {
- if (count($args) < 2) {
- trigger_error('vsprintf() Too few arguments', E_USER_WARNING);
- return null;
- }
-
- array_unshift($args, $format);
- return call_user_func_array('sprintf', $args);
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/vsprintf.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_chunk.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_chunk.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_chunk.php (nonexistent)
@@ -1,76 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_chunk.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_combine()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.array_chunk
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com)
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_chunk'))
-{
- function array_chunk ($input, $size, $preserve_keys = false)
- {
- if (!is_array($input)) {
- trigger_error('array_chunk() expects parameter 1 to be array, ' . gettype($input) . ' given', E_USER_WARNING);
- return null;
- }
-
- if (!is_numeric($size)) {
- trigger_error('array_chunk() expects parameter 2 to be long, ' . gettype($size) . ' given', E_USER_WARNING);
- return null;
- }
-
- $size = (int)$size;
- if ($size <= 0)
- {
- trigger_error('array_chunk() Size parameter expected to be greater than 0', E_USER_WARNING);
- return null;
- }
-
- $chunks = array();
- $i = 0;
-
- if ($preserve_keys !== false)
- {
- foreach ($input as $key => $value) {
- $chunks[(int)($i++ / $size)][$key] = $value;
- }
- }
- else
- {
- foreach ($input as $value) {
- $chunks[(int)($i++ / $size)][] = $value;
- }
- }
-
- return $chunks;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_chunk.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/call_user_func_array.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/call_user_func_array.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/call_user_func_array.php (nonexistent)
@@ -1,80 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: call_user_func_array.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace call_user_func_array()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/call_user_func_array
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.0.4
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('call_user_func_array'))
-{
- function call_user_func_array ($function, $param_arr)
- {
- $param_arr = (array) $param_arr;
-
- // Sanity check
- if (!is_callable($function))
- {
- if (is_array($function) && count($function) > 2) {
- $function = $function[0] . '::' . $function[1];
- }
- $error = sprintf('call_user_func_array() First argument is expected to be a valid callback, \'%s\' was given', $function);
- trigger_error($error, E_USER_WARNING);
- return null;
- }
-
- // Build argument string
- $arg_string = '';
- $comma = '';
- for ($i = 0, $x = count($param_arr); $i < $x; $i++) {
- $arg_string .= $comma . "\$param_arr[$i]";
- $comma = ', ';
- }
-
- // Determine method of calling function
- if (is_array($function))
- {
- $object =& $function[0];
- $method = $function[1];
-
- // Static vs method call
- if (is_string($function[0])) {
- eval("\$retval = $object::\$method($arg_string);");
- } else {
- eval("\$retval = \$object->\$method($arg_string);");
- }
- }
- else {
- eval("\$retval = \$function($arg_string);");
- }
-
- return $retval;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/call_user_func_array.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/array_key_exists.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/array_key_exists.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/array_key_exists.php (nonexistent)
@@ -1,56 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: array_key_exists.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace array_key_exists()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/array_key_exists
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.1.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('array_key_exists'))
-{
- function array_key_exists ($key, $search)
- {
- if (!is_scalar($key)) {
- trigger_error('array_key_exists() The first argument should be either a string or an integer', E_USER_WARNING);
- return false;
- }
-
- if (is_object($search)) {
- $search = get_object_vars($search);
- }
-
- if (!is_array($search)) {
- trigger_error('array_key_exists() The second argument should be either an array or an object', E_USER_WARNING);
- return false;
- }
-
- return in_array($key, array_keys($search));
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/array_key_exists.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/vprintf.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/vprintf.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/vprintf.php (nonexistent)
@@ -1,47 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: vprintf.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace vprintf()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.vprintf
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.1.0
- * @require PHP 4.0.4 (call_user_func_array)
- */
-if (!function_exists('vprintf'))
-{
- function vprintf ($format, $args)
- {
- if (count($args) < 2) {
- trigger_error('vprintf() Too few arguments', E_USER_WARNING);
- return null;
- }
-
- array_unshift($args, $format);
- return call_user_func_array('printf', $args);
- }
-}
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/vprintf.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/ob_get_flush.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/ob_get_flush.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/ob_get_flush.php (nonexistent)
@@ -1,49 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: ob_get_flush.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace ob_get_flush()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/ob_get_flush
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com/)
- * @version $Revision: 1.1 $
- * @since PHP 4.3.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('ob_get_flush'))
-{
- function ob_get_flush ()
- {
- $contents = ob_get_contents();
-
- if ($contents !== false) {
- ob_end_flush();
- }
-
- return $contents;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/ob_get_flush.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/is_a.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/is_a.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/is_a.php (nonexistent)
@@ -1,48 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: is_a.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace function is_a()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.is_a
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.0 (is_subclass_of)
- */
-if (!function_exists('is_a'))
-{
- function is_a ($object, $class)
- {
- if (get_class($object) == strtolower($class)) {
- return true;
- }
-
- else {
- return is_subclass_of($object, $class);
- }
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/is_a.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/ob_clean.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/ob_clean.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/ob_clean.php (nonexistent)
@@ -1,49 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: ob_clean.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace ob_clean()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/ob_clean
- * @author Aidan Lister <aidan@php.net>
- * @author Thiemo M舩tig (http://maettig.com/)
- * @version $Revision: 1.1 $
- * @since PHP 4.2.0
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('ob_clean'))
-{
- function ob_clean ()
- {
- if (@ob_end_clean()) {
- return ob_start();
- }
-
- trigger_error("ob_clean() failed to delete buffer. No buffer to delete.", E_USER_NOTICE);
-
- return false;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/ob_clean.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.1.96/compat/stripos.php
===================================================================
--- branches/unlabeled/unlabeled-1.1.96/compat/stripos.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.1.96/compat/stripos.php (nonexistent)
@@ -1,71 +0,0 @@
-<?php
-/* vim: set expandtab tabstop=4 shiftwidth=4: */
-// +----------------------------------------------------------------------+
-// | PHP Version 4 |
-// +----------------------------------------------------------------------+
-// | Copyright (c) 1997-2004 The PHP Group |
-// +----------------------------------------------------------------------+
-// | This source file is subject to version 3.0 of the PHP license, |
-// | that is bundled with this package in the file LICENSE, and is |
-// | available at through the world-wide-web at |
-// | http://www.php.net/license/3_0.txt. |
-// | If you did not receive a copy of the PHP license and are unable to |
-// | obtain it through the world-wide-web, please send a note to |
-// | license@php.net so we can mail you a copy immediately. |
-// +----------------------------------------------------------------------+
-// | Authors: Aidan Lister <aidan@php.net> |
-// +----------------------------------------------------------------------+
-//
-// $Id: stripos.php,v 1.1 2004-10-26 18:22:16 kostja Exp $
-//
-
-
-/**
- * Replace stripos()
- *
- * @category PHP
- * @package PHP_Compat
- * @link http://php.net/function.stripos
- * @author Aidan Lister <aidan@php.net>
- * @version $Revision: 1.1 $
- * @since PHP 5
- * @require PHP 4.0.1 (trigger_error)
- */
-if (!function_exists('stripos'))
-{
- function stripos ($haystack, $needle, $offset = null)
- {
- if (!is_scalar($haystack)) {
- trigger_error('stripos() expects parameter 1 to be string, ' . gettype($haystack) . ' given', E_USER_WARNING);
- return false;
- }
-
- if (!is_scalar($needle)) {
- trigger_error('stripos() needle is not a string or an integer.', E_USER_WARNING);
- return false;
- }
-
- if (!is_null($offset) && !is_numeric($offset)) {
- trigger_error('stripos() expects parameter 3 to be long, ' . gettype($offset) . ' given', E_USER_WARNING);
- return false;
- }
-
- // Manipulate the string if there is an offset
- $fix = 0;
- if (!is_null($offset))
- {
- if ($offset > 0)
- {
- $haystack = substr($haystack, $offset, strlen($haystack) - $offset);
- $fix = $offset;
- }
- }
-
- $segments = explode (strtolower($needle), strtolower($haystack), 2);
- $position = strlen($segments[0]) + $fix;
-
- return $position;
- }
-}
-
-?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.1.96/compat/stripos.php
___________________________________________________________________
Deleted: cvs2svn:cvs-rev
## -1 +0,0 ##
-1.1
\ No newline at end of property
Deleted: svn:executable
## -1 +0,0 ##
-*
\ No newline at end of property
Index: branches/unlabeled/unlabeled-1.44.2/kernel/startup.php
===================================================================
--- branches/unlabeled/unlabeled-1.44.2/kernel/startup.php (revision 6980)
+++ branches/unlabeled/unlabeled-1.44.2/kernel/startup.php (revision 6981)
@@ -1,207 +1,208 @@
<?php
if( !defined('FULL_PATH') ) define('FULL_PATH', realpath(dirname(__FILE__).'/..') );
require_once FULL_PATH.'/globals.php';
if( !isset($FrontEnd) ) $FrontEnd = 0;
if( !class_exists('kApplication') )
{
// KENEL4 INIT: BEGIN
if ($FrontEnd != 1 && !defined('ADMIN') ) {
define('ADMIN', 1);
}
include_once(FULL_PATH.'/core/kernel/startup.php');
$application =& kApplication::Instance();
$application->Init();
$application->ProcessRequest();
// KERNEL4 INIT: END
}
// compatibility constants
$g_TablePrefix = TABLE_PREFIX;
$pathtoroot = preg_replace('/(.*)\/$/', '\\1', FULL_PATH).'/';
$admin = 'admin';
$rootURL = PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').rtrim(BASE_PATH, '/').'/';
$localURL = $rootURL.'kernel/';
$adminURL = $rootURL.$admin;
$imagesURL = $adminURL.'/images';
$browseURL = $adminURL.'/browse';
$cssURL = $adminURL.'/include';
$pathchar = '/';
if(!get_magic_quotes_gpc())
{
function addSlashesA($a)
{
foreach($a as $k => $v)
{
$a[$k] = is_array($v) ? addSlashesA($v) : addslashes($v);
}
return $a;
}
foreach(Array(
'HTTP_GET_VARS','HTTP_POST_VARS','HTTP_COOKIE_VARS','HTTP_SESSION_VARS','HTTP_SERVER_VARS',
'_POST','_GET','_COOKIE','_SESSION','_SERVER','_REQUEST') as $_)
if(isset($GLOBALS[$_]))
$GLOBALS[$_]=addSlashesA($GLOBALS[$_]);
}
/*
startup.php: this is the primary startup sequence for in-portal services
*/
if( file_exists(FULL_PATH.'/debug.php') && !defined('DEBUG_MODE') ) include_once(FULL_PATH.'/debug.php');
if( !defined('DEBUG_MODE') ) error_reporting(0);
ini_set('memory_limit', constOn('IS_INSTALL') ? -1 : '32M');
ini_set('include_path', '.');
$kernel_version = "1.0.0";
$FormError = array();
$FormValues = array();
+
/* include PHP version compatibility functions */
-require_once(FULL_PATH.'/compat.php');
+require_once(FULL_PATH.'/kernel/include/compat.php');
/* set global variables and module lists */
if( constOn('DEBUG_MODE') ) include_once(FULL_PATH.'/kernel/include/debugger.php');
// put all non-checked checkboxes in $_POST & $_REQUEST with 0 values
if( GetVar('form_fields') )
{
$form_fields = GetVar('form_fields');
foreach($form_fields as $checkbox_name)
{
if( GetVar($checkbox_name) === false ) SetVar($checkbox_name,0);
}
}
LogEntry("Initalizing System..\n");
/* for 64 bit timestamps */
if( !function_exists('adodb_mktime') ) require_once(FULL_PATH.'/kernel/include/adodb/adodb-time.inc.php');
require_once(FULL_PATH.'/kernel/include/dates.php');
/* create the global error object */
require_once(FULL_PATH.'/kernel/include/error.php');
$Errors = new clsErrorManager();
require_once(FULL_PATH.'/kernel/include/itemdb.php');
require_once(FULL_PATH.'/kernel/include/db.class.php'); // moved from kernel/include/config.php
require_once(FULL_PATH.'/kernel/include/adodb/adodb.inc.php'); // moved from kernel/include/config.php
require_once(FULL_PATH.'/kernel/include/config.php');
/* create the global configuration object */
LogEntry("Creating Config Object..\n");
$objConfig = new clsConfig();
$objConfig->Load(); /* Populate our configuration data */
LogEntry("Done Loading Configuration\n");
if( defined('ADODB_EXTENSION') && constant('ADODB_EXTENSION') > 0 )
LogEntry("ADO Extension: ".ADODB_EXTENSION."\n");
require_once(FULL_PATH.'/kernel/include/parseditem.php');
require_once(FULL_PATH.'/kernel/include/itemreview.php'); // moved from kernel/include/item.php
require_once(FULL_PATH.'/kernel/include/itemrating.php'); // moved from kernel/include/item.php
require_once(FULL_PATH.'/kernel/include/item.php');
require_once(FULL_PATH.'/kernel/include/syscache.php');
require_once(FULL_PATH.'/kernel/include/modlist.php');
require_once(FULL_PATH.'/kernel/include/searchconfig.php');
require_once(FULL_PATH.'/kernel/include/banrules.php');
$objModules = new clsModList();
$objSystemCache = new clsSysCacheList();
$objSystemCache->PurgeExpired();
$objBanList = new clsBanRuleList();
require_once(FULL_PATH.'/kernel/include/image.php');
require_once(FULL_PATH.'/kernel/include/itemtypes.php');
$objItemTypes = new clsItemTypeList();
require_once(FULL_PATH.'/kernel/include/theme.php');
$objThemes = new clsThemeList();
require_once(FULL_PATH.'/kernel/include/language.php');
$objLanguages = new clsLanguageList();
$objImageList = new clsImageList();
/* Load session and user class definitions */
//require_once("include/customfield.php");
//require_once("include/custommetadata.php");
require_once(FULL_PATH.'/kernel/include/usersession.php');
require_once(FULL_PATH.'/kernel/include/favorites.php');
require_once(FULL_PATH.'/kernel/include/portaluser.php');
require_once(FULL_PATH.'/kernel/include/portalgroup.php');
/* create the user management class */
$objFavorites = new clsFavoriteList();
$objUsers = new clsUserManager();
$objGroups = new clsGroupList();
require_once(FULL_PATH.'/kernel/include/cachecount.php');
require_once(FULL_PATH.'/kernel/include/customfield.php');
require_once(FULL_PATH.'/kernel/include/custommetadata.php');
require_once(FULL_PATH.'/kernel/include/permissions.php');
require_once(FULL_PATH.'/kernel/include/relationship.php');
require_once(FULL_PATH.'/kernel/include/category.php');
require_once(FULL_PATH.'/kernel/include/statitem.php');
/* category base class, used by all the modules at some point */
$objPermissions = new clsPermList();
$objPermCache = new clsPermCacheList();
$objCatList = new clsCatList();
$objCustomFieldList = new clsCustomFieldList();
$objCustomDataList = new clsCustomDataList();
$objCountCache = new clsCacheCountList();
require_once(FULL_PATH.'/kernel/include/smtp.php');
require_once(FULL_PATH.'/kernel/include/emailmessage.php');
require_once(FULL_PATH.'/kernel/include/events.php');
LogEntry("Creating Mail Queue..\n");
$objMessageList = new clsEmailMessageList();
$objEmailQueue = new clsEmailQueue();
LogEntry("Done creating Mail Queue Objects\n");
require_once(FULL_PATH.'/kernel/include/searchitems.php');
require_once(FULL_PATH.'/kernel/include/advsearch.php');
require_once(FULL_PATH.'/kernel/include/parse.php');
require_once(FULL_PATH.'/kernel/include/socket.php');
/* responsible for including module code as required
This script also creates an instance of the user session onject and
handles all session management. The global session object is created
and populated, then the global user object is created and populated
each module's parser functions and action code is included here
*/
LogEntry("Startup complete\n");
include_once("include/modules.php");
if( IsDebugMode() && function_exists('DebugByFile') ) DebugByFile();
/* startup is complete, so now check the mail queue to see if there's anything that needs to be sent*/
$objEmailQueue->SendMailQeue();
$ado=&GetADODBConnection();
$rs = $ado->Execute("SELECT * FROM ".GetTablePrefix()."Modules WHERE LoadOrder = 0");
$kernel_version = $rs->fields['Version'];
$adminDir = $objConfig->Get("AdminDirectory");
if ($adminDir == '') {
$adminDir = 'admin';
}
/*if (strstr(__FILE__, $adminDir) && !GetVar('logout') && !strstr(__FILE__, "install") && !strstr(__FILE__, "index")) {
require_login(null, 'expired='.(int)GetVar('expired') );
}*/
?>
\ No newline at end of file
Property changes on: branches/unlabeled/unlabeled-1.44.2/kernel/startup.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.44
\ No newline at end of property
+1.44.2.1
\ No newline at end of property

Event Timeline