Code Duplication    Length = 8-9 lines in 2 locations

include/oninstall.php 2 locations

@@ 131-138 (lines=8) @@
128
    return $ret;
129
}
130
131
function makeShortEventAftertransfer()
132
{
133
    $result = $GLOBALS['xoopsDB']->queryF("SELECT id, summary FROM {$GLOBALS['xoopsDB']->prefix('apcal_event')}");
134
    while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
135
        $shortsummary = makeShort($row['summary']);
136
        $GLOBALS['xoopsDB']->queryF("UPDATE {$GLOBALS['xoopsDB']->prefix('apcal_event')} SET shortsummary='{$shortsummary}' WHERE id={$row['id']}");
137
    }
138
}
139
140
function makeShortCatAftertransfer()
141
{
@@ 140-148 (lines=9) @@
137
    }
138
}
139
140
function makeShortCatAftertransfer()
141
{
142
143
    $result = $GLOBALS['xoopsDB']->queryF("SELECT cid, cat_title FROM {$GLOBALS['xoopsDB']->prefix('apcal_cat')}");
144
    while ($row = $GLOBALS['xoopsDB']->fetchArray($result)) {
145
        $cat_shorttitle = makeShort($row['cat_title']);
146
        $GLOBALS['xoopsDB']->queryF("UPDATE {$GLOBALS['xoopsDB']->prefix('apcal_cat')} SET cat_shorttitle='{$cat_shorttitle}' WHERE cid={$row['cid']}");
147
    }
148
}
149
150
/**
151
 * @param $tablename