diff options
-rwxr-xr-x | boot.php | 13 | ||||
-rw-r--r-- | library/html5.js | 8 | ||||
-rw-r--r-- | mod/network.php | 2 | ||||
-rw-r--r-- | mod/rmagic.php | 2 | ||||
-rw-r--r-- | version.inc | 2 | ||||
-rwxr-xr-x | view/tpl/head.tpl | 2 |
6 files changed, 21 insertions, 8 deletions
@@ -1668,14 +1668,17 @@ function notice($s) { $a = get_app(); if(! x($_SESSION, 'sysmsg')) $_SESSION['sysmsg'] = array(); + // ignore duplicated error messages which haven't yet been displayed + // - typically seen as multiple 'permission denied' messages + // as a result of auto-reloading a protected page with &JS=1 + + if(in_array($s,$_SESSION['sysmsg'])) + return; + if($a->interactive) { - // shameless plug, permission is denied and they have no identity. - // There's a fairly good chance that they've not got zot. - if((stristr($s, t('permission denied'))) && (! get_observer_hash())) { - $s .= '<br><a href="http://getzot.com">' . t('Got Zot?') . '</a>'; - } $_SESSION['sysmsg'][] = $s; } + } /** diff --git a/library/html5.js b/library/html5.js new file mode 100644 index 000000000..448cebd79 --- /dev/null +++ b/library/html5.js @@ -0,0 +1,8 @@ +/* + HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed +*/ +(function(l,f){function m(){var a=e.elements;return"string"==typeof a?a.split(" "):a}function i(a){var b=n[a[o]];b||(b={},h++,a[o]=h,n[h]=b);return b}function p(a,b,c){b||(b=f);if(g)return b.createElement(a);c||(c=i(b));b=c.cache[a]?c.cache[a].cloneNode():r.test(a)?(c.cache[a]=c.createElem(a)).cloneNode():c.createElem(a);return b.canHaveChildren&&!s.test(a)?c.frag.appendChild(b):b}function t(a,b){if(!b.cache)b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag(); +a.createElement=function(c){return!e.shivMethods?b.createElem(c):p(c,a,b)};a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+m().join().replace(/[\w\-]+/g,function(a){b.createElem(a);b.frag.createElement(a);return'c("'+a+'")'})+");return n}")(e,b.frag)}function q(a){a||(a=f);var b=i(a);if(e.shivCSS&&!j&&!b.hasCSS){var c,d=a;c=d.createElement("p");d=d.getElementsByTagName("head")[0]||d.documentElement;c.innerHTML="x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>"; +c=d.insertBefore(c.lastChild,d.firstChild);b.hasCSS=!!c}g||t(a,b);return a}var k=l.html5||{},s=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,r=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,j,o="_html5shiv",h=0,n={},g;(function(){try{var a=f.createElement("a");a.innerHTML="<xyz></xyz>";j="hidden"in a;var b;if(!(b=1==a.childNodes.length)){f.createElement("a");var c=f.createDocumentFragment();b="undefined"==typeof c.cloneNode|| +"undefined"==typeof c.createDocumentFragment||"undefined"==typeof c.createElement}g=b}catch(d){g=j=!0}})();var e={elements:k.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",version:"3.7.0",shivCSS:!1!==k.shivCSS,supportsUnknownElements:g,shivMethods:!1!==k.shivMethods,type:"default",shivDocument:q,createElement:p,createDocumentFragment:function(a,b){a||(a=f); +if(g)return a.createDocumentFragment();for(var b=b||i(a),c=b.frag.cloneNode(),d=0,e=m(),h=e.length;d<h;d++)c.createElement(e[d]);return c}};l.html5=e;q(f)})(this,document); diff --git a/mod/network.php b/mod/network.php index d24d665d8..b2888b223 100644 --- a/mod/network.php +++ b/mod/network.php @@ -13,7 +13,7 @@ function network_init(&$a) { return; } - if(count($_GET) < 2) { + if((count($_GET) < 2) || (count($_GET) < 3 && $_GET['JS'])) { $network_options = get_pconfig(local_channel(),'system','network_page_default'); if($network_options) goaway('network' . '?f=&' . $network_options); diff --git a/mod/rmagic.php b/mod/rmagic.php index 49525bd32..597c6ed9c 100644 --- a/mod/rmagic.php +++ b/mod/rmagic.php @@ -33,6 +33,8 @@ function rmagic_post(&$a) { $openid = new LightOpenID(z_root()); $openid->identity = $address; $openid->returnUrl = z_root() . '/openid'; + $openid->required = array('namePerson/friendly', 'namePerson'); + $openid->optional = array('namePerson/first','media/image/aspect11','media/image/default'); goaway($openid->authUrl()); } catch (Exception $e) { notice( t('We encountered a problem while logging in with the OpenID you provided. Please check the correct spelling of the ID.').'<br /><br >'. t('The error message was:').' '.$e->getMessage()); diff --git a/version.inc b/version.inc index 4012103ea..db510a94e 100644 --- a/version.inc +++ b/version.inc @@ -1 +1 @@ -2015-03-11.968 +2015-03-12.969 diff --git a/view/tpl/head.tpl b/view/tpl/head.tpl index ebb52dea9..dc334deef 100755 --- a/view/tpl/head.tpl +++ b/view/tpl/head.tpl @@ -4,7 +4,7 @@ <meta name="generator" content="{{$generator}}" /> <!--[if IE]> -<script src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script> +<script src="{{$baseurl}}/library/html5.js"></script> <![endif]--> {{$head_css}} |