From 9370f5c88da2c48921068dbeaa44ab847c65309f Mon Sep 17 00:00:00 2001 From: paul Date: Mon, 16 Oct 2006 18:20:28 +0000 Subject: [PATCH] Renamed LiveSupport to Campcaster. Got rid of copyright notice in files, we will just have one that covers all files at the root of the package. Converted comments to Phpdocumentor format. Added @author, @version, @package, and @subpackage doc tags. Reformatted code to Campware PHP coding conventions. --- .../src/modules/htmlUI/bin/configurePHP.php | 23 -- livesupport/src/modules/htmlUI/doc/index.html | 2 +- .../htmlUI/src/postfilter.template_marker.php | 6 +- .../htmlUI/var/formmask/exchange.inc.php | 11 +- .../htmlUI/var/formmask/generic.inc.php | 3 +- .../var/formmask/mdata_relations.inc.php | 1 + .../htmlUI/var/formmask/metadata.inc.php | 2 +- .../htmlUI/var/formmask/subjects.inc.php | 2 +- .../src/modules/htmlUI/var/html/index.php | 2 +- livesupport/src/modules/htmlUI/var/index.php | 2 +- .../modules/htmlUI/var/localizer/auth.inc.php | 16 +- .../htmlUI/var/localizer/form_function.php | 67 ++-- .../src/modules/htmlUI/var/redirect.php | 2 +- .../modules/htmlUI/var/templates/header.tpl | 2 +- .../src/modules/htmlUI/var/templates/menu.tpl | 14 +- .../htmlUI/var/templates/popup/header.tpl | 2 +- .../htmlUI/var/templates/popup/help.tpl | 82 ++--- .../src/modules/htmlUI/var/ui_base.inc.php | 60 ++-- .../modules/htmlUI/var/ui_browse.class.php | 8 +- .../modules/htmlUI/var/ui_browser.class.php | 103 +++--- .../modules/htmlUI/var/ui_calendar.class.php | 13 +- .../src/modules/htmlUI/var/ui_conf.php | 10 +- .../modules/htmlUI/var/ui_conf.php.template | 13 +- .../modules/htmlUI/var/ui_exchange.class.php | 276 +++++++------- .../modules/htmlUI/var/ui_handler.class.php | 312 +++++++++------- .../modules/htmlUI/var/ui_hubBrowse.class.php | 38 +- .../modules/htmlUI/var/ui_hubSearch.class.php | 40 ++- .../src/modules/htmlUI/var/ui_jscom.php | 119 +++++-- .../modules/htmlUI/var/ui_playlist.class.php | 337 +++++++++++------- .../modules/htmlUI/var/ui_scheduler.class.php | 102 +++--- .../var/ui_schedulerPhpClient.class.php | 134 ++++--- .../htmlUI/var/ui_scratchpad.class.php | 97 +++-- .../modules/htmlUI/var/ui_search.class.php | 52 +-- .../htmlUI/var/ui_smartyExtensions.inc.php | 13 +- .../modules/htmlUI/var/ui_subjects.class.php | 153 ++++---- .../modules/htmlUI/var/ui_transfers.class.php | 117 +++--- 36 files changed, 1277 insertions(+), 959 deletions(-) diff --git a/livesupport/src/modules/htmlUI/bin/configurePHP.php b/livesupport/src/modules/htmlUI/bin/configurePHP.php index a2987b53c..92fcc97ef 100755 --- a/livesupport/src/modules/htmlUI/bin/configurePHP.php +++ b/livesupport/src/modules/htmlUI/bin/configurePHP.php @@ -1,29 +1,6 @@ #!/usr/bin/php -#------------------------------------------------------------------------------- -# Copyright (c) 2004 Media Development Loan Fund -# -# This file is part of the Campcaster project. -# http://campcaster.campware.org/ -# To report bugs, send an e-mail to bugs@campware.org -# -# Campcaster 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. -# -# Campcaster 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 Campcaster; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# # Author : $Author$ # Version : $Revision$ -# Location : $URL$ #------------------------------------------------------------------------------- #------------------------------------------------------------------------------- # This script configures php for the htmlUI diff --git a/livesupport/src/modules/htmlUI/doc/index.html b/livesupport/src/modules/htmlUI/doc/index.html index 3aed9ae18..e13ee61e5 100644 --- a/livesupport/src/modules/htmlUI/doc/index.html +++ b/livesupport/src/modules/htmlUI/doc/index.html @@ -8,7 +8,7 @@

Preface

This document is part of the -LiveSupport +Campcaster project, Copyright © 2004 Media Development Loan Fund, under the GNU GPL.
diff --git a/livesupport/src/modules/htmlUI/src/postfilter.template_marker.php b/livesupport/src/modules/htmlUI/src/postfilter.template_marker.php index 660a90062..e1c7f6bb5 100644 --- a/livesupport/src/modules/htmlUI/src/postfilter.template_marker.php +++ b/livesupport/src/modules/htmlUI/src/postfilter.template_marker.php @@ -8,7 +8,7 @@ * Version: 1.0 * Date: March, 2003 * Purpose: Mark the Template begin and end - * Install: Drop into the plugin directory, call + * Install: Drop into the plugin directory, call * $smarty->load_filter('post','template_marker'); * from application. * Author: Erik Seifert @@ -16,6 +16,6 @@ */ function smarty_postfilter_template_marker($compiled, &$smarty) { - return '' . $compiled . ''; + return '' . $compiled . ''; } -?> +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/formmask/exchange.inc.php b/livesupport/src/modules/htmlUI/var/formmask/exchange.inc.php index 2fc06cc35..59d015ae9 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/exchange.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/exchange.inc.php @@ -48,7 +48,7 @@ $mask = array( 'label' => 'Sun', 'groupit' => true ), - array( + array( 'group' => array('mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'), 'label' => 'Weeksdays' ), @@ -57,7 +57,7 @@ $mask = array( 'type' => 'date', 'label' => 'Month/Day', 'options' => array( - 'format' => 'md', + 'format' => 'md', 'addEmptyOption' => true, 'emptyOptionValue' => '*', 'emptyOptionText' => '*' @@ -68,7 +68,7 @@ $mask = array( 'type' => 'date', 'label' => 'Hour/Minute', 'options' => array( - 'format' => 'Hi', + 'format' => 'Hi', ) ), array( @@ -76,7 +76,7 @@ $mask = array( 'type' =>'button', 'label' =>'Cancel', 'attributes'=>array('onclick' => 'location.href="'.UI_BROWSER.'?act=BACKUP"'), - 'groupit' => TRUE + 'groupit' => TRUE ), array( 'element' =>'Submit', @@ -90,5 +90,4 @@ $mask = array( ), ) ); -?> - \ No newline at end of file +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php b/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php index 8508d7515..4f19bd504 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/generic.inc.php @@ -849,4 +849,5 @@ $ui_fmask = array( 'group' => array('cancel', 'submitter') ) ) -); \ No newline at end of file +); +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/formmask/mdata_relations.inc.php b/livesupport/src/modules/htmlUI/var/formmask/mdata_relations.inc.php index 0ae6abb9c..6997c335a 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/mdata_relations.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/mdata_relations.inc.php @@ -60,3 +60,4 @@ $relations = array( 'ls:url' => 'Stream URL' ); +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/formmask/metadata.inc.php b/livesupport/src/modules/htmlUI/var/formmask/metadata.inc.php index d8610b25e..3753aae02 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/metadata.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/metadata.inc.php @@ -475,4 +475,4 @@ $mask = array( ), ) ); -?> +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/formmask/subjects.inc.php b/livesupport/src/modules/htmlUI/var/formmask/subjects.inc.php index a041fe8f0..e6783cd31 100644 --- a/livesupport/src/modules/htmlUI/var/formmask/subjects.inc.php +++ b/livesupport/src/modules/htmlUI/var/formmask/subjects.inc.php @@ -117,4 +117,4 @@ $mask = array( ) ), ); -?> +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/html/index.php b/livesupport/src/modules/htmlUI/var/html/index.php index 5e79caf53..e2d91473a 100644 --- a/livesupport/src/modules/htmlUI/var/html/index.php +++ b/livesupport/src/modules/htmlUI/var/html/index.php @@ -1,3 +1,3 @@ +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/index.php b/livesupport/src/modules/htmlUI/var/index.php index 60c09cc56..b93dfd6f1 100644 --- a/livesupport/src/modules/htmlUI/var/index.php +++ b/livesupport/src/modules/htmlUI/var/index.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/localizer/auth.inc.php b/livesupport/src/modules/htmlUI/var/localizer/auth.inc.php index 28b53be08..d12c0e41f 100644 --- a/livesupport/src/modules/htmlUI/var/localizer/auth.inc.php +++ b/livesupport/src/modules/htmlUI/var/localizer/auth.inc.php @@ -1,10 +1,9 @@ setFetchMode(DB_FETCHMODE_ASSOC); $gb =& new GreenBox($dbc, $config); - if (!$data['PHP_AUTH_USER'] || !$data['PHP_AUTH_PW']) { return FALSE; } @@ -34,7 +32,7 @@ function login(&$data) $id = $gb->getObjId($data['PHP_AUTH_USER'], $gb->storId); - if(PEAR::isError($id)) { + if (PEAR::isError($id)) { return FALSE; } @@ -52,7 +50,7 @@ function authenticate() if (!isset($_SERVER['PHP_AUTH_USER'])) { authenticate(); -} elseif (login($_SERVER) !== TRUE) { +} elseif (login($_SERVER) !== TRUE) { authenticate(); } -?> +?> \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/localizer/form_function.php b/livesupport/src/modules/htmlUI/var/localizer/form_function.php index 35f74d06b..7c025975b 100644 --- a/livesupport/src/modules/htmlUI/var/localizer/form_function.php +++ b/livesupport/src/modules/htmlUI/var/localizer/form_function.php @@ -1,63 +1,72 @@ $v) { ## add elements ######################## - if ($v['type']=='radio') { - foreach($v['options'] as $rk=>$rv) { + if ($v['type'] == 'radio') { + foreach ($v['options'] as $rk => $rv) { $radio[] =& $form->createElement($v['type'], NULL, NULL, $rv, $rk, $v['attributes']); } $form->addGroup($radio, $v['element'], tra($v['label'])); unset($radio); - - } elseif ($v['type']=='select') { + + } elseif ($v['type'] == 'select') { $elem[$v['element']] =& $form->createElement($v['type'], $v['element'], tra($v['label']), $v['options'], $v['attributes']); $elem[$v['element']]->setMultiple($v['multiple']); - if (isset($v['selected'])) $elem[$v['element']]->setSelected($v['selected']); - if (!$v['groupit']) $form->addElement($elem[$v['element']]); - - } elseif ($v['type']=='date') { + if (isset($v['selected'])) { + $elem[$v['element']]->setSelected($v['selected']); + } + if (!$v['groupit']) { + $form->addElement($elem[$v['element']]); + } + } elseif ($v['type'] == 'date') { $elem[$v['element']] =& $form->createElement($v['type'], $v['element'], tra($v['label']), $v['options'], $v['attributes']); - if (!$v['groupit']) $form->addElement($elem[$v['element']]); - - } elseif ($v['type']=='checkbox' || $v['type']=='static') { + if (!$v['groupit']) { + $form->addElement($elem[$v['element']]); + } + + } elseif (($v['type'] == 'checkbox') || ($v['type'] == 'static')) { $elem[$v['element']] =& $form->createElement($v['type'], $v['element'], tra($v['label']), $v['text'], $v['attributes']); - if (!$v['groupit']) $form->addElement($elem[$v['element']]); - + if (!$v['groupit']) { + $form->addElement($elem[$v['element']]); + } + } elseif (isset($v['type'])) { $elem[$v['element']] =& $form->createElement($v['type'], $v['element'], tra($v['label']), ($v[type]=='text' || $v['type']=='file' || $v['type']=='password') ? array_merge(array('size'=>UI_INPUT_STANDARD_SIZE, 'maxlength'=>UI_INPUT_STANDARD_MAXLENGTH), $v['attributes']) : ($v['type']=='textarea' ? array_merge(array('rows'=>UI_TEXTAREA_STANDART_ROWS, 'cols'=>UI_TEXTAREA_STANDART_COLS), $v['attributes']) : ($v['type']=='button' || $v['type']=='submit' || $v['type']=='reset' ? array_merge(array('class'=>UI_BUTTON_STYLE), $v['attributes']) : $v['attributes'])) ); - if (!$v['groupit']) $form->addElement($elem[$v['element']]); + if (!$v['groupit']) { + $form->addElement($elem[$v['element']]); + } } - ## add required rule ################### + // add required rule ################### if ($v['required']) { $form->addRule($v['element'], isset($v['requiredmsg']) ? tra($v['requiredmsg']) : tra('Missing value for $1', tra($v['label'])), 'required', NULL, $side); } - ## add constant value ################## + // add constant value ################## if (isset($v['constant'])) { $form->setConstants(array($v['element']=>$v['constant'])); } - ## add default value ################### + // add default value ################### if (isset($v['default'])) { $form->setDefaults(array($v['element']=>$v['default'])); } - ## add other rules ##################### + // add other rules ##################### if ($v['rule']) { $form->addRule($v['element'], isset($v['rulemsg']) ? tra($v['rulemsg']) : tra('$1 must be $2', tra($v['element']), tra($v['rule'])), $v['rule'] ,$v['format'], $side); } - ## add group ########################### + // add group ########################### if (is_array($v['group'])) { foreach($v['group'] as $val) { $groupthose[] =& $elem[$val]; @@ -78,7 +87,7 @@ function parseArr2Form(&$form, $mask, $side='client') } } } - + $form->validate(); } @@ -101,19 +110,19 @@ function addLanguageFormArr() 'type' => 'text', 'label' => 'English name', 'required' => TRUE - ), + ), array( 'element' => 'NativeName', 'type' => 'text', 'label' => 'Native Name', 'required' => TRUE - ), + ), array( 'element' => 'Submit', 'type' => 'submit', 'label' => 'Submit', 'groupit' => TRUE - ), + ), array( 'element' => 'Cancel', 'type' => 'button', diff --git a/livesupport/src/modules/htmlUI/var/redirect.php b/livesupport/src/modules/htmlUI/var/redirect.php index 60c09cc56..b93dfd6f1 100644 --- a/livesupport/src/modules/htmlUI/var/redirect.php +++ b/livesupport/src/modules/htmlUI/var/redirect.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/templates/header.tpl b/livesupport/src/modules/htmlUI/var/templates/header.tpl index 659703164..774e2a932 100644 --- a/livesupport/src/modules/htmlUI/var/templates/header.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/header.tpl @@ -3,7 +3,7 @@ - LIVESUPPORT + Campcaster {* *} diff --git a/livesupport/src/modules/htmlUI/var/templates/menu.tpl b/livesupport/src/modules/htmlUI/var/templates/menu.tpl index 62daef3ed..579b2248c 100644 --- a/livesupport/src/modules/htmlUI/var/templates/menu.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/menu.tpl @@ -28,9 +28,9 @@ if (window.attachEvent) window.attachEvent("onload", sfHover);
  • ##Station Settings##
  • {/if} - {if $SUBJECTS->isMemberOf('Subjects')} + {*if $SUBJECTS->isMemberOf('Subjects')*}
  • ##User/Groups##
  • - {else} + {*else*}
  • ##Change Password##
  • - {/if} + {*/if*} {if $SUBJECTS->isMemberOf('Admins')}
  • ##File List##
  • {/if} @@ -92,5 +92,5 @@ if (window.attachEvent) window.attachEvent("onload", sfHover); {/if} -{include file='userinfo.tpl'} +{include file='userinfo.tpl'} \ No newline at end of file diff --git a/livesupport/src/modules/htmlUI/var/templates/popup/header.tpl b/livesupport/src/modules/htmlUI/var/templates/popup/header.tpl index dba3e416c..64dd5f472 100644 --- a/livesupport/src/modules/htmlUI/var/templates/popup/header.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/popup/header.tpl @@ -3,7 +3,7 @@ - LIVESUPPORT + Campcaster diff --git a/livesupport/src/modules/htmlUI/var/templates/popup/help.tpl b/livesupport/src/modules/htmlUI/var/templates/popup/help.tpl index 22d2ca327..9c6839b99 100644 --- a/livesupport/src/modules/htmlUI/var/templates/popup/help.tpl +++ b/livesupport/src/modules/htmlUI/var/templates/popup/help.tpl @@ -2,7 +2,7 @@ -LiveSupport Help +Campcaster Help