X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=23abb142636456b0c982e7428c42d032df0564fe;hb=8deac7248e7db35515d7810491f9136deffa3098;hp=453149305a400d6d8f67c126eb828ea3df6bc905;hpb=cf34bd5da53afa249e5208937e33d7ec60a020fe;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index 453149305a..23abb14263 100644 --- a/lib/util.php +++ b/lib/util.php @@ -146,6 +146,7 @@ function common_init_language() { bind_textdomain_codeset("laconica", "UTF-8"); textdomain("laconica"); setlocale(LC_CTYPE, 'C'); + common_log(LOG_INFO,'Language requested:'.$language.' Locale set:'.$locale_set,__FILE__); } define('PAGE_TYPE_PREFS', 'text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2'); @@ -178,7 +179,7 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall= 'src' => common_path('js/jquery.form.js')), ' '); common_element('script', array('type' => 'text/javascript', - 'src' => common_path('js/util.js')), + 'src' => common_path('js/util.js?version='.LACONICA_VERSION)), ' '); common_element('link', array('rel' => 'search', 'type' => 'application/opensearchdescription+xml', 'href' => common_local_url('opensearch', array('type' => 'people')), @@ -377,7 +378,7 @@ function common_input($id, $label, $value=NULL,$instructions=NULL) { common_element_end('p'); } -function common_checkbox($id, $label, $checked=false, $instructions=NULL, $value='true') +function common_checkbox($id, $label, $checked=false, $instructions=NULL, $value='true', $disabled=false) { common_element_start('p'); $attrs = array('name' => $id, @@ -390,6 +391,9 @@ function common_checkbox($id, $label, $checked=false, $instructions=NULL, $value if ($checked) { $attrs['checked'] = 'checked'; } + if ($disabled) { + $attrs['disabled'] = 'true'; + } common_element('input', $attrs); # XXX: use a