Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pquery
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
pquery
Commits
607f0caf
Commit
607f0caf
authored
Dec 05, 2011
by
Taddeus Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated config constant names and locations.
parent
8808bee9
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
75 deletions
+5
-75
pquery.config.php
pquery.config.php
+0
-56
pquery.php
pquery.php
+2
-2
pquery.sql.php
pquery.sql.php
+2
-2
test/config.php
test/config.php
+1
-14
test/test_sql.php
test/test_sql.php
+0
-1
No files found.
pquery.config.php
deleted
100644 → 0
View file @
8808bee9
<?php
/**
* Base and plugin config for pQuery utility framework.
*
* @package pQuery
*/
/**
* Indicates whether the framework is in debug mode, which right
* now only means that occuring errors will be displayed or not.
*
* @var bool
*/
define
(
'DEBUG'
,
true
);
/**
* The root location of the pQuery framework folder, used for file
* inclusions. The path is absolute and should end with a slash ('/').
*
* @var string
*/
define
(
'PQUERY_ROOT'
,
'D:/xampp/htdocs/pquery/'
);
/**
* Abstract class containing plugin configs.
*/
abstract
class
pQueryConfig
{
/**
* Indicates whether errors occuring in the framework will
* terminate the script.
*
* @var bool
*/
const
ERROR_IS_FATAL
=
true
;
/**
* Name of the utilities folder
*
* @var string
*/
const
UTILS_FOLDER
=
'utils/'
;
/**
* Config for MySQL plugin.
*
* @var array
*/
static
$sql
=
array
(
'host'
=>
'localhost'
,
'username'
=>
'root'
,
'password'
=>
''
,
'dbname'
=>
'tcms2'
);
}
?>
\ No newline at end of file
pquery.php
View file @
607f0caf
...
...
@@ -112,7 +112,7 @@ class pQuery {
}
/**
* Display an error message if in
{@link DEBUG}
mode.
* Display an error message if in
debug
mode.
*
* The optional arguments are passed to {@link printf}, along with $error.
*
...
...
@@ -314,7 +314,7 @@ function _p($variable, $plugin=null) {
// Use custom plugin class
if
(
isset
(
pQuery
::
$plugins
[
$plugin
])
)
$class_name
=
pQuery
::
$plugins
[
$plugin
];
else
if
(
DEBUG
)
else
if
(
PQUERY_
DEBUG
)
pQuery
::
error
(
'Plugin "%s" does not exist.'
,
$plugin
);
}
...
...
pquery.sql.php
View file @
607f0caf
...
...
@@ -271,14 +271,14 @@ class pQuerySql extends pQuery implements pQueryExtension {
/**
* Extention of {@link pQuery::error}, returning FALSE (useful in result loops).
* Also, the current query is printed in
DEBUG
mode.
* Also, the current query is printed in
debug
mode.
*
* @returns bool FALSE
*/
static
function
error
()
{
parent
::
error
(
'MySQL error %d: %s.'
,
mysql_errno
(),
mysql_error
());
if
(
DEBUG
)
if
(
PQUERY_
DEBUG
)
echo
$this
->
query
;
return
false
;
...
...
test/config.php
View file @
607f0caf
...
...
@@ -11,7 +11,7 @@
*
* @var bool
*/
define
(
'DEBUG'
,
true
);
define
(
'
PQUERY_
DEBUG'
,
true
);
/**
* The root location of the pQuery framework folder, used for file
...
...
@@ -21,17 +21,4 @@ define('DEBUG', true);
*/
define
(
'PQUERY_ROOT'
,
'D:/xampp/htdocs/pquery/'
);
/**
* Abstract class containing plugin configs.
*/
abstract
class
pQueryConfig
{
/**
* Indicates whether errors occuring in the framework will
* terminate the script.
*
* @var bool
*/
const
ERROR_IS_FATAL
=
true
;
}
?>
\ No newline at end of file
test/test_sql.php
View file @
607f0caf
<?php
__p
::
load_plugin
(
'sql'
);
include
'../../debug.php'
;
class
pQuerySqlTest
extends
UnitTestCase
{
function
__construct
()
{
...
...
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