<?php

function xoops_module_update_pm(&$module) 
{
    $sql = "UPDATE ".$GLOBALS['xoopsDB']->prefix('user_profile')." SET pm_link=".$GLOBALS['xoopsDB']->quoteString(
    "<a href=\"javascript:openWithSelfMain('{X_URL}/modules/pm/pmlite.php?send2=1&to_userid={X_UID}', 'pmlite', 550, 450);\" title=\""._PM_MI_MESSAGE." {X_UNAME}\"><img src=\"{X_URL}/modules/pm/images/pm.gif\" alt=\""._PM_MI_MESSAGE." {X_UNAME}\" /></a>"
    )." WHERE pm_link=''";
    if (!$GLOBALS['xoopsDB']->query($sql)) {
        $module->setMessage($GLOBALS['xoopsDB']->error());
    }else{
        $module->setMessage("pm_link data updated");
    }
    return true;
}
?>