Skip to content

Commit

Permalink
Cleanup of notices, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
jegelstaff committed Feb 11, 2025
1 parent e3680ca commit 7e95c3a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion libraries/icms/view/theme/Object.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function xoInit($options = array()) {
: ICMS_THEME_URL . '/' . $this->folderName . '/',
'icms_themecss'=> xoops_getcss($this->folderName),
'icms_requesturi' => htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES),
'icms_redirect' => htmlspecialchars(trim($_GET['xoops_redirect']), ENT_QUOTES),
'icms_redirect' => (isset($_GET['xoops_redirect']) ? htmlspecialchars(trim($_GET['xoops_redirect']), ENT_QUOTES) : ''),
'icms_sitename' => htmlspecialchars($icmsConfig['sitename'], ENT_QUOTES),
'icms_slogan' => htmlspecialchars($icmsConfig['slogan'], ENT_QUOTES),
'icms_dirname' => @$icmsModule ? $icmsModule->getVar('dirname') : 'system',
Expand Down
1 change: 1 addition & 0 deletions modules/formulize/class/forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function __construct($id_form="", $includeAllElements=false){
if(!is_numeric($id_form)) {
include XOOPS_ROOT_PATH.'/modules/formulize/class/formSetEmptyDefaults.php';
} else {
include XOOPS_ROOT_PATH.'/modules/formulize/class/formSetEmptyDefaults.php';
$formq = q("SELECT * FROM " . $xoopsDB->prefix("formulize_id") . " WHERE id_form=$id_form");
if(!isset($formq[0])) {
unset($formq);
Expand Down
9 changes: 5 additions & 4 deletions modules/formulize/include/readelements.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
$uid = $xoopsUser ? $xoopsUser->getVar('uid') : 0;
$uid = isset($GLOBALS['userprofile_uid']) ? $GLOBALS['userprofile_uid'] : $uid; // if the userprofile form is in play and a new user has been set, then use that uid

if(!$element_handler) {
if(!isset($element_handler) OR !$element_handler) {
$element_handler = xoops_getmodulehandler('elements', 'formulize');
}

Expand Down Expand Up @@ -397,9 +397,10 @@
synchExistingSubformEntries($overrideFrid);
synchSubformBlankDefaults();


foreach($notEntriesList['update_entry'] as $updateFid=>$updateEntries) {
$GLOBALS['formulize_snapshotRevisions'][$updateFid] = formulize_getCurrentRevisions($updateFid, $updateEntries);
if(isset($notEntriesList['update_entry'])) {
foreach($notEntriesList['update_entry'] as $updateFid=>$updateEntries) {
$GLOBALS['formulize_snapshotRevisions'][$updateFid] = formulize_getCurrentRevisions($updateFid, $updateEntries);
}
}

// update the derived values for all forms that we saved data for, now that we've saved all the data from all the forms
Expand Down
4 changes: 2 additions & 2 deletions modules/formulize/initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
$screen_handler =& xoops_getmodulehandler($thisscreen1->getVar('type').'Screen', 'formulize');
$screen = $screen_handler->get($sid); // get the full screen object

if($_POST['ventry'] AND $screen->getVar('type') == 'listOfEntries' AND $screen->getVar("viewentryscreen") != "none" AND $screen->getVar("viewentryscreen") AND !strstr($screen->getVar("viewentryscreen"), "p")) { // if the user is viewing an entry off a list, then check what screen gets used to display entries instead, since that's what we're doing (but only if there is a screen specified, and it's not a pageworks page)
if(isset($_POST['ventry']) AND $_POST['ventry'] AND $screen->getVar('type') == 'listOfEntries' AND $screen->getVar("viewentryscreen") != "none" AND $screen->getVar("viewentryscreen") AND !strstr($screen->getVar("viewentryscreen"), "p")) { // if the user is viewing an entry off a list, then check what screen gets used to display entries instead, since that's what we're doing (but only if there is a screen specified, and it's not a pageworks page)
// do all this to set the Frid properly. That's it. Otherwise, no change. Frid affects behaviour in readelements.php
$base_screen_handler = xoops_getmodulehandler('screen', 'formulize');
$viewEntryScreenObject = $base_screen_handler->get(intval($screen->getVar('viewentryscreen')));
Expand All @@ -167,7 +167,7 @@
$entry = "";
}

$formulize_screen_loadview = (!isset($formulize_screen_loadview) OR !is_numeric($formulize_screen_loadview)) ? intval($_GET['loadview']) : $formulize_screen_loadview;
$formulize_screen_loadview = (!isset($formulize_screen_loadview) OR !is_numeric($formulize_screen_loadview)) ? (isset($_GET['loadview']) ? intval($_GET['loadview']) : 0) : $formulize_screen_loadview;
$loadThisView = (isset($formulize_screen_loadview) AND is_numeric($formulize_screen_loadview)) ? $formulize_screen_loadview : "";
if (!$loadThisView) {
// a 0 could possibly screw things up, so change to ""
Expand Down
5 changes: 3 additions & 2 deletions themes/Anari/theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<link rel="icon" type="image/png" href="<{$icms_imageurl}>icons/icon.png" />

<!-- CSS -->
<link rel="stylesheet" type="text/css" media="all" href="<{$icms_imageurl}><{if $icms_rtl}>rtl/<{/if}>css/style.css?v=1.6" />
<link rel="stylesheet" type="text/css" media="all" href="<{$icms_imageurl}><{if isset($icms_rtl) AND $icms_rtl}>rtl/<{/if}>css/style.css?v=1.6" />

<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>

Expand Down Expand Up @@ -65,6 +65,7 @@
<div class="site-layout">

<!-- LAYOUT -> SIDEBAR -->
<{assign var=openMenuClass value=''}>
<{if $xoops_requesturi|strstr:'/modules/formulize/application.php'}>
<{assign var=openMenuClass value='site-layout__sidebar--open'}>
<script type='text/javascript'>
Expand Down Expand Up @@ -182,7 +183,7 @@
});
</script>

<{ if $masquerade_username }>
<{ if isset($masquerade_username) AND $masquerade_username }>
<div id="formulize-masquerade-block">
Masquerading as <b><{$masquerade_username}></b>
<form method="post" action="<{$smarty.const.XOOPS_URL}>/modules/formulize/">
Expand Down

0 comments on commit 7e95c3a

Please sign in to comment.