Skip to content

Commit

Permalink
Merge branch 'craigk5n:master' into php
Browse files Browse the repository at this point in the history
  • Loading branch information
bbannon authored Aug 31, 2024
2 parents 589bbab + 1fe120c commit 1db0579
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion category_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
7 changes: 3 additions & 4 deletions includes/js/edit_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [];

Expand Down Expand Up @@ -602,7 +601,6 @@ function editCats ( evt ) {
var selected_ids = cat_ids.split ( ',' );

<?php
load_user_categories();
foreach ( $categories as $catid => $cat ) {
if ( $catid == 0 || $catid == -1 )
continue; // Ignore these special cases (0=All, -1=None)
Expand Down Expand Up @@ -632,6 +630,7 @@ function catOkHandler () {
var catIds = '', catNames = '';
<?php
foreach ( $categories as $catid => $cat ) {
echo ' // Processing catid=' . $catid . "\n";
if ( $catid == 0 || $catid == -1 )
continue; // Ignore these special cases (0=All, -1=None)
?>
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions install/headless.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
1 change: 1 addition & 0 deletions js_cacher.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

send_no_cache_header();
load_global_settings();
session_name(getSessionName());
@session_start();

$login = ( empty( $_SESSION['webcal_login'] )
Expand Down

0 comments on commit 1db0579

Please sign in to comment.