aboutsummaryrefslogtreecommitdiffstats
path: root/boot.php
diff options
context:
space:
mode:
Diffstat (limited to 'boot.php')
-rwxr-xr-xboot.php104
1 files changed, 25 insertions, 79 deletions
diff --git a/boot.php b/boot.php
index 0ae12e4a7..d8b4fa686 100755
--- a/boot.php
+++ b/boot.php
@@ -5,14 +5,14 @@
*/
/**
- * Red Matrix.
+ * Hubzilla.
*
- * The Red Matrix (aka "Red") is an open source decentralised communications
+ * Hubzilla is an open source decentralised communications
* platform combined with a decentralised identity/authentication framework
* wrapped in an extensible content management system, providing website designers
* the ability to embed fully decentralised communications and social tools
* into many traditional website designs (blogs, forums, small business
- * websites, charitable organisations, etc.). Red also provides DNS mobility
+ * websites, charitable organisations, etc.). Hubzilla also provides DNS mobility
* and internet scale privacy/access control.
*
* This allows any individual website to participate in a matrix of linked
@@ -45,8 +45,8 @@ require_once('include/Contact.php');
require_once('include/account.php');
-define ( 'PLATFORM_NAME', 'redmatrix' );
-define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'R');
+define ( 'PLATFORM_NAME', 'hubzilla' );
+define ( 'RED_VERSION', trim(file_get_contents('version.inc')) . 'H');
define ( 'ZOT_REVISION', 1 );
define ( 'DB_UPDATE_VERSION', 1147 );
@@ -230,15 +230,16 @@ define ( 'PAGE_REMOVED', 0x8000 );
/**
- * Photo types
+ * Photo usage types
*/
define ( 'PHOTO_NORMAL', 0x0000 );
define ( 'PHOTO_PROFILE', 0x0001 );
define ( 'PHOTO_XCHAN', 0x0002 );
define ( 'PHOTO_THING', 0x0004 );
-define ( 'PHOTO_ADULT', 0x0008 );
+define ( 'PHOTO_COVER', 0x0010 );
+define ( 'PHOTO_ADULT', 0x0008 );
define ( 'PHOTO_FLAG_OS', 0x4000 );
/**
@@ -399,36 +400,6 @@ define ( 'VNOTIFY_INTRO', 0x0200 );
define ( 'VNOTIFY_REGISTER', 0x0400 );
-// We need a flag to designate that a site is a
-// global directory mirror, but probably doesn't
-// belong in hubloc.
-// This indicates a need for an 'xsite' table
-// which contains only sites and not people.
-// Then we might have to revisit hubloc as a
-// linked structure between xchan and xsite
-
-define ( 'HUBLOC_FLAGS_PRIMARY', 0x0001);
-define ( 'HUBLOC_FLAGS_UNVERIFIED', 0x0002);
-define ( 'HUBLOC_FLAGS_ORPHANCHECK', 0x0004);
-define ( 'HUBLOC_FLAGS_DELETED', 0x1000);
-
-define ( 'XCHAN_FLAGS_NORMAL', 0x0000);
-define ( 'XCHAN_FLAGS_HIDDEN', 0x0001);
-define ( 'XCHAN_FLAGS_ORPHAN', 0x0002);
-define ( 'XCHAN_FLAGS_CENSORED', 0x0004);
-define ( 'XCHAN_FLAGS_SELFCENSORED', 0x0008);
-define ( 'XCHAN_FLAGS_SYSTEM', 0x0010);
-define ( 'XCHAN_FLAGS_PUBFORUM', 0x0020);
-define ( 'XCHAN_FLAGS_DELETED', 0x1000);
-/*
- * Traficlights for Administration of HubLoc
- * to detect problems in inter server communication
- */
-define ('HUBLOC_NOTUSED', 0x0000);
-define ('HUBLOC_SEND_ERROR', 0x0001);
-define ('HUBLOC_RECEIVE_ERROR', 0x0002);
-define ('HUBLOC_WORKS', 0x0004);
-define ('HUBLOC_OFFLINE', 0x0008);
/**
* Tag/term types
@@ -443,6 +414,7 @@ define ( 'TERM_FILE', 5 );
define ( 'TERM_SAVEDSEARCH', 6 );
define ( 'TERM_THING', 7 );
define ( 'TERM_BOOKMARK', 8 );
+define ( 'TERM_HIERARCHY', 9 );
define ( 'TERM_OBJ_POST', 1 );
define ( 'TERM_OBJ_PHOTO', 2 );
@@ -452,6 +424,7 @@ define ( 'TERM_OBJ_OBJECT', 5 );
define ( 'TERM_OBJ_THING', 6 );
define ( 'TERM_OBJ_APP', 7 );
+
/**
* various namespaces we may need to parse
*/
@@ -550,41 +523,26 @@ define ( 'ACCOUNT_ROLE_ADMIN', 0x1000 );
*/
define ( 'ITEM_VISIBLE', 0x0000);
-define ( 'ITEM_HIDDEN', 0x0001);
+//define ( 'ITEM_HIDDEN', 0x0001);
define ( 'ITEM_BLOCKED', 0x0002);
define ( 'ITEM_MODERATED', 0x0004);
define ( 'ITEM_SPAM', 0x0008);
-define ( 'ITEM_DELETED', 0x0010);
+//define ( 'ITEM_DELETED', 0x0010);
define ( 'ITEM_UNPUBLISHED', 0x0020);
-define ( 'ITEM_WEBPAGE', 0x0040); // is a static web page, not a conversational item
+//define ( 'ITEM_WEBPAGE', 0x0040); // is a static web page, not a conversational item
define ( 'ITEM_DELAYED_PUBLISH', 0x0080);
define ( 'ITEM_BUILDBLOCK', 0x0100); // Named thusly to make sure nobody confuses this with ITEM_BLOCKED
-define ( 'ITEM_PDL', 0x0200); // Page Description Language - e.g. Comanche
+//define ( 'ITEM_PDL', 0x0200); // Page Description Language - e.g. Comanche
define ( 'ITEM_BUG', 0x0400); // Is a bug, can be used by the internal bug tracker
define ( 'ITEM_PENDING_REMOVE', 0x0800); // deleted, notification period has lapsed
define ( 'ITEM_DOC', 0x1000); // hubzilla only, define here so that item import does the right thing
-/**
- * Item Flags
- */
-
-define ( 'ITEM_ORIGIN', 0x0001);
-define ( 'ITEM_UNSEEN', 0x0002);
-define ( 'ITEM_STARRED', 0x0004);
-define ( 'ITEM_UPLINK', 0x0008);
-define ( 'ITEM_CONSENSUS', 0x0010); // an item which may present agree/disagree/abstain options
-define ( 'ITEM_WALL', 0x0020);
-define ( 'ITEM_THREAD_TOP', 0x0040);
-define ( 'ITEM_NOTSHOWN', 0x0080); // technically visible but not normally shown (e.g. like/dislike)
-define ( 'ITEM_NSFW', 0x0100);
-define ( 'ITEM_RELAY', 0x0200); // used only in the communication layers, not stored
-define ( 'ITEM_MENTIONSME', 0x0400);
-define ( 'ITEM_NOCOMMENT', 0x0800); // commenting/followups are disabled
-define ( 'ITEM_OBSCURED', 0x1000); // bit-mangled to protect from casual browsing by site admin
-define ( 'ITEM_VERIFIED', 0x2000); // Signature verification was successful
-define ( 'ITEM_RETAINED', 0x4000); // We looked at this item once to decide whether or not to expire it, and decided not to.
-define ( 'ITEM_RSS', 0x8000); // Item comes from a feed. Use this to decide whether to link the title
- // Don't make us evaluate this same item again.
+define ( 'ITEM_TYPE_POST', 0 );
+define ( 'ITEM_TYPE_BLOCK', 1 );
+define ( 'ITEM_TYPE_PDL', 2 );
+define ( 'ITEM_TYPE_WEBPAGE', 3 );
+define ( 'ITEM_TYPE_BUG', 4 );
+define ( 'ITEM_TYPE_DOC', 5 );
define ( 'DBTYPE_MYSQL', 0 );
define ( 'DBTYPE_POSTGRES', 1 );
@@ -759,7 +717,6 @@ class App {
set_include_path(
'include' . PATH_SEPARATOR
. 'library' . PATH_SEPARATOR
- . 'library/phpsec' . PATH_SEPARATOR
. 'library/langdet' . PATH_SEPARATOR
. '.' );
@@ -1098,18 +1055,7 @@ class App {
}
function set_template_engine($engine = 'smarty3') {
-
$this->theme['template_engine'] = $engine;
-
- /*if ($engine) {
- case 'smarty3':
- if(!is_writable(TEMPLATE_BUILD_PATH))
- echo "<b>ERROR</b> folder <tt>" . TEMPLATE_BUILD_PATH . "</tt> must be writable by webserver."; killme();
-
- break;
- default:
- break;
- }*/
}
function get_template_ldelim($engine = 'smarty3') {
@@ -1523,7 +1469,7 @@ function login($register = false, $form_id = 'main-login', $hiddens=false) {
$reglink = 'register';
$reg = array(
- 'title' => t('Create an account to access services and applications within the Red Matrix'),
+ 'title' => t('Create an account to access services and applications within the Hubzilla'),
'desc' => t('Register'),
'link' => (($register) ? $reglink : 'pubsites')
);
@@ -2191,7 +2137,7 @@ function construct_page(&$a) {
}
/**
- * @brief Returns RedMatrix's root directory.
+ * @brief Returns Hubzilla's root directory.
*
* @return string
*/
@@ -2299,7 +2245,7 @@ function z_check_cert() {
/**
* @brief Send email to admin if server has an invalid certificate.
*
- * If a RedMatrix hub is available over https it must have a publicly valid
+ * If a Hubzilla hub is available over https it must have a publicly valid
* certificate.
*/
function cert_bad_email() {
@@ -2313,7 +2259,7 @@ function cert_bad_email() {
'$error' => t('Website SSL certificate is not valid. Please correct.')
));
- $subject = email_header_encode(sprintf(t('[red] Website SSL error for %s'), $a->get_hostname()));
+ $subject = email_header_encode(sprintf(t('[hubzilla] Website SSL error for %s'), $a->get_hostname()));
mail($a->config['system']['admin_email'], $subject, $email_msg,
'From: Administrator' . '@' . $a->get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"
@@ -2354,7 +2300,7 @@ function check_cron_broken() {
'$lastdate' => (($d)? $d : t('never'))
));
- $subject = email_header_encode(sprintf(t('[red] Cron tasks not running on %s'), $a->get_hostname()));
+ $subject = email_header_encode(sprintf(t('[hubzilla] Cron tasks not running on %s'), $a->get_hostname()));
mail($a->config['system']['admin_email'], $subject, $email_msg,
'From: Administrator' . '@' . $a->get_hostname() . "\n"
. 'Content-type: text/plain; charset=UTF-8' . "\n"