Merge remote-tracking branch 'origin/0.9.31'
This commit is contained in:
@@ -26,9 +26,7 @@ Database::needSqlData();
|
|||||||
$sql_root = Database::getSqlData();
|
$sql_root = Database::getSqlData();
|
||||||
Database::needRoot(false);
|
Database::needRoot(false);
|
||||||
|
|
||||||
if (($page == 'settings' || $page == 'overview')
|
if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
|
||||||
&& $userinfo['change_serversettings'] == '1'
|
|
||||||
) {
|
|
||||||
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
$settings_data = loadConfigArrayDir('./actions/admin/settings/');
|
||||||
$settings = loadSettings($settings_data);
|
$settings = loadSettings($settings_data);
|
||||||
|
|
||||||
|
|||||||
@@ -26,53 +26,44 @@
|
|||||||
* @author Florian Lippert <flo@syscp.org>
|
* @author Florian Lippert <flo@syscp.org>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
function buildNavigation($navigation, $userinfo)
|
function buildNavigation($navigation, $userinfo) {
|
||||||
{
|
|
||||||
global $theme;
|
global $theme;
|
||||||
|
|
||||||
$returnvalue = '';
|
$returnvalue = '';
|
||||||
|
|
||||||
foreach($navigation as $box)
|
foreach($navigation as $box) {
|
||||||
{
|
if ((!isset($box['show_element']) || $box['show_element'] === true) &&
|
||||||
if((!isset($box['show_element']) || $box['show_element'] === true) &&
|
(!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1')))) {
|
||||||
(!isset($box['required_resources']) || $box['required_resources'] == '' || (isset($userinfo[$box['required_resources']]) && ((int)$userinfo[$box['required_resources']] > 0 || $userinfo[$box['required_resources']] == '-1'))))
|
|
||||||
{
|
|
||||||
$navigation_links = '';
|
$navigation_links = '';
|
||||||
foreach($box['elements'] as $element_id => $element)
|
foreach ($box['elements'] as $element_id => $element) {
|
||||||
{
|
if ((!isset($element['show_element']) || $element['show_element'] === true) &&
|
||||||
if((!isset($element['show_element']) || $element['show_element'] === true) &&
|
(!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1')))) {
|
||||||
(!isset($element['required_resources']) || $element['required_resources'] == '' || (isset($userinfo[$element['required_resources']]) && ((int)$userinfo[$element['required_resources']] > 0 || $userinfo[$element['required_resources']] == '-1'))))
|
if (isset($element['url']) && trim($element['url']) != '') {
|
||||||
{
|
|
||||||
if(isset($element['url']) && trim($element['url']) != '')
|
|
||||||
{
|
|
||||||
// append sid only to local
|
// append sid only to local
|
||||||
|
|
||||||
if(!preg_match('/^https?\:\/\//', $element['url'])
|
if (!preg_match('/^https?\:\/\//', $element['url'])
|
||||||
&& (isset($userinfo['hash']) && $userinfo['hash'] != ''))
|
&& (isset($userinfo['hash']) && $userinfo['hash'] != '')) {
|
||||||
{
|
|
||||||
// generate sid with ? oder &
|
// generate sid with ? oder &
|
||||||
|
|
||||||
if(strpos($element['url'], '?') !== false)
|
if (strpos($element['url'], '?') !== false) {
|
||||||
{
|
|
||||||
$element['url'].= '&s=' . $userinfo['hash'];
|
$element['url'].= '&s=' . $userinfo['hash'];
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$element['url'].= '?s=' . $userinfo['hash'];
|
$element['url'].= '?s=' . $userinfo['hash'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = '';
|
$target = '';
|
||||||
|
if (isset($element['new_window']) && $element['new_window'] == true) {
|
||||||
if(isset($element['new_window']) && $element['new_window'] == true)
|
|
||||||
{
|
|
||||||
$target = ' target="_blank"';
|
$target = ' target="_blank"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$completeLink = '<a href="' . htmlspecialchars($element['url']) . '"' . $target . ' class="menu">' . $element['label'] . '</a>';
|
$active = '';
|
||||||
}
|
if (isset($_GET['page']) && substr_count($element['url'], "page=" . $_GET['page']) > 0 && substr_count($element['url'], basename($_SERVER["SCRIPT_FILENAME"])) > 0) {
|
||||||
else
|
$active = ' active';
|
||||||
{
|
}
|
||||||
|
|
||||||
|
$completeLink = '<a href="' . htmlspecialchars($element['url']) . '"' . $target . ' class="menu' . $active . '">' . $element['label'] . '</a>';
|
||||||
|
} else {
|
||||||
$completeLink = $element['label'];
|
$completeLink = $element['label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,38 +71,27 @@ function buildNavigation($navigation, $userinfo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($navigation_links != '')
|
if ($navigation_links != '') {
|
||||||
{
|
if (isset($box['url']) && trim($box['url']) != '') {
|
||||||
if(isset($box['url']) && trim($box['url']) != '')
|
|
||||||
{
|
|
||||||
// append sid only to local
|
// append sid only to local
|
||||||
|
|
||||||
if(!preg_match('/^https?\:\/\//', $box['url'])
|
if (!preg_match('/^https?\:\/\//', $box['url']) && (isset($userinfo['hash']) && $userinfo['hash'] != '')) {
|
||||||
&& (isset($userinfo['hash']) && $userinfo['hash'] != ''))
|
|
||||||
{
|
|
||||||
// generate sid with ? oder &
|
// generate sid with ? oder &
|
||||||
|
|
||||||
if(strpos($box['url'], '?') !== false)
|
if (strpos($box['url'], '?') !== false) {
|
||||||
{
|
|
||||||
$box['url'].= '&s=' . $userinfo['hash'];
|
$box['url'].= '&s=' . $userinfo['hash'];
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$box['url'].= '?s=' . $userinfo['hash'];
|
$box['url'].= '?s=' . $userinfo['hash'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = '';
|
$target = '';
|
||||||
|
if (isset($box['new_window']) && $box['new_window'] == true) {
|
||||||
if(isset($box['new_window']) && $box['new_window'] == true)
|
|
||||||
{
|
|
||||||
$target = ' target="_blank"';
|
$target = ' target="_blank"';
|
||||||
}
|
}
|
||||||
|
|
||||||
$completeLink = '<a href="' . htmlspecialchars($box['url']) . '"' . $target . ' class="menu">' . $box['label'] . '</a>';
|
$completeLink = '<a href="' . htmlspecialchars($box['url']) . '"' . $target . ' class="menu">' . $box['label'] . '</a>';
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
$completeLink = $box['label'];
|
$completeLink = $box['label'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -206,7 +206,7 @@ return array (
|
|||||||
'required_resources' => 'change_serversettings',
|
'required_resources' => 'change_serversettings',
|
||||||
),
|
),
|
||||||
array (
|
array (
|
||||||
'url' => 'admin_settings.php?page=settings',
|
'url' => 'admin_settings.php?page=overview',
|
||||||
'label' => $lng['admin']['serversettings'],
|
'label' => $lng['admin']['serversettings'],
|
||||||
'required_resources' => 'change_serversettings',
|
'required_resources' => 'change_serversettings',
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -395,6 +395,10 @@ a:hover {
|
|||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.infotext {
|
.infotext {
|
||||||
font-size: 11px;
|
font-size: 11px;
|
||||||
}
|
}
|
||||||
|
|||||||
4
templates/Sparkle/assets/css/main.css
vendored
4
templates/Sparkle/assets/css/main.css
vendored
@@ -488,6 +488,10 @@ a:hover {
|
|||||||
text-decoration:underline;
|
text-decoration:underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a.active {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
.infotext {
|
.infotext {
|
||||||
font-size:11px;
|
font-size:11px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user