'true' => true,
'false' => false
);
+ static $benchmark = false;
// highlight_string(var_export($sql, 1));
return false;
}
+ if ($benchmark) {
+ $start = microtime_float();
+ }
if ($expectError) {
$c = @mysql_query($sql, $serendipity['dbConn']);
} else {
$c = mysql_query($sql, $serendipity['dbConn']);
}
+ if ($benchmark) {
+ $end = microtime_float();
+ echo "[bench: " . ($end-$start) . "s] $sql<br />\n";
+ }
+
if (!$expectError && mysql_error($serendipity['dbConn']) != '') {
$msg = '<pre>' . $sql . '</pre> / ' . mysql_error($serendipity['dbConn']);
*/
function serendipity_load_configuration($author = null) {
global $serendipity;
+ static $config_loaded = array();
+
+ if (isset($config_loaded[$author])) {
+ return true;
+ }
if (!empty($author)) {
// Replace default configuration directives with user-relevant data
$serendipity[$row['name']] = serendipity_get_bool($row['value']);
}
}
+ $config_loaded[$author] = true;
}
/**