Exemple #1
0
                    $action = 'show';
                }
            }
            //release the lock after finishing saving
            $lock_manager->releaseLock($wiki_title, $wikiId);
        } else {
            //failed to lock, unable to save
            $action = 'conflict';
        }
        break;
        // page history
    // page history
    case 'history':
        $wikiPage->loadPage($wiki_title);
        $wiki_title = $wikiPage->getTitle();
        $history = $wikiPage->history(0, 0, 'DESC');
        break;
}
// change to use empty page content
if (!isset($content)) {
    $content = '';
}
// --------- End of wiki command processing -----------
// --------- Start of wiki display --------------------
// set xtra head
$jspath = document_web_path() . '/lib/javascript';
// set image repository
$head_content .= "<script type=\"text/javascript\">" . "\nvar sImgPath = '{$themeimg}'" . "\n</script>\n";
$head_content .= '<link rel="stylesheet" type="text/css" href="' . $urlServer . 'modules/wiki/style.css">';
//navigation bar
if (!add_units_navigation()) {
Exemple #2
0
         while ($last < $nbEntries) {
             $last += $step;
         }
         $last = $last > $nbEntries ? $last - $step : $last;
         $previous = $offset - $step < 0 ? false : $offset - $step;
         $next = $offset + $step >= $nbEntries ? false : $offset + $step;
         if ($next > $nbEntries) {
             $next = false;
         }
         if ($previous < 0) {
             $previous = false;
         }
     }
     // get page history
     if ('history' == $action) {
         $history = $wikiPage->history($offset, $step, 'DESC');
     }
     // get recent changes
     if ('recent' == $action) {
         $recentChanges = $wiki->recentChanges($offset, $step);
     }
     if (0 === $step) {
         $step = $defaultStep;
     }
     break;
     // all pages
 // all pages
 case 'all':
     $allPages = $wiki->allPages();
     break;
     // edit page content