A bunch of small changes from scrutinizer-ci; some tidying, some actual bug fixes

This commit is contained in:
Shish
2014-03-30 13:26:48 +01:00
parent db5aa56300
commit c8aa3327a1
31 changed files with 170 additions and 266 deletions

View File

@ -385,7 +385,13 @@ function make_http(/*string*/ $link) {
/**
* Make a form tag with relevant auth token and stuff
*
* @retval string
* @param target string
* @param method string
* @param multipart boolean
* @param form_id string
* @param onsubmit string
*
* @return string
*/
function make_form($target, $method="POST", $multipart=False, $form_id="", $onsubmit="") {
global $user;
@ -1276,6 +1282,7 @@ function _sanitise_environment() {
}
function _get_themelet_files($_theme) {
$base_themelets = array();
if(file_exists('themes/'.$_theme.'/custompage.class.php')) $base_themelets[] = 'themes/'.$_theme.'/custompage.class.php';
$base_themelets[] = 'themes/'.$_theme.'/layout.class.php';
$base_themelets[] = 'themes/'.$_theme.'/themelet.class.php';
@ -1406,7 +1413,7 @@ function _decaret($str) {
}
function _get_user() {
global $config, $database;
global $config;
$user = null;
if(get_prefixed_cookie("user") && get_prefixed_cookie("session")) {
$tmp_user = User::by_session(get_prefixed_cookie("user"), get_prefixed_cookie("session"));