$parts =
explode('.',
$max);
$n = Number::
alphadecimalToInt($parts[0
]);
$prefix = '';
} else { // This is a comment with a parent comment, so increase the part of
// the thread value at the proper depth.
// Get the parent comment:
$parent =
$this->
getParentComment();
// Strip the "/" from the end of the parent thread.
$parent->
setThread((string) rtrim((string) $parent->
getThread(), '/'
));
$prefix =
$parent->
getThread() . '.';
// Get the max value in *this* thread.
$max =
$storage->
getMaxThreadPerThread($this);
if ($max == ''
) { // First child of this parent. As the other two cases do an
// increment of the thread number before creating the thread
// string set this to -1 so it requires an increment too.
$n = -1;
} else {