From 972fc91e12b08eb0aae31c448b7879408ddab229 Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 16 Feb 2015 15:08:53 -0800 Subject: [PATCH 1/3] remove superfluous non-boolean boolean --- include/api.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/api.php b/include/api.php index d5c2a429c..d0c4ed0aa 100644 --- a/include/api.php +++ b/include/api.php @@ -808,8 +808,8 @@ require_once('include/items.php'); require_once('include/security.php'); - $lastwall = q("SELECT * from item where 1 - and item_private = 0 and item_restrict = 0 + $lastwall = q("SELECT * from item where + item_private = 0 and item_restrict = 0 and author_xchan = '%s' and allow_cid = '' and allow_gid = '' and deny_cid = '' and deny_gid = '' and verb = '%s' From ca8e22101803454be60af35d2cf71ae80224805a Mon Sep 17 00:00:00 2001 From: Habeas Codice Date: Mon, 16 Feb 2015 15:09:43 -0800 Subject: [PATCH 2/3] normalize age data mysql has type tinyint(3) which probably turns into a 24-bit value, but postgres uses 3-digit decimal as its constraint (probably what the mysql schema was intended to do). either that or mysql silently truncates while postgres respects the constraint. Either way, bad data gets in unchecked, now it's checked. --- include/zot.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/include/zot.php b/include/zot.php index da6ca16c3..cbe0c9303 100644 --- a/include/zot.php +++ b/include/zot.php @@ -2243,6 +2243,11 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = UPDATE_FLAGS_ $r = q("select * from xprof where xprof_hash = '%s' limit 1", dbesc($hash) ); + + $age = intval($arr['xprof_age']); + if($age > 150) + $age = 150; + if($r) { $update = false; foreach($r[0] as $k => $v) { @@ -2271,7 +2276,7 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = UPDATE_FLAGS_ where xprof_hash = '%s'", dbesc($arr['xprof_desc']), dbesc($arr['xprof_dob']), - intval($arr['xprof_age']), + $age, dbesc($arr['xprof_gender']), dbesc($arr['xprof_marital']), dbesc($arr['xprof_sexual']), @@ -2294,7 +2299,7 @@ function import_directory_profile($hash,$profile,$addr,$ud_flags = UPDATE_FLAGS_ dbesc($arr['xprof_hash']), dbesc($arr['xprof_desc']), dbesc($arr['xprof_dob']), - intval($arr['xprof_age']), + $age, dbesc($arr['xprof_gender']), dbesc($arr['xprof_marital']), dbesc($arr['xprof_sexual']), From e0c9929325c4c4493e76f3e6dfe7c4ada63a55ea Mon Sep 17 00:00:00 2001 From: marijus Date: Tue, 17 Feb 2015 00:32:38 +0100 Subject: [PATCH 3/3] quickfix for eventual css calc() not supported bug --- view/theme/redbasic/js/redbasic.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/view/theme/redbasic/js/redbasic.js b/view/theme/redbasic/js/redbasic.js index 4f70752c0..53ee45648 100644 --- a/view/theme/redbasic/js/redbasic.js +++ b/view/theme/redbasic/js/redbasic.js @@ -1,6 +1,10 @@ $(document).ready(function() { +if($(window).width() < 767) { + $('main').css('width', $(window).width() + 231 ); +} + $('#expand-aside').click(function() { $('#expand-aside-icon').toggleClass('icon-circle-arrow-right').toggleClass('icon-circle-arrow-left'); $('main').toggleClass('region_1-on');