fix templatechooser to not apply theme in backend
Conflicts: docs/NEWS index.php
This commit is contained in:
@ -61,6 +61,8 @@ Version 2.0.2 ()
|
|||||||
* Fix Issue #321, negative offset for LIMIT SQL statements when
|
* Fix Issue #321, negative offset for LIMIT SQL statements when
|
||||||
using stable archive sorting and plugins like history.
|
using stable archive sorting and plugins like history.
|
||||||
|
|
||||||
|
* Templatechooser will not apply theme in backend admin.
|
||||||
|
|
||||||
* Use "secure" flag for (session) cookies sent over SSL, thanks to
|
* Use "secure" flag for (session) cookies sent over SSL, thanks to
|
||||||
dayton967
|
dayton967
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ class serendipity_event_templatechooser extends serendipity_event
|
|||||||
$propbag->add('description', PLUGIN_EVENT_TEMPLATECHOOSER_DESC);
|
$propbag->add('description', PLUGIN_EVENT_TEMPLATECHOOSER_DESC);
|
||||||
$propbag->add('stackable', false);
|
$propbag->add('stackable', false);
|
||||||
$propbag->add('author', 'Evan Nemerson');
|
$propbag->add('author', 'Evan Nemerson');
|
||||||
$propbag->add('version', '1.5');
|
$propbag->add('version', '1.6');
|
||||||
$propbag->add('requirements', array(
|
$propbag->add('requirements', array(
|
||||||
'serendipity' => '0.8',
|
'serendipity' => '0.8',
|
||||||
'smarty' => '2.6.7',
|
'smarty' => '2.6.7',
|
||||||
@ -41,7 +41,11 @@ class serendipity_event_templatechooser extends serendipity_event
|
|||||||
if (isset($hooks[$event])) {
|
if (isset($hooks[$event])) {
|
||||||
switch($event) {
|
switch($event) {
|
||||||
case 'frontend_configure':
|
case 'frontend_configure':
|
||||||
|
if (defined('IN_serendipity_admin') && IN_serendipity_admin) {
|
||||||
|
// Admin shall not have switchable themes.
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) {
|
if (isset($serendipity['COOKIE']['user_template']) && !isset($_REQUEST['user_template'])) {
|
||||||
$_REQUEST['user_template'] = $serendipity['COOKIE']['user_template'];
|
$_REQUEST['user_template'] = $serendipity['COOKIE']['user_template'];
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user