* under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('OutputCache');
class OutputCache
{
    private $content = NULL;
    public function __construct()
    {
    }
    public function start()
    {
        $this->content = 0;
        // Obliterate content.
        ob_start();
    }
    public function &stop()
    {
        $this->content = ob_get_contents();
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('Plugins');
require_once DIR_CLASSES . '/plugin.class.php';
class Plugins implements Iterator, Countable
{
    private $_rootDir;
    private $_plugins;
    private $_position = 0;
    public function __construct($pluginDir)
    {
        // Add a trailing backslash if necessary.
        if (substr($pluginDir, -1, 1) != '/') {
            $pluginDir = $pluginDir . '/';
        }
        $this->_rootDir = $pluginDir;
        $this->detect();
    }
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('MasterBrowserPlugin');
require_once DIR_CLASSES . '/masterserver.class.php';
class MasterBrowserPlugin extends Plugin implements Actioner, RequestInterpreter
{
    public static $name = 'masterbrowser';
    private $_displayOptions = 0;
    private static $baseRequestName = 'masterserver';
    private static $serverSummaryCacheName = 'masterbrowser/summary.html';
    /// Master Server instance (temporary).
    private $db;
    public function __construct()
    {
    }
    public function title()
    {
        return 'Master Server';
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('BuildLogParser');
require_once 'buildevent.class.php';
require_once 'packagefactory.class.php';
require_once 'packages/abstractunstablepackage.class.php';
class BuildLogParser
{
    public static function parse($xmlBuildLog, &$builds)
    {
        if (!is_array($builds)) {
            throw new Exception('Invalid builds argument, array expected');
        }
        $logDom = self::constructSimpleXmlElementTree($xmlBuildLog);
        if ($logDom == FALSE) {
            throw new Exception('Failed constructing XML DOM');
        }
        if (!self::parseBuildLogDOM($logDom, $builds)) {
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('AbstractUnstableBuilderPackage');
require_once 'abstractunstablepackage.class.php';
abstract class AbstractUnstableBuilderPackage extends AbstractUnstablePackage implements iBuilderProduct
{
    protected $buildId = 0;
    /// Unique.
    // Override implementation in AbstractUnstablePackage.
    public function composeFullTitle($includeVersion = true, $includePlatformName = true, $includeBuildId = true)
    {
        $includeVersion = (bool) $includeVersion;
        $includeBuildId = (bool) $includeBuildId;
        $title = $this->title;
        if ($includeVersion && isset($this->version)) {
            $title .= " {$this->version}";
        }
        if ($includeBuildId && $this->buildId !== 0) {
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
require_once 'includes/platform.inc.php';
require_once 'includes/utilities.inc.php';
includeGuard('MasterServer');
function get_ident($info)
{
    if (!is_array($info)) {
        throw new Exception('Invalid info argument, array expected.');
    }
    if (!isset($info['at'])) {
        throw new Exception('Invalid info, parameter \'at\' not specified.');
    }
    if (!isset($info['port'])) {
        throw new Exception('Invalid info, parameter \'port\' not specified.');
    }
    return $info['at'] . ":" . $info['port'];
}
class ServerInfo implements ArrayAccess
{
Ejemplo n.º 7
0
 * @file plugin.class.php
 * Abstract class which specifies the base object for all Plugins.
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('Plugin');
class Plugin
{
    public static $name;
    // Abstract methods:
    public function title()
    {
    }
}
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('PackageFactory');
require_once DIR_CLASSES . '/version.class.php';
require_once 'packages/basepackage.class.php';
require_once 'packages/nullpackage.class.php';
require_once 'packages/distributionpackage.class.php';
require_once 'packages/unstabledistributionpackage.class.php';
require_once 'packages/pluginpackage.class.php';
require_once 'packages/unstablepluginpackage.class.php';
class PackageFactory
{
    private static $nullPackage = NULL;
    public static function newNullPackage()
    {
        if (!isset($nullPackage)) {
            self::$nullPackage = new NullPackage();
        }
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright @ 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('ContentCache');
class ContentInfo
{
    public $modifiedTime = NULL;
}
class ContentCache
{
    private $_docRoot = NULL;
    public function __construct($docRoot = NULL)
    {
        $this->_docRoot = $docRoot . '/';
    }
    public function store($file, $content)
    {
        if (!isset($file) || $file == '' || !isset($content) || $content == '') {
            return false;
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('AddonRepositoryPlugin');
require_once 'baseaddon.class.php';
require_once 'addonsparser.class.php';
class AddonRepositoryPlugin extends Plugin implements Actioner, RequestInterpreter
{
    public static $name = 'addonrepository';
    public static $baseRequestName = 'addons';
    private $_displayOptions = 0;
    // Symbolic game mode names:
    public static $doomGameModes = array('doom1', 'doom1-ultimate', 'doom1-share', 'doom2', 'doom2-plut', 'doom2-tnt');
    public static $hereticGameModes = array('heretic', 'heretic-share', 'heretic-ext');
    public static $hexenGameModes = array('hexen', 'hexen-dk', 'hexen-demo');
    private $addons = NULL;
    public function __construct()
    {
    }
/**
 * @file unstabledistributionpackage.class.php
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('DistributionUnstablePackage');
require_once 'abstractunstablebuilderpackage.class.php';
class DistributionUnstablePackage extends AbstractUnstablePackage
{
}
class DistributionUnstableBuilderPackage extends AbstractUnstableBuilderPackage
{
}
Ejemplo n.º 12
0
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('Feed');
require_once DIR_EXTERNAL . '/magpierss/rss_fetch.inc';
class FeedItem
{
    public $author;
    public $timestamp;
    // unix
    public $title;
    public $link;
    public $description;
}
class Feed implements Iterator, Countable
{
    private $feedFormat;
    private $feedUri;
    private $items;
Ejemplo n.º 13
0
    // Should never happen as all requests are supposed to be rewritten and
    // passed to index.php
    if (count(get_included_files()) == 1) {
        header('HTTP/1.0 403 Forbidden');
        exit;
    }
    // Ensure this module is only included once.
    $moduleName = strtoupper("{$moduleName}");
    $finalModuleName = "MODULE_{$moduleName}";
    if (defined($finalModuleName)) {
        throw new Exception("Module name '{$moduleName}' already defined");
    }
    define("{$finalModuleName}", TRUE);
}
// Guard this file too.
includeGuard('platform');
/**
 * Apply assumed default PHP configuration.
 *
 * Much of the configuration done here is actually overridden at a higher
 * level however we define a default for normalization reasons.
 */
mb_internal_encoding("utf-8");
mb_http_output("utf-8");
date_default_timezone_set('Europe/London');
/**
 * @defgroup basePaths Base Paths
 * @ingroup platform
 */
///{
define('DIR_CACHE', 'cache');
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('AbstractPackage');
require_once 'basepackage.class.php';
require_once dirname(__FILE__) . '/../downloadable.interface.php';
require_once dirname(__FILE__) . '/../builderproduct.interface.php';
abstract class AbstractPackage extends BasePackage implements iDownloadable
{
    protected static $emptyString = '';
    protected $directDownloadUri = NULL;
    protected $directDownloadFallbackUri = NULL;
    protected $releaseNotesUri = NULL;
    protected $releaseChangeLogUri = NULL;
    protected $releaseDate = 0;
    protected $compileLogUri = NULL;
    protected $compileWarnCount = NULL;
    protected $compileErrorCount = NULL;
    public function __construct($platformId = PID_ANY, $title = NULL, $version = NULL, $directDownloadUri = NULL, $directDownloadFallbackUri = NULL, $releaseDate = 0)
<?php

/**
 * @file builderproduct.interface.php
 * Abstract interface for objects which provide "BuilderProduct" functionality.
 *
 * @authors Copyright @ 2009-2013 Daniel Swanson <*****@*****.**>
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('iBuilderProduct');
interface iBuilderProduct
{
    public function setBuildUniqueId($id);
    public function buildUniqueId();
}
Ejemplo n.º 16
0
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('Request');
require_once DIR_CLASSES . '/url.class.php';
class Request
{
    private $_url;
    private $_post;
    public function __construct($url, $postVars = NULL)
    {
        $this->_url = new Url($url);
        if (isset($postVars) && is_array($postVars)) {
            $this->_post = array();
            foreach ($postVars as $key => $val) {
                $this->_post[$key] = $val;
            }
        }
        $this->_post = NULL;
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('BuildEvent');
class BuildEvent
{
    private $uniqueId;
    private $startDate;
    private $authorName;
    private $authorEmail;
    private $releaseTypeId;
    private $releaseNotesUri = NULL;
    private $releaseChangeLogUri = NULL;
    // Event chains:
    private $prevForStartDate = NULL;
    private $nextForStartDate = NULL;
    private $prevForVersion = NULL;
    private $nextForVersion = NULL;
    /// @todo Collections should be private but allow public iteration.
/**
 * @file unstablepluginpackage.class.php
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('PluginUnstablePackage');
require_once 'abstractunstablebuilderpackage.class.php';
class PluginUnstablePackage extends AbstractUnstablePackage
{
}
class PluginUnstableBuilderPackage extends AbstractUnstableBuilderPackage
{
}
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('BaseAddon');
abstract class BaseAddon
{
    protected $title = '(unnamed)';
    protected $version = NULL;
    protected $attribs = array('featured' => 0);
    public function __construct($title = NULL, $version = NULL)
    {
        if (!is_null($title)) {
            $this->title = "{$title}";
        }
        if (!is_null($version)) {
            $this->version = "{$version}";
        }
    }
    public function &title()
Ejemplo n.º 20
0
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('Url');
class Url
{
    private $scheme = NULL;
    private $host = NULL;
    private $user = NULL;
    private $pass = NULL;
    private $path = NULL;
    private $fragment = NULL;
    private $args = NULL;
    public function __construct($str = NULL)
    {
        if (isset($str) && is_array($str)) {
            foreach ($str as $key => $value) {
                if (!strcasecmp('scheme', $key)) {
                    $this->scheme = strtolower($value);
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, write to the Free
 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
 * 02110-1301 USA</small>
 */
includeGuard('BuildRepositoryPlugin');
require_once DIR_CLASSES . '/outputcache.class.php';
/**
 * @defgroup platformId  Platform Identifier
 * @ingroup builds
 */
///@{
define('PID_ANY', 0);
///< (Enumeration). Ordinal value affects sort order and must be unique.
define('PID_WIN_X86', 1);
define('PID_MAC10_8_X86_64', 2);
define('PID_MAC10_6_X86_X86_64', 3);
define('PID_MAC10_4_X86_PPC', 4);
define('PID_LINUX_X86_64', 5);
define('PID_LINUX_X86', 6);
define('PID_SOURCE', 7);
Ejemplo n.º 22
0
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright @ 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('Actions');
require_once DIR_CLASSES . '/actioner.interface.php';
class Actions implements Iterator, Countable
{
    private $_actions = array();
    private $_position = 0;
    public function __construct()
    {
    }
    public function enqueue($actioner, $args = NULL)
    {
        if (!$actioner instanceof Actioner) {
            throw new Exception('Cannot enqueue. Not Actioner');
        }
        $this->_actions[] = array('actioner' => $actioner, 'args' => $args);
    }
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('PanoramaRotatorPlugin');
class PanoramaRotatorPlugin extends Plugin implements RequestInterpreter
{
    public static $name = 'panoramarotator';
    private $_title = 'Panorama Rotator';
    public function __construct()
    {
    }
    public function title()
    {
        return self::$_title;
    }
    static function panorama()
    {
        /**
         * Inspired by Matt Mullenweg's "Random Image Script"
/**
 * @file distributionpackage.class.php
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('DistributionPackage');
require_once 'abstractbuilderpackage.class.php';
class DistributionPackage extends AbstractPackage
{
}
class DistributionBuilderPackage extends AbstractBuilderPackage
{
}
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('iDownloadable');
interface iDownloadable
{
    public function &directDownloadUri();
    public function hasDirectDownloadUri();
    public function &directDownloadFallbackUri();
    public function hasDirectDownloadFallbackUri();
    public function &releaseDate();
    public function hasReleaseDate();
    public function genDownloadBadge();
}
Ejemplo n.º 26
0
 * @authors Copyright © 2013-2015 Daniel Swanson <*****@*****.**>
 *
 * @par License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * <small>This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or (at your
 * option) any later version. This program is distributed in the hope that it
 * will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
 * Public License for more details. You should have received a copy of the GNU
 * General Public License along with this program; if not, see:
 * http://www.gnu.org/licenses</small>
 */
includeGuard('Version');
/**
 * Component values are public for convenience.
 */
class Version
{
    public $major;
    public $minor;
    public $patch;
    public $revision;
    /**
     * Construct a new Version from discrete component values.
     *
     * @param integer:$major     Version number, @em major component.
     * @param integer:$minor     Version number, @em minor component.
     * @param integer:$patch     Version number, @em patch component.
<?php

/**
 * @file actioner.interface.php
 * Actioner interface specification.
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright @ 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('iActioner');
interface Actioner
{
    public function execute($args = NULL);
}
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('AbstractUnstablePackage');
require_once 'abstractpackage.class.php';
abstract class AbstractUnstablePackage extends AbstractPackage
{
    // Override implementation in AbstractPackage.
    public function composeFullTitle($includeVersion = true, $includePlatformName = true)
    {
        $includeVersion = (bool) $includeVersion;
        $includeBuildId = (bool) $includeBuildId;
        $title = $this->title;
        if ($includeVersion && isset($this->version)) {
            $title .= " {$this->version}";
        }
        if ($includePlatformName && $this->platformId !== PID_ANY) {
            $plat =& BuildRepositoryPlugin::platform($this->platformId);
            $title .= ' for ' . $plat['nicename'];
 * @file requestinterpreter.interface.php
 *
 * @section License
 * GPL: http://www.gnu.org/licenses/gpl.html
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('iRequestInterpreter');
require_once DIR_CLASSES . '/request.class.php';
interface RequestInterpreter
{
    /**
     * Handle the specified request.
     * @param request  (Request) to be interpreted.
     */
    public function InterpretRequest($request);
}
Ejemplo n.º 30
0
 * under the terms of the GNU General Public License as published by the Free
 * Software Foundation; either version 2 of the License, or (at your option)
 * any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 *
 * @author Copyright &copy; 2009-2013 Daniel Swanson <*****@*****.**>
 */
includeGuard('PagesPlugin');
class PagesPlugin extends Plugin implements Actioner, RequestInterpreter
{
    public static $name = 'pages';
    private $_displayOptions = 0;
    private $_pageName;
    public function __construct()
    {
    }
    public function title()
    {
        return 'Pages';
    }
    public function mustUpdateCachedPage(&$pageFile, &$cacheName)
    {
        if (!FrontController::contentCache()->has($cacheName)) {