Fixes & code style changes
This commit is contained in:
@@ -327,6 +327,8 @@ class basic
|
|||||||
if (SET_SESSION_NAME) {
|
if (SET_SESSION_NAME) {
|
||||||
// set the session name for possible later check
|
// set the session name for possible later check
|
||||||
$this->session_name = SET_SESSION_NAME;
|
$this->session_name = SET_SESSION_NAME;
|
||||||
|
}
|
||||||
|
if ($this->session_name) {
|
||||||
session_name($this->session_name);
|
session_name($this->session_name);
|
||||||
}
|
}
|
||||||
// start session
|
// start session
|
||||||
@@ -1010,7 +1012,7 @@ class basic
|
|||||||
if (($result = basic::array_search_simple($_value, $key, $value)) !== false) {
|
if (($result = basic::array_search_simple($_value, $key, $value)) !== false) {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
} elseif ($_key == $key && $_value = $value) {
|
} elseif ($_key == $key && $_value == $value) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ class db_pgsql
|
|||||||
{
|
{
|
||||||
// result type is passed on as is [should be checked]
|
// result type is passed on as is [should be checked]
|
||||||
if ($result_type) {
|
if ($result_type) {
|
||||||
return pg_fetch_array($cursor, NULL, $result_type);
|
return pg_fetch_array($cursor, null, $result_type);
|
||||||
} else {
|
} else {
|
||||||
return pg_fetch_array($cursor);
|
return pg_fetch_array($cursor);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ class gettext_reader
|
|||||||
if ($cmp == 0) {
|
if ($cmp == 0) {
|
||||||
// string is exactly in the middle => return it
|
// string is exactly in the middle => return it
|
||||||
return $half;
|
return $half;
|
||||||
} else if ($cmp < 0) {
|
} elseif ($cmp < 0) {
|
||||||
// The string is in the upper half
|
// The string is in the upper half
|
||||||
return $this->find_string($string, $start, $half);
|
return $this->find_string($string, $start, $half);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ class StringReader
|
|||||||
{
|
{
|
||||||
$data = substr($this->_str, $this->_pos, $bytes);
|
$data = substr($this->_str, $this->_pos, $bytes);
|
||||||
$this->_pos += $bytes;
|
$this->_pos += $bytes;
|
||||||
if (strlen($this->_str)<$this->_pos) {
|
if (strlen($this->_str) < $this->_pos) {
|
||||||
$this->_pos = strlen($this->_str);
|
$this->_pos = strlen($this->_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ class StringReader
|
|||||||
public function seekto($pos)
|
public function seekto($pos)
|
||||||
{
|
{
|
||||||
$this->_pos = $pos;
|
$this->_pos = $pos;
|
||||||
if (strlen($this->_str)<$this->_pos) {
|
if (strlen($this->_str) < $this->_pos) {
|
||||||
$this->_pos = strlen($this->_str);
|
$this->_pos = strlen($this->_str);
|
||||||
}
|
}
|
||||||
return $this->_pos;
|
return $this->_pos;
|
||||||
@@ -101,7 +101,7 @@ class FileReader
|
|||||||
public function __construct($filename)
|
public function __construct($filename)
|
||||||
{
|
{
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
$this->_length=filesize($filename);
|
$this->_length = filesize($filename);
|
||||||
$this->_pos = 0;
|
$this->_pos = 0;
|
||||||
$this->_fd = fopen($filename, 'rb');
|
$this->_fd = fopen($filename, 'rb');
|
||||||
if (!$this->_fd) {
|
if (!$this->_fd) {
|
||||||
@@ -165,7 +165,7 @@ class CachedFileReader extends StringReader
|
|||||||
public function __construct($filename)
|
public function __construct($filename)
|
||||||
{
|
{
|
||||||
if (file_exists($filename)) {
|
if (file_exists($filename)) {
|
||||||
$length=filesize($filename);
|
$length = filesize($filename);
|
||||||
$fd = fopen($filename, 'rb');
|
$fd = fopen($filename, 'rb');
|
||||||
|
|
||||||
if (!$fd) {
|
if (!$fd) {
|
||||||
|
|||||||
Reference in New Issue
Block a user