Browse Source

- Huge performance issue fixed

pull/16/head
Jaussoin Timothée 12 years ago
parent
commit
bc847ad951
  1. 2
      app/models/contact/Contact.php
  2. 4
      system/User.php
  3. 2
      system/widget/WidgetWrapper.php

2
app/models/contact/Contact.php

@ -198,7 +198,7 @@ class Contact extends ModlModel {
public function setLocation($stanza) {
$this->loclatitude = (string)$stanza->items->item->geoloc->lat;
$this->loclongitude = (string)$stanza->items->item->geoloc->lon;
$this->localtitude = (string)$stanza->items->item->geoloc->alt;
$this->localtitude = (int)$stanza->items->item->geoloc->alt;
$this->loccountry = (string)$stanza->items->item->geoloc->country;
$this->loccountrycode = (string)$stanza->items->item->geoloc->countrycode;
$this->locregion = (string)$stanza->items->item->geoloc->region;

4
system/User.php

@ -27,7 +27,9 @@ class User {
if($this->isLogged()) {
global $session;
$this->username = $session['user'].'@'.$session['host'];
$this->config = $session['config'];
if(isset($session['config']))
$this->config = $session['config'];
$this->sizelimit = (int)\system\Conf::getServerConfElement('sizeLimit');

2
system/widget/WidgetWrapper.php

@ -181,6 +181,7 @@ class WidgetWrapper
if(array_key_exists($key, $this->registered_events)) {
$we = $this->registered_events[$key];
array_push($we, $widget_name);
$we = array_unique($we);
$this->registered_events[$key] = $we;
} else {
$this->registered_events[$key] = array($widget_name);
@ -208,7 +209,6 @@ class WidgetWrapper
$widgets = $this->registered_events[$fct];
} else
$widgets = $this->get_loaded_widgets();
if(isset($widgets) && is_array($widgets))
foreach($widgets as $widget)
$this->run_widget($widget, $method, $params);

Loading…
Cancel
Save