Skip to content

Commit ea60299

Browse files
authored
Merge pull request #177 from jdarwood007/updatesmf21
Update SMF21 branch
2 parents 9cd9a2f + 7b1ed29 commit ea60299

File tree

16 files changed

+257
-104
lines changed

16 files changed

+257
-104
lines changed

.github/scripts/DCO.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Developer's Certificate of Origin 1.1
2+
3+
By making a contribution to this project, I certify that:
4+
5+
(a) The contribution was created in whole or in part by me and I
6+
have the right to submit it under the open source license
7+
indicated in the file; or
8+
9+
(b) The contribution is based upon previous work that, to the best
10+
of my knowledge, is covered under an appropriate open source
11+
license and I have the right under that license to submit that
12+
work with modifications, whether created in whole or in part
13+
by me, under the same open source license (unless I am
14+
permitted to submit under a different license), as indicated
15+
in the file; or
16+
17+
(c) The contribution was provided directly to me by some other
18+
person who certified (a), (b) or (c) and I have not modified
19+
it.
20+
21+
(d) I understand and agree that this project and the contribution
22+
are public and that a record of the contribution (including all
23+
personal information I submit with it, including my sign-off) is
24+
maintained indefinitely and may be redistributed consistent with
25+
this project or the open source license(s) involved.

.github/scripts/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# [SimpleDesk](simpledesk.net)
2+
3+
This is a SimpleDesk Build Tools Repository.
4+
The software is licensed under [BSD 3-clause license](http://www.opensource.org/licenses/BSD-3-Clause).
5+
6+
Contributions to documentation are licensed under [CC-by-SA 3](https://creativecommons.org/licenses/by-sa/3.0). Third party libraries or sets of images, are under their own licenses.
7+
8+
##Notes:
9+
10+
This repository contains all tools used by Travis CI and other automated scripts.
11+
12+
Feel free to fork this repository and make your desired changes.
13+
14+
Please see the [Developer's Certificate of Origin](https://github.com/SimpleDesk/buildTools/blob/master/DCO.txt) in the repository:
15+
by signing off your contributions, you acknowledge that you can and do license your submissions under the license of the project.
16+
17+
##How to contribute:
18+
* fork the repository. If you are not used to Github, please check out [fork a repository](https://help.github.com/fork-a-repo).
19+
* branch your repository, to commit the desired changes.
20+
* sign-off your commits, to acknowledge your submission under the license of the project.
21+
* It is enough to include in your commit comment "Signed-off by: " followed by your name and email address (for example: `Signed-off-by: SleePy <[email protected]>`)
22+
* an easy way to do so, is to define an alias for the git commit command, which includes -s switch (reference: [How to create Git aliases](https://git.wiki.kernel.org/index.php/Aliases))
23+
* send a pull request to us.
24+
25+
Please, feel free to play around. That's what we're doing. ;)

.github/scripts/check-license.php

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,31 @@
110110
if (!preg_match('~' . implode('', $yearMatch) . '~i', $contents))
111111
die('Error: The software year is incorrect in ' . $currentFile . "\n");
112112

113-
// Check the version is correct.
114-
$versionMatch = $match;
115-
$sd_version_whitespace = 40;
116-
$versionMatch[14] = '\* SimpleDesk Version: ' . $currentVersion . ' {' . ($sd_version_whitespace - strlen($currentVersion)) . '}\*' . '[\r]?\n';
117-
if (!preg_match('~' . implode('', $versionMatch) . '~i', $contents))
118-
{
119-
$badVersion = true;
120-
foreach ($ignoreFilesVersion as $if)
121-
if (preg_match('~' . $if . '~i', $currentFile))
122-
$badVersion = false;
113+
/* Remove once we only support PHP 8.0 and above */
114+
if (! function_exists('str_ends_with')) {
115+
function str_ends_with(string $haystack, string $needle): bool
116+
{
117+
$needle_len = strlen($needle);
118+
return ($needle_len === 0 || 0 === substr_compare($haystack, $needle, - $needle_len));
119+
}
120+
}
123121

124-
if ($badVersion)
125-
die('Error: The version is incorrect in ' . $currentFile . "\n");
122+
// Check the version is correct, but only for alpha/beta/rc builds. As well, the "final" .0 releases.
123+
if (stripos($currentVersion, 'alpha') > 0 || stripos($currentVersion, 'beta') > 0 || stripos($currentVersion, 'RC') > 0 || str_ends_with($currentVersion, '.0'))
124+
{
125+
$versionMatch = $match;
126+
$sd_version_whitespace = 40;
127+
$versionMatch[14] = '\* SimpleDesk Version: ' . $currentVersion . ' {' . ($sd_version_whitespace - strlen($currentVersion)) . '}\*' . '[\r]?\n';
128+
if (!preg_match('~' . implode('', $versionMatch) . '~i', $contents))
129+
{
130+
$badVersion = true;
131+
foreach ($ignoreFilesVersion as $if)
132+
if (preg_match('~' . $if . '~i', $currentFile))
133+
$badVersion = false;
134+
135+
if ($badVersion)
136+
die('Error: The version is incorrect in ' . $currentFile . "\n");
137+
}
126138
}
127139

128140
die('Stop here' . "\n");

.github/scripts/license.txt

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Copyright (c) 2010-2020, SimpleDesk Team
2+
All rights reserved.
3+
4+
Redistribution and use in source and binary forms, with or without
5+
modification, are permitted provided that the following conditions are met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above copyright
10+
notice, this list of conditions and the following disclaimer in the
11+
documentation and/or other materials provided with the distribution.
12+
* Neither the name of SimpleDesk nor the
13+
names of its contributors may be used to endorse or promote products
14+
derived from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17+
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19+
DISCLAIMED. IN NO EVENT SHALL SIMPLEDESK TEAM BE LIABLE FOR ANY
20+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

.github/scripts/runTools.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/bash
2+
3+
git submodule foreach git pull origin master
4+
5+
if [ $# -eq 0 ]
6+
then
7+
echo "Running Local Version"
8+
9+
echo "Checking PHP syntax"
10+
php .github/scripts/check-php-syntax.php ./
11+
12+
echo "Checking for Sign Off issues"
13+
php .github/scripts/check-signed-off.php ./
14+
15+
echo "Checking for Licensing issues"
16+
php .github/scripts/check-license-master.php ./
17+
18+
echo "Checking for End of File issues"
19+
php .github/scripts/check-eof-master.php ./
20+
else
21+
echo "Running Travis Version"
22+
if find . -name "*.php" ! -path "./vendor/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
23+
if php .github/scripts/check-signed-off.php travis | grep "Error:"; then php .github/scripts/check-signed-off.php travis; exit 1; fi
24+
if find . -name "*.php" -exec php .github/scripts/check-license.php {} 2>&1 \; | grep "Error:"; then exit 1; fi
25+
if find . -name "*.php" -exec php .github/scripts/check-eof.php {} 2>&1 \; | grep "Error:"; then exit 1; fi
26+
fi

.github/workflows/Syntax-Check.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: PHP Syntax Check
22

33
on:
44
push:
5-
branches: [ smf21, smf20, master ]
5+
branches: [ smf21, master ]
66
pull_request:
7-
branches: [ smf21, smf20, master ]
7+
branches: [ smf21, master ]
88

99
workflow_dispatch:
1010
jobs:
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
operating-system: [ ubuntu-latest ]
16-
php: [ '7.1', '7.2', '7.3', '7.4', '8.0' ]
16+
php: [ '7.4', '8.0', '8.1', '8.2' ]
1717
name: PHP ${{ matrix.php }} Syntax Check
1818
steps:
1919
- uses: actions/checkout@master

css/helpdesk.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,4 +583,8 @@ dl.stats dd span, dl.stats dt span {
583583
.sd_unread_content div.sd_unread_row span:not(:nth-child(1), :nth-child(2), :nth-child(5)) {
584584
display: none;
585585
}
586+
}
587+
588+
.sd_wordbreak {
589+
overflow-wrap: break-word;
586590
}

install-sd.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Any questions, please contact SimpleDesk.net *
1414
* *
1515
***************************************************************
16-
* SimpleDesk Version: 2.1.0 *
16+
* SimpleDesk Version: 2.1.1 *
1717
* File Info: install.php *
1818
**************************************************************/
1919

@@ -91,8 +91,8 @@ function sd_initialize_install()
9191
require_once(getcwd() . '/SSI.php');
9292
elseif (!defined('SMF')) // If we are outside SMF and can't find SSI.php, then throw an error
9393
die('<b>Error:</b> Cannot install - please verify you put this file in the same place as SMF\'s SSI.php.');
94-
elseif (@version_compare(PHP_VERSION, '5.3.8', '<'))
95-
die('<b>Error:</b> SimpleDesk 2.1 requires PHP 5.3.8 to be installed on your server.');
94+
elseif (@version_compare(PHP_VERSION, '7.4.0', '<'))
95+
die('<b>Error:</b> SimpleDesk 2.1 requires PHP 7.4.0 to be installed on your server.');
9696

9797
if (SMF == 'SSI')
9898
db_extend('packages');

package-info.xml

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,42 @@
33
<package-info xmlns="http://www.simplemachines.org/xml/package-info" xmlns:smf="http://www.simplemachines.org/">
44
<id>SimpleDeskTeam:SimpleDesk</id>
55
<name>SimpleDesk - Integrated Helpdesk for Simple Machines Forum</name>
6-
<version>2.1.0</version>
6+
<version>2.1.1</version>
77
<type>modification</type>
88

9-
<install for="2.1 RC4, 2.1.0-2.1.99">
9+
<upgrade from="2.1.0" for="2.1.3-2.1.99">
10+
<!-- language files -->
11+
<require-dir name="sd_language" destination="$themes_dir/default/languages" />
12+
13+
<!-- sources -->
14+
<require-dir name="sd_source" destination="$sourcedir" />
15+
16+
<!-- templates -->
17+
<require-dir name="sd_template" destination="$themedir" />
18+
19+
<!-- images -->
20+
<require-dir name="images/simpledesk" destination="$themes_dir/default/images" />
21+
<require-dir name="images/sd_plugins" destination="$themes_dir/default/images" />
22+
<require-dir name="images/shd" destination="$imagesdir/admin" />
23+
<require-file name="images/feature_shd.png" destination="$themes_dir/default/images/admin" /><!-- explicitly called from default theme in ACP -->
24+
25+
<!-- css -->
26+
<require-file name="css/helpdesk.css" destination="$themedir/css" />
27+
<require-file name="css/helpdesk_admin.css" destination="$themedir/css" />
28+
<require-file name="css/helpdesk_responsive.css" destination="$themedir/css" />
29+
<require-file name="css/helpdesk_icons.css" destination="$themedir/css" />
30+
31+
<!-- scripts -->
32+
<require-file name="scripts/helpdesk_admin.js" destination="$themedir/scripts" />
33+
<require-file name="scripts/helpdesk.js" destination="$themedir/scripts" />
34+
35+
<!-- bundled plugins -->
36+
<require-dir name="sd_plugins_source" destination="$sourcedir" />
37+
<require-dir name="sd_plugins_template" destination="$themes_dir/default" />
38+
<require-dir name="sd_plugins_lang" destination="$languagedir" />
39+
</upgrade>
40+
41+
<install for="2.1.3-2.1.99">
1042
<!-- readme files -->
1143
<readme lang="english" parsebbc="true" type="file">language-readme/readme.english.txt</readme>
1244

@@ -100,7 +132,7 @@
100132
<credits url="https://www.simpledesk.net" license="BSD 3-Clause" licenseurl="https://github.com/SimpleMachines/SimpleDesk/blob/master/license.txt" copyright="2010-2021">Simple Desk</credits>
101133
</install>
102134

103-
<uninstall for="2.1 RC4, 2.1.0-2.1.99">
135+
<uninstall for="2.1.3-2.1.99">
104136
<!-- database changes, undone -->
105137
<database>uninstall-sd-optional.php</database>
106138
<code type="file">uninstall-sd-required.php</code>

sd_plugins_source/front_page/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ function shdplugin_front_page()
5353
'description' => 'shdp_frontpage_desc',
5454
'author' => 'SimpleDesk Team',
5555
'website' => 'https://www.simpledesk.net/',
56-
'version' => '1.0.1',
56+
'version' => '2.1.0',
5757
'compatibility' => array(
58-
'SimpleDesk 2.1 RC1', // should tie up with the SHD_VERSION constants
58+
'SimpleDesk 2.1.*', // should tie up with the SHD_VERSION constants
5959
),
6060
'acp_url' => 'action=admin;area=helpdesk_options;sa=frontpage',
6161
),

0 commit comments

Comments
 (0)