コード例 #1
0
    </style>
  </head>
  <body>
    <h1><?php 
print $title;
?>
</h1>
<?php 
$force = array_key_exists('force', $_GET);
if ($force) {
    print "<h2>Forcing re-building existing packages...</h2>";
}
$scheme = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http';
$root = $scheme . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] . '/';
print "<ul>";
for ($edition_num = get_number_of_editions(); $edition_num > 0; $edition_num--) {
    $server_root = $scheme . '://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'];
    $edition_id = urlencode(get_edition_id($edition_num));
    $save_root = urlencode(get_package_dir($edition_num));
    $relative_path = urlencode(ltrim($_SERVER['SCRIPT_NAME'] . '/edition/' . $edition_id, '/'));
    $scheme = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http';
    $atom = urlencode($server_root . $_SERVER['SCRIPT_NAME'] . '/edition/' . $edition_id . '/content.xml');
    $package_url = $server_root . CONTENT_TEST_PATH . 'build-package.php?edition_id=' . $edition_id . '&save_root=' . $save_root . '&atom=' . $atom . '&relative_path=' . $relative_path;
    $package_xml_exists = pugpig_get_edition_package_exists($edition_num);
    print "<li>{$edition_id}... (<a href=\"{$package_url}\">build url</a>) ";
    if ($package_xml_exists) {
        print "<span class=\"exists\">already exists</span>";
    } else {
        print "<span class=\"notexists\">does not exist</span>";
    }
    print " - ";
コード例 #2
0
 function get_all_atom_edition_ids()
 {
     $ids = array();
     $num_editions = get_number_of_editions();
     $edition_num = $num_editions;
     $start_num = get_edition_start_num();
     do {
         $ids[] = get_edition_id($edition_num);
     } while (--$edition_num >= $start_num);
     return $ids;
 }
コード例 #3
0
 function get_all_atom_edition_ids()
 {
     $ids = array();
     $start_num = get_edition_start_num();
     $end_num = get_number_of_editions() + $start_num - 1;
     $edition_num = $start_num;
     do {
         if (pugpig_get_edition_package_exists($edition_num)) {
             $ids[] = get_edition_id($edition_num);
         }
     } while ($edition_num++ < $end_num);
     return $ids;
 }