webcalendar

Check-in [f3f78547ec]
Login

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

Overview
Comment:Get running on modern PHP
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | master | trunk
Files: files | file ages | folders
SHA3-256:f3f78547ecc773cb63c1cc7c935982ddbf15174d00c35ebf17c9c53f376384c7
User & Date: ajv-899-334-8894@vsta.org 2018-01-12 00:03:47
Context
2018-02-05
17:01
Add duration check-in: 818ac02765 user: ajv-899-334-8894@vsta.org tags: master, trunk
2018-01-12
00:03
Get running on modern PHP check-in: f3f78547ec user: ajv-899-334-8894@vsta.org tags: master, trunk
00:03
Dial back the amount of days needing processing check-in: a61ef81825 user: ajv-899-334-8894@vsta.org tags: master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to includes/classes/phpmailer/class.phpmailer.php.

1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
     */
    function EncodeFile ($path, $encoding = "base64") {
        if(!@$fd = fopen($path, "rb"))
        {
            $this->SetError($this->Lang("file_open") . $path);
            return "";
        }
        $magic_quotes = get_magic_quotes_runtime ();
        set_magic_quotes_runtime(0);
        $file_buffer = fread($fd, filesize($path));
        $file_buffer = $this->EncodeString($file_buffer, $encoding);
        fclose($fd);
        set_magic_quotes_runtime($magic_quotes);

        return $file_buffer;
    }

    /**
     * Encodes string to requested format. Returns an
     * empty string on failure.







|
|



|







1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
     */
    function EncodeFile ($path, $encoding = "base64") {
        if(!@$fd = fopen($path, "rb"))
        {
            $this->SetError($this->Lang("file_open") . $path);
            return "";
        }
        // $magic_quotes = get_magic_quotes_runtime ();
        // set_magic_quotes_runtime(0);
        $file_buffer = fread($fd, filesize($path));
        $file_buffer = $this->EncodeString($file_buffer, $encoding);
        fclose($fd);
        // set_magic_quotes_runtime($magic_quotes);

        return $file_buffer;
    }

    /**
     * Encodes string to requested format. Returns an
     * empty string on failure.

Changes to includes/settings.php.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
/* updated via install/index.php on Sun, 05 Feb 2017 22:30:40 -0500
install_password: 7920e1cb7abe5b3c4dae4780016f6cb5
db_type: mysql
db_host: localhost
db_database: webcal
db_login: webcal
db_password: webCALx
db_persistent: false
db_cachedir: /var/cache/webcal
readonly: false
user_inc: user.php
use_http_auth: false
single_user: false
# end settings.php */
?>



|












1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
/* updated via install/index.php on Sun, 05 Feb 2017 22:30:40 -0500
install_password: 7920e1cb7abe5b3c4dae4780016f6cb5
db_type: mysqli
db_host: localhost
db_database: webcal
db_login: webcal
db_password: webCALx
db_persistent: false
db_cachedir: /var/cache/webcal
readonly: false
user_inc: user.php
use_http_auth: false
single_user: false
# end settings.php */
?>

Changes to install/index.php.

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

$failure = $failureStr . '<blockquote>';
$selected = ' selected="selected" ';
$checked = ' checked="checked" ';

// First pass at settings.php.
// We need to read it first in order to get the md5 password.
$magic = @get_magic_quotes_runtime ();
@set_magic_quotes_runtime (0);
$fd = @fopen ( $file, 'rb', true );
$settings = array ();
$password = '';
$forcePassword = false;
if ( ! empty ( $fd ) ) {
  while ( ! feof ( $fd ) ) {
    $buffer = fgets ( $fd, 4096 );
................................................................................
  }
  fclose ( $fd );
  // File exists, but no password. Force them to create a password.
  if ( empty ( $password ) ) {
    $forcePassword = true;
  }
}
@set_magic_quotes_runtime ($magic);

session_start ();
$doLogin = false;

// Set default Application Name
if ( ! isset ( $_SESSION['application_name'] ) ) {
  $_SESSION['application_name'] = 'WebCalendar';
................................................................................
    </head>
    <body onLoad="alert('<?php etranslate ( 'Password has been set', true ) ?>');">
    </body></html>
  <?php
  exit;
}

$magic = @get_magic_quotes_runtime ();
@set_magic_quotes_runtime (0);
$fd = @fopen ( $file, 'rb', false );
if ( ! empty ( $fd ) ) {
  while ( ! feof ( $fd ) ) {
    $buffer = fgets ( $fd, 4096 );
    $buffer = trim ( $buffer, "\r\n " );
    if ( preg_match ( "/^#|\/\*/", $buffer ) )
      continue;
................................................................................
      continue;
    if ( preg_match ( "/(\S+):\s*(.*)/", $buffer, $matches ) ) {
      $settings[$matches[1]] = $matches[2];
    }
  }
  fclose ( $fd );
}
@set_magic_quotes_runtime ($magic);

$action = getGetValue ( 'action' );
// We were set here because of a mismatch of $PROGRAM_VERSION
// A simple way to ensure that UPGRADING.html gets read and processed
if ( ! empty ( $action ) && $action == 'mismatch' ) {
  $_SESSION['old_program_version'] = $version = getGetValue ( 'version' );
}







|
|







 







|







 







|
|







 







|







106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
...
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
...
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
...
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281

$failure = $failureStr . '<blockquote>';
$selected = ' selected="selected" ';
$checked = ' checked="checked" ';

// First pass at settings.php.
// We need to read it first in order to get the md5 password.
// $magic = @get_magic_quotes_runtime ();
// @set_magic_quotes_runtime (0);
$fd = @fopen ( $file, 'rb', true );
$settings = array ();
$password = '';
$forcePassword = false;
if ( ! empty ( $fd ) ) {
  while ( ! feof ( $fd ) ) {
    $buffer = fgets ( $fd, 4096 );
................................................................................
  }
  fclose ( $fd );
  // File exists, but no password. Force them to create a password.
  if ( empty ( $password ) ) {
    $forcePassword = true;
  }
}
// @set_magic_quotes_runtime ($magic);

session_start ();
$doLogin = false;

// Set default Application Name
if ( ! isset ( $_SESSION['application_name'] ) ) {
  $_SESSION['application_name'] = 'WebCalendar';
................................................................................
    </head>
    <body onLoad="alert('<?php etranslate ( 'Password has been set', true ) ?>');">
    </body></html>
  <?php
  exit;
}

// $magic = @get_magic_quotes_runtime ();
// @set_magic_quotes_runtime (0);
$fd = @fopen ( $file, 'rb', false );
if ( ! empty ( $fd ) ) {
  while ( ! feof ( $fd ) ) {
    $buffer = fgets ( $fd, 4096 );
    $buffer = trim ( $buffer, "\r\n " );
    if ( preg_match ( "/^#|\/\*/", $buffer ) )
      continue;
................................................................................
      continue;
    if ( preg_match ( "/(\S+):\s*(.*)/", $buffer, $matches ) ) {
      $settings[$matches[1]] = $matches[2];
    }
  }
  fclose ( $fd );
}
// @set_magic_quotes_runtime ($magic);

$action = getGetValue ( 'action' );
// We were set here because of a mismatch of $PROGRAM_VERSION
// A simple way to ensure that UPGRADING.html gets read and processed
if ( ! empty ( $action ) && $action == 'mismatch' ) {
  $_SESSION['old_program_version'] = $version = getGetValue ( 'version' );
}