Implementing the whole template system using Smarty. This commit includes movements of ROOT/js, ROOT/images, etc. to theme specific directories like templates/<THEME>/. If you are attemping to use your own templates you won't need to modify Froxlor's core files. This commit may require additional work.

Signed-off-by: Arnold Bechtoldt <mail@arnoldbechtoldt.com>
This commit is contained in:
Arnold Bechtoldt
2012-08-14 23:08:25 +02:00
parent 6d0d1ae015
commit 601bf68d09
618 changed files with 15381 additions and 643 deletions

View File

@@ -62,7 +62,7 @@ class ApsParser
private function ManageInstances()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Question = false;
//dont do anything if there is no instance
@@ -170,7 +170,7 @@ class ApsParser
//create table with contents based on instance status
if($Question != true)
{
global $settings;
global $settings, $theme;
$Instances = '';
if((int)$this->userinfo['customers_see_all'] == 1)
@@ -317,7 +317,7 @@ class ApsParser
private function ManagePackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Question = false;
if(isset($_POST['save']))
@@ -611,7 +611,7 @@ class ApsParser
private function UploadNewPackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
//define how many files can be uploaded at once
@@ -724,7 +724,7 @@ class ApsParser
private function SearchPackages()
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Error = 0;
$Ids = array();
$ShowAll = 0;
@@ -852,7 +852,7 @@ class ApsParser
private function CustomerStatus($CustomerId)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -877,7 +877,7 @@ class ApsParser
//skip if parse of xml has failed
if($Xml == false)continue;
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/assets/img/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -1033,7 +1033,7 @@ class ApsParser
private function CreatePackageInstance($PackageId, $CustomerId)
{
global $lng;
global $lng, $theme;
if(!self::IsValidPackageId($PackageId, true))return false;
@@ -1141,7 +1141,7 @@ class ApsParser
private function CheckException($Category, $Item, $Value)
{
global $settings;
global $settings, $theme;
//search for element within system settings
@@ -1164,7 +1164,7 @@ class ApsParser
private function CheckSubmappings($ParentMapping, $Url)
{
global $lng;
global $lng, $theme;
$Error = array();
//check for special PHP handler extensions
@@ -1243,7 +1243,7 @@ class ApsParser
private function InstallNewPackage($Filename)
{
global $lng, $userinfo;
global $lng, $userinfo, $theme;
if(file_exists($Filename)
&& $Xml = self::GetXmlFromZip($Filename))
@@ -1726,7 +1726,7 @@ class ApsParser
public function MainHandler($Action)
{
global $lng, $filename, $s, $page, $action, $Id, $userinfo;
global $lng, $filename, $s, $page, $action, $Id, $userinfo, $theme;
//check for basic functions, classes and permissions
@@ -2810,7 +2810,7 @@ class ApsParser
private function ShowPackageInstaller($PackageId, $WrongData, $CustomerId)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -2838,7 +2838,7 @@ class ApsParser
//icon for package
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/img/default.png';
if($this->aps_version != '1.0')
{
@@ -3231,7 +3231,7 @@ class ApsParser
private function ShowPackageInfo($PackageId, $All = false)
{
global $lng, $filename, $s, $page, $action, $userinfo;
global $lng, $filename, $s, $page, $action, $userinfo, $theme;
$Data = '';
$Fieldname = '';
$Fieldvalue = '';
@@ -3245,7 +3245,7 @@ class ApsParser
//return if parse of xml file has failed
if($Xml == false)return false;
$Icon = './images/Classic/default.png';
$Icon = 'templates/'.$theme.'/img/default.png';
$this->aps_version = isset($Xml->attributes()->version) ? (string)$Xml->attributes()->version : '1.0';
@@ -3460,7 +3460,7 @@ class ApsParser
*/
private function InfoBox($Message, $Type = 0)
{
global $lng, $filename, $s, $page, $action;
global $lng, $filename, $s, $page, $action, $theme;
//shows a box with informations
eval("echo \"" . getTemplate("aps/infobox") . "\";");
}

View File

@@ -189,7 +189,7 @@ class db
function query($query_str, $unbuffered = false, $suppress_error = false)
{
global $numbqueries;
global $numbqueries, $theme;
if (!mysql_ping($this->link_id))
{
@@ -349,7 +349,7 @@ class db
function showerror($errormsg, $mysqlActive = true)
{
global $filename;
global $filename, $theme;
$text = 'MySQL - Error: ' . str_replace("\n", "\t", $errormsg);
if($mysqlActive)

View File

@@ -26,7 +26,7 @@ class htmlform
public static function genHTMLForm($data = array())
{
global $lng;
global $lng, $theme;
$nob = false;
self::$_form = '';

View File

@@ -421,6 +421,8 @@ class paging
function getHtmlArrowCode($baseurl, $field = '')
{
global $theme;
if($field != ''
&& isset($this->fields[$field]))
{

View File

@@ -260,7 +260,7 @@ class ticket
public function sendMail($customerid = - 1, $template_subject = null, $default_subject = null, $template_body = null, $default_body = null)
{
global $mail;
global $mail, $theme;
// Some checks are to be made here in the future
@@ -680,13 +680,13 @@ class ticket
private function convertLatin1ToHtml($str)
{
$html_entities = array (
"<EFBFBD>" => "&Auml;",
"<EFBFBD>" => "&auml;",
"<EFBFBD>" => "&Ouml;",
"<EFBFBD>" => "&ouml;",
"<EFBFBD>" => "&Uuml;",
"<EFBFBD>" => "&uuml;",
"<EFBFBD>" => "&szlig;"
"Ä" => "&Auml;",
"ä" => "&auml;",
"Ö" => "&Ouml;",
"ö" => "&ouml;",
"Ü" => "&Uuml;",
"ü" => "&uuml;",
"ß" => "&szlig;"
/*
* @TODO continue this table for all the special-characters
*/

View File

@@ -44,7 +44,7 @@ function includeFunctions($dirname)
function __autoload($classname)
{
global $libdirname;
global $libdirname, $theme;
findIncludeClass($libdirname . '/classes/', $classname);
}

View File

@@ -28,7 +28,7 @@
*/
function domainHasApsInstances($domainid = 0)
{
global $db, $settings;
global $db, $settings, $theme;
if($settings['aps']['aps_active'] == '1')
{

View File

@@ -19,7 +19,7 @@
function correctMysqlUsers($mysql_access_host_array)
{
global $db, $settings, $sql, $sql_root;
global $db, $settings, $sql, $sql_root, $theme;
foreach($sql_root as $mysql_server => $mysql_server_details)
{

View File

@@ -24,7 +24,7 @@
*/
function maildirExists($result = null)
{
global $settings;
global $settings, $theme;
if(is_array($result))
{

View File

@@ -26,7 +26,7 @@
*/
function makeChownWithNewStats($row)
{
global $settings;
global $settings, $theme;
// get correct user
if($settings['system']['mod_fcgid'] == '1' && isset($row['deactivated']) && $row['deactivated'] == '0')

View File

@@ -34,7 +34,7 @@
function makePathfield($path, $uid, $gid, $fieldType, $value = '', $dom = false)
{
global $lng;
global $lng, $theme;
$value = str_replace($path, '', $value);
$field = array();

View File

@@ -33,7 +33,7 @@
function safe_exec($exec_string, &$return_value = false)
{
global $settings;
global $settings, $theme;
//
// define allowed system commands

View File

@@ -27,7 +27,7 @@
*/
function storeDefaultIndex($loginname = null, $destination = null, $logger = null, $force = false)
{
global $db, $settings, $pathtophpfiles;
global $db, $settings, $pathtophpfiles, $theme;
if ($force
|| (int)$settings['system']['store_index_file_subs'] == 1

View File

@@ -17,7 +17,7 @@
function buildFormEx($form, $part = '')
{
global $settings;
global $settings, $theme;
$fields = '';
if(validateFormDefinition($form))

View File

@@ -19,7 +19,7 @@
function getFormFieldOutput($fieldname, $fielddata)
{
global $settings;
global $settings, $theme;
$returnvalue = '';
if(is_array($fielddata) && isset($fielddata['type']) && $fielddata['type'] != '' && function_exists('getFormFieldOutput' . ucfirst($fielddata['type'])))

View File

@@ -19,14 +19,14 @@
function getFormGroupOutput($groupname, $groupdetails)
{
global $lng;
global $lng, $theme;
eval("\$group = \"" . getTemplate("settings/settings_group") . "\";");
return $group;
}
function getFormOverviewGroupOutput($groupname, $groupdetails)
{
global $lng, $settings, $filename, $s;
global $lng, $settings, $filename, $s, $theme;
$group = '';
$title = $groupdetails['title'];

View File

@@ -26,7 +26,7 @@
*/
function correctErrorDocument($errdoc = null)
{
global $settings, $idna_convert;
global $settings, $idna_convert, $theme;
if($errdoc !== null && $errdoc != '')
{

View File

@@ -24,7 +24,7 @@
*/
function getNextCronjobs()
{
global $db;
global $db, $theme;
$query = "SELECT `id`, `cronfile` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `interval` <> '0' AND `isactive` = '1' AND (";
@@ -60,7 +60,7 @@ function getNextCronjobs()
function includeCronjobs($debugHandler, $pathtophpfiles)
{
global $settings;
global $settings, $theme;
$cronjobs = getNextCronjobs();
@@ -84,7 +84,7 @@ function includeCronjobs($debugHandler, $pathtophpfiles)
function getIntervalOptions()
{
global $db, $lng, $cronlog;
global $db, $lng, $cronlog, $theme;
$query = "SELECT DISTINCT `interval` FROM `" . TABLE_PANEL_CRONRUNS . "` ORDER BY `interval` ASC;";
$result = $db->query($query);
@@ -110,7 +110,7 @@ function getIntervalOptions()
function getCronjobsLastRun()
{
global $db, $lng;
global $db, $lng, $theme;
$query = "SELECT `lastrun`, `desc_lng_key` FROM `".TABLE_PANEL_CRONRUNS."` WHERE `isactive` = '1' ORDER BY `cronfile` ASC";
$result = $db->query($query);
@@ -135,7 +135,7 @@ function getCronjobsLastRun()
function toggleCronStatus($module = null, $isactive = 0)
{
global $db;
global $db, $theme;
if($isactive != 1) {
$isactive = 0;
@@ -148,7 +148,7 @@ function toggleCronStatus($module = null, $isactive = 0)
function getOutstandingTasks()
{
global $db, $lng;
global $db, $lng, $theme;
$query = "SELECT * FROM `".TABLE_PANEL_TASKS."` ORDER BY `type` ASC";
$result = $db->query($query);

View File

@@ -29,7 +29,7 @@
function createAWStatsConf($logFile, $siteDomain, $hostAliases, $customerDocroot, $awstats_params = array())
{
global $pathtophpfiles, $settings;
global $pathtophpfiles, $settings, $theme;
// Generation header

View File

@@ -27,7 +27,7 @@
*/
function customerHasPerlEnabled($cid = 0)
{
global $db;
global $db, $theme;
if($cid > 0)
{

View File

@@ -25,7 +25,7 @@
*/
function domainHasMainSubDomains($id = 0)
{
global $db;
global $db, $theme;
$sql = "SELECT COUNT(`id`) as `mainsubs` FROM `".TABLE_PANEL_DOMAINS."` WHERE `ismainbutsubto` = '".(int)$id."'";
$result = $db->query_first($sql);
@@ -47,7 +47,7 @@ function domainHasMainSubDomains($id = 0)
*/
function domainMainToSubExists($id = 0)
{
global $db;
global $db, $theme;
$sql = "SELECT `id` FROM `".TABLE_PANEL_DOMAINS."` WHERE `id` = '".(int)$id."'";
$result = $db->query_first($sql);

View File

@@ -21,7 +21,7 @@
function generatePassword()
{
global $db, $settings;
global $db, $settings, $theme;
return substr(md5(uniqid(microtime(), 1)), 24, 10);
}

View File

@@ -19,7 +19,7 @@
function getAdmins($limit_resource = '')
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -19,7 +19,7 @@
function getCustomerDetail($customerid, $varname)
{
global $db;
global $db, $theme;
$query = 'SELECT `' . $db->escape($varname) . '` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `customerid` = \'' . (int)$customerid . '\'';
$customer = $db->query_first($query);

View File

@@ -9,10 +9,10 @@
*/
function getCustomerIdByDomain($domain = null)
{
global $db;
global $db, $theme;
$result = $db->query_first("SELECT `customerid` FROM `" . TABLE_PANEL_DOMAINS . "` WHERE `domain` = '".$domain."'");
if(is_array($result)
if(is_array($result)
&& isset($result['customerid'])
) {
return $result['customerid'];

View File

@@ -19,7 +19,7 @@
function getCustomers($limit_resource = '')
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -17,7 +17,7 @@
function getFilesystemQuota()
{
global $settings;
global $settings, $theme;
if ($settings['system']['diskquota_enabled'])
{
# Fetch all quota in the desired partition

View File

@@ -19,7 +19,7 @@
function getIpAddresses()
{
global $db;
global $db, $theme;
$query = 'SELECT `id`, `ip`, `port` FROM `' . TABLE_PANEL_IPSANDPORTS . '` ORDER BY `ip` ASC, `port` ASC';
$result = $db->query($query);

View File

@@ -19,7 +19,7 @@
function getIpPortCombinations($ssl = null)
{
global $db;
global $db, $theme;
$additional_conditions = '';
$additional_conditions_array = array();

View File

@@ -19,7 +19,7 @@
function getLanguages()
{
global $db;
global $db, $theme;
$query = 'SELECT * FROM `' . TABLE_PANEL_LANGUAGE . '` ';
$result = $db->query($query);

View File

@@ -9,10 +9,10 @@
*/
function getLoginNameByUid($uid = null)
{
global $db;
global $db, $theme;
$result = $db->query_first("SELECT `loginname` FROM `" . TABLE_PANEL_CUSTOMERS . "` WHERE `guid` = '".(int)$uid."'");
if(is_array($result)
if(is_array($result)
&& isset($result['loginname'])
) {
return $result['loginname'];

View File

@@ -22,7 +22,7 @@
*/
function getPhpConfigs()
{
global $db;
global $db, $theme;
$query = 'SELECT * FROM `' . TABLE_PANEL_PHPCONFIGS . '` ';
$result = $db->query($query, false, true);

View File

@@ -25,10 +25,10 @@
*/
function getServerId() {
global $server_id;
global $server_id, $theme;
if(isset($server_id)
&& is_numeric($server_id)
if(isset($server_id)
&& is_numeric($server_id)
&& $server_id > 0
) {
return $server_id;

View File

@@ -19,7 +19,7 @@
function getSessionUserDetail($varname)
{
global $userinfo;
global $userinfo, $theme;
if(isset($userinfo[$varname]))
{

View File

@@ -29,7 +29,7 @@
function inserttask($type, $param1 = '', $param2 = '', $param3 = '', $param4 = '')
{
global $db, $settings;
global $db, $settings, $theme;
if($type == '1'
|| $type == '3'

View File

@@ -26,7 +26,7 @@
*/
function isCustomerStdSubdomain($did = 0)
{
global $db;
global $db, $theme;
if($did > 0)
{

View File

@@ -20,7 +20,7 @@
function loadConfigArrayDir()
{
// Workaround until we use gettext
global $lng;
global $lng, $theme;
// we now use dynamic function parameters
// so we can read from more than one directory

View File

@@ -28,7 +28,7 @@
*/
function openRootDB($debugHandler = false, $lockfile = false)
{
global $db_root;
global $db_root, $theme;
require dirname(dirname(dirname(__FILE__))).'/userdata.inc.php';
@@ -68,6 +68,6 @@ function openRootDB($debugHandler = false, $lockfile = false)
function closeRootDB()
{
global $db_root;
global $db_root, $theme;
if(isset($db_root)) unset($db_root);
}

View File

@@ -28,7 +28,7 @@
function updateCounters($returndebuginfo = false)
{
global $db;
global $db, $theme;
$returnval = array();
if($returndebuginfo === true)

View File

@@ -27,7 +27,7 @@
*/
function updateToVersion($new_version = null)
{
global $db, $settings;
global $db, $settings, $theme;
if($new_version !== null && $new_version != '')
{
@@ -48,7 +48,7 @@ function updateToVersion($new_version = null)
*/
function isFroxlor()
{
global $settings;
global $settings, $theme;
if(isset($settings['panel']['frontend'])
&& $settings['panel']['frontend'] == 'froxlor')
@@ -70,7 +70,7 @@ function isFroxlor()
*/
function isFroxlorVersion($to_check = null)
{
global $settings;
global $settings, $theme;
if($settings['panel']['frontend'] == 'froxlor'
&& $settings['panel']['version'] == $to_check)
@@ -92,7 +92,7 @@ function isFroxlorVersion($to_check = null)
*/
function hasUpdates($to_check = null)
{
global $settings;
global $settings, $theme;
if(!isset($settings['panel']['version'])
|| $settings['panel']['version'] != $to_check)
@@ -115,7 +115,7 @@ function hasUpdates($to_check = null)
*/
function showUpdateStep($task = null, $needs_status = true)
{
global $updatelog, $filelog;
global $updatelog, $filelog, $theme;
// output
echo $task;
@@ -141,7 +141,7 @@ function showUpdateStep($task = null, $needs_status = true)
*/
function lastStepStatus($status = -1, $message = '')
{
global $updatelog, $filelog;
global $updatelog, $filelog, $theme;
switch($status)
{

View File

@@ -22,7 +22,7 @@
*/
function getRedirectCodesArray()
{
global $db;
global $db, $theme;
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
$result = $db->query($sql);
@@ -44,7 +44,7 @@ function getRedirectCodesArray()
*/
function getRedirectCodes()
{
global $db, $lng;
global $db, $lng, $theme;
$sql = "SELECT * FROM `".TABLE_PANEL_REDIRECTCODES."` WHERE `enabled` = '1' ORDER BY `id` ASC";
$result = $db->query($sql);
@@ -68,7 +68,7 @@ function getRedirectCodes()
*/
function getDomainRedirectCode($domainid = 0)
{
global $db;
global $db, $theme;
$code = '';
if($domainid > 0)
@@ -98,7 +98,7 @@ function getDomainRedirectCode($domainid = 0)
*/
function getDomainRedirectId($domainid = 0)
{
global $db;
global $db, $theme;
$code = 1;
if($domainid > 0)
@@ -128,10 +128,10 @@ function getDomainRedirectId($domainid = 0)
*/
function addRedirectToDomain($domainid = 0, $redirect = 1)
{
global $db;
global $db, $theme;
if($domainid > 0)
{
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
}
}
@@ -147,7 +147,7 @@ function addRedirectToDomain($domainid = 0, $redirect = 1)
*/
function updateRedirectOfDomain($domainid = 0, $redirect = false)
{
global $db;
global $db, $theme;
if($redirect == false)
{
@@ -158,7 +158,7 @@ function updateRedirectOfDomain($domainid = 0, $redirect = false)
{
$db->query("DELETE FROM `".TABLE_PANEL_DOMAINREDIRECTS."`
WHERE `did` = '".(int)$domainid."'");
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
$db->query("INSERT INTO `".TABLE_PANEL_DOMAINREDIRECTS."`
SET `rid` = '".(int)$redirect."', `did` = '".(int)$domainid."'");
}
}
}

View File

@@ -34,7 +34,7 @@
function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_nr = 1)
{
global $userinfo, $db, $s, $header, $footer, $lng;
global $userinfo, $db, $s, $header, $footer, $lng, $theme;
$hiddenparams = '';
@@ -58,7 +58,7 @@ function ask_yesno($text, $yesfile, $params = array(), $targetname = '', $back_n
function ask_yesno_withcheckbox($text, $chk_text, $yesfile, $params = array(), $targetname = '', $show_checkbox = true)
{
global $userinfo, $db, $s, $header, $footer, $lng;
global $userinfo, $db, $s, $header, $footer, $lng, $theme;
$hiddenparams = '';

View File

@@ -32,7 +32,7 @@
function makeyesno($name, $yesvalue, $novalue = '', $yesselected = '', $disabled = false)
{
global $lng;
global $lng, $theme;
if($disabled) {
$d = ' disabled="disabled"';

View File

@@ -38,7 +38,7 @@
function redirectTo($destination, $get_variables = array(), $isRelative = false)
{
global $s;
global $s, $theme;
if(is_array($get_variables))
{

View File

@@ -28,7 +28,7 @@
function standard_error($errors = '', $replacer = '')
{
global $db, $userinfo, $s, $header, $footer, $lng;
global $db, $userinfo, $s, $header, $footer, $lng, $theme;
$_SESSION['requestData'] = $_POST;
$replacer = htmlentities($replacer);

View File

@@ -27,7 +27,7 @@
function standard_success($success_message = '', $replacer = '', $params = array())
{
global $s, $header, $footer, $lng;
global $s, $header, $footer, $lng, $theme;
if(isset($lng['success'][$success_message]))
{

View File

@@ -19,7 +19,7 @@
function getSetting($settinggroup, $varname)
{
global $settings;
global $settings, $theme;
if(isset($settings[$settinggroup]) && is_array($settings[$settinggroup]) && isset($settings[$settinggroup][$varname]))
{
return $settings[$settinggroup][$varname];

View File

@@ -19,7 +19,7 @@
function saveSetting($settinggroup, $varname, $newvalue)
{
global $db;
global $db, $theme;
$query = 'UPDATE `' . TABLE_PANEL_SETTINGS . '` SET `value` = \'' . $db->escape($newvalue) . '\' WHERE `settinggroup` = \'' . $db->escape($settinggroup) . '\' AND `varname`=\'' . $db->escape($varname) . '\'';
return $db->query($query);
}

View File

@@ -23,7 +23,7 @@ function storeSettingDefaultIp($fieldname, $fielddata, $newfieldvalue)
if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'defaultip')
{
global $db;
global $db, $theme;
$customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\'');
$ids = array();

View File

@@ -23,7 +23,7 @@ function storeSettingHostname($fieldname, $fielddata, $newfieldvalue)
if($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'hostname')
{
global $db, $idna_convert;
global $db, $idna_convert, $theme;
$newfieldvalue = $idna_convert->encode($newfieldvalue);
$customerstddomains_result = $db->query('SELECT `standardsubdomain` FROM `' . TABLE_PANEL_CUSTOMERS . '` WHERE `standardsubdomain` <> \'0\'');

View File

@@ -31,7 +31,7 @@
*/
function checkLastGuid()
{
global $log, $cronlog, $db, $settings;
global $log, $cronlog, $db, $settings, $theme;
$mylog = null;
if (isset($cronlog) && $cronlog instanceof FroxlorLogger) {

View File

@@ -17,7 +17,7 @@
function checkFcgidPhpFpm($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
global $settings;
global $settings, $theme;
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);

View File

@@ -17,7 +17,7 @@
function checkPathConflicts($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
global $settings;
global $settings, $theme;
if((int)$settings['system']['mod_fcgid'] == 1)
{
/**

View File

@@ -19,7 +19,7 @@
function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
global $settings;
global $settings, $theme;
if(!isset($allnewfieldvalues['customer_mysqlprefix']))
{
$allnewfieldvalues['customer_mysqlprefix'] = $settings['customer']['mysqlprefix'];

View File

@@ -17,7 +17,7 @@
function setCycleOfCronjob($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
global $settings, $db;
global $settings, $db, $theme;
switch($newfieldvalue)
{

View File

@@ -33,7 +33,7 @@
function validate($str, $fieldname, $pattern = '', $lng = '', $emptydefault = array())
{
global $log;
global $log, $theme;
if(!is_array($emptydefault))
{

View File

@@ -28,7 +28,7 @@
*/
function validatePassword($password = null)
{
global $settings;
global $settings, $theme;
if ($settings['panel']['password_min_length'] > 0) {
$password = validate(

View File

@@ -28,7 +28,7 @@
function validateUrl($url)
{
global $idna_convert;
global $idna_convert, $theme;
if(strtolower(substr($url, 0, 7)) != "http://"
&& strtolower(substr($url, 0, 8)) != "https://")

View File

@@ -363,8 +363,9 @@ if(isset($userinfo['theme']) && $userinfo['theme'] != $theme)
/*
* check for custom header-graphic
*/
$hl_path = 'images/'.$theme;
$hl_path = 'templates/'.$theme.'/assets/img';
$header_logo = $hl_path.'/logo.png';
if(file_exists($hl_path.'/logo_custom.png')) {
$header_logo = $hl_path.'/logo_custom.png';
}