[Uebimiau] Bugfix: problem with attachment names

Discussion in 'Tips/Tricks/Mods' started by willybald, Feb 25, 2009.

  1. willybald

    willybald New Member

    To get rid of the problem which is shown in the attached picture, that on some server uebimiau doesnt show file names of attachments you have to do the following:

    - go to your uebimiau directory
    - open inc/class.uebimiau.php
    - somewhere around line 567 you will find
    $filename substr($filename,-100)
    this is the critical part... the intention of the author is to truncate file names longer than 100 chars, the minus means starting at the end.

    in fact there are php versions where this works well ( i didnt investigate which ones) but on others the filename becomes empty, because the starting point is out of bounds.

    the solution is to build a condition around:
    if (strlen($filename) > 100)
    $filename substr($filename,-100)
    for now this fix only truncate file names if it exceeds 100 chars, otherwise leave it untouched

    hope this helps,

    Attached Files:

Share This Page