Merge branch 'master' of github.com:shish/shimmie2
This commit is contained in:
commit
07aac04d44
3 changed files with 3 additions and 2 deletions
|
@ -326,6 +326,7 @@ class Database {
|
|||
*/
|
||||
public function execute($query, $args=array()) {
|
||||
try {
|
||||
_count_execs($this->db, $query, $args);
|
||||
$stmt = $this->db->prepare($query);
|
||||
if (!array_key_exists(0, $args)) {
|
||||
foreach($args as $name=>$value) {
|
||||
|
|
|
@ -409,7 +409,7 @@ function check_cli() {
|
|||
*/
|
||||
function _count_execs($db, $sql, $inputarray) {
|
||||
global $_execs;
|
||||
if(DEBUG) {
|
||||
if(DEBUG_SQL) {
|
||||
$fp = @fopen("data/sql.log", "a");
|
||||
if($fp) {
|
||||
if(is_array($inputarray)) {
|
||||
|
|
|
@ -61,6 +61,7 @@ function _d($name, $value) {if(!defined($name)) define($name, $value);}
|
|||
_d("DATABASE_DSN", null); // string PDO database connection details
|
||||
_d("CACHE_DSN", null); // string cache connection details
|
||||
_d("DEBUG", false); // boolean print various debugging details
|
||||
_d("DEBUG_SQL", false); // boolean dump SQL queries to data/sql.log
|
||||
_d("COVERAGE", false); // boolean activate xdebug coverage monitor
|
||||
_d("CONTEXT", null); // string file to log performance data into
|
||||
_d("CACHE_MEMCACHE", false); // boolean store complete rendered pages in memcache
|
||||
|
@ -106,7 +107,6 @@ try {
|
|||
ctx_log_start("Connecting to DB");
|
||||
// connect to the database
|
||||
$database = new Database();
|
||||
//$database->db->fnExecute = '_count_execs'; // FIXME: PDO equivalent
|
||||
$database->db->beginTransaction();
|
||||
$config = new DatabaseConfig($database);
|
||||
ctx_log_endok();
|
||||
|
|
Reference in a new issue