Skip to content

Commit

Permalink
PHP8 changes and misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
craigk5n committed Sep 7, 2023
1 parent d0572ba commit 1389b61
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
context: .
file: ./docker/Dockerfile-php8
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/webcalendar:v1.9.6-dev-php8
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/webcalendar:v1.9.7-dev-php8
2 changes: 1 addition & 1 deletion UPGRADING.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h1>WebCalendar Upgrading Notes</h1>
<table>
<tr>
<th>WebCalendar Version:</th>
<td>1.9.6</td>
<td>1.9.7</td>
</tr>
</table>

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "k5n/webcalendar",
"type": "project",
"description": "Multi-user web-based calendar app",
"version": "1.9.6",
"version": "1.9.7",
"homepage": "https://www.k5n.us/webcalendar/",
"authors": [
{
Expand Down
3 changes: 2 additions & 1 deletion day.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

load_user_categories();

$wday = strftime ( '%w', mktime ( 0, 0, 0, $thismonth, $thisday, $thisyear ) );
$thisdate = new DateTime("$thisyear-$thismonth-$thisday");
$wday = $thisdate->format('w');
$now = mktime ( 23, 59, 59, $thismonth, $thisday, $thisyear );
$nowYmd = date ( 'Ymd', $now );

Expand Down
4 changes: 2 additions & 2 deletions includes/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ function do_config()
];

// When changing PROGRAM VERSION, also change it in install/default_config.php
$PROGRAM_VERSION = 'v1.9.6';
$PROGRAM_VERSION = 'v1.9.7';
// Update PROGRAM_DATE with official release data
$PROGRAM_DATE = '30 Aug 2023';
$PROGRAM_DATE = '07 Sep 2023';

$PROGRAM_NAME = 'WebCalendar ' . "$PROGRAM_VERSION ($PROGRAM_DATE)";
$PROGRAM_URL = 'http://k5n.us/wp/webcalendar/';
Expand Down
5 changes: 3 additions & 2 deletions includes/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -987,8 +987,9 @@ function display_activity_log( $cal_type, $cal_text = '', $break = '<br>&nbsp;'
else
$ret = '???';
//fix any broken special characters
$cal_text = preg_replace( "/&amp;(#[0-9]+|[a-z]+);/i", "&$1;",
htmlentities( $cal_text ) );
if (!empty($cal_text)) {
$cal_text = preg_replace("/&amp;(#[0-9]+|[a-z]+);/i", "&$1;", htmlentities($cal_text));
}
return $ret
. ( empty ( $cal_text ) ? '' : $break . $cal_text );
}
Expand Down
2 changes: 1 addition & 1 deletion install/default_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
'USER_RSS_ENABLED' => 'N',
'USER_SEES_ONLY_HIS_GROUPS' => 'Y',
'USER_SORT_ORDER' => 'cal_lastname, cal_firstname',
'WEBCAL_PROGRAM_VERSION' => 'v1.9.6',
'WEBCAL_PROGRAM_VERSION' => 'v1.9.7',
'WEEK_START' => '0',
'WEEKEND_START' => '6',
'WEEKENDBG' => '#d0d0d0',
Expand Down
1 change: 0 additions & 1 deletion install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@
. '\' ); document.go(-1)">';
// Invalid password.
echo '<br>' . translate( 'Password Incorrect' ) . '</title></head><body>' . translate( 'Password Incorrect' );
echo "Password: '$pwd' <br> md5 = " . md5($pwd) . "<br>envpwd = " . $envpwd;
echo '</body></html>';
exit;
}
Expand Down
2 changes: 1 addition & 1 deletion install/sql/upgrade-db2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-ibase.sql
Original file line number Diff line number Diff line change
Expand Up @@ -315,4 +315,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-mssql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-mysql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -270,4 +270,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-oracle.sql
Original file line number Diff line number Diff line change
Expand Up @@ -298,4 +298,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade-postgres.sql
Original file line number Diff line number Diff line change
Expand Up @@ -316,4 +316,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -616,4 +616,4 @@ ALTER TABLE webcal_user MODIFY cal_passwd VARCHAR(255);
/*upgrade_v1.9.5*/
update webcal_entry_categories SET cat_owner = '' WHERE cat_owner IS NULL;
ALTER TABLE webcal_entry_categories ADD PRIMARY KEY (cal_id, cat_id, cat_order, cat_owner);
/*upgrade_v1.9.6*/
/*upgrade_v1.9.7*/
2 changes: 1 addition & 1 deletion install/sql/upgrade_matrix.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
//Program Version for this release
$PROGRAM_VERSION = 'v1.9.6';
$PROGRAM_VERSION = 'v1.9.7';

//array element[0] = sql insertion testy
//array element[1] = sql delete to clean up
Expand Down
8 changes: 0 additions & 8 deletions login.php
Original file line number Diff line number Diff line change
Expand Up @@ -257,13 +257,5 @@
}
?>
</div>

<?php
// TODO use variable from init.php for these version numbers
?>
<!--
<script src="vendor/twbs/bootstrap/dist/js/ootstrap.min.js"></script>
<script src="vendor/twbs/bootstrap/js/dist/index.js"></script>
-->
</body>
</html>

0 comments on commit 1389b61

Please sign in to comment.