Preview icon html generation should be extracted as a function to inc.utils.php
Open Source Document Management System
Brought to you by:
steinm
Preview icon html generation should be extracted as a function to inc.utils.php
because it's widely used and can create issues in case of the code changes.
Most repeated code part <img class=\"mimeicon\" width=\"".$previewwidth."\"src=\"../op/op.Preview.php?documentid=".$document->getID() ...
inc.utils.php isn't quite the right place, but put that code into a function sounds very reasonable.
I don't know the code structure wll so tell me where to put it? If there is no file point the new location please.
I checked the code again. There are various similar code parts for the preview images, but they become less, because documentListRow() was used where possible. So I will not change this for now.
Do you checked th code manually? I've used phpcpd.
Yes, mostly manually with the help of grep.