| @@ 676-688 (lines=13) @@ | ||
| 673 | * @return array Array with uid-pid pairs for all pages in the page tree. |
|
| 674 | * @see ImportExport::flatInversePageTree() |
|
| 675 | */ |
|
| 676 | public function flatInversePageTree_pid($idH, $a = [], $pid = -1) |
|
| 677 | { |
|
| 678 | if (is_array($idH)) { |
|
| 679 | $idH = array_reverse($idH); |
|
| 680 | foreach ($idH as $v) { |
|
| 681 | $a[$v['uid']] = $pid; |
|
| 682 | if (is_array($v['subrow'])) { |
|
| 683 | $a = $this->flatInversePageTree_pid($v['subrow'], $a, $v['uid']); |
|
| 684 | } |
|
| 685 | } |
|
| 686 | } |
|
| 687 | return $a; |
|
| 688 | } |
|
| 689 | ||
| 690 | /** |
|
| 691 | * Write all database records except pages (writtein in writeRecords_pages()) |
|
| @@ 978-990 (lines=13) @@ | ||
| 975 | * @return array Array with uid-uid pairs for all pages in the page tree. |
|
| 976 | * @see Import::flatInversePageTree_pid() |
|
| 977 | */ |
|
| 978 | public function flatInversePageTree($idH, $a = []) |
|
| 979 | { |
|
| 980 | if (is_array($idH)) { |
|
| 981 | $idH = array_reverse($idH); |
|
| 982 | foreach ($idH as $k => $v) { |
|
| 983 | $a[$v['uid']] = $v['uid']; |
|
| 984 | if (is_array($v['subrow'])) { |
|
| 985 | $a = $this->flatInversePageTree($v['subrow'], $a); |
|
| 986 | } |
|
| 987 | } |
|
| 988 | } |
|
| 989 | return $a; |
|
| 990 | } |
|
| 991 | ||
| 992 | /** |
|
| 993 | * Returns TRUE if the input table name is to be regarded as a static relation (that is, not exported etc). |
|