protected function clean_url($value) {
        global $CFG;

        if (empty($value)) {
            // Nothing.

        } else if (strpos($value, $CFG->wwwroot . '/') === 0) {
            $value = str_replace($CFG->wwwroot, '', $value);

        } else if (strpos($value, '/') !== 0) {
            debugging("Invalid url_select urls parameter: url '$value' is not local relative url!", DEBUG_DEVELOPER);
        }

        return $value;
    }
protected function clean_url($value) {
        global $CFG;

        if (empty($value)) {
            // Nothing.

        } else if (strpos($value, $CFG->wwwroot . '/') === 0) {
            $value = str_replace($CFG->wwwroot, '', $value);

        } else if (strpos($value, '/') !== 0) {
            debugging("Invalid url_select urls parameter: url '$value' is not local relative url!", DEBUG_DEVELOPER);
        }

        return $value;
    }
protected function clean_url ( $ value ) { global $ CFG ; if ( empty ( $ value ) ) { // Nothing. } else if ( strpos ( $ value , $ CFG -> wwwroot . '/' ) === 0 ) { $ value = str_replace ( $ CFG -> wwwroot , '' , $ value ) ; } else if ( strpos ( $ value , '/' ) !== 0 ) { debugging ( "Invalid url_select urls parameter: url '$value' is not local relative url!" , DEBUG_DEVELOPER ) ; } return $ value ; }
Clean a URL.

@param string $value The URL.
@return The cleaned URL.
Clean a URL .