BBCode toolbar: Selectboxes of attachments and images are being sorted by name;
fixed redirects after login
This commit is contained in:
parent
e949c087d5
commit
76dbaa342b
@ -669,11 +669,15 @@ function plugin_bbcode_toolbar() {
|
|||||||
// get all available images
|
// get all available images
|
||||||
$indexer = new fs_filelister(IMAGES_DIR);
|
$indexer = new fs_filelister(IMAGES_DIR);
|
||||||
$imageslist = $indexer->getList();
|
$imageslist = $indexer->getList();
|
||||||
|
// sort by name
|
||||||
|
sort($imageslist);
|
||||||
array_unshift($imageslist, '--');
|
array_unshift($imageslist, '--');
|
||||||
$_FP_SMARTY->assign('images_list', $imageslist);
|
$_FP_SMARTY->assign('images_list', $imageslist);
|
||||||
// get all available attachements
|
// get all available attachements
|
||||||
$indexer = new fs_filelister(ATTACHS_DIR);
|
$indexer = new fs_filelister(ATTACHS_DIR);
|
||||||
$attachslist = $indexer->getList();
|
$attachslist = $indexer->getList();
|
||||||
|
// sort by name
|
||||||
|
sort($attachslist);
|
||||||
array_unshift($attachslist, '--');
|
array_unshift($attachslist, '--');
|
||||||
$_FP_SMARTY->assign('attachs_list', $attachslist);
|
$_FP_SMARTY->assign('attachs_list', $attachslist);
|
||||||
// DMKE: does not work
|
// DMKE: does not work
|
||||||
|
24
login.php
24
login.php
@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
require (SMARTY_DIR . 'SmartyValidate.class.php');
|
require (SMARTY_DIR . 'SmartyValidate.class.php');
|
||||||
|
|
||||||
|
|
||||||
$tpl = 'default.tpl';
|
$tpl = 'default.tpl';
|
||||||
|
|
||||||
function login_validate() {
|
function login_validate() {
|
||||||
@ -36,7 +35,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function main() {
|
function main() {
|
||||||
@ -48,41 +46,34 @@
|
|||||||
user_logout();
|
user_logout();
|
||||||
|
|
||||||
function myredirect() {
|
function myredirect() {
|
||||||
login_redirect('index.php');
|
// login_redirect('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('wp_head', 'myredirect');
|
add_filter('wp_head', 'myredirect');
|
||||||
|
|
||||||
$content = (SHARED_TPLS . 'login.tpl');
|
$content = (SHARED_TPLS . 'login.tpl');
|
||||||
|
|
||||||
} elseif (user_loggedin()) {
|
} elseif (user_loggedin()) {
|
||||||
|
|
||||||
function myredirect() {
|
function myredirect() {
|
||||||
login_redirect('index.php');
|
login_redirect('admin.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('wp_head', 'myredirect');
|
add_filter('wp_head', 'myredirect');
|
||||||
|
|
||||||
$content = (SHARED_TPLS . 'login_success.tpl');
|
$content = (SHARED_TPLS . 'login_success.tpl');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
utils_redirect();
|
utils_redirect();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} elseif (sess_remove('logout_done')) {
|
} elseif (sess_remove('logout_done')) {
|
||||||
|
|
||||||
function myredirect() {
|
function myredirect() {
|
||||||
login_redirect('index.php');
|
// login_redirect('.');
|
||||||
}
|
}
|
||||||
|
|
||||||
add_filter('wp_head', 'myredirect');
|
add_filter('wp_head', 'myredirect');
|
||||||
|
|
||||||
$content = (SHARED_TPLS . 'login_success.tpl');
|
$content = (SHARED_TPLS . 'login_success.tpl');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} elseif (empty($_POST)) {
|
} elseif (empty($_POST)) {
|
||||||
$content = (SHARED_TPLS . 'login.tpl');
|
$content = (SHARED_TPLS . 'login.tpl');
|
||||||
} else {
|
} else {
|
||||||
@ -102,13 +93,9 @@
|
|||||||
|
|
||||||
$smarty->assign('subject', $lang ['login'] ['head']);
|
$smarty->assign('subject', $lang ['login'] ['head']);
|
||||||
$smarty->assign('content', $content);
|
$smarty->assign('content', $content);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function login_redirect($url, $secs = 0) {
|
||||||
|
|
||||||
|
|
||||||
function login_redirect($url, $secs=5){
|
|
||||||
echo '<meta http-equiv="refresh" content="' . "$secs;url=$url" . '" />';
|
echo '<meta http-equiv="refresh" content="' . "$secs;url=$url" . '" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -119,12 +106,9 @@
|
|||||||
|
|
||||||
add_filter('wp_title', 'login_title', 10, 2);
|
add_filter('wp_title', 'login_title', 10, 2);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
system_init();
|
system_init();
|
||||||
main();
|
main();
|
||||||
theme_init($smarty);
|
theme_init($smarty);
|
||||||
$smarty->display('default.tpl');
|
$smarty->display('default.tpl');
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user