SMF icon indicating copy to clipboard operation
SMF copied to clipboard

Remove closing tags

Open norv opened this issue 14 years ago • 8 comments

They were previously removed, in the other branch, afaik. One of the topics of relevance: http://www.simplemachines.org/community/index.php?topic=458941.0

I'm sure we haven't tested package manager for it, though, nor the mod site package parser.

I don't remember if this was the reason why they're back, by any chance.

norv avatar May 02 '12 18:05 norv

They had been removed in Trunk, but they were all added back in during the defractor-refractor .... the package manager was not updated and many mods still use the search for ?> bla bla etc etc ... in the end it seemed like more things would be broken then would be "fixed" for by this update. That said if you want to re-remove them, update pacman et all, and be responsible for any bug reports this creates then go for it.

Spuds avatar May 02 '12 19:05 Spuds

Yep. Then again, mods shouldn't use search for ?>, but position=end, and package manager should interpret it the same way. This might be the wishful "should", of course. Those two tools should both work without end tags (another "should" :)), since they do already work for css files. Again for position=end. I'll take a closer look. It's all about testing, methinks.

norv avatar May 02 '12 20:05 norv

Yep ... mods should do a lot of things .. :P ... as you know the ?> removal is just a grep away ;)

Spuds avatar May 02 '12 23:05 Spuds

Taking a look at the code in package manager, and making a few tests with position=end with it, this is working fine: package manager recognizes it correctly, for any files, php as well as css.

norv avatar May 03 '12 01:05 norv

So just support for ]]> (I think thats the correct wrong way that's used :P ) has to be added or does that work anyway or do we just those packages fail?

Spuds avatar May 03 '12 14:05 Spuds

Doing a quick test the uninstall details are not reported properly if the closing php tag is removed from the file, maybe it's just an issue I have, but I see in find "?>" (the same happens also during the install, honestly I have never tried with a css, but I assume it is the same) and as operation I see "add before" and an empty code block.

emanuele45 avatar May 07 '12 21:05 emanuele45

Yes, it's the same for .css files, always was (though rarely used and never reported). Might want to change that way of reporting from package manager, though it wasn't a problem.

norv avatar May 07 '12 21:05 norv

There are also quite a few hidden gems in the code along the lines of '?' . '>' and combos there of ... all of those will need to be found and modified for this to work.

Spuds avatar May 09 '12 15:05 Spuds