tinycm diff plugins/forum/forum.cgi @ rev 121

Remove ashism ==
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Feb 26 12:26:25 2019 +0100 (2019-02-26)
parents 12c983066e52
children
line diff
     1.1 --- a/plugins/forum/forum.cgi	Sun Feb 12 09:42:27 2017 +0000
     1.2 +++ b/plugins/forum/forum.cgi	Tue Feb 26 12:26:25 2019 +0100
     1.3 @@ -15,8 +15,8 @@
     1.4  <div id="tools">
     1.5  	<a href="$script?forum=edit&amp;t=new">$(gettext "New post")</a>
     1.6  	$([ "$(GET t)" ] && echo "<a href='$script?forum'>Forum</a>")
     1.7 -	$([ "$index" == "forum" ] && echo "<a href='$script?d=index'>Index</a>")
     1.8 -	$([ "$HG" == "yes" ] && echo "<a href='$script?hg'>Hg Log</a>")
     1.9 +	$([ "$index" = "forum" ] && echo "<a href='$script?d=index'>Index</a>")
    1.10 +	$([ "$HG" = "yes" ] && echo "<a href='$script?hg'>Hg Log</a>")
    1.11  </div>
    1.12  EOT
    1.13  }
    1.14 @@ -120,13 +120,13 @@
    1.15  show_messages() {
    1.16  	msgs=$(ls -1 $forum/$t/msg.*.txt | wc -l)
    1.17  	echo "<h3>$(gettext 'Messages'): $msgs</h3>"
    1.18 -	[ "$msgs" == 0 ] && echo "<p>$(gettext 'Be the first to post a message!')<p/>"
    1.19 +	[ "$msgs" = 0 ] && echo "<p>$(gettext 'Be the first to post a message!')<p/>"
    1.20  	for msg in $(ls -1tr $forum/$t/msg.*.conf)
    1.21  	do
    1.22  		. ${msg}
    1.23  		rm=""
    1.24  		# User can delete his post.
    1.25 -		if [ "$user" == "$AUTHOR" ]; then
    1.26 +		if [ "$user" = "$AUTHOR" ]; then
    1.27  			rm="- <a href=\"?forum=msgrm&amp;t=$t&amp;msg=$ID\">$(gettext 'Remove')</a>"
    1.28  		fi
    1.29  		# Display user gravatar, date and message
    1.30 @@ -167,7 +167,7 @@
    1.31  				html_footer && exit 0
    1.32  			fi
    1.33  			# New post
    1.34 -			if [ "$t" == "new" ]; then
    1.35 +			if [ "$t" = "new" ]; then
    1.36  				date=$(date '+%Y-%m-%d %H:%M')
    1.37  				last=$(ls -r $forum | head -n 1)
    1.38  				nb=${last%.txt}