diff --git a/C.php b/C.php
index eb7a4679194a101399be5a31a7f01642c4a1fbcf..ea061cc303abb1ddedcafd0c3aae70297de05e39 100644
--- a/C.php
+++ b/C.php
@@ -7,15 +7,14 @@
* Email: sobi[at]sigsiu.net
* Url: https://www.Sigsiu.NET
*
- * @copyright Copyright (C) 2006 - 2019 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
+ * @copyright Copyright (C) 2006 - 2020 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
* @license GNU/LGPL Version 3
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
* as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
- * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
+ * See https://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * @created Thu, Dec 1, 2016 12:04:09
*/
namespace Sobi;
@@ -24,8 +23,8 @@ defined( 'SOBI' ) || exit( 'Restricted access' );
/**
* @author Radek Suski
- * @version 1.0
* @created Thu, Dec 1, 2016 11:53:09
+ * @modified 21 January 2020 by Sigrid Suski
*/
abstract class C
{
@@ -43,5 +42,5 @@ abstract class C
const NO = 0;
const ROOT = JPATH_ROOT;
const DS = DIRECTORY_SEPARATOR;
- const VERSION = '1.0.10';
+ const VERSION = '1.0.11';
}
diff --git a/Database/MySQLi.php b/Database/MySQLi.php
index 622c6a7a2944e5bcc8c869272861e71cd2a0520d..786f4387a15d120aecbd4212f2b644039222d602 100644
--- a/Database/MySQLi.php
+++ b/Database/MySQLi.php
@@ -7,16 +7,14 @@
* Email: sobi[at]sigsiu.net
* Url: https://www.Sigsiu.NET
*
- * @copyright Copyright (C) 2006 - 2017 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
+ * @copyright Copyright (C) 2006 - 2020 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
* @license GNU/LGPL Version 3
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
* as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
- * See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
+ * See https://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
- *
- * @created Thu, Dec 1, 2016 12:01:45
*/
namespace Sobi\Database;
@@ -31,8 +29,8 @@ use Sobi\Utils\StringUtils;
/**
* @author Radek Suski
- * @version 1.0
* @created Wed, Nov 30, 2016 11:35:26
+ * @modified 21 January 2020 by Sigrid Suski
*/
class MySQLi
{
@@ -68,8 +66,8 @@ class MySQLi
/**
* Returns the error number
- * @deprecated
* @return int
+ * @deprecated
*/
public function getErrorNum()
{
@@ -78,8 +76,8 @@ class MySQLi
/**
* Returns the error message
- * @deprecated
* @return string
+ * @deprecated
*/
public function getErrorMsg()
{
@@ -92,8 +90,8 @@ class MySQLi
* @param string $method
* @param array $args
*
- * @throws Exception
* @return mixed
+ * @throws Exception
*/
public function __call( $method, $args )
{
@@ -166,6 +164,12 @@ class MySQLi
/* (non-PHPdoc)
* @see Site/lib/base/SPDatabase#loadFile($file)
*/
+ /**
+ * @param $file
+ *
+ * @return array
+ * @throws Exception
+ */
public function loadFile( $file )
{
$sql = file_get_contents( $file );
@@ -254,12 +258,12 @@ class MySQLi
}
elseif ( strstr( $order, '.' ) && ( stristr( $order, 'asc' ) || stristr( $order, 'desc' ) ) ) {
$order = explode( '.', $order );
- $e = array_pop( $order );
+ $ext = array_pop( $order );
if ( $n ) {
- $order = implode( '.', $order ) . '+0 ' . $e;
+ $order = implode( '.', $order ) . '+0 ' . $ext;
}
else {
- $order = implode( '.', $order ) . ' ' . $e;
+ $order = implode( '.', $order ) . ' ' . $ext;
}
}
else {
@@ -281,8 +285,8 @@ class MySQLi
* @param string | array $where - SQL delete condition
* @param int $limit - maximal number of rows to delete
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & delete( $table, $where, $limit = 0 )
{
@@ -304,8 +308,8 @@ class MySQLi
* @param string $table - in which table
* @param bool|string $ifExists
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & drop( $table, $ifExists = true )
{
@@ -325,8 +329,8 @@ class MySQLi
*
* @param string $table - in which table
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & truncate( $table )
{
@@ -507,7 +511,8 @@ class MySQLi
* @param string $engine - optional engine type
* @param string $charset
*
- * @return \Sobi\Database\MySQLi
+ * @return $this
+ * @throws Exception
*/
public function & createTable( $name, $fields, $keys = [], $notExists = false, $engine = null, $charset = 'utf8' )
{
@@ -566,6 +571,11 @@ class MySQLi
* (non-PHPdoc)
* @see Site/lib/base/SPDatabase#argsOr($val)
*/
+ /**
+ * @param $val
+ *
+ * @return string
+ */
public function argsOr( $val )
{
$cond = [];
@@ -599,6 +609,8 @@ class MySQLi
* @param array $set - two-dimensional array with table row name to update => new value
* @param string $where - SQL update condition
* @param int $limit
+ *
+ * @throws Exception
*/
public function update( $table, $set, $where, $limit = 0 )
{
@@ -666,8 +678,8 @@ class MySQLi
* @param bool $ignore - adds "IGNORE" after "INSERT" command
* @param bool $normalize - if the $values is a two-dimensional, array and it's not complete - fit to the columns
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & insert( $table, $values, $ignore = false, $normalize = false )
{
@@ -704,6 +716,8 @@ class MySQLi
*
* @param string $table - table name
* @param array $values
+ *
+ * @throws Exception
*/
public function normalize( $table, &$values )
{
@@ -724,8 +738,8 @@ class MySQLi
* @param bool $update - update existing row if cannot insert it because of duplicate primary key
* @param bool $ignore - adds "IGNORE" after "INSERT" command
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & insertArray( $table, $values, $update = false, $ignore = false )
{
@@ -771,8 +785,8 @@ class MySQLi
* @param string $table - table name
* @param array $values - two-dimensional array with table row name => value
*
- * @throws Exception
* @return \Sobi\Database\MySQLi
+ * @throws Exception
*/
public function & insertUpdate( $table, $values )
{
@@ -844,8 +858,8 @@ class MySQLi
/**
* Loads the first field of the first row returned by the query.
*
- * @throws Exception
* @return string
+ * @throws Exception
*/
public function loadResult()
{
@@ -863,8 +877,8 @@ class MySQLi
/**
* Load an array of single field results into an array
*
- * @throws Exception
* @return array
+ * @throws Exception
*/
public function loadResultArray()
{
@@ -884,8 +898,8 @@ class MySQLi
*
* @param string $key field name of a primary key
*
- * @throws Exception
* @return array If key is empty as sequential list of returned records.
+ * @throws Exception
*/
public function loadAssocList( $key = null )
{
@@ -903,8 +917,8 @@ class MySQLi
/**
* Loads the first row of a query into an object
*
- * @throws Exception
* @return stdObject
+ * @throws Exception
*/
public function loadObject()
{
@@ -932,8 +946,8 @@ class MySQLi
*
* @param string $key
*
- * @throws Exception
* @return array If key is empty as sequential list of returned records.
+ * @throws Exception
*/
public function loadObjectList( $key = null )
{
@@ -951,8 +965,8 @@ class MySQLi
/**
* Load the first row of the query.
*
- * @throws Exception
* @return array
+ * @throws Exception
*/
public function loadRow()
{
@@ -972,8 +986,8 @@ class MySQLi
*
* @param string $key field name of a primary key
*
- * @throws Exception
* @return array If key is empty as sequential list of returned records.
+ * @throws Exception
*/
public function loadRowList( $key = null )
{
@@ -990,8 +1004,8 @@ class MySQLi
/**
* Returns an error statement
- * @deprecated
* @return string
+ * @deprecated
*/
public function stderr()
{
@@ -1013,8 +1027,8 @@ class MySQLi
*
* @param string $query - query to execute
*
- * @throws Exception
* @return mixed
+ * @throws Exception
*/
public function exec( $query )
{
@@ -1034,8 +1048,8 @@ class MySQLi
*
* @param string $table
*
- * @throws Exception
* @return array
+ * @throws Exception
*/
public function getColumns( $table )
{
@@ -1057,6 +1071,7 @@ class MySQLi
* rolls back the current transaction, canceling its changes
*
* @return bool
+ * @throws Exception
*/
public function rollback()
{
@@ -1064,9 +1079,10 @@ class MySQLi
}
/**
- * begin a new transaction
+ * begins a new transaction
*
* @return bool
+ * @throws Exception
*/
public function transaction()
{
@@ -1077,6 +1093,7 @@ class MySQLi
* commits the current transaction, making its changes permanent
*
* @return bool
+ * @throws Exception
*/
public function commit()
{
@@ -1085,6 +1102,7 @@ class MySQLi
/**
* Returns current datetime in database acceptable format
+ *
* @return string
*/
public function now()
@@ -1093,7 +1111,7 @@ class MySQLi
}
/**
- * Creates syntax for joins two tables
+ * Creates syntax for join two tables
*
* @param array $params - two cells array with table name table, alias name as and common key key
* @param string $through - join direction (left/right)
diff --git a/changelog.md b/changelog.md
index 5b768b41ca2b38110676a159e910a3dcc1f81f46..9ceee2e3f32275a6457e0bcf87b111b048fa8bb7 100644
--- a/changelog.md
+++ b/changelog.md
@@ -9,11 +9,11 @@ Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
Email: sobi[at]sigsiu.net
Url: https://www.Sigsiu.NET
-@copyright Copyright (C) 2006 - 2019 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
+@copyright Copyright (C) 2006 - 2020 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
@license GNU/GPL Version 3
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License version 3
as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
-See http://www.gnu.org/licenses/gpl.html and https://www.sigsiu.net/licenses.
+See https://www.gnu.org/licenses/gpl.html and https://www.sigsiu.net/licenses.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
@@ -27,6 +27,12 @@ Legend:
- (!) - Change
+1.0.11 (21 January 2020)
+------------------
+
+ (#) double usage of variable $e
+
+
1.0.10 (26 November 2019)
------------------