Menu

#297 Preview icon html generation should be extracted as a function to inc.utils.php

5.0.0
closed
nobody
feature-request
2017-01-18
2016-11-22
r3code
No

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() ...

Discussion

  • Uwe Steinmann

    Uwe Steinmann - 2016-11-22
    • status: open --> accepted
     
  • Uwe Steinmann

    Uwe Steinmann - 2016-11-22

    inc.utils.php isn't quite the right place, but put that code into a function sounds very reasonable.

     
    • r3code

      r3code - 2016-11-22

      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.

       
  • Uwe Steinmann

    Uwe Steinmann - 2017-01-18
    • status: accepted --> closed
     
  • Uwe Steinmann

    Uwe Steinmann - 2017-01-18

    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.

     
    • r3code

      r3code - 2017-01-18

      Do you checked th code manually? I've used phpcpd.

       
  • Uwe Steinmann

    Uwe Steinmann - 2017-01-18

    Yes, mostly manually with the help of grep.

     

Log in to post a comment.

MongoDB Logo MongoDB