Example #1
0
/**
 * Callback function to validate data
 * @return bool must return true or other hooks don't get called
 */
function validateSource($editPage, $textBox1, $section, &$hookError)
{
    $ns = $editPage->mTitle->getNamespace();
    if ($ns == NS_SOURCE) {
        $source = new Source($editPage->mTitle->getText());
        $source->validate($textBox1, $section, $hookError);
    }
    return true;
}