diff --git a/category_handler.php b/category_handler.php index 4d030ad29..e296f3703 100644 --- a/category_handler.php +++ b/category_handler.php @@ -71,7 +71,7 @@ function updateIconBlob($catId, $iconData, $iconMimeType) { if (!dbi_execute( 'DELETE FROM webcal_entry_categories WHERE cat_id = ? AND ( cat_owner = ?' - . ($is_admin ? ' OR cat_owner = '' )' : ' )'), + . ($is_admin ? ' OR cat_owner = \'\'' : ' )'), [$id, $login] )) { $error = db_error(); diff --git a/includes/js/edit_entry.php b/includes/js/edit_entry.php index 2aa901886..adea98205 100644 --- a/includes/js/edit_entry.php +++ b/includes/js/edit_entry.php @@ -2,8 +2,7 @@ defined ( '_ISVALID' ) or die ( 'You cannot access this file directly!' ); global $GROUPS_ENABLED,$WORK_DAY_START_HOUR,$WORK_DAY_END_HOUR; -$user = $arinc[3]; - +load_user_categories(); ?> var bydayAr = bymonthdayAr = bysetposAr = []; @@ -602,7 +601,6 @@ function editCats ( evt ) { var selected_ids = cat_ids.split ( ',' ); $cat ) { if ( $catid == 0 || $catid == -1 ) continue; // Ignore these special cases (0=All, -1=None) @@ -632,6 +630,7 @@ function catOkHandler () { var catIds = '', catNames = ''; $cat ) { + echo ' // Processing catid=' . $catid . "\n"; if ( $catid == 0 || $catid == -1 ) continue; // Ignore these special cases (0=All, -1=None) ?> @@ -665,7 +664,7 @@ function catOkHandler () { cats.val(catNames); var catId = $('#cat_id'); catId.val(catIds); - console.log("cat_id.value = " + catId.value); + //console.log("cat_id.value = " + catId.value); $('#catModal').modal('hide'); return true; } diff --git a/install/headless.php b/install/headless.php index e5a848b59..283e1a3d1 100644 --- a/install/headless.php +++ b/install/headless.php @@ -27,6 +27,7 @@ // We need the $_SESSION superglobal to pass data to and from some of the update // functions. Sessions are basically useless in CLI mode, but technically the // session functions *do* work. +session_name(getSessionName()); session_start(); // Load the settings.php file or get settings from env vars. diff --git a/js_cacher.php b/js_cacher.php index 6aff9a4d9..32f05593f 100644 --- a/js_cacher.php +++ b/js_cacher.php @@ -46,6 +46,7 @@ send_no_cache_header(); load_global_settings(); +session_name(getSessionName()); @session_start(); $login = ( empty( $_SESSION['webcal_login'] )