projects
/
fa-stable.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
13bc5b7
)
Prevent empty log lines and a couple of include cleanups.
author
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 10 May 2015 17:20:38 +0000
(19:20 +0200)
committer
Janusz Dobrowolski
<janusz@frontaccounting.eu>
Sun, 10 May 2015 17:36:32 +0000
(19:36 +0200)
admin/includes/fa_patch.class.inc
patch
|
blob
|
history
includes/errors.inc
patch
|
blob
|
history
includes/references.inc
patch
|
blob
|
history
includes/remote_url.inc
patch
|
blob
|
history
includes/session.inc
patch
|
blob
|
history
diff --git
a/admin/includes/fa_patch.class.inc
b/admin/includes/fa_patch.class.inc
index c62417b98efa85a4cedb07cb9764802011427602..1275898d08b4f76a9b4bc1955969ff58ade3115a 100644
(file)
--- a/
admin/includes/fa_patch.class.inc
+++ b/
admin/includes/fa_patch.class.inc
@@
-9,7
+9,7
@@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
-include($path_to_root."/includes/packages.inc");
+include
_once
($path_to_root."/includes/packages.inc");
//
// Utility class contains basic database upgrade routines.
//
//
// Utility class contains basic database upgrade routines.
//
diff --git
a/includes/errors.inc
b/includes/errors.inc
index 1bf3b3bdeb37235af8f69a5ba7f1719b28cbbffd..937270eac3f4c5149371710f5f8ba9cdd48b8458 100644
(file)
--- a/
includes/errors.inc
+++ b/
includes/errors.inc
@@
-79,7
+79,7
@@
function error_handler($errno, $errstr, $file, $line) {
if (!in_array(array($errno, $errstr, $file, $line, @$bt), $messages))
$messages[] = array($errno, $errstr, $file, $line, @$bt);
}
if (!in_array(array($errno, $errstr, $file, $line, @$bt), $messages))
$messages[] = array($errno, $errstr, $file, $line, @$bt);
}
- else if
($errno&~E_NOTICE
) { // log all not displayed messages
+ else if
($errno&~E_NOTICE && $errstr != ''
) { // log all not displayed messages
$user = @$_SESSION["wa_current_user"]->loginname;
$context = isset($SysPrefs) && !$SysPrefs->db_ok ? '[before upgrade]' : '';
error_log(user_company() . ":$user:". basename($file) .":$line:$context $errstr");
$user = @$_SESSION["wa_current_user"]->loginname;
$context = isset($SysPrefs) && !$SysPrefs->db_ok ? '[before upgrade]' : '';
error_log(user_company() . ":$user:". basename($file) .":$line:$context $errstr");
diff --git
a/includes/references.inc
b/includes/references.inc
index a5e872d703e0dcee08afefff37dae24e039c29c0..249dccf7cf53bdd263083e57e7ebb33552193dfa 100644
(file)
--- a/
includes/references.inc
+++ b/
includes/references.inc
@@
-10,6
+10,7
@@
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
include_once($path_to_root . "/includes/db/class.reflines_db.inc");
See the License here <http://www.gnu.org/licenses/gpl-3.0.html>.
***********************************************************************/
include_once($path_to_root . "/includes/db/class.reflines_db.inc");
+include_once($path_to_root . "/includes/types.inc");
//---------------------------------------------------------------------------------------------
// 2.4 - further changes toward removing refs table introduced:
// . all transactions now have references stored in trans table.
//---------------------------------------------------------------------------------------------
// 2.4 - further changes toward removing refs table introduced:
// . all transactions now have references stored in trans table.
diff --git
a/includes/remote_url.inc
b/includes/remote_url.inc
index 0e53dbf466eab1cc32445cd9ca935f1d8c919504..4cb88e12d1fbfb91d4e97caee58b1a67599b6144 100644
(file)
--- a/
includes/remote_url.inc
+++ b/
includes/remote_url.inc
@@
-43,7
+43,6
@@
function url_get_contents($url, $timeout=10)
}
$response = '';
}
$response = '';
-
// connect to the remote server
$fp = @fsockopen($host, $port, $errno, $errstr, $timeout );
if( !$fp ) {
// connect to the remote server
$fp = @fsockopen($host, $port, $errno, $errstr, $timeout );
if( !$fp ) {
@@
-67,7
+66,7
@@
function url_get_contents($url, $timeout=10)
while ($line = fread($fp, 4096)) {
$response .= $line;
while ($line = fread($fp, 4096)) {
$response .= $line;
- if (
$host=='localhost'
&& !$unblocked++)
+ if (
strpos($host,'localhost') !== false
&& !$unblocked++)
stream_set_blocking($fp, 0); // just after connection switch to nonblocking mode
usleep(10);
}
stream_set_blocking($fp, 0); // just after connection switch to nonblocking mode
usleep(10);
}
diff --git
a/includes/session.inc
b/includes/session.inc
index ad3978c27df990184058915412795db7b0a5e936..e8b4b1437259e9a210cb06ec7b243b0590df683e 100644
(file)
--- a/
includes/session.inc
+++ b/
includes/session.inc
@@
-476,7
+476,7
@@
if (!defined('FA_LOGOUT_PHP_FILE')){
login_timeout();
if (!$_SESSION["wa_current_user"]->old_db)
login_timeout();
if (!$_SESSION["wa_current_user"]->old_db)
- include
_once
($path_to_root . '/company/'.user_company().'/installed_extensions.php');
+ include($path_to_root . '/company/'.user_company().'/installed_extensions.php');
install_hooks();
install_hooks();