$page->current = true; $page->homePage = false; $page->space = $space; $page->title = $subChapter->getTitle(); $page->content = $subChapter->getWiki($stylesheet); $page->parentId = $mainPage->id; } echo "\n\t storing status: "; try { $soap->storePage($token, $page); echo "success"; } catch (Exception $e) { echo "failed - " . $e->getMessage(); } } } // remove deleted pages if (count($book->chapter)) { $diff = array_diff($prev, $new); foreach ($diff as $key => $pagename) { if ($pagename != 'Home' && $pagename != 'manual-template' && $pagename != 'Appendix' && $pagename != 'manual-note') { echo 'Removing ' . $pagename . "\n"; try { $page = $soap->getPage($token, $space, $pagename); $soap->removePage($token, $page->id); } catch (Exception $e) { continue; } } } }
<?php require_once 'includes/header.php'; require_once 'etc/config.php'; $soap = new SoapClient($confluenceWsdl); $token = $soap->login($confluenceUser, $confluencePass); if ($_SERVER['REQUEST_METHOD'] === 'POST') { if (is_array($_POST['page'])) { foreach ($_POST['page'] as $key => $pageId) { $soap->removePage($token, $pageId); } } } $pages = $soap->getPages($token, $_REQUEST['space']); arsort($pages); ?> <h1>Zend Framework - Wiki Page Manager</h1> <p>Currently browsing <?php echo $_REQUEST['space']; ?> </p> <form name="frm_page_manager" method="post" action="pages.php"> <table width="100%"> <tr> <th>x</th> <th>id</th> <th>parent id</th> <th>page</th> </tr> <?php foreach ($pages as $key => $page) {