Alright. The first two TODOs are easy. There is a variable called $blob which is defined a couple of lines above. You would need to change the if statement so that it checks for "net" and that should do the job I guess.
The other huge blocks need to be cut in two pieces. Usually they use something that looks like this:
print <<END; ABC DEF 123 END
This will simply print everything between the print statement and END. It will stop when ever there is a line with just "END" in it.
So you could cut that in two parts:
print <<END; ABC DEF END
if ($something) { print "123\n"; }
That is basically it.
I am not entirely sure if that answers all your questions, so feel free to ask back if there is anything else you would like to know :)
-Michael
On Sat, 2015-06-27 at 09:37 +0200, Larsen wrote:
On Thu, 25 Jun 2015 12:28:51 +0200, Alexander Marx alexander.marx@oab.de wrote:
On Thu, 2015-06-04 at 23:46 +0200, Larsen wrote: > PS: Need help with the TODOs in that patch as I am now web developer > and where I don´t know how to use an if-clause. As these are in the ovpnmain.cgi (as far as I have seen) you should get in touch with Alex when he is back from holiday. That will be towards the end of next week.
Should not be related to ovpnmain.cgi. I just don´t have the experience how to combine html-code and if-clauses here. Any dev might be able to give a hint here.
Hi All "HTML" Files are the cgi files within /srv/web/ipfire/cgi-bin. These Files are CGI's which means it can be any programming language. The IPFire CGI's are usually written in perl. So one can easily use perl if-clauses. When it comes to the output part you also use Perl code to "print" the htmlcode.
Yes, I know where to change it, but I don´t know how exactly to combine perl code and HTML. Please have a look at the parts marked with TODO here: http://patchwork.ipfire.org/patch/15/
In other places, there is a huge "print" part where perl gives out HTML in one block. Here however, I need to use perl inside one of those blocks.
Lars