コード例 #1
0
ファイル: index.php プロジェクト: gauthierm/pinhole
<?php

@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('site');
    PackageConfig::addPackage('pinhole');
}
require_once '../include/Application.php';
$config_filename = dirname(__FILE__) . '/../demo.ini';
$app = new Application('pinhole-demo', $config_filename);
$app->run();
コード例 #2
0
ファイル: link-fixer.php プロジェクト: nburka/blorgy
#!/usr/bin/php
<?php 
ini_set('include_path', '.:/so/sites/blorgy/pear/lib');
@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('site');
    PackageConfig::addPackage('blorg');
}
ini_set('memory_limit', -1);
set_time_limit(9000);
proc_nice(19);
require_once 'LinkFixer.php';
$config_filename = dirname(__FILE__) . '/../../blorgy.ini';
$fixer = new LinkFixer('blorgy_link_fixer', $config_filename, 'Link Fixer', 'Fixes bad links in the comments table the Blorgy site. Should only ' . 'need to be run once.');
$fixer->run();
コード例 #3
0
ファイル: convert.php プロジェクト: nburka/blorgy
#!/usr/bin/php
<?php 
ini_set('include_path', '/so/sites/blorgy/pear/lib');
proc_nice(10);
set_time_limit(130000);
ini_set('memory_limit', '-1');
@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('conversion');
    PackageConfig::addPackage('blorg');
    PackageConfig::addPackage('admin');
    PackageConfig::addPackage('site');
}
require_once 'Conversion/ConversionProcess.php';
$process = new ConversionProcess();
$process->src_dsn = 'pgsql://php@dancy/blogs';
$process->dst_dsn = 'pgsql://php@zest/BlorgyNew';
$process->instance = 1;
if ($_SERVER['argc'] < 1) {
    exit;
}
$args = $_SERVER['argv'];
array_shift($args);
$clear_data = false;
foreach ($args as $arg) {
    switch ($arg) {
        case '-C':
            $clear_data = true;
            break;
        default:
コード例 #4
0
ファイル: index.php プロジェクト: nburka/blorgy
<?php

@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('site');
    PackageConfig::addPackage('admin');
    PackageConfig::addPackage('blorg');
    PackageConfig::addPackage('hot-date');
    PackageConfig::addPackage('net-notifier');
}
require_once '../../include/admin/BlorgyAdminApplication.php';
$config_filename = dirname(__FILE__) . '/../../blorgy.ini';
$app = new BlorgyAdminApplication('blorgyadmin', $config_filename);
$app->run();
コード例 #5
0
ファイル: tag-tester.php プロジェクト: gauthierm/pinhole
<?php

require_once 'PackageConfig.php';
PackageConfig::addPackage('pinhole', 'work-gauthierm');
PackageConfig::addPackage('swat', 'work-gauthierm');
PackageConfig::addPackage('site', 'work-gauthierm');
require_once 'MDB2.php';
require_once 'SwatDB/SwatDB.php';
require_once 'Pinhole/PinholeTagFactory.php';
$dsn = 'pgsql://php@192.168.0.26/gallery?sslmode=disable';
$connection = MDB2::connect($dsn);
$instance = new PinholeInstance();
$instance->setDatabase($connection);
$instance->load(1);
PinholeTagFactory::setDefaultDatabase($connection);
PinholeTagFactory::setDefaultInstance($instance);
function test_tag($string)
{
    $tag = PinholeTagFactory::get($string);
    if ($tag) {
        echo "=> ", $tag, ': "', $tag->getTitle(), "\"\n";
        echo "   Photos: ";
        foreach ($tag->getPhotos() as $photo) {
            echo $photo->id, ' ';
        }
        echo "\n";
        if ($tag instanceof PinholeIterableTag) {
            echo "   Iterable: ", $tag->prev()->getTitle(), " <=> ", $tag->next()->getTitle(), "\n";
        }
    } else {
        echo "=> {$string}: *** error loading tag ***\n";
コード例 #6
0
ファイル: nate-go-indexer.php プロジェクト: nburka/blorgy
#!/usr/bin/php
<?php 
/**
 * Builds and updates the NateGoSearch index for Blorgy
 *
 * OPTIONS
 * -a  or  --all
 *    Indexes all content rather than just queued content.
 *
 * -v  or  --verbose level
 *    Sets the level of verbosity of the indexer. Pass 0 to turn off all
 *    output.
 */
ini_set('include_path', '.:/so/sites/blorgy/pear/lib');
@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('site');
    PackageConfig::addPackage('blorg');
    PackageConfig::addPackage('nate-go-search');
}
ini_set('memory_limit', -1);
set_time_limit(9000);
proc_nice(19);
require_once 'Blorg/BlorgNateGoSearchIndexer.php';
$config_filename = dirname(__FILE__) . '/../../blorgy.ini';
$indexer = new BlorgNateGoSearchIndexer('blorgy_search_indexer', $config_filename, 'Search Indexer', 'Builds and updates the NateGoSearch index for the Blorgy site');
$indexer->run();
コード例 #7
0
ファイル: create.php プロジェクト: nburka/blorgy
#!/usr/bin/php
<?php 
@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('creation');
}
require 'Creation/CreationProcess.php';
$process = new CreationProcess();
if ($_SERVER['argc'] < 2) {
    echo "Usage ./create.php <dsn> <sql files>...\n";
    exit;
}
$args = $_SERVER['argv'];
array_shift($args);
$process->dsn = array_shift($args);
foreach ($args as $arg) {
    if (substr($arg, -3) === 'sql') {
        $process->addFile($arg);
    } else {
        echo "{$arg}: does not end with sql, ignoring\n";
    }
}
$process->run();
コード例 #8
0
ファイル: index.php プロジェクト: nburka/blorgy
<?php

@(include_once 'PackageConfig.php');
if (class_exists('PackageConfig')) {
    PackageConfig::addPackage('swat');
    PackageConfig::addPackage('site');
    PackageConfig::addPackage('admin');
    PackageConfig::addPackage('blorg');
    PackageConfig::addPackage('xml-atom');
    PackageConfig::addPackage('hot-date');
    PackageConfig::addPackage('nate-go-search');
    PackageConfig::addPackage('concentrate');
}
/*
function shutdownDebug() {
	$usage = getrusage();
	if ($usage["ru_utime.tv_sec"] >= 29) {
		error_log('Timeout! '.$usage["ru_utime.tv_sec"]."s - ".
			$_SERVER['SCRIPT_URI']." - ".
			$_SERVER['HTTP_USER_AGENT']." - ".
			date("F j, Y, g:i a"));
	}
}
register_shutdown_function('shutdownDebug');
*/
require_once '../include/Application.php';
$config_filename = dirname(__FILE__) . '/../blorgy.ini';
$app = new Application('blorgy', $config_filename);
$app->run();