webcalendar

Check-in [63a1e79c45]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix some breakage; looks like PHP has changed a bit since the source was written.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:63a1e79c4516f27a89db5615b28cf7364aee8ffa9c9619ed392cb6105b9ad195
User & Date: ajv-899-334-8894@vsta.org 2018-03-29 04:20:14
Context
2018-06-06
03:54
Update paths used check-in: 56cae09514 user: vandys tags: master, trunk
2018-03-29
04:20
Fix some breakage; looks like PHP has changed a bit since the source was written. check-in: 63a1e79c45 user: ajv-899-334-8894@vsta.org tags: master, trunk
04:19
Make it easier to view another day check-in: 564bb5cc45 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to access.php.

72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
...
103
104
105
106
107
108
109

110
111
112
113
114
115
116
    if ( ! $is_admin )
      list ( $puser, $pouser ) = array ( $pouser, $puser );

    dbi_execute ( 'DELETE FROM webcal_access_user WHERE cal_login = ?
      AND cal_other_user = ?', array ( $puser, $pouser ) );

    if ( empty ( $pouser ) )
      break;
    $approve_total = $edit_total = $view_total = 0;
    for ( $i = 1; $i <= 256; ) {
      $approve_total += getPostValue ( 'a_' . $i );
      $edit_total += getPostValue ( 'e_' . $i );
      $view_total += getPostValue ( 'v_' . $i );
      $i += $i;
    }
................................................................................
          ( strlen ( $email ) ? $email : 'N' ),
          ( strlen ( $time ) ? $time : 'N' ) ) ) ) {
      die_miserable_death ( str_replace ( 'XXX', dbi_error (), $dbErrStr ) );
    }
    $saved = true;
  }
}

$checked = ' checked="checked"';
$guser = getPostValue ( 'guser' );
$selected = ' selected="selected"';

//if ( $guser == '__default__' ) {
//  $otheruser = $guser;
//  $user_fullname = $defConfigStr;







|







 







>







72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
...
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
    if ( ! $is_admin )
      list ( $puser, $pouser ) = array ( $pouser, $puser );

    dbi_execute ( 'DELETE FROM webcal_access_user WHERE cal_login = ?
      AND cal_other_user = ?', array ( $puser, $pouser ) );

    if ( empty ( $pouser ) )
      goto nouser;
    $approve_total = $edit_total = $view_total = 0;
    for ( $i = 1; $i <= 256; ) {
      $approve_total += getPostValue ( 'a_' . $i );
      $edit_total += getPostValue ( 'e_' . $i );
      $view_total += getPostValue ( 'v_' . $i );
      $i += $i;
    }
................................................................................
          ( strlen ( $email ) ? $email : 'N' ),
          ( strlen ( $time ) ? $time : 'N' ) ) ) ) {
      die_miserable_death ( str_replace ( 'XXX', dbi_error (), $dbErrStr ) );
    }
    $saved = true;
  }
}
nouser:
$checked = ' checked="checked"';
$guser = getPostValue ( 'guser' );
$selected = ' selected="selected"';

//if ( $guser == '__default__' ) {
//  $otheruser = $guser;
//  $user_fullname = $defConfigStr;

Changes to layers_toggle.php.

27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

$sql = 'INSERT INTO webcal_user_pref ( cal_login, cal_setting, cal_value )
  VALUES ( ?, \'LAYERS_STATUS\', ? )';
if ( ! dbi_execute ( $sql, array ( $layer_user,
      ( $status == 'off' ? 'N': 'Y' ) ) ) ) {
  $error = translate ( 'Unable to update preference' ) . ': ' . dbi_error ()
   . '<br /><br /><span class="bold">SQL:</span> ' . $sql;
  break;
}

if ( empty ( $error ) )
  do_redirect ( $url );

print_header ();
echo print_error ( $error, true ) . print_trailer ();

?>







<









27
28
29
30
31
32
33

34
35
36
37
38
39
40
41
42

$sql = 'INSERT INTO webcal_user_pref ( cal_login, cal_setting, cal_value )
  VALUES ( ?, \'LAYERS_STATUS\', ? )';
if ( ! dbi_execute ( $sql, array ( $layer_user,
      ( $status == 'off' ? 'N': 'Y' ) ) ) ) {
  $error = translate ( 'Unable to update preference' ) . ': ' . dbi_error ()
   . '<br /><br /><span class="bold">SQL:</span> ' . $sql;

}

if ( empty ( $error ) )
  do_redirect ( $url );

print_header ();
echo print_error ( $error, true ) . print_trailer ();

?>