Bugfixing after adding timestamps
This commit is contained in:
parent
fdee002f73
commit
2cb576d305
13
boot.php
13
boot.php
|
@ -418,6 +418,8 @@ if(! class_exists('App')) {
|
|||
$this->performance["network"] = 0;
|
||||
$this->performance["rendering"] = 0;
|
||||
$this->performance["parser"] = 0;
|
||||
$this->performance["marktime"] = 0;
|
||||
$this->performance["markstart"] = microtime(true);
|
||||
|
||||
$this->config = array();
|
||||
$this->page = array();
|
||||
|
@ -726,12 +728,17 @@ if(! class_exists('App')) {
|
|||
return $this->rdelim[$engine];
|
||||
}
|
||||
|
||||
function save_timestamp($stamp1, $value) {
|
||||
$stamp2 = microtime(true);
|
||||
$duration = (float)($stamp2-$stamp1);
|
||||
function save_timestamp($stamp, $value) {
|
||||
$duration = (float)(microtime(true)-$stamp);
|
||||
|
||||
$this->performance[$value] += (float)$duration;
|
||||
$this->performance["marktime"] += (float)$duration;
|
||||
}
|
||||
|
||||
function mark_timestamp($mark) {
|
||||
//$this->performance["markstart"] -= microtime(true) - $this->performance["marktime"];
|
||||
$this->performance["markstart"] = microtime(true) - $this->performance["markstart"] - $this->performance["marktime"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -368,7 +368,6 @@ function visible_activity($item) {
|
|||
if(!function_exists('conversation')) {
|
||||
function conversation(&$a, $items, $mode, $update, $preview = false) {
|
||||
|
||||
|
||||
require_once('include/bbcode.php');
|
||||
|
||||
$ssl_state = ((local_user()) ? true : false);
|
||||
|
|
|
@ -195,6 +195,9 @@ function call_hooks($name, &$data = null) {
|
|||
|
||||
if (! function_exists('get_plugin_info')){
|
||||
function get_plugin_info($plugin){
|
||||
|
||||
$a = get_app();
|
||||
|
||||
$info=Array(
|
||||
'name' => $plugin,
|
||||
'description' => "",
|
||||
|
@ -270,6 +273,7 @@ function get_theme_info($theme){
|
|||
|
||||
if (!is_file("view/theme/$theme/theme.php")) return $info;
|
||||
|
||||
$a = get_app();
|
||||
$stamp1 = microtime(true);
|
||||
$f = file_get_contents("view/theme/$theme/theme.php");
|
||||
$a->save_timestamp($stamp1, "file");
|
||||
|
|
|
@ -39,9 +39,7 @@ function replace_macros($s,$r) {
|
|||
$output = template_unescape($r);
|
||||
}
|
||||
$a = get_app();
|
||||
$stamp2 = microtime(true);
|
||||
$duration = (float)($stamp2-$stamp1);
|
||||
$a->performance["rendering"] += (float)$duration;
|
||||
$a->save_timestamp($stamp1, "rendering");
|
||||
|
||||
return $output;
|
||||
}}
|
||||
|
|
|
@ -130,7 +130,6 @@ function admin_content(&$a) {
|
|||
* Page content
|
||||
*/
|
||||
$o = '';
|
||||
|
||||
// urls
|
||||
if ($a->argc > 1){
|
||||
switch ($a->argv[1]){
|
||||
|
@ -817,6 +816,7 @@ function admin_page_plugins(&$a){
|
|||
}
|
||||
|
||||
$t = get_markup_template("admin_plugins_details.tpl");
|
||||
|
||||
return replace_macros($t, array(
|
||||
'$title' => t('Administration'),
|
||||
'$page' => t('Plugins'),
|
||||
|
@ -1016,7 +1016,6 @@ function admin_page_themes(&$a){
|
|||
|
||||
}
|
||||
|
||||
|
||||
$screenshot = array( get_theme_screenshot($theme), t('Screenshot'));
|
||||
if(! stristr($screenshot[0],$theme))
|
||||
$screenshot = null;
|
||||
|
@ -1044,8 +1043,6 @@ function admin_page_themes(&$a){
|
|||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* List themes
|
||||
*/
|
||||
|
|
|
@ -571,7 +571,7 @@ function network_content(&$a, $update = 0) {
|
|||
}
|
||||
|
||||
|
||||
// We don't have to deal with ACL's on this page. You're looking at everything
|
||||
// We don't have to deal with ACLs on this page. You're looking at everything
|
||||
// that belongs to you, hence you can see all of it. We will filter by group if
|
||||
// desired.
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ class Conversation extends BaseObject {
|
|||
* _ false on failure
|
||||
*/
|
||||
public function get_template_data($alike, $dlike) {
|
||||
global $a;
|
||||
$result = array();
|
||||
|
||||
foreach($this->threads as $item) {
|
||||
|
@ -140,6 +141,7 @@ class Conversation extends BaseObject {
|
|||
$result[] = $item_data;
|
||||
}
|
||||
|
||||
//$a->mark_timestamp();
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue