Commit 3e7d5ec5 authored by sept_7's avatar sept_7

[FIX] Notices both in PHP and Smarty

parent 3ad384bf
......@@ -302,6 +302,7 @@ class HeaderLib
}
function output_js_config($wrap = true) {
$back = null;
if (count($this->js_config)) {
ksort($this->js_config);
$back = "\n<!-- js_config before loading JSfile -->\n";
......@@ -619,7 +620,7 @@ class HeaderLib
private function process_themegen_files($files) {
global $prefs, $tikidomainslash, $in_installer;
if (empty($in_installer) && $prefs['themegenerator_feature'] === 'y' && !empty($prefs['themegenerator_theme'])) {
if (empty($in_installer) && isset($prefs['themegenerator_feature']) && $prefs['themegenerator_feature'] === 'y' && !empty($prefs['themegenerator_theme'])) {
global $themegenlib; include_once 'lib/themegenlib.php';
$data = $themegenlib->getCurrentTheme()->getData();
......
......@@ -40,7 +40,7 @@ function smarty_function_html_body_attributes($params, &$smarty) {
$class .= 'fullscreen';
}
if ($prefs['layout_add_body_group_class'] === 'y') {
if (isset($prefs['layout_add_body_group_class']) && $prefs['layout_add_body_group_class'] === 'y') {
if (empty($user)) {
$class .= ' grp_Anonymous';
} else if (TikiLib::lib('user')->user_is_in_group($user, 'Registered')) {
......
......@@ -7,9 +7,8 @@
</div>
<div id="sitetitles" class="floatleft">
<div id="sitetitle">
<a href="./"{if isset($prefs.mobile_mode) && $prefs.mobile_mode eq "y"} rel="external"{/if}>{$prefs.sitetitle}</a>
</div>
<div id="sitesubtitle">{$prefs.sitesubtitle}
<a href="./"{if isset($prefs.mobile_mode) && $prefs.mobile_mode eq "y"} rel="external"{/if}>{if !empty($prefs.sitetitle)}{$prefs.sitetitle}{/if}</a>
</div>
<div id="sitesubtitle">{if !empty($prefs.sitesubtitle)}{$prefs.sitesubtitle}{/if}</div>
</div>
{/tikimodule}
\ No newline at end of file
{/tikimodule}
......@@ -5,7 +5,7 @@
{assign var=thispage value=$page|escape:"url"}
{capture assign=page_bar}
{if $prefs.user_favorites eq 'y' and $user}
{if !empty($user) and !empty($prefs.user_favorites) and $prefs.user_favorites eq 'y' and $user}
{button _keepall='y' _class="favorite-toggle" href="tiki-ajax_services.php" controller="favorite" action="toggle" type="wiki+page" object=$thispage _text="{tr}Toggle Favorite{/tr}"}
{/if}
......
......@@ -65,10 +65,10 @@
{if $prefs.feature_tell_a_friend eq 'y' && $tiki_p_tell_a_friend eq 'y'}
<a title="{tr}Send a link{/tr}" href="tiki-tell_a_friend.php?url={$smarty.server.REQUEST_URI|escape:'url'}">{icon _id='email_link' alt="{tr}Send a link{/tr}"}</a>
{/if}
{if $user and $prefs.feature_notepad eq 'y' and $tiki_p_notepad eq 'y'}
{if !empty($user) and $prefs.feature_notepad eq 'y' and $tiki_p_notepad eq 'y'}
<a title="{tr}Save to notepad{/tr}" href="tiki-index.php?page={$page|escape:"url"}&amp;savenotepad=1{if !empty($page_ref_id)}&amp;page_ref_id={$page_ref_id}{/if}">{icon _id='disk' alt="{tr}Save to notepad{/tr}"}</a>
{/if}
{if $user and $prefs.feature_user_watches eq 'y'}
{if !empty($user) and $prefs.feature_user_watches eq 'y'}
{if $user_watching_page eq 'n'}
<a href="tiki-index.php?page={$page|escape:"url"}&amp;watch_event=wiki_page_changed&amp;watch_object={$page|escape:"url"}&amp;watch_action=add{if $structure eq 'y'}&amp;structure={$home_info.pageName|escape:'url'}{/if}" class="icon">{icon _id='eye' alt="{tr}Page is NOT being monitored. Click icon to START monitoring.{/tr}"}</a>
{else}
......
......@@ -177,7 +177,7 @@
</div> {* -- END of fixedwidth -- *}
{include file='footer.tpl'}
{if $prefs.socialnetworks_user_firstlogin == 'y'}
{if isset($prefs.socialnetworks_user_firstlogin) && $prefs.socialnetworks_user_firstlogin == 'y'}
{include file='tiki-socialnetworks_firstlogin_launcher.tpl'}
{/if}
......
......@@ -328,7 +328,7 @@ if ($prefs['javascript_enabled'] != 'n') {
}
// include and setup themegen editor if already open
if ($tiki_p_admin === 'y' && $prefs['themegenerator_feature'] === 'y' && !empty($_COOKIE['themegen']) &&
if (! empty($tiki_p_admin) && $tiki_p_admin === 'y' && !empty($prefs['themegenerator_feature']) && $prefs['themegenerator_feature'] === 'y' && !empty($_COOKIE['themegen']) &&
(strpos($_SERVER['SCRIPT_NAME'], 'tiki-admin.php') === false || strpos($_SERVER['QUERY_STRING'], 'page=look') === false)) {
include_once 'lib/themegenlib.php';
$themegenlib->setupEditor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment