[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.shm.inc.php
From: |
Caeies |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.shm.inc.php |
Date: |
Tue, 26 Sep 2006 16:02:45 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Caeies <Caeies> 06/09/26 16:02:45
Modified files:
inc : class.shm.inc.php
Log message:
PLEASE don t use =& for returned values of functions !!!
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.shm.inc.php?cvsroot=phpgwapi&r1=1.9&r2=1.10
Patches:
Index: class.shm.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.shm.inc.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- class.shm.inc.php 22 Sep 2006 03:05:41 -0000 1.9
+++ class.shm.inc.php 26 Sep 2006 16:02:45 -0000 1.10
@@ -63,7 +63,7 @@
* @internal Development of this application was funded by
http://www.bergen.kommune.no/bbb_/ekstern/
* @package phpgwapi
* @subpackage application
- * @version $Id: class.shm.inc.php,v 1.9 2006/09/22 03:05:41 skwashd Exp
$
+ * @version $Id: class.shm.inc.php,v 1.10 2006/09/26 16:02:45 Caeies Exp
$
*/
//This makes sure there is something set for temp
@@ -160,7 +160,7 @@
* @param int $id memory block id
* @return string the data from memory block
*/
- function &read_mem($id)
+ function read_mem($id)
{
return shmop_read($id, 0, shmop_size($id));
}
@@ -243,15 +243,15 @@
*/
function &get_value($key)
{
- $hash_id =& $this->hash($key);
- $value = array();
- $id =& $this->mem_exist($hash_id);
+ $hash_id = $this->hash($key);
+ $value = array('key' => '', 'value' => '');
+ $id = $this->mem_exist($hash_id);
while($value['key']!=$key)
{
if($id!=0)
{
- $value =&
unserialize($this->read_mem($id));
- if($value['key']!=$key) $id =&
$this->mem_exist($this->hash($hash_id));
+ $value =
unserialize($this->read_mem($id));
+ if($value['key']!=$key) $id =
$this->mem_exist($this->hash($hash_id));
}
else
{
@@ -318,7 +318,7 @@
$SHM_KEY = ftok(PHPGW_SHM_LOCK, 'R');
$shmid = @sem_get($SHM_KEY, 1024, 0644 | IPC_CREAT);
sem_acquire($shmid);
- $temp =& $this->get_value($this->hashid);
+ $temp = $this->get_value($this->hashid);
$temp[$key] = array('shmid' => $id, 'time' => time());
$this->store_value($this->hashid,$temp);
sem_release($shmid);
@@ -376,7 +376,7 @@
if(isset($data))
{
$v = $data[$key];
- $id =& $this->mem_exist($this->hash($hash_id));
+ $id = $this->mem_exist($this->hash($hash_id));
$this->delete_mem($id);
$this->close_mem($id);
unset($data);
@@ -439,7 +439,7 @@
function do_cache()
{
$key =
"http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}" . serialize($_POST);
- $contents =& $this->get_value($key);
+ $contents = $this->get_value($key);
if($contents)
{
//$this->log_this("Cache hit for " . $key .
"\n");