Commit 355c42cb authored by Alexander Kampmann's avatar Alexander Kampmann

Merge branch 'master' of https://github.com/friendica/friendica

Conflicts:
	include/config.php
	update.php
parents cbf45448 9b6e9108

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -9,9 +9,9 @@ require_once('include/nav.php');
require_once('include/cache.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '2.3.1288' );
define ( 'FRIENDICA_VERSION', '2.3.1302' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1134 );
define ( 'DB_UPDATE_VERSION', 1135 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
......@@ -90,13 +90,14 @@ define ( 'PAGE_SOAPBOX', 1 );
define ( 'PAGE_COMMUNITY', 2 );
define ( 'PAGE_FREELOVE', 3 );
define ( 'PAGE_BLOG', 4 );
define ( 'PAGE_PRVGROUP', 5 );
/**
* Network and protocol family types
*/
define ( 'NETWORK_ZOT', 'zot!'); // Zot!
define ( 'NETWORK_DFRN', 'dfrn'); // Friendica, Mistpark, other DFRN implementations
define ( 'NETWORK_ZOT', 'zot!'); // Zot!
define ( 'NETWORK_OSTATUS', 'stat'); // status.net, identi.ca, GNU-social, other OStatus implementations
define ( 'NETWORK_FEED', 'feed'); // RSS/Atom feeds with no known "post/notify" protocol
define ( 'NETWORK_DIASPORA', 'dspr'); // Diaspora
......@@ -108,6 +109,28 @@ define ( 'NETWORK_XMPP', 'xmpp'); // XMPP
define ( 'NETWORK_MYSPACE', 'mysp'); // MySpace
define ( 'NETWORK_GPLUS', 'goog'); // Google+
/*
* These numbers are used in stored permissions
* and existing allocations MUST NEVER BE CHANGED
* OR RE-ASSIGNED! You may only add to them.
*/
$netgroup_ids = array(
NETWORK_DFRN => (-1),
NETWORK_ZOT => (-2),
NETWORK_OSTATUS => (-3),
NETWORK_FEED => (-4),
NETWORK_DIASPORA => (-5),
NETWORK_MAIL => (-6),
NETWORK_MAIL2 => (-7),
NETWORK_FACEBOOK => (-8),
NETWORK_LINKEDIN => (-9),
NETWORK_XMPP => (-10),
NETWORK_MYSPACE => (-11),
NETWORK_GPLUS => (-12),
);
/**
* Maximum number of "people who like (or don't like) this" that we will list by name
*/
......@@ -135,6 +158,9 @@ define ( 'NOTIFY_PROFILE', 0x0040 );
define ( 'NOTIFY_TAGSELF', 0x0080 );
define ( 'NOTIFY_TAGSHARE', 0x0100 );
define ( 'NOTIFY_SYSTEM', 0x8000 );
/**
* various namespaces we may need to parse
*/
......@@ -268,6 +294,8 @@ class App {
public $nav_sel;
public $category;
private $scheme;
private $hostname;
private $baseurl;
......@@ -352,6 +380,9 @@ class App {
$this->argc = count($this->argv);
if((array_key_exists('0',$this->argv)) && strlen($this->argv[0])) {
$this->module = str_replace(".", "_", $this->argv[0]);
if(array_key_exists('2',$this->argv)) {
$this->category = $this->argv[2];
}
}
else {
$this->argc = 1;
......@@ -560,6 +591,10 @@ function absurl($path) {
return $path;
}
function is_ajax() {
return (!empty($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest');
}
// Primarily involved with database upgrade, but also sets the
// base url for use in cmdline programs which don't have
......@@ -955,6 +990,12 @@ function profile_sidebar($profile, $block = 0) {
if((remote_user()) && ($_SESSION['visitor_visiting'] == $profile['uid']))
$connect = False;
if(get_my_url() && $profile['unkmail'])
$wallmessage = t('Message');
else
$wallmessage = false;
// show edit profile to yourself
if ($profile['uid'] == local_user()) {
......@@ -1037,6 +1078,7 @@ function profile_sidebar($profile, $block = 0) {
$o .= replace_macros($tpl, array(
'$profile' => $profile,
'$connect' => $connect,
'$wallmessage' => $wallmessage,
'$location' => template_escape($location),
'$gender' => $gender,
'$pdesc' => $pdesc,
......@@ -1232,17 +1274,20 @@ function current_theme(){
$system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
$theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css'))
if($theme_name &&
(file_exists('view/theme/' . $theme_name . '/style.css') ||
file_exists('view/theme/' . $theme_name . '/style.php')))
return($theme_name);
foreach($app_base_themes as $t) {
if(file_exists('view/theme/' . $t . '/style.css'))
if(file_exists('view/theme/' . $t . '/style.css')||
file_exists('view/theme/' . $t . '/style.php'))
return($t);
}
$fallback = glob('view/theme/*/style.css');
$fallback = glob('view/theme/*/style.[css|php]');
if(count($fallback))
return (str_replace('view/theme/','', str_replace("/style.css","",$fallback[0])));
return (str_replace('view/theme/','', substr($fallback[0],0,-10)));
}}
......@@ -1254,6 +1299,8 @@ if(! function_exists('current_theme_url')) {
function current_theme_url() {
global $a;
$t = current_theme();
if (file_exists('view/theme/' . $t . '/style.php'))
return($a->get_baseurl() . '/view/theme/' . $t . '/style.pcss');
return($a->get_baseurl() . '/view/theme/' . $t . '/style.css');
}}
......@@ -1279,8 +1326,12 @@ function feed_birthday($uid,$tz) {
*
*/
$birthday = '';
if(! strlen($tz))
$tz = 'UTC';
$p = q("SELECT `dob` FROM `profile` WHERE `is-default` = 1 AND `uid` = %d LIMIT 1",
intval($uid)
);
......@@ -1378,6 +1429,29 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
);
}
$arr = array('is_owner' => $is_owner, 'nickname' => $nickname, 'tab' => (($tab) ? $tab : false), 'tabs' => $tabs);
call_hooks('profile_tabs', $arr);
$tpl = get_markup_template('common_tabs.tpl');
return replace_macros($tpl,array('$tabs'=>$tabs));
return replace_macros($tpl,array('$tabs' => $arr['tabs']));
}}
function get_my_url() {
if(x($_SESSION,'my_url'))
return $_SESSION['my_url'];
return false;
}
function zrl($s) {
if(! strlen($s))
return $s;
if(! strpos($s,'/profile/'))
return $s;
$achar = strpos($s,'?') ? '&' : '?';
$mine = get_my_url();
if($mine and ! link_compare($mine,$s))
return $s . $achar . 'zrl=' . urlencode($mine);
return $s;
}
......@@ -290,9 +290,10 @@ CREATE TABLE IF NOT EXISTS `mail` (
`convid` int(10) unsigned NOT NULL,
`title` char(255) NOT NULL,
`body` mediumtext NOT NULL,
`seen` tinyint(1) NOT NULL,
`seen` tinyint(1) NOT NULL DEFAULT '0',
`reply` tinyint(1) NOT NULL DEFAULT '0',
`replied` tinyint(1) NOT NULL,
`replied` tinyint(1) NOT NULL DEFAULT '0',
`unknown` tinyint(1) NOT NULL DEFAULT '0',
`uri` char(255) NOT NULL,
`parent-uri` char(255) NOT NULL,
`created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
......@@ -301,6 +302,7 @@ CREATE TABLE IF NOT EXISTS `mail` (
KEY `guid` (`guid`),
KEY `convid` (`convid`),
KEY `reply` (`reply`),
KEY `unknown` (`unknown`),
KEY `uri` (`uri`),
KEY `parent-uri` (`parent-uri`),
KEY `created` (`created`)
......@@ -454,6 +456,8 @@ CREATE TABLE IF NOT EXISTS `user` (
`blockwall` tinyint(1) unsigned NOT NULL DEFAULT '0',
`hidewall` tinyint(1) unsigned NOT NULL DEFAULT '0',
`blocktags` tinyint(1) unsigned NOT NULL DEFAULT '0',
`unkmail` tinyint(1) unsigned NOT NULL DEFAULT '0',
`cntunkmail` int(11) unsigned NOT NULL DEFAULT '10',
`notify-flags` int(11) unsigned NOT NULL DEFAULT '65535',
`page-flags` int(11) unsigned NOT NULL DEFAULT '0',
`prvnets` tinyint(1) NOT NULL DEFAULT '0',
......@@ -473,6 +477,8 @@ CREATE TABLE IF NOT EXISTS `user` (
KEY `account_expired` (`account_expired`),
KEY `hidewall` (`hidewall`),
KEY `blockwall` (`blockwall`),
KEY `unkmail` (`unkmail`),
KEY `cntunkmail` (`cntunkmail`),
KEY `blocked` (`blocked`),
KEY `verified` (`verified`),
KEY `login_date` (`login_date`)
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -5,6 +5,7 @@ Friendica Documentation and Resources
**Contents**
* [Account Basics](help/Account-Basics)
* [New User Quick Start](help/guide)
* [Profiles](help/Profiles)
* [Connectors](help/Connectors)
* [Making Friends](help/Making-Friends)
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
And that brings the Quick Start to an end.
Here are some more things to help get you started:
**Groups**
- <a href = "https://kakste.com/profile/newhere">New Here</a> - a group for people new to Friendica
- <a href = "http://helpers.pyxis.uberspace.de/profile/helpers">Friendica Support</a> - problems? This is the place to ask.
- <a href = "https://kakste.com/profile/public_stream">Public Stream</a> - a place to talk about anything to anyone.