Revision 1514
Added by Dietmar about 13 years ago
functions.php | ||
---|---|---|
539 | 539 |
} |
540 | 540 |
|
541 | 541 |
// Function to get all sub pages id's |
542 |
function get_subs($parent, $subs)
|
|
542 |
function get_subs($parent, array $subs )
|
|
543 | 543 |
{ |
544 | 544 |
// Connect to the database |
545 | 545 |
global $database; |
546 | 546 |
// Get id's |
547 | 547 |
$sql = 'SELECT `page_id` FROM `'.TABLE_PREFIX.'pages` WHERE `parent` = '.$parent; |
548 |
$query = $database->query($sql); |
|
549 |
if($query->numRows() > 0) |
|
550 |
{ |
|
548 |
if( ($query = $database->query($sql)) ) { |
|
551 | 549 |
while($fetch = $query->fetchRow()) { |
552 | 550 |
$subs[] = $fetch['page_id']; |
553 |
// Get subs of this sub |
|
551 |
// Get subs of this sub recursive
|
|
554 | 552 |
$subs = get_subs($fetch['page_id'], $subs); |
555 | 553 |
} |
556 | 554 |
} |
Also available in: Unified diff
account/signup.php, check if user is already logged
fix non object message in framework/functions.php