Performance tests
This commit is contained in:
parent
9a940786c1
commit
8c80fe0bf5
4 changed files with 19 additions and 10 deletions
|
@ -77,11 +77,15 @@ class dba {
|
||||||
|
|
||||||
$this->error = '';
|
$this->error = '';
|
||||||
|
|
||||||
|
//@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Start '.$sql."\n", FILE_APPEND);
|
||||||
|
|
||||||
if($this->mysqli)
|
if($this->mysqli)
|
||||||
$result = @$this->db->query($sql);
|
$result = @$this->db->query($sql);
|
||||||
else
|
else
|
||||||
$result = @mysql_query($sql,$this->db);
|
$result = @mysql_query($sql,$this->db);
|
||||||
|
|
||||||
|
//@file_put_contents("/tmp/friendica-db.log", datetime_convert().':'.session_id(). ' Stop '."\n", FILE_APPEND);
|
||||||
|
|
||||||
if($this->mysqli) {
|
if($this->mysqli) {
|
||||||
if($this->db->errno)
|
if($this->db->errno)
|
||||||
$this->error = $this->db->error;
|
$this->error = $this->db->error;
|
||||||
|
|
|
@ -413,7 +413,7 @@ function network_content(&$a, $update = 0) {
|
||||||
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
|
$myurl = str_replace(array('www.','.'),array('','\\.'),$myurl);
|
||||||
$diasp_url = str_replace('/profile/','/u/',$myurl);
|
$diasp_url = str_replace('/profile/','/u/',$myurl);
|
||||||
$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ",
|
$sql_extra .= sprintf(" AND `item`.`parent` IN (SELECT distinct(`parent`) from item where ( `author-link` like '%s' or `tag` like '%s' or tag like '%s' )) ",
|
||||||
dbesc(protect_sprintf('%s' . $myurl)),
|
dbesc(protect_sprintf('%' . $myurl)),
|
||||||
dbesc(protect_sprintf('%' . $myurl . '\\]%')),
|
dbesc(protect_sprintf('%' . $myurl . '\\]%')),
|
||||||
dbesc(protect_sprintf('%' . $diasp_url . '\\]%'))
|
dbesc(protect_sprintf('%' . $diasp_url . '\\]%'))
|
||||||
);
|
);
|
||||||
|
|
|
@ -18,6 +18,11 @@ $a->page['htmlhead'] .= sprintf('<META NAME=generator CONTENT="%s"/>', $diabook_
|
||||||
|
|
||||||
//init css on network and profilepages
|
//init css on network and profilepages
|
||||||
$cssFile = null;
|
$cssFile = null;
|
||||||
|
|
||||||
|
// Preload config
|
||||||
|
load_config("diabook");
|
||||||
|
load_pconfig(local_user(), "diabook");
|
||||||
|
|
||||||
//get statuses of boxes at right-hand-column
|
//get statuses of boxes at right-hand-column
|
||||||
$close_pages = false;
|
$close_pages = false;
|
||||||
$site_close_pages = get_config("diabook", "close_pages" );
|
$site_close_pages = get_config("diabook", "close_pages" );
|
||||||
|
|
Loading…
Reference in a new issue