Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pquery
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Taddeüs Kroes
pquery
Commits
607f0caf
Commit
607f0caf
authored
13 years ago
by
Taddeus Kroes
Browse files
Options
Downloads
Patches
Plain Diff
Updated config constant names and locations.
parent
8808bee9
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
pquery.config.php
+0
-56
0 additions, 56 deletions
pquery.config.php
pquery.php
+2
-2
2 additions, 2 deletions
pquery.php
pquery.sql.php
+2
-2
2 additions, 2 deletions
pquery.sql.php
test/config.php
+1
-14
1 addition, 14 deletions
test/config.php
test/test_sql.php
+0
-1
0 additions, 1 deletion
test/test_sql.php
with
5 additions
and
75 deletions
pquery.config.php
deleted
100644 → 0
+
0
−
56
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
This diff is collapsed.
Click to expand it.
pquery.php
+
2
−
2
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
);
}
...
...
This diff is collapsed.
Click to expand it.
pquery.sql.php
+
2
−
2
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
;
...
...
This diff is collapsed.
Click to expand it.
test/config.php
+
1
−
14
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
This diff is collapsed.
Click to expand it.
test/test_sql.php
+
0
−
1
View file @
607f0caf
<?php
__p
::
load_plugin
(
'sql'
);
include
'../../debug.php'
;
class
pQuerySqlTest
extends
UnitTestCase
{
function
__construct
()
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment