aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-10-04 23:05:45 -0700
committerfriendica <info@friendica.com>2012-10-04 23:05:45 -0700
commit7bee460df28bcd956206c3719e091fb500e3045d (patch)
tree4d06c81c9cfd39d2f88cab1c52aa5b6d11ef20ab /boot.php
parent4302134fdd2640843aa1349e95285b966d1282ab (diff)
downloadvolse-hubzilla-7bee460df28bcd956206c3719e091fb500e3045d.tar.gz
volse-hubzilla-7bee460df28bcd956206c3719e091fb500e3045d.tar.bz2
volse-hubzilla-7bee460df28bcd956206c3719e091fb500e3045d.zip
provide auto admin registration as before, but allow the current admin to create other admins
Diffstat (limited to 'boot.php')
-rw-r--r--boot.php24
1 files changed, 18 insertions, 6 deletions
diff --git a/boot.php b/boot.php
index 266b45914..32333197e 100644
--- a/boot.php
+++ b/boot.php
@@ -9,6 +9,7 @@ require_once('include/language.php');
require_once('include/nav.php');
require_once('include/cache.php');
require_once('library/Mobile_Detect/Mobile_Detect.php');
+require_once('object/BaseObject.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
@@ -327,7 +328,8 @@ define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 );
function startup() {
error_reporting(E_ERROR | E_WARNING | E_PARSE);
- set_time_limit(0);
+
+ @set_time_limit(0);
// This has to be quite large to deal with embedded private photos
ini_set('pcre.backtrack_limit', 500000);
@@ -367,16 +369,16 @@ function startup() {
if(! class_exists('App')) {
class App {
- public $account = null;
+ public $account = null; // account record
- private $channel = null;
- private $observer = null;
- private $widgets = array();
+ private $channel = null; // channel record
+ private $observer = null; // xchan record
+ private $widgets = array(); // widgets for this page
public $language;
public $module_loaded = false;
public $query_string;
- public $config;
+ public $config; // config cache
public $page;
public $profile;
public $user;
@@ -548,6 +550,8 @@ if(! class_exists('App')) {
$mobile_detect = new Mobile_Detect();
$this->is_mobile = $mobile_detect->isMobile();
$this->is_tablet = $mobile_detect->isTablet();
+
+ BaseObject::set_app($this);
}
function get_baseurl($ssl = false) {
@@ -606,6 +610,14 @@ if(! class_exists('App')) {
return $this->path;
}
+ function set_account($aid) {
+ $this->account = $aid;
+ }
+
+ function get_account() {
+ return $this->account;
+ }
+
function set_channel($channel) {
$this->channel = $channel;
}