From: <var...@us...> - 2021-08-13 14:39:57
|
Revision: 10508 http://sourceforge.net/p/phpwiki/code/10508 Author: vargenau Date: 2021-08-13 14:39:54 +0000 (Fri, 13 Aug 2021) Log Message: ----------- Rename _ncsa_time as ncsa_time, _zone_offset as zone_offset; no parameter for zone_offset Modified Paths: -------------- trunk/lib/Request.php trunk/lib/WikiDB/backend/ADODB_oci8po.php trunk/lib/WikiDB/backend/PDO.php trunk/lib/WikiDB/backend/PDO_oci8.php trunk/lib/WikiDB/backend/PearDB_oci8.php trunk/lib/WikiDB/backend.php trunk/lib/WikiUser.php trunk/lib/stdlib.php Modified: trunk/lib/Request.php =================================================================== --- trunk/lib/Request.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/Request.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1080,7 +1080,7 @@ { $entry = sprintf('%s %s %s [%s] "%s" %d %d "%s" "%s"', $this->host, $this->ident, $this->user, - _ncsa_time($this->time), + ncsa_time($this->time), $this->request, $this->status, $this->size, $this->referer, $this->user_agent); if (!empty($this->_accesslog->reader)) { Modified: trunk/lib/WikiDB/backend/ADODB_oci8po.php =================================================================== --- trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/ADODB_oci8po.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -162,7 +162,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - _ncsa_time($entry->time), + ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiDB/backend/PDO.php =================================================================== --- trunk/lib/WikiDB/backend/PDO.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PDO.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1359,7 +1359,7 @@ $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); - $ncsa_time = _ncsa_time($entry->time); + $ncsa_time = ncsa_time($entry->time); $sth->bindParam(8, $ncsa_time, PDO::PARAM_STR, 28); $sth->bindParam(9, $entry->time, PDO::PARAM_INT); $sth->bindParam(10, $entry->status, PDO::PARAM_INT); Modified: trunk/lib/WikiDB/backend/PDO_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PDO_oci8.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PDO_oci8.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -82,7 +82,7 @@ $sth->bindParam(5, $entry->request, PDO::PARAM_STR, 255); $sth->bindParam(6, $entry->request_args, PDO::PARAM_STR, 255); $sth->bindParam(7, $entry->request_uri, PDO::PARAM_STR, 255); - $ncsa_time = _ncsa_time($entry->time); + $ncsa_time = ncsa_time($entry->time); $sth->bindParam(8, $ncsa_time, PDO::PARAM_STR, 28); $sth->bindParam(9, $entry->time, PDO::PARAM_INT); $sth->bindParam(10, $entry->status, PDO::PARAM_INT); Modified: trunk/lib/WikiDB/backend/PearDB_oci8.php =================================================================== --- trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend/PearDB_oci8.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -115,7 +115,7 @@ $entry->request, $entry->request_uri, $entry->request_args, - _ncsa_time($entry->time), + ncsa_time($entry->time), $entry->status, $entry->size, $entry->referer, Modified: trunk/lib/WikiDB/backend.php =================================================================== --- trunk/lib/WikiDB/backend.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiDB/backend.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -707,7 +707,7 @@ $entry->request, $entry->request_args, $entry->request_uri, - $entry->_ncsa_time($entry->time), + $entry->ncsa_time($entry->time), $entry->status, (int)$entry->size, $entry->referer, Modified: trunk/lib/WikiUser.php =================================================================== --- trunk/lib/WikiUser.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/WikiUser.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -598,7 +598,7 @@ if ($logout) { // Log out if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = _zone_offset(); + $zone_offset = zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $entry = sprintf('%s - %s - [%s %s] "%s" %s - "%s" "%s"', (string)$request->get('REMOTE_HOST'), @@ -634,7 +634,7 @@ $authlevel = $this->checkPass($passwd === false ? '' : $passwd); if (LOGIN_LOG and is_writeable(LOGIN_LOG)) { - $zone_offset = _zone_offset(); + $zone_offset = zone_offset(); $ncsa_time = date("d/M/Y:H:i:s", time()); $manglepasswd = $passwd; for ($i = 0; $i < strlen($manglepasswd); $i++) { Modified: trunk/lib/stdlib.php =================================================================== --- trunk/lib/stdlib.php 2021-08-13 14:25:58 UTC (rev 10507) +++ trunk/lib/stdlib.php 2021-08-13 14:39:54 UTC (rev 10508) @@ -1076,13 +1076,11 @@ /** * Get time zone offset. * - * @param int $time Unix timestamp (defaults to current time). * @return string Zone offset, e.g. "-0800" for PST. */ -function _zone_offset($time = 0) +function zone_offset() { - if (!$time) - $time = time(); + $time = time(); $offset = date("Z", $time); $negoffset = ""; if ($offset < 0) { @@ -1100,11 +1098,11 @@ * @param int $time Unix timestamp (defaults to current time). * @return string Formatted date & time. */ -function _ncsa_time($time = 0) +function ncsa_time($time = 0) { if (!$time) $time = time(); - return date("d/M/Y:H:i:s", $time) . " " . _zone_offset(); + return date("d/M/Y:H:i:s", $time) . " " . zone_offset(); } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |