mirror of
https://github.com/processwire/processwire.git
synced 2025-08-30 18:09:56 +02:00
Various minor adjustments
This commit is contained in:
@@ -205,7 +205,10 @@ DirectoryIndex index.php index.html index.htm
|
||||
# Both of these lines are optional, but can help to reduce server load. However, they
|
||||
# are not compatible with the $config->pagefileSecure option (if enabled) and they
|
||||
# may produce an Apache 404 rather than your regular 404. You may uncomment the two lines
|
||||
# below if you don't need to use the $config->pagefileSecure option.
|
||||
# below if you don't need to use the $config->pagefileSecure option. After uncommenting, test
|
||||
# a URL like domain.com/site/assets/files/test.jpg to make sure you are getting a 404 and not
|
||||
# your homepage. If getting your homepage, then either: do not use this option, or comment out
|
||||
# section #2 above that makes ProcessWire the 404 handler.
|
||||
# -----------------------------------------------------------------------------------------------
|
||||
|
||||
# RewriteCond %{REQUEST_FILENAME} !\.(jpg|jpeg|gif|png|ico)$ [NC]
|
||||
|
@@ -277,7 +277,7 @@ abstract class AdminTheme extends WireData implements Module {
|
||||
try {
|
||||
$field->save();
|
||||
} catch(\Exception $e) {
|
||||
$this->error("Error creating 'admin_theme' field: " . $e->getMessage());
|
||||
// $this->error("Error creating 'admin_theme' field: " . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1450,7 +1450,9 @@ class Page extends WireData implements \Countable, WireMatchable {
|
||||
if($field && count($parts) < 2) {
|
||||
// this is a field that will provide its own formatted value
|
||||
$subname = count($parts) == 1 ? array_shift($parts) : '';
|
||||
if(!$this->wire($subname)) $value = $field->type->markupValue($this, $field, $value, $subname);
|
||||
if(!$subname || !$this->wire($subname)) {
|
||||
$value = $field->type->markupValue($this, $field, $value, $subname);
|
||||
}
|
||||
}
|
||||
|
||||
} while(is_object($value) && count($parts));
|
||||
|
@@ -201,7 +201,7 @@ class InputfieldPassword extends InputfieldText {
|
||||
$failIcon = "<i class='fa fa-fw fa-frown-o'></i>";
|
||||
$okIcon = "<i class='fa fa-fw fa-meh-o'></i>";
|
||||
$goodIcon = "<i class='fa fa-fw fa-smile-o'></i>";
|
||||
$oldPassLabel = $this->_('Old password');
|
||||
$oldPassLabel = $this->_('Current password');
|
||||
$newPassLabel = $this->_('New password');
|
||||
$confirmLabel = $this->_('Confirm');
|
||||
$name = $this->attr('name');
|
||||
|
@@ -296,10 +296,13 @@ class Languages extends PagesType {
|
||||
if(is_null($language)) {
|
||||
// save current user language setting and make current language default
|
||||
if(!$this->defaultLanguage) return;
|
||||
/** @var User $user */
|
||||
$user = $this->wire('user');
|
||||
if($user->language->id == $this->defaultLanguage->id) return; // already default
|
||||
$this->savedLanguage = $user->language;
|
||||
$previouslyChanged = $user->isChanged('language');
|
||||
$user->language = $this->defaultLanguage;
|
||||
if(!$previouslyChanged) $user->untrackChange('language');
|
||||
} else {
|
||||
// set what language is the default
|
||||
$this->defaultLanguage = $language;
|
||||
@@ -315,7 +318,11 @@ class Languages extends PagesType {
|
||||
*/
|
||||
public function unsetDefault() {
|
||||
if(!$this->savedLanguage || !$this->defaultLanguage) return;
|
||||
$this->wire('user')->language = $this->savedLanguage;
|
||||
/** @var User $user */
|
||||
$user = $this->wire('user');
|
||||
$previouslyChanged = $user->isChanged('language');
|
||||
$user->language = $this->savedLanguage;
|
||||
if(!$previouslyChanged) $user->untrackChange('language');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user