protected function recursive_concat(array $args) {
        $count = count($args);
        if ($count == 1) {
            $arg = reset($args);
            return $arg;
        }
        if ($count == 2) {
            $args[] = "' '";
            // No return here intentionally.
        }
        $first = array_shift($args);
        $second = array_shift($args);
        $third = $this->recursive_concat($args);
        return "MOODLELIB.TRICONCAT($first, $second, $third)";
    }
protected function recursive_concat(array $args) {
        $count = count($args);
        if ($count == 1) {
            $arg = reset($args);
            return $arg;
        }
        if ($count == 2) {
            $args[] = "' '";
            // No return here intentionally.
        }
        $first = array_shift($args);
        $second = array_shift($args);
        $third = $this->recursive_concat($args);
        return "MOODLELIB.TRICONCAT($first, $second, $third)";
    }
protected function recursive_concat ( array $ args ) { $ count = count ( $ args ) ; if ( $ count == 1 ) { $ arg = reset ( $ args ) ; return $ arg ; } if ( $ count == 2 ) { $ args [ ] = "' '" ; // No return here intentionally. } $ first = array_shift ( $ args ) ; $ second = array_shift ( $ args ) ; $ third = $ this -> recursive_concat ( $ args ) ; return "MOODLELIB.TRICONCAT($first, $second, $third)" ; }
Mega hacky magic to work around crazy Oracle NULL concats.
@param array $args
@return string
Mega hacky magic to work around crazy Oracle NULL concats .