X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=6ec557b2f915f9ba08e1ab8989caea9a5e0e47e8;hb=aac0605bd1baf1462a20646c01edc19557a33b93;hp=48dd1a1b4a075fd106746545d33174854c3eb6d2;hpb=054b4d0be6f3d524a602d787380d9da5986c1f9f;p=quix0rs-gnu-social.git
diff --git a/lib/util.php b/lib/util.php
index 48dd1a1b4a..6ec557b2f9 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -146,6 +146,9 @@ function common_init_language() {
bind_textdomain_codeset("laconica", "UTF-8");
textdomain("laconica");
setlocale(LC_CTYPE, 'C');
+ if(!$locale_set) {
+ common_log(LOG_INFO,'Language requested:'.$language.' - locale could not be set:',__FILE__);
+ }
}
define('PAGE_TYPE_PREFS', 'text/html,application/xhtml+xml,application/xml;q=0.3,text/xml;q=0.2');
@@ -161,13 +164,13 @@ function common_show_header($pagetitle, $callable=NULL, $data=NULL, $headercall=
$pagetitle . " - " . $config['site']['name']);
common_element('link', array('rel' => 'stylesheet',
'type' => 'text/css',
- 'href' => theme_path('display.css'),
+ 'href' => theme_path('display.css') . '?version=' . LACONICA_VERSION,
'media' => 'screen, projection, tv'));
foreach (array(6,7) as $ver) {
if (file_exists(theme_file('ie'.$ver.'.css'))) {
# Yes, IE people should be put in jail.
$xw->writeComment('[if lte IE '.$ver.']> 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 +380,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 +393,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