]> git.mxchange.org Git - friendica.git/commitdiff
Merge remote branch 'upstream/master'
authorTobias Hößl <tobias@hoessl.eu>
Tue, 28 Feb 2012 21:19:02 +0000 (21:19 +0000)
committerTobias Hößl <tobias@hoessl.eu>
Tue, 28 Feb 2012 21:19:02 +0000 (21:19 +0000)
boot.php
include/conversation.php
include/event.php
include/items.php
mod/dfrn_request.php
mod/message.php

index c3e5c0de02214d27e4948c5927f747948a16e291..18b6f8375f5e8bd8358c02ef9866b5b354fbdce1 100755 (executable)
--- a/boot.php
+++ b/boot.php
@@ -1209,7 +1209,7 @@ function current_theme(){
        $a = get_app();
        
        $system_theme = ((isset($a->config['system']['theme'])) ? $a->config['system']['theme'] : '');
-       $theme_name = ((is_array($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
+       $theme_name = ((isset($_SESSION) && x($_SESSION,'theme')) ? $_SESSION['theme'] : $system_theme);
        
        if($theme_name && file_exists('view/theme/' . $theme_name . '/style.css'))
                return($theme_name);
@@ -1335,7 +1335,7 @@ function profile_tabs($a, $is_owner=False, $nickname=Null){
                array(
                        'label' => t('Profile'),
                        'url'   => $url.'/?tab=profile',
-                       'sel'   => (($tab=='profile')?'active':''),
+                       'sel'   => ((isset($tab) && $tab=='profile')?'active':''),
                ),
                array(
                        'label' => t('Photos'),
index 2ef37694dc2dd1a668f4c7bef941538f8e140a87..9f564843e91c77d2827fccf883011443f2c20616 100755 (executable)
@@ -986,8 +986,8 @@ function conv_sort($arr,$order) {
                usort($parents,'sort_thr_commented');
 
        if(count($parents))
-               foreach($parents as $x) 
-                       $x['children'] = array();
+               foreach($parents as $i=>$_x) 
+                       $parents[$i]['children'] = array();
 
        foreach($arr as $x) {
                if($x['id'] != $x['parent']) {
index 4a9a9a0041e40ec6318070806ec9add4be990333..29202baddf982417cdf3decedc3f0b69be539dc8 100755 (executable)
@@ -163,7 +163,7 @@ function bbtoevent($s) {
        if(preg_match("/\[event\-adjust\](.*?)\[\/event\-adjust\]/is",$s,$match))
                $ev['adjust'] = $match[1];
        $match = '';
-       $ev['nofinish'] = (($ev['start'] && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0);
+       $ev['nofinish'] = (((x($ev, 'start') && $ev['start']) && (!x($ev, 'finish') || !$ev['finish'])) ? 1 : 0);
        return $ev;
 
 }
index 7d52571c25d6a176d32a0b70540df807102ac2ed..5268dfc1d8bb859bfa66e898bd89f43ed40b710f 100755 (executable)
@@ -682,7 +682,7 @@ function item_store($arr,$force_parent = false) {
                unset($arr['dsprsig']);
        }
 
-       if($arr['gravity'])
+       if(x($arr, 'gravity'))
                $arr['gravity'] = intval($arr['gravity']);
        elseif($arr['parent-uri'] === $arr['uri'])
                $arr['gravity'] = 0;
@@ -742,6 +742,7 @@ function item_store($arr,$force_parent = false) {
 
        if($arr['parent-uri'] === $arr['uri']) {
                $parent_id = 0;
+               $parent_deleted = 0;
                $allow_cid = $arr['allow_cid'];
                $allow_gid = $arr['allow_gid'];
                $deny_cid  = $arr['deny_cid'];
@@ -800,6 +801,8 @@ function item_store($arr,$force_parent = false) {
                                logger('item_store: item parent was not found - ignoring item');
                                return 0;
                        }
+                       
+                       $parent_deleted = 0;
                }
        }
 
index bc159137df697046fa14abb9ee8bc18b59f4a5e0..452fec1669fe1880d1a1df44e39511c9ba3a4573 100755 (executable)
@@ -43,7 +43,7 @@ function dfrn_request_post(&$a) {
                return;
 
 
-       if($_POST['cancel']) {
+       if(x($_POST, 'cancel')) {
                goaway(z_root());
        } 
 
index 4b494e906f5be8df0f0e8747d6b7d41d9997f678..e293d62d9dcb178fd0d979a2815e4885317355b5 100755 (executable)
@@ -176,7 +176,7 @@ function message_content(&$a) {
                        $a->set_pager_total($r[0]['total']);
        
                $r = q("SELECT max(`mail`.`created`) AS `mailcreated`, min(`mail`.`seen`) AS `mailseen`, 
-                       `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` 
+                       `mail`.* , `contact`.`name`, `contact`.`url`, `contact`.`thumb` , `contact`.`network`  
                        FROM `mail` LEFT JOIN `contact` ON `mail`.`contact-id` = `contact`.`id` 
                        WHERE `mail`.`uid` = %d AND `from-url` $eq '%s' GROUP BY `parent-uri` ORDER BY `created` DESC  LIMIT %d , %d ",
                        intval(local_user()),