Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Q
question2answer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
outils
question2answer
Commits
75419dce
Commit
75419dce
authored
Jan 07, 2018
by
pupi1985
Committed by
Scott
Jan 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove some IDE warnings
parent
aaab2150
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
CacheFactory.php
qa-include/Q2A/Storage/CacheFactory.php
+1
-1
DbConnection.php
qa-src/Database/DbConnection.php
+14
-6
No files found.
qa-include/Q2A/Storage/CacheFactory.php
View file @
75419dce
...
...
@@ -29,7 +29,7 @@ class Q2A_Storage_CacheFactory
/**
* Get the appropriate cache handler.
* @return Q2A_Storage_Cache
Interface
The cache handler.
* @return Q2A_Storage_Cache
Driver
The cache handler.
*/
public
static
function
getCacheDriver
()
{
...
...
qa-src/Database/DbConnection.php
View file @
75419dce
...
...
@@ -20,14 +20,24 @@ namespace Q2A\Database;
use
PDO
;
use
PDOException
;
use
Q2A\Database\DbResult
;
use
PDOStatement
;
use
Q2A_Storage_CacheFactory
;
class
DbConnection
{
/** @var PDO */
protected
$pdo
;
/** @var array */
protected
$config
;
/** @var bool */
protected
$allowConnect
=
false
;
/** @var string */
protected
$failHandler
;
/** @var int */
protected
$updateCountsSuspended
=
0
;
public
function
__construct
()
...
...
@@ -71,9 +81,9 @@ class DbConnection
}
/**
* Connect to the Q2A database, optionally install the $fail
h
andler (and call it if necessary). Uses PDO as of Q2A
* Connect to the Q2A database, optionally install the $fail
H
andler (and call it if necessary). Uses PDO as of Q2A
* 1.9.
* @param string $fail
h
andler
* @param string $fail
H
andler
* @return mixed|void
*/
public
function
connect
(
$failHandler
=
null
)
...
...
@@ -120,7 +130,7 @@ class DbConnection
/**
* If a DB error occurs, call the installed fail handler (if any) otherwise report error and exit immediately.
* @param $type
* @param
string
$type
* @param int $errno
* @param string $error
* @param string $query
...
...
@@ -424,7 +434,6 @@ class DbConnection
}
qa_sort_by
(
$outresult
,
$selectspec
[
'sortasc'
],
'_order_'
);
}
elseif
(
isset
(
$selectspec
[
'sortdesc'
]))
{
require_once
QA_INCLUDE_DIR
.
'util/sort.php'
;
...
...
@@ -512,7 +521,6 @@ class DbConnection
$this
->
updateCountsSuspended
+=
(
$suspend
?
1
:
-
1
);
}
/**
* Returns whether counts should currently be updated (i.e. if count updating has not been suspended).
* @return bool
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment