porting to PHP5-style object assignments (it should work now...)

This commit is contained in:
real_nowhereman 2009-07-23 15:19:06 +00:00
parent 72880e6e16
commit eccfec41ee
16 changed files with 34 additions and 34 deletions

View File

@ -109,6 +109,6 @@
define('BLOG_BASEURL', 'http://'.$_SERVER['HTTP_HOST']. BLOG_ROOT);
function _dummy() {}
set_error_handler('_dummy');
#function _dummy() {}
#set_error_handler('_dummy');

View File

@ -224,7 +224,7 @@ class pairs {
function &slice($offset, $count=null) {
if (is_null($count)) $count = $this->count;
$a =& new pairs(
$a = new pairs(
array_slice($this->a, $offset, $count),
array_slice($this->b, $offset, $count)
);
@ -569,7 +569,7 @@ class BPlusTree_Node {
}
$o =& new BPlusTree_Node(
$o = new BPlusTree_Node(
$this->flag,
$this->size,
$this->keylen,
@ -751,7 +751,7 @@ class BPlusTree_Node {
* @returns object {@link pairs}
*/
function &_pairs($a, $b) {
$x =& new pairs($a,$b);
$x = new pairs($a,$b);
return $x;
}
@ -1546,7 +1546,7 @@ class BPlusTree {
$includeupper =null
) {
$o =& new BPlusWalker($this, $keylower, $includelower, $keyupper, $includeupper);
$o = new BPlusWalker($this, $keylower, $includelower, $keyupper, $includeupper);
return $o;
}
@ -1594,7 +1594,7 @@ class BPlusTree {
$file = $this->file;
fseek($file, 0, SEEK_END);
$this->root_seek = ftell($file);
$this->root =& new BplusTree_Node(
$this->root = new BplusTree_Node(
BPT_FLAG_LEAFANDROOT,
$this->nodesize, $this->keylen, $this->root_seek, $file
);
@ -1609,7 +1609,7 @@ class BPlusTree {
$file = $this->file;
if ($this->get_parameters()===false)
return false;
$this->root =& new BplusTree_Node(
$this->root = new BplusTree_Node(
BPT_FLAG_LEAFANDROOT,
$this->nodesize,
$this->keylen,
@ -2593,7 +2593,7 @@ class SBPlusTree extends BPlusTree {
$keyupper =null,
$includeupper =null
) {
$o =& new SBPlusWalker($this, $keylower, $includelower, $keyupper, $includeupper);
$o = new SBPlusWalker($this, $keylower, $includelower, $keyupper, $includeupper);
return $o;
}
}

View File

@ -21,7 +21,7 @@
trigger_error ("Can't find index '{$this->_cachefile}'", E_USER_ERROR);
}
$this->_tree =& new caching_SBPT(
$this->_tree = new caching_SBPT(
fopen($this->_cachefile.'.dat', 'rb'),
fopen(INDEX_DIR.'index.strings.dat', 'rb'),
256,

View File

@ -39,7 +39,7 @@
* @see bdb_idtofile()
*/
function comment_getlist($id) {
$obj =& new comment_indexer($id); //todo change syntax
$obj = new comment_indexer($id); //todo change syntax
return $obj->getList();
}

View File

@ -39,7 +39,7 @@
function &draft_init() {
global $draftdb;
if (!isset($draftdb))
$draftdb =& new draft_indexer;
$draftdb = new draft_indexer;
return $draftdb;
}

View File

@ -87,7 +87,7 @@
$mode = 'r+b';
else $mode = 'w+b';
$this->indices[$cat] =& new BPlusTree(
$this->indices[$cat] = new BPlusTree(
fopen($f, $mode),
$this->_offset,
$this->_chunksize,
@ -345,7 +345,7 @@
static $entry_index = null;
if (is_null($entry_index))
$entry_index=& new entry_index;
$entry_index= new entry_index;
return $entry_index;
@ -358,7 +358,7 @@
if (!file_exists($F)) {
$o = false;
} else {
$o =& new entry_cached_index($id_cat);
$o = new entry_cached_index($id_cat);
}
return $o;
@ -503,7 +503,7 @@
*/
function &entry_get_comments($id, &$count) {
$obj =& new comment_indexer($id);
$obj = new comment_indexer($id);
$count = count($obj->getList());

View File

@ -260,7 +260,7 @@
function fs_delete_recursive($path) {
if (file_exists($path)) {
$obj =& new fs_pathlister($path);
$obj = new fs_pathlister($path);
$list = ($obj->getList());
unset($obj);

View File

@ -148,7 +148,7 @@
global $current_query;
$this->params =& new FPDB_QueryParams($params);
$this->params = new FPDB_QueryParams($params);
$this->ID = $ID;
if ($this->params->id || $this->params->random) {
@ -258,7 +258,7 @@
} else {
// notice this won't work with cats (for now)
$obj =& new entry_archives($qp->y, $qp->m, $qp->d);
$obj = new entry_archives($qp->y, $qp->m, $qp->d);
$filteredkeys = $obj->getList();
$index_count = $obj->getCount();
@ -403,7 +403,7 @@
}
if ($qp->comments) {
$this->comments =& new FPDB_CommentList($id, comment_getlist($id));
$this->comments = new FPDB_CommentList($id, comment_getlist($id));
$cont['comments'] = $this->comments->getCount();
}
@ -581,7 +581,7 @@
function init() {
#if (!$this->_indexer) {
#$this->_indexer =& new entry_indexer();
#$this->_indexer = new entry_indexer();
$this->_categories = entry_categories_get();
#$obj =& $this->_indexer;
#$this->entry_index = $obj->getList();
@ -653,7 +653,7 @@
static $queryId=-1;
$queryId++;
$this->queries[$queryId] =& new FPDB_Query($params, $queryId);
$this->queries[$queryId] = new FPDB_Query($params, $queryId);
$this->init();

View File

@ -118,7 +118,7 @@
}
function lang_list() {
$obj =& new lang_indexer();
$obj = new lang_indexer();
return $obj->getList();
}

View File

@ -59,7 +59,7 @@
// this is done during init process
// all the plugin are loaded
$pluginlister =& new plugin_indexer;
$pluginlister = new plugin_indexer;
$enab = $pluginlister->getEnableds($check);
include_once (INCLUDES_DIR . 'core.wp-pluggable-funcs.php');
@ -70,7 +70,7 @@
function plugin_get($id=null){
$pluginlister =& new plugin_indexer;
$pluginlister = new plugin_indexer;
return $pluginlister->getList();
}

View File

@ -17,7 +17,7 @@
function static_getlist() {
$obj =& new static_indexer;
$obj = new static_indexer;
$list = $obj->getList();
return $list;

View File

@ -73,7 +73,7 @@
define('SYSTEM_VER', '0.812.1');
define('SYSTEM_VER', '0.907');
function system_ver() {
return 'fp-' . SYSTEM_VER;
}
@ -154,9 +154,9 @@
system_unregister_globals();
system_prepare_iis();
$GLOBALS['fpdb'] =& new FPDB;
$GLOBALS['fpdb'] = new FPDB;
$GLOBALS['fp_widgets'] =& new widget_indexer;
$GLOBALS['fp_widgets'] = new widget_indexer;
$GLOBALS['smarty'] =& $GLOBALS['_FP_SMARTY'];
$smarty =& $GLOBALS['smarty'];

View File

@ -22,7 +22,7 @@
function user_list(){
$obj =& new user_lister;
$obj = new user_lister;
if ($users = $obj->getList()) {
return $entry_arr;
} else return false;

View File

@ -63,7 +63,7 @@ if (!function_exists('fnmatch')) {
/* // NoWhereMan note: why splitting this in two? :)
if(count($out)==1) return(eregi("^$out[0]$",$string)); else*/
foreach($out as $tester) {
if (eregi("^$tester$",$string))
if (preg_match("/^$tester$/i",$string))
return true;
}

View File

@ -6,7 +6,7 @@
require_once INCLUDES_DIR.'core.utils.php';
utils_checksmarty();
require(SMARTY_DIR . 'Smarty.class.php');
$smarty =& new Smarty;
$smarty = new Smarty;
$_FP_SMARTY =& $smarty;
@ -42,7 +42,7 @@
require_once INCLUDES_DIR.'core.cookie.php';
require_once INCLUDES_DIR.'core.system.php';
require_once INCLUDES_DIR.'core.theme.php';
require_once INCLUDES_DIR.'core.layout.php';
// require_once INCLUDES_DIR.'core.layout.php';
require_once INCLUDES_DIR.'core.users.php';
?>