Merge branch 'master' of dev.sourcefabric.org:airtime
This commit is contained in:
commit
f4bba3d302
5 changed files with 32 additions and 13 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
/*
|
||||
* Navigation container (config/array)
|
||||
|
||||
|
||||
* Each element in the array will be passed to
|
||||
* Zend_Navigation_Page::factory() when constructing
|
||||
* the navigation container below.
|
||||
|
@ -16,7 +16,7 @@ $pages = array(
|
|||
'resource' => 'nowplaying'
|
||||
),
|
||||
array(
|
||||
'label' => 'Add Audio',
|
||||
'label' => 'Add Media',
|
||||
'module' => 'default',
|
||||
'controller' => 'Plupload',
|
||||
'action' => 'plupload',
|
||||
|
@ -51,7 +51,7 @@ $pages = array(
|
|||
'module' => 'default',
|
||||
'controller' => 'user',
|
||||
'action' => 'add-user',
|
||||
'resource' => 'user'
|
||||
'resource' => 'user'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
@ -64,10 +64,10 @@ $pages = array(
|
|||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
// Create container from array
|
||||
$container = new Zend_Navigation($pages);
|
||||
$container->id = "nav";
|
||||
|
||||
|
||||
//store it in the registry:
|
||||
Zend_Registry::set('Zend_Navigation', $container);
|
||||
|
|
|
@ -161,7 +161,7 @@ class ScheduleController extends Zend_Controller_Action
|
|||
if (($user->isHost($show->getShowId()) || $user->isAdmin()) && !$show->isRecorded() && !$show->isRebroadcast()) {
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/schedule-show-dialog'.$params,
|
||||
'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add Content');
|
||||
'callback' => 'window["buildScheduleDialog"]'), 'title' => 'Add / Remove Content');
|
||||
|
||||
$menu[] = array('action' => array('type' => 'ajax', 'url' => '/Schedule/clear-show'.$params,
|
||||
'callback' => 'window["scheduleRefetchEvents"]'), 'title' => 'Remove All Content');
|
||||
|
|
19
install/DoctrineMigrations/Version20110312121200.php
Normal file
19
install/DoctrineMigrations/Version20110312121200.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Migrations\AbstractMigration,
|
||||
Doctrine\DBAL\Schema\Schema;
|
||||
|
||||
class Version20110312121200 extends AbstractMigration
|
||||
{
|
||||
public function up(Schema $schema)
|
||||
{
|
||||
$schema->dropTable("cc_backup");
|
||||
$schema->dropTable("cc_trans");
|
||||
}
|
||||
|
||||
public function down(Schema $schema)
|
||||
{
|
||||
}
|
||||
}
|
|
@ -39,7 +39,7 @@ $command = "sudo -u postgres dropdb {$CC_CONFIG['dsn']['database']} 2> /dev/null
|
|||
//------------------------------------------------------------------------
|
||||
if ($dbDeleteFailed) {
|
||||
echo " * Couldn't delete the database, so deleting all the DB tables...".PHP_EOL;
|
||||
AirtimeInstall::DbConnect(true);
|
||||
AirtimeInstall::DbConnect(false);
|
||||
|
||||
if (!PEAR::isError($CC_DBC)) {
|
||||
$sql = "select * from pg_tables where tableowner = 'airtime'";
|
||||
|
|
|
@ -112,7 +112,7 @@ class AirtimeInstall {
|
|||
public static function SetupStorageDirectory($CC_CONFIG)
|
||||
{
|
||||
global $CC_CONFIG, $CC_DBC;
|
||||
|
||||
|
||||
echo PHP_EOL."*** Directory Setup ***".PHP_EOL;
|
||||
foreach (array('baseFilesDir', 'storageDir') as $d) {
|
||||
if ( !file_exists($CC_CONFIG[$d]) ) {
|
||||
|
@ -141,7 +141,7 @@ class AirtimeInstall {
|
|||
// Create the database user
|
||||
$command = "sudo -u postgres psql postgres --command \"CREATE USER {$CC_CONFIG['dsn']['username']} "
|
||||
." ENCRYPTED PASSWORD '{$CC_CONFIG['dsn']['password']}' LOGIN CREATEDB NOCREATEUSER;\" 2>/dev/null";
|
||||
|
||||
|
||||
@exec($command, $output, $results);
|
||||
if ($results == 0) {
|
||||
echo "* User {$CC_CONFIG['dsn']['username']} created.".PHP_EOL;
|
||||
|
@ -153,7 +153,7 @@ class AirtimeInstall {
|
|||
public static function CreateDatabase()
|
||||
{
|
||||
global $CC_CONFIG;
|
||||
|
||||
|
||||
$command = "sudo -u postgres createdb {$CC_CONFIG['dsn']['database']} --owner {$CC_CONFIG['dsn']['username']} 2> /dev/null";
|
||||
@exec($command, $output, $results);
|
||||
if ($results == 0) {
|
||||
|
@ -205,7 +205,7 @@ class AirtimeInstall {
|
|||
|
||||
public static function CreateSymlinks(){
|
||||
AirtimeInstall::RemoveSymlinks();
|
||||
|
||||
|
||||
$dir = realpath(__DIR__."/../utils/airtime-import");
|
||||
exec("ln -s $dir /usr/bin/airtime-import");
|
||||
|
||||
|
@ -214,8 +214,8 @@ class AirtimeInstall {
|
|||
}
|
||||
|
||||
public static function RemoveSymlinks(){
|
||||
exec("rm /usr/bin/airtime-import >/dev/null 2>&1");
|
||||
exec("rm /usr/bin/airtime-clean-storage >/dev/null 2>&1");
|
||||
exec("rm -f /usr/bin/airtime-import");
|
||||
exec("rm -f /usr/bin/airtime-clean-storage");
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue