Feature: Support php7.4 (#1354)

* Run CI tests against php 7.4

* Sort composer dependencies

* Remove unused Aws S3 php library

* Pin simplepie dependency to ^1.5

* Pin getid3 dependency to ^1.9

* Pin composer semver to ^3.2

* Pin php-amqplib to ^2.12

* Drop sentry logging support

* Update composer dependencies

* Move propel regenerate to Makefile

* Regenerate propel files with v1.7.0

* Pin propel orm to ^1.7

* Regenerate propel files with v1.7.2

* fix: generator_version in airtime-conf-production.php

* Replace propel/propel1 with jooola/propel1

* Regenerate propel files with v1.7.3-dev

* Fix php7.4 compatibility

Using php-cs-fixer:

    '@PhpCsFixer' => true,
    'concat_space' => ['spacing' => 'one'],
    'ordered_class_elements' => false,
    'yoda_style' => false,
    '@PHP74Migration' => true,
    'assign_null_coalescing_to_coalesce_equal' => false,
    'ternary_to_null_coalescing' => false,
    'heredoc_indentation' => false,
    '@PHP74Migration:risky' => true,
    'declare_strict_types' => false,
    'void_return' => false,
    'use_arrow_functions' => false,

* Fix pre-commit
This commit is contained in:
Jonas L 2021-10-17 17:19:53 +02:00 committed by GitHub
parent 30b3470a06
commit 5e8d8db6e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
90 changed files with 887 additions and 1310 deletions

View File

@ -57,10 +57,13 @@ jobs:
test-legacy:
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-18.04
php-version: "7.2"
- runs-on: ubuntu-latest
php-version: "7.4"
runs-on: ${{ matrix.runs-on }}
env:

View File

@ -1,14 +0,0 @@
#!/usr/bin/env bash
set -e
# Absolute path to this script
SCRIPT=$(readlink -f "$0")
# Absolute directory this script is in
SCRIPTPATH=$(dirname "$SCRIPT")
cd "$SCRIPTPATH/../legacy/" || (echo "could not cd in $SCRIPTPATH/../legacy/" && exit 1)
path=$(pwd)
cd build
sed -i "s|\"project\.home =.*$\"|\"project.home = $path\"|g" build.properties
../vendor/propel/propel1/generator/bin/propel-gen

View File

@ -30,3 +30,8 @@ lint: $(PHP-CS-FIXER)
.PHONY: build
build:
COMPOSER_ARGS="--no-dev --ignore-platform-reqs" $(MAKE)
propel-gen: vendor
cd build && \
../vendor/bin/propel-gen \
-Dproject.home="$(shell pwd)"

View File

@ -177,13 +177,13 @@ class Application_Common_DateHelper
}
if (1 === substr_count($p_time, '.')) {
list($hhmmss, $ms) = explode('.', $p_time);
[$hhmmss, $ms] = explode('.', $p_time);
} else {
$hhmmss = $p_time;
$ms = 0;
}
list($hours, $minutes, $seconds) = explode(':', $hhmmss);
[$hours, $minutes, $seconds] = explode(':', $hhmmss);
$totalSeconds = ($hours * 3600 + $minutes * 60 + $seconds) . ".{$ms}";

View File

@ -70,7 +70,7 @@ class Application_Common_OsPath
$paths[0] = DIRECTORY_SEPARATOR . $paths[0];
}
return join(DIRECTORY_SEPARATOR, $paths);
return implode(DIRECTORY_SEPARATOR, $paths);
}
public static function getBaseDir()

View File

@ -61,7 +61,7 @@ class PodcastManager
$episodeList = $service->getPodcastEpisodes($podcast->getDbPodcastId());
$episodes = [];
usort($episodeList, [__CLASS__, '_sortByEpisodePubDate']);
for ($i = 0; $i < sizeof($episodeList); ++$i) {
for ($i = 0; $i < count($episodeList); ++$i) {
$episodeData = $episodeList[$i];
$ts = $podcast->getDbAutoIngestTimestamp();
// If the timestamp for this podcast is empty (no previous episodes have been ingested) and there are no

View File

@ -26,7 +26,7 @@ $conf = [
],
'default' => 'airtime',
],
'generator_version' => '1.7.0',
'generator_version' => '1.7.3-dev',
];
$conf['classmap'] = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php';

View File

@ -1,6 +1,6 @@
<?php
// This file generated by Propel 1.7.0 convert-conf target
// This file generated by Propel 1.7.3-dev convert-conf target
// from XML runtime conf file /vagrant/legacy/build/runtime-conf.xml
$conf = [
'datasources' => [
@ -18,7 +18,7 @@ $conf = [
],
'default' => 'airtime',
],
'generator_version' => '1.7.0',
'generator_version' => '1.7.3-dev',
];
$conf['classmap'] = include dirname(__FILE__) . DIRECTORY_SEPARATOR . 'classmap-airtime-conf.php';

View File

@ -1,6 +1,6 @@
<?php
// This file generated by Propel 1.7.0 convert-conf target
// This file generated by Propel 1.7.3-dev convert-conf target
return [
'BaseCcBlock' => 'airtime/om/BaseCcBlock.php',
'BaseCcBlockPeer' => 'airtime/om/BaseCcBlockPeer.php',
@ -83,9 +83,6 @@ return [
'BaseCcStreamSetting' => 'airtime/om/BaseCcStreamSetting.php',
'BaseCcStreamSettingPeer' => 'airtime/om/BaseCcStreamSettingPeer.php',
'BaseCcStreamSettingQuery' => 'airtime/om/BaseCcStreamSettingQuery.php',
'BaseCcTracktypes' => 'airtime/om/BaseCcTracktypes.php',
'BaseCcTracktypesPeer' => 'airtime/om/BaseCcTracktypesPeer.php',
'BaseCcTracktypesQuery' => 'airtime/om/BaseCcTracktypesQuery.php',
'BaseCcSubjs' => 'airtime/om/BaseCcSubjs.php',
'BaseCcSubjsPeer' => 'airtime/om/BaseCcSubjsPeer.php',
'BaseCcSubjsQuery' => 'airtime/om/BaseCcSubjsQuery.php',
@ -95,6 +92,9 @@ return [
'BaseCcTimestamp' => 'airtime/om/BaseCcTimestamp.php',
'BaseCcTimestampPeer' => 'airtime/om/BaseCcTimestampPeer.php',
'BaseCcTimestampQuery' => 'airtime/om/BaseCcTimestampQuery.php',
'BaseCcTracktypes' => 'airtime/om/BaseCcTracktypes.php',
'BaseCcTracktypesPeer' => 'airtime/om/BaseCcTracktypesPeer.php',
'BaseCcTracktypesQuery' => 'airtime/om/BaseCcTracktypesQuery.php',
'BaseCcWebstream' => 'airtime/om/BaseCcWebstream.php',
'BaseCcWebstreamMetadata' => 'airtime/om/BaseCcWebstreamMetadata.php',
'BaseCcWebstreamMetadataPeer' => 'airtime/om/BaseCcWebstreamMetadataPeer.php',
@ -230,10 +230,6 @@ return [
'CcStreamSettingPeer' => 'airtime/CcStreamSettingPeer.php',
'CcStreamSettingQuery' => 'airtime/CcStreamSettingQuery.php',
'CcStreamSettingTableMap' => 'airtime/map/CcStreamSettingTableMap.php',
'CcTracktypes' => 'airtime/CcTracktypes.php',
'CcTracktypesPeer' => 'airtime/CcTracktypesPeer.php',
'CcTracktypesQuery' => 'airtime/CcTracktypesQuery.php',
'CcTracktypesTableMap' => 'airtime/map/CcTracktypesTableMap.php',
'CcSubjs' => 'airtime/CcSubjs.php',
'CcSubjsPeer' => 'airtime/CcSubjsPeer.php',
'CcSubjsQuery' => 'airtime/CcSubjsQuery.php',
@ -246,6 +242,10 @@ return [
'CcTimestampPeer' => 'airtime/CcTimestampPeer.php',
'CcTimestampQuery' => 'airtime/CcTimestampQuery.php',
'CcTimestampTableMap' => 'airtime/map/CcTimestampTableMap.php',
'CcTracktypes' => 'airtime/CcTracktypes.php',
'CcTracktypesPeer' => 'airtime/CcTracktypesPeer.php',
'CcTracktypesQuery' => 'airtime/CcTracktypesQuery.php',
'CcTracktypesTableMap' => 'airtime/map/CcTracktypesTableMap.php',
'CcWebstream' => 'airtime/CcWebstream.php',
'CcWebstreamMetadata' => 'airtime/CcWebstreamMetadata.php',
'CcWebstreamMetadataPeer' => 'airtime/CcWebstreamMetadataPeer.php',

View File

@ -1344,7 +1344,7 @@ class ApiController extends Zend_Controller_Action
$data = json_decode($request->getParam('data'));
foreach ($data as $pair) {
list($id, $gain) = $pair;
[$id, $gain] = $pair;
// TODO : move this code into model -- RG
$file = Application_Model_StoredFile::RecallById($p_id = $id)->getPropelOrm();
$file->setDbReplayGain($gain);
@ -1360,7 +1360,7 @@ class ApiController extends Zend_Controller_Action
$data = json_decode($request->getParam('data'), $assoc = true);
foreach ($data as $pair) {
list($id, $info) = $pair;
[$id, $info] = $pair;
// TODO : move this code into model -- RG
$file = Application_Model_StoredFile::RecallById($p_id = $id)->getPropelOrm();
@ -1504,7 +1504,7 @@ class ApiController extends Zend_Controller_Action
$params = $request->getParams();
$instance = $request->getParam('instance_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$historyService = new Application_Service_HistoryService();
$results = $historyService->getPlayedItemData($startsDT, $endsDT, $params, $instance);
@ -1528,7 +1528,7 @@ class ApiController extends Zend_Controller_Action
$params = $request->getParams();
$userId = $request->getParam('user_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$historyService = new Application_Service_HistoryService();
$shows = $historyService->getShowList($startsDT, $endsDT, $userId);
@ -1582,7 +1582,7 @@ class ApiController extends Zend_Controller_Action
$params = $request->getParams();
$showId = $request->getParam('show_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
if ((!isset($showId)) || (!is_numeric($showId))) {
//if (!isset($showId)) {

View File

@ -283,8 +283,8 @@ class LibraryController extends Zend_Controller_Action
$newPl->setCreator(Application_Model_User::getCurrentUser()->getId());
$newPl->setDescription($originalPl->getDescription());
list($plFadeIn) = $originalPl->getFadeInfo(0);
list(, $plFadeOut) = $originalPl->getFadeInfo($originalPl->getSize() - 1);
[$plFadeIn] = $originalPl->getFadeInfo(0);
[, $plFadeOut] = $originalPl->getFadeInfo($originalPl->getSize() - 1);
$newPl->setfades($plFadeIn, $plFadeOut);
$newPl->setName(sprintf(_('Copy of %s'), $originalPl->getName()));

View File

@ -29,7 +29,7 @@ class ListenerstatController extends Zend_Controller_Action
$this->view->headScript()->appendFile($baseUrl . 'js/airtime/utilities/utilities.js?' . $CC_CONFIG['airtime_version'], 'text/javascript');
$this->view->headLink()->appendStylesheet($baseUrl . 'css/jquery.ui.timepicker.css?' . $CC_CONFIG['airtime_version']);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
$startsDT->setTimezone($userTimezone);
$endsDT->setTimezone($userTimezone);
@ -85,7 +85,7 @@ class ListenerstatController extends Zend_Controller_Action
$form = new Application_Form_ShowListenerStat();
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
$startsDT->setTimezone($userTimezone);
$endsDT->setTimezone($userTimezone);
@ -101,7 +101,7 @@ class ListenerstatController extends Zend_Controller_Action
public function getDataAction()
{
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
$data = Application_Model_ListenerStat::getDataPointsWithinRange(
$startsDT->format(DEFAULT_TIMESTAMP_FORMAT),
$endsDT->format(DEFAULT_TIMESTAMP_FORMAT)
@ -111,7 +111,7 @@ class ListenerstatController extends Zend_Controller_Action
public function getShowDataAction()
{
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
$show_id = $this->getRequest()->getParam('show_id', null);
$data = Application_Model_ListenerStat::getShowDataPointsWithinRange(
$startsDT->format(DEFAULT_TIMESTAMP_FORMAT),
@ -123,7 +123,7 @@ class ListenerstatController extends Zend_Controller_Action
public function getAllShowData()
{
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
return Application_Model_ListenerStat::getAllShowDataPointsWithinRange(
$startsDT->format(DEFAULT_TIMESTAMP_FORMAT),
@ -133,7 +133,7 @@ class ListenerstatController extends Zend_Controller_Action
public function getAllShowDataAction()
{
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
$show_id = $this->getRequest()->getParam('show_id', null);
$data = Application_Model_ListenerStat::getAllShowDataPointsWithinRange(
$startsDT->format(DEFAULT_TIMESTAMP_FORMAT),

View File

@ -27,7 +27,7 @@ class PlayouthistoryController extends Zend_Controller_Action
Zend_Layout::getMvcInstance()->assign('parent_page', 'Analytics');
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($this->getRequest());
$userTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
$startsDT->setTimezone($userTimezone);
@ -83,7 +83,7 @@ class PlayouthistoryController extends Zend_Controller_Action
$params = $request->getParams();
$instance = $request->getParam('instance_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$historyService = new Application_Service_HistoryService();
$r = $historyService->getFileSummaryData($startsDT, $endsDT, $params);
@ -106,7 +106,7 @@ class PlayouthistoryController extends Zend_Controller_Action
$params = $request->getParams();
$instance = $request->getParam('instance_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$historyService = new Application_Service_HistoryService();
$r = $historyService->getPlayedItemData($startsDT, $endsDT, $params, $instance);
@ -129,7 +129,7 @@ class PlayouthistoryController extends Zend_Controller_Action
$params = $request->getParams();
$instance = $request->getParam('instance_id', null);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$historyService = new Application_Service_HistoryService();
$shows = $historyService->getShowList($startsDT, $endsDT);

View File

@ -174,7 +174,7 @@ class PluploadController extends Zend_Controller_Action
if ($unit) {
// Find the position of the unit in the ordered string which is the power
// of magnitude to multiply a kilobyte by.
return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));
return round($size * 1024 ** stripos('bkmgtpezy', $unit[0]));
}
return round($size);

View File

@ -148,11 +148,11 @@ class ScheduleController extends Zend_Controller_Action
$calendar_interval = Application_Model_Preference::GetCalendarTimeScale();
if ($calendar_interval == 'agendaDay') {
list($start, $end) = Application_Model_Show::getStartEndCurrentDayView();
[$start, $end] = Application_Model_Show::getStartEndCurrentDayView();
} elseif ($calendar_interval == 'agendaWeek') {
list($start, $end) = Application_Model_Show::getStartEndCurrentWeekView();
[$start, $end] = Application_Model_Show::getStartEndCurrentWeekView();
} elseif ($calendar_interval == 'month') {
list($start, $end) = Application_Model_Show::getStartEndCurrentMonthPlusView();
[$start, $end] = Application_Model_Show::getStartEndCurrentMonthPlusView();
} else {
Logging::error("Invalid Calendar Interval '{$calendar_interval}'");
}
@ -487,7 +487,7 @@ class ScheduleController extends Zend_Controller_Action
$forms = $this->createShowFormAction();
list($data, $validateStartDate, $validateStartTime, $originalShowStartDateTime) =
[$data, $validateStartDate, $validateStartTime, $originalShowStartDateTime] =
$service_showForm->preEditShowValidationCheck($data);
if ($service_showForm->validateShowForms(
@ -548,7 +548,7 @@ class ScheduleController extends Zend_Controller_Action
$forms = $this->createShowFormAction();
list($data, $validateStartDate, $validateStartTime, $originalShowStartDateTime) =
[$data, $validateStartDate, $validateStartTime, $originalShowStartDateTime] =
$service_showForm->preEditShowValidationCheck($data);
if ($service_showForm->validateShowForms(

View File

@ -195,7 +195,7 @@ class ShowbuilderController extends Zend_Controller_Action
$timestamp = intval($request->getParam('timestamp', -1));
$instances = $request->getParam('instances', []);
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$opts = ['myShows' => $my_shows, 'showFilter' => $show_filter];
$showBuilder = new Application_Model_ShowBuilder($startsDT, $endsDT, $opts);
@ -217,7 +217,7 @@ class ShowbuilderController extends Zend_Controller_Action
$show_instance_filter = intval($request->getParam('showInstanceFilter', 0));
$my_shows = intval($request->getParam('myShows', 0));
list($startsDT, $endsDT) = Application_Common_HTTPHelper::getStartEndFromRequest($request);
[$startsDT, $endsDT] = Application_Common_HTTPHelper::getStartEndFromRequest($request);
$opts = ['myShows' => $my_shows,
'showFilter' => $show_filter,

View File

@ -146,7 +146,7 @@ class WebstreamController extends Zend_Controller_Action
return;
}
list($analysis, $mime, $mediaUrl, $di) = Application_Model_Webstream::analyzeFormData($parameters);
[$analysis, $mime, $mediaUrl, $di] = Application_Model_Webstream::analyzeFormData($parameters);
try {
if (Application_Model_Webstream::isValid($analysis)) {

View File

@ -118,7 +118,7 @@ class PageLayoutInitPlugin extends Zend_Controller_Plugin_Abstract
if (!$csrf_namespace->authtoken) {
// If we don't have a token, regenerate it and set a 1 week timeout
// Should we log the user out here if the token is expired?
$csrf_namespace->authtoken = sha1(uniqid(rand(), 1));
$csrf_namespace->authtoken = sha1(uniqid(random_int(0, getrandmax()), 1));
$csrf_namespace->setExpirationSeconds(168 * 60 * 60);
}

View File

@ -9,7 +9,7 @@ class RabbitMqPlugin extends Zend_Controller_Plugin_Abstract
Application_Model_RabbitMq::SendMessageToPypo('update_schedule', $md);
}
if (memory_get_peak_usage() > 30 * pow(2, 20)) {
if (memory_get_peak_usage() > 30 * 2 ** 20) {
Logging::debug('Peak memory usage: '
. (memory_get_peak_usage() / 1000000)
. ' MB while accessing URI ' . $_SERVER['REQUEST_URI']);

View File

@ -234,7 +234,7 @@ class Application_Form_AddShowWhen extends Zend_Form_SubForm
} elseif ($formData['add_show_repeat_type'] == 2 && $formData['add_show_monthly_repeat_type'] == 2) {
$interval = 'P1M';
} elseif ($formData['add_show_repeat_type'] == 2 && $formData['add_show_monthly_repeat_type'] == 3) {
list($weekNumberOfMonth, $dayOfWeek) =
[$weekNumberOfMonth, $dayOfWeek] =
Application_Service_ShowService::getMonthlyWeeklyRepeatInterval(
new DateTime($start_time, $showTimezone)
);

View File

@ -59,7 +59,7 @@ class Application_Form_Player extends Zend_Form_SubForm
break;
}
$streamURL->setAttrib('numberOfEnabledStreams', sizeof($urlOptions) - $opusStreamCount);
$streamURL->setAttrib('numberOfEnabledStreams', count($urlOptions) - $opusStreamCount);
$streamURL->removeDecorator('label');
$this->addElement($streamURL);

View File

@ -913,7 +913,7 @@ class Application_Form_SmartBlockCriteria extends Zend_Form_SubForm
$isValid = false;
}
// length check
if ($d['sp_criteria_value'] >= pow(2, 31)) {
if ($d['sp_criteria_value'] >= 2 ** 31) {
$element->addError(_('The value should be less then 2147483648'));
$isValid = false;
}

View File

@ -89,7 +89,6 @@ class Logging
//Escape the % symbols in any of our errors because Sentry chokes (vsprint formatting error).
$msg = self::toString($p_msg);
$msg = str_replace('%', '%%', $msg);
SentryLogger::getInstance()->captureError($msg);
}
public static function debug($p_msg)

View File

@ -1,135 +0,0 @@
<?php
class SentryLogger
{
private static $instance;
private $sentryClient;
/** Singleton getter */
public static function getInstance()
{
if (!is_null(self::$instance)) {
return self::$instance;
}
self::$instance = new SentryLogger();
return self::$instance;
}
private function __construct()
{
if (!file_exists(SENTRY_CONFIG_PATH)) {
$this->sentryClient = null;
return;
}
// Instantiate a new client with a compatible DSN
$sentry_config = parse_ini_file(SENTRY_CONFIG_PATH, false);
$dsn = $sentry_config['dsn'];
$this->sentryClient = new Raven_Client(
$dsn,
[
//FIXME: This doesn't seem to be working...
'processorOptions' => [
'Raven_SanitizeDataProcessor' => [
'fields_re' => '/(authorization|password|passwd|user_token|secret|SESSION)/i',
'values_re' => '/^(?:\d[ -]*?){13,16}$/',
],
],
]
);
$client = $this->sentryClient;
/* The Raven docs suggest not enabling these because they're "too noisy".
// Install error handlers and shutdown function to catch fatal errors
$error_handler = new Raven_ErrorHandler($client);
$error_handler->registerExceptionHandler(true);
$error_handler->registerErrorHandler(true);
$error_handler->registerShutdownFunction(true);
*/
$error_handler = new Raven_ErrorHandler($client);
$error_handler->registerExceptionHandler();
}
public function captureMessage($msg)
{
if (!$this->sentryClient) {
return;
}
$client = $this->sentryClient;
self::addUserData($client);
self::addTags($client);
// Capture a message
$event_id = $client->getIdent($client->captureMessage($msg));
if ($client->getLastError() !== null) {
//printf('There was an error sending the event to Sentry: %s', $client->getLastError());
}
}
public function captureException($exception)
{
if (!$this->sentryClient) {
return;
}
$client = $this->sentryClient;
self::addUserData($client);
self::addTags($client);
$event_id = $client->getIdent($client->captureException($exception, [
'extra' => $this->getExtraData(),
'tags' => $this->getTags(),
]));
$client->context->clear();
}
public function captureError($errorMessage)
{
if (!$this->sentryClient) {
return;
}
$client = $this->sentryClient;
// Provide some additional data with an exception
self::addUserData($client);
self::addTags($client);
$event_id = $client->getIdent($client->captureMessage($errorMessage, [
'extra' => $this->getExtraData(),
]));
$client->context->clear();
}
private static function getTags()
{
$tags = [];
$config = Config::getConfig();
$tags['Development Environment'] = $config['dev_env'];
return $tags;
}
private static function addTags($client)
{
$client->tags_context(self::getTags());
}
private static function addUserData($client)
{
$userData = [];
$userData['client_id'] = Application_Model_Preference::GetClientId();
$userData['station_url'] = array_key_exists('SERVER_NAME', $_SERVER) ? $_SERVER['SERVER_NAME'] : '';
$client->user_context($userData);
}
/** Extra data to log with Sentry */
private function getExtraData()
{
$extraData = [];
$extraData['php_version'] = phpversion();
$extraData['client_id'] = Application_Model_Preference::GetClientId();
return $extraData;
}
}

View File

@ -126,7 +126,7 @@ class Application_Model_Auth
{
$string = '';
for ($i = 0; $i < $length; ++$i) {
$string .= $allowed_chars[mt_rand(0, strlen($allowed_chars) - 1)];
$string .= $allowed_chars[random_int(0, strlen($allowed_chars) - 1)];
}
return $string;

View File

@ -331,7 +331,7 @@ SQL;
public function getDynamicBlockLength()
{
list($value, $modifier) = $this->getLimitValueAndModifier();
[$value, $modifier] = $this->getLimitValueAndModifier();
if ($modifier == 'items') {
$length = $value . ' ' . _('items');
} else {
@ -1200,7 +1200,7 @@ SQL;
public function hasItemLimit()
{
list($value, $modifier) = $this->getLimitValueAndModifier();
[$value, $modifier] = $this->getLimitValueAndModifier();
return $modifier == 'items';
}

View File

@ -20,8 +20,8 @@ class Application_Model_Datatables
$input2 = null;
}
} elseif ($dbname == 'bit_rate' || $dbname == 'sample_rate') {
$input1 = isset($info[0]) ? doubleval($info[0]) * 1000 : null;
$input2 = isset($info[1]) ? doubleval($info[1]) * 1000 : null;
$input1 = isset($info[0]) ? floatval($info[0]) * 1000 : null;
$input2 = isset($info[1]) ? floatval($info[1]) * 1000 : null;
} else {
$input1 = isset($info[0]) ? $info[0] : null;
$input2 = isset($info[1]) ? $info[1] : null;
@ -82,10 +82,10 @@ class Application_Model_Datatables
$orig2searchTerm = [];
foreach ($data as $key => $d) {
if (strstr($key, 'mDataProp_')) {
list($dump, $index) = explode('_', $key);
[$dump, $index] = explode('_', $key);
$current2dbname[$index] = $d;
} elseif (strstr($key, 'sSearch_')) {
list($dump, $index) = explode('_', $key);
[$dump, $index] = explode('_', $key);
$orig2searchTerm[$index] = $d;
}
}
@ -112,7 +112,7 @@ class Application_Model_Datatables
$advancedWhere = self::buildWhereClauseForAdvancedSearch($dbname2searchTerm);
if (!empty($advancedWhere['clause'])) {
$where[] = join(' AND ', $advancedWhere['clause']);
$where[] = implode(' AND ', $advancedWhere['clause']);
$params = $advancedWhere['params'];
}
}
@ -122,7 +122,7 @@ class Application_Model_Datatables
}
$selectorCount = 'SELECT COUNT(*) ';
$selectorRows = 'SELECT ' . join(',', $displayColumns) . ' ';
$selectorRows = 'SELECT ' . implode(',', $displayColumns) . ' ';
$sql = $selectorCount . ' FROM ' . $fromTable;
$sqlTotalRows = $sql;
@ -157,14 +157,14 @@ class Application_Model_Datatables
$orderby[] = $data["mDataProp_{$num}"] . ' ' . $data['sSortDir_' . $i];
}
$orderby[] = 'id';
$orderby = join(',', $orderby);
$orderby = implode(',', $orderby);
// End Order By clause
$displayLength = intval($data['iDisplayLength']);
$needToBind = false;
if (count($where) > 0) {
$needToBind = true;
$where = join(' OR ', $where);
$where = implode(' OR ', $where);
$sql = $selectorCount . ' FROM ' . $fromTable . ' WHERE ' . $where;
$sqlTotalDisplayRows = $sql;

View File

@ -114,11 +114,11 @@ SQL;
);
$utcTimezone = new DateTimeZone('UTC');
$displayTimezone = new DateTimeZone(Application_Model_Preference::GetUserTimezone());
if (sizeof($data) > 0) {
if (count($data) > 0) {
$t = new DateTime($data[0]['timestamp'], $utcTimezone);
$t->setTimezone($displayTimezone);
// tricking javascript so it thinks the server timezone is in UTC
$average_listeners = array_sum(array_column($data, 'listeners')) / sizeof($data);
$average_listeners = array_sum(array_column($data, 'listeners')) / count($data);
$max_num_listeners = max(array_column($data, 'listeners'));
$entry = ['show' => $showName, 'time' => $t->format('Y-m-d H:i:s'), 'average_number_of_listeners' => $average_listeners,
'maximum_number_of_listeners' => $max_num_listeners, ];

View File

@ -59,7 +59,7 @@ class Application_Model_LiveLog
$duration = $start->diff($end);
$duration = $duration->format('%H:%i:%s');
$intervals = explode(':', $duration);
for ($i = 0; $i < sizeof($intervals); ++$i) {
for ($i = 0; $i < count($intervals); ++$i) {
if (!isset($intervals[$i])) {
$intervals[$i] = 0;
}
@ -199,7 +199,7 @@ class Application_Model_LiveLog
$clip_length = $track['clip_length'];
//Convert clip_length into seconds
$clip_length_intervals = explode(':', $clip_length);
for ($i = 0; $i < sizeof($clip_length_intervals); ++$i) {
for ($i = 0; $i < count($clip_length_intervals); ++$i) {
if (!isset($clip_length_intervals[$i])) {
$clip_length_intervals[$i] = 0;
}
@ -209,7 +209,7 @@ class Application_Model_LiveLog
$extra_time = $extra_time->format('%H:%i:%s');
//Convert extra_time into seconds;
$extra_time_intervals = explode(':', $extra_time);
for ($i = 0; $i < sizeof($extra_time_intervals); ++$i) {
for ($i = 0; $i < count($extra_time_intervals); ++$i) {
if (!isset($extra_time_intervals[$i])) {
$extra_time_intervals[$i] = 0;
}
@ -240,7 +240,7 @@ class Application_Model_LiveLog
}
$intervals = explode(':', $clip_length);
for ($i = 0; $i < sizeof($intervals); ++$i) {
for ($i = 0; $i < count($intervals); ++$i) {
if (!isset($intervals[$i])) {
$intervals[$i] = 0;
}

View File

@ -886,8 +886,8 @@ SQL;
$start = self::AirtimeTimeToPypoTime($item['start']);
$end = self::AirtimeTimeToPypoTime($item['end']);
list(, , , $start_hour) = explode('-', $start);
list(, , , $end_hour) = explode('-', $end);
[, , , $start_hour] = explode('-', $start);
[, , , $end_hour] = explode('-', $end);
$same_hour = $start_hour == $end_hour;
$independent_event = !$same_hour;
@ -1139,7 +1139,7 @@ SQL;
$needScheduleUntil->add(new DateInterval('P1D'));
}
Application_Model_Show::createAndFillShowInstancesPastPopulatedUntilDate($needScheduleUntil);
list($range_start, $range_end) = self::getRangeStartAndEnd($p_fromDateTime, $p_toDateTime);
[$range_start, $range_end] = self::getRangeStartAndEnd($p_fromDateTime, $p_toDateTime);
$data = [];
$data['media'] = [];

View File

@ -991,7 +991,7 @@ final class Application_Model_Scheduler
$insert_sql = 'INSERT INTO cc_schedule ' .
'(starts, ends, cue_in, cue_out, fade_in, fade_out, ' .
'clip_length, position, instance_id, file_id, stream_id) VALUES ' .
implode($values, ',') . ' RETURNING id';
implode(',', $values) . ' RETURNING id';
$stmt = $this->con->prepare($insert_sql);
if ($stmt->execute()) {
@ -1020,7 +1020,7 @@ final class Application_Model_Scheduler
"WHERE starts >= '{$initalStartDT->format(DEFAULT_MICROTIME_FORMAT)}' " .
"AND instance_id = {$instanceId} ";
if (count($excludeIds) > 0) {
$followingItems_sql .= 'AND id NOT IN (' . implode($excludeIds, ',') . ') ';
$followingItems_sql .= 'AND id NOT IN (' . implode(',', $excludeIds) . ') ';
}
$followingItems_sql .= 'ORDER BY starts';
$followingSchedItems = Application_Common_Database::prepareAndExecute(

View File

@ -353,7 +353,7 @@ SQL;
$sql_gen = 'UPDATE cc_show_instances ' .
'SET ends = (ends + :deltaDay1::INTERVAL + :interval1::INTERVAL) ' .
'WHERE (id IN (' . implode($instanceIds, ',') . ') ' .
'WHERE (id IN (' . implode(',', $instanceIds) . ') ' .
'AND ends > :current_timestamp1) ' .
"AND ((ends + :deltaDay2::INTERVAL + :interval2::INTERVAL - starts) <= interval '24:00')";
@ -371,7 +371,7 @@ SQL;
$sql_gen = 'UPDATE cc_show_days ' .
'SET duration = (CAST(duration AS interval) + :deltaDay3::INTERVAL + :interval3::INTERVAL) ' .
'WHERE id IN (' . implode($showDayIds, ',') . ') ' .
'WHERE id IN (' . implode(',', $showDayIds) . ') ' .
"AND ((CAST(duration AS interval) + :deltaDay4::INTERVAL + :interval4::INTERVAL) <= interval '24:00')";
Application_Common_Database::prepareAndExecute(
@ -671,7 +671,7 @@ SQL;
*/
public function getStartDate()
{
list($date) = explode(' ', $this->getStartDateAndTime());
[$date] = explode(' ', $this->getStartDateAndTime());
return $date;
}
@ -684,7 +684,7 @@ SQL;
*/
public function getStartTime()
{
list(, $time) = explode(' ', $this->getStartDateAndTime());
[, $time] = explode(' ', $this->getStartDateAndTime());
return $time;
}
@ -1214,9 +1214,9 @@ SQL;
}
//$hashValue = (md5($date->format('d'))[0] % $cols) + ((intval($date->format('h'))/24) % $rows);
$row = intval($date->format('w')) % sizeof($palette);
$row = intval($date->format('w')) % count($palette);
$foo = $date->format('H');
$col = intval(intval($date->format('H')) / 24.0 * sizeof($palette[0]));
$col = intval(intval($date->format('H')) / 24.0 * count($palette[0]));
//$color = $palette[$hashValue % sizeof($palette)];
return $palette[$row][$col];
}

View File

@ -803,10 +803,10 @@ SQL;
}
}
$plSelect = 'SELECT ' . join(',', $plSelect);
$blSelect = 'SELECT ' . join(',', $blSelect);
$fileSelect = 'SELECT ' . join(',', $fileSelect);
$streamSelect = 'SELECT ' . join(',', $streamSelect);
$plSelect = 'SELECT ' . implode(',', $plSelect);
$blSelect = 'SELECT ' . implode(',', $blSelect);
$fileSelect = 'SELECT ' . implode(',', $fileSelect);
$streamSelect = 'SELECT ' . implode(',', $streamSelect);
$type = intval($datatables['type']);

View File

@ -110,7 +110,7 @@ class Application_Model_Tracktype
$params[$p] = $visible[$i];
}
$sql_type = join(' OR ', $visibility);
$sql_type = implode(' OR ', $visibility);
$sql = $sql_gen . ' WHERE (' . $sql_type . ') ';

View File

@ -301,7 +301,7 @@ class Application_Model_User
$params[$p] = $type[$i];
}
$sql_type = join(' OR ', $types);
$sql_type = implode(' OR ', $types);
$sql = $sql_gen . ' WHERE (' . $sql_type . ') ';

View File

@ -47,7 +47,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
$dateString = $this->webstream->getDbLength();
$arr = explode(':', $dateString);
if (count($arr) == 3) {
list($hours, $min, $sec) = $arr;
[$hours, $min, $sec] = $arr;
$di = new DateInterval("PT{$hours}H{$min}M{$sec}S");
return $di->format('%Hh %Im');
@ -183,14 +183,14 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
$valid['url'][1] = _('URL should be 512 characters or less');
} else {
try {
list($mime, $content_length_found) = self::discoverStreamMime($url);
[$mime, $content_length_found] = self::discoverStreamMime($url);
if (is_null($mime)) {
throw new Exception(_('No MIME type found for webstream.'));
}
$mediaUrl = self::getMediaUrl($url, $mime, $content_length_found);
if (preg_match('/(x-mpegurl)|(xspf\+xml)|(pls\+xml)|(x-scpls)/', $mime)) {
list($mime, $content_length_found) = self::discoverStreamMime($mediaUrl);
[$mime, $content_length_found] = self::discoverStreamMime($mediaUrl);
}
} catch (Exception $e) {
$valid['url'][0] = false;
@ -384,7 +384,7 @@ class Application_Model_Webstream implements Application_Model_LibraryEditable
$headers = self::cleanHeaders($headers);
foreach ($headers as $h) {
if (preg_match('/^content-type:/i', $h)) {
list(, $value) = explode(':', $h, 2);
[, $value] = explode(':', $h, 2);
$mime = trim($value);
}
if (preg_match('/^content-length:/i', $h)) {

View File

@ -340,7 +340,7 @@ class CcFiles extends BaseCcFiles
public function setDbTrackNumber($v)
{
$max = pow(2, 31) - 1;
$max = 2 ** 31 - 1;
$v = ($v > $max) ? $max : $v;
return parent::setDbTrackNumber($v);

View File

@ -1,5 +1,7 @@
<?php
/**
* This class defines the structure of the 'cc_track_types' table.
*
@ -38,9 +40,9 @@ class CcTracktypesTableMap extends TableMap
$this->setPrimaryKeyMethodInfo('cc_track_types_id_seq');
// columns
$this->addPrimaryKey('id', 'DbId', 'INTEGER', true, null, null);
$this->addColumn('code', 'DbCode', 'VARCHAR', true, 255, '');
$this->addColumn('visibility', 'DbVisibility', 'BOOLEAN', true, 1, true);
$this->addColumn('type_name', 'DbTypeName', 'VARCHAR', true, 255, '');
$this->addColumn('code', 'DbCode', 'VARCHAR', true, 16, '');
$this->addColumn('visibility', 'DbVisibility', 'BOOLEAN', true, null, true);
$this->addColumn('type_name', 'DbTypeName', 'VARCHAR', true, 64, '');
$this->addColumn('description', 'DbDescription', 'VARCHAR', true, 255, '');
// validators
} // initialize()
@ -50,7 +52,6 @@ class CcTracktypesTableMap extends TableMap
*/
public function buildRelations()
{
} // buildRelations()
} // CcTracktypesTableMap

View File

@ -75,7 +75,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
/**
* The value for the type field.
* Note: this column has a database default value of: 'static'
* Note: this column has a database default value of: 'dynamic'
* @var string
*/
protected $type;
@ -151,7 +151,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
{
$this->name = '';
$this->length = '00:00:00';
$this->type = 'static';
$this->type = 'dynamic';
}
/**
@ -329,7 +329,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -421,7 +421,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -442,7 +442,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
*/
public function setDbLength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -463,7 +463,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
*/
public function setDbType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -494,7 +494,7 @@ abstract class BaseCcBlock extends BaseObject implements Persistent
return false;
}
if ($this->type !== 'static') {
if ($this->type !== 'dynamic') {
return false;
}

View File

@ -433,7 +433,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
*/
public function setDbCliplength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -454,7 +454,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
*/
public function setDbCuein($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -475,7 +475,7 @@ abstract class BaseCcBlockcontents extends BaseObject implements Persistent
*/
public function setDbCueout($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -202,7 +202,7 @@ abstract class BaseCcBlockcriteria extends BaseObject implements Persistent
*/
public function setDbCriteria($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -223,7 +223,7 @@ abstract class BaseCcBlockcriteria extends BaseObject implements Persistent
*/
public function setDbModifier($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -244,7 +244,7 @@ abstract class BaseCcBlockcriteria extends BaseObject implements Persistent
*/
public function setDbValue($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -265,7 +265,7 @@ abstract class BaseCcBlockcriteria extends BaseObject implements Persistent
*/
public function setDbExtra($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -91,7 +91,7 @@ abstract class BaseCcCountry extends BaseObject implements Persistent
*/
public function setDbIsoCode($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -112,7 +112,7 @@ abstract class BaseCcCountry extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -288,18 +288,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $info_url;
/**
* The value for the artwork field.
* @var string
*/
protected $artwork;
/**
* The value for the track_type field.
* @var string
*/
protected $track_type;
/**
* The value for the artist_url field.
* @var string
@ -458,6 +446,18 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
protected $description;
/**
* The value for the artwork field.
* @var string
*/
protected $artwork;
/**
* The value for the track_type field.
* @var string
*/
protected $track_type;
/**
* @var CcSubjs
*/
@ -1158,28 +1158,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->info_url;
}
/**
* Get the [artwork] column value.
*
* @return string
*/
public function getDbArtwork()
{
return $this->artwork;
}
/**
* Get the [track_type] column value.
*
* @return string
*/
public function getDbTrackType()
{
return $this->track_type;
}
/**
* Get the [artist_url] column value.
*
@ -1455,6 +1433,28 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this->description;
}
/**
* Get the [artwork] column value.
*
* @return string
*/
public function getDbArtwork()
{
return $this->artwork;
}
/**
* Get the [track_type] column value.
*
* @return string
*/
public function getDbTrackType()
{
return $this->track_type;
}
/**
* Set the value of [id] column.
*
@ -1484,7 +1484,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1505,7 +1505,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbMime($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1526,7 +1526,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbFtype($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1572,7 +1572,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbFilepath($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1729,7 +1729,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbMd5($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1750,7 +1750,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbTrackTitle($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1763,46 +1763,6 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbTrackTitle()
/**
* Set the value of [artwork] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbArtwork($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->artwork !== $v) {
$this->artwork = $v;
$this->modifiedColumns[] = CcFilesPeer::ARTWORK;
}
return $this;
} // setDbArtwork()
/**
* Set the value of [track_type] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbTrackType($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
}
if ($this->track_type !== $v) {
$this->track_type = $v;
$this->modifiedColumns[] = CcFilesPeer::TRACK_TYPE;
}
return $this;
} // setDbTrackType()
/**
* Set the value of [artist_name] column.
*
@ -1811,7 +1771,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbArtistName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1874,7 +1834,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbFormat($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1895,7 +1855,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbLength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1916,7 +1876,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbAlbumTitle($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1937,7 +1897,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbGenre($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1958,7 +1918,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbComments($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -1979,7 +1939,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbYear($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2042,7 +2002,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2084,7 +2044,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbRating($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2105,7 +2065,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbEncodedBy($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2126,7 +2086,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbDiscNumber($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2147,7 +2107,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbMood($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2168,7 +2128,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbLabel($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2189,7 +2149,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbComposer($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2210,7 +2170,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbEncoder($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2231,7 +2191,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbChecksum($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2252,7 +2212,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbLyrics($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2273,7 +2233,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbOrchestra($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2294,7 +2254,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbConductor($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2315,7 +2275,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbLyricist($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2336,7 +2296,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbOriginalLyricist($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2357,7 +2317,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbRadioStationName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2378,7 +2338,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbInfoUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2399,7 +2359,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbArtistUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2420,7 +2380,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbAudioSourceUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2441,7 +2401,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbRadioStationUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2462,7 +2422,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbBuyThisUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2483,7 +2443,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbIsrcNumber($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2504,7 +2464,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbCatalogNumber($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2525,7 +2485,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbOriginalArtist($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2546,7 +2506,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbCopyright($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2567,7 +2527,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbReportDatetime($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2588,7 +2548,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbReportLocation($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2609,7 +2569,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbReportOrganization($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2630,7 +2590,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbSubject($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2651,7 +2611,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbContributor($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2672,7 +2632,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbLanguage($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2768,7 +2728,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbCuein($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2789,7 +2749,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbCueout($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2947,7 +2907,7 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -2960,6 +2920,48 @@ abstract class BaseCcFiles extends BaseObject implements Persistent
return $this;
} // setDbDescription()
/**
* Set the value of [artwork] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbArtwork($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->artwork !== $v) {
$this->artwork = $v;
$this->modifiedColumns[] = CcFilesPeer::ARTWORK;
}
return $this;
} // setDbArtwork()
/**
* Set the value of [track_type] column.
*
* @param string $v new value
* @return CcFiles The current object (for fluent API support)
*/
public function setDbTrackType($v)
{
if ($v !== null) {
$v = (string) $v;
}
if ($this->track_type !== $v) {
$this->track_type = $v;
$this->modifiedColumns[] = CcFilesPeer::TRACK_TYPE;
}
return $this;
} // setDbTrackType()
/**
* Indicates whether the columns in this object are only set to default values.
*

View File

@ -1925,64 +1925,6 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::INFO_URL, $dbInfoUrl, $comparison);
}
/**
* Filter the query on the artwork column
*
* Example usage:
* <code>
* $query->filterByDbArtwork('fooValue'); // WHERE artwork = 'fooValue'
* $query->filterByDbArtwork('%fooValue%'); // WHERE artwork LIKE '%fooValue%'
* </code>
*
* @param string $dbArtwork The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbArtwork($dbArtwork = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbArtwork)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbArtwork)) {
$dbArtwork = str_replace('*', '%', $dbArtwork);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::ARTWORK, $dbArtwork, $comparison);
}
/**
* Filter the query on the track_type column
*
* Example usage:
* <code>
* $query->filterByDbTrackType('fooValue'); // WHERE track_type = 'fooValue'
* $query->filterByDbTrackType('%fooValue%'); // WHERE track_type LIKE '%fooValue%'
* </code>
*
* @param string $dbTrackType The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbTrackType($dbTrackType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbTrackType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbTrackType)) {
$dbTrackType = str_replace('*', '%', $dbTrackType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::TRACK_TYPE, $dbTrackType, $comparison);
}
/**
* Filter the query on the artist_url column
*
@ -2739,6 +2681,64 @@ abstract class BaseCcFilesQuery extends ModelCriteria
return $this->addUsingAlias(CcFilesPeer::DESCRIPTION, $dbDescription, $comparison);
}
/**
* Filter the query on the artwork column
*
* Example usage:
* <code>
* $query->filterByDbArtwork('fooValue'); // WHERE artwork = 'fooValue'
* $query->filterByDbArtwork('%fooValue%'); // WHERE artwork LIKE '%fooValue%'
* </code>
*
* @param string $dbArtwork The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbArtwork($dbArtwork = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbArtwork)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbArtwork)) {
$dbArtwork = str_replace('*', '%', $dbArtwork);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::ARTWORK, $dbArtwork, $comparison);
}
/**
* Filter the query on the track_type column
*
* Example usage:
* <code>
* $query->filterByDbTrackType('fooValue'); // WHERE track_type = 'fooValue'
* $query->filterByDbTrackType('%fooValue%'); // WHERE track_type LIKE '%fooValue%'
* </code>
*
* @param string $dbTrackType The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcFilesQuery The current query, for fluid interface
*/
public function filterByDbTrackType($dbTrackType = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbTrackType)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbTrackType)) {
$dbTrackType = str_replace('*', '%', $dbTrackType);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcFilesPeer::TRACK_TYPE, $dbTrackType, $comparison);
}
/**
* Filter the query by a related CcSubjs object
*

View File

@ -194,7 +194,7 @@ abstract class BaseCcLiveLog extends BaseObject implements Persistent
*/
public function setDbState($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -113,7 +113,7 @@ abstract class BaseCcLoginAttempts extends BaseObject implements Persistent
*/
public function setDbIP($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -124,7 +124,7 @@ abstract class BaseCcMountName extends BaseObject implements Persistent
*/
public function setDbMountName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -199,7 +199,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
*/
public function setDirectory($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -220,7 +220,7 @@ abstract class BaseCcMusicDirs extends BaseObject implements Persistent
*/
public function setType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -193,7 +193,7 @@ abstract class BaseCcPerms extends BaseObject implements Persistent
*/
public function setAction($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -235,7 +235,7 @@ abstract class BaseCcPerms extends BaseObject implements Persistent
*/
public function setType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -298,7 +298,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -390,7 +390,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -411,7 +411,7 @@ abstract class BaseCcPlaylist extends BaseObject implements Persistent
*/
public function setDbLength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -558,7 +558,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function setDbCliplength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -579,7 +579,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function setDbCuein($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -600,7 +600,7 @@ abstract class BaseCcPlaylistcontents extends BaseObject implements Persistent
*/
public function setDbCueout($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -176,7 +176,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persis
*/
public function setDbKey($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -197,7 +197,7 @@ abstract class BaseCcPlayoutHistoryMetaData extends BaseObject implements Persis
*/
public function setDbValue($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -141,7 +141,7 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persis
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -162,7 +162,7 @@ abstract class BaseCcPlayoutHistoryTemplate extends BaseObject implements Persis
*/
public function setDbType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -249,7 +249,7 @@ abstract class BaseCcPlayoutHistoryTemplateField extends BaseObject implements P
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -270,7 +270,7 @@ abstract class BaseCcPlayoutHistoryTemplateField extends BaseObject implements P
*/
public function setDbLabel($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -291,7 +291,7 @@ abstract class BaseCcPlayoutHistoryTemplateField extends BaseObject implements P
*/
public function setDbType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -176,7 +176,7 @@ abstract class BaseCcPref extends BaseObject implements Persistent
*/
public function setKeystr($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -197,7 +197,7 @@ abstract class BaseCcPref extends BaseObject implements Persistent
*/
public function setValstr($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -586,7 +586,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
public function setDbClipLength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -657,7 +657,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
public function setDbCueIn($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -678,7 +678,7 @@ abstract class BaseCcSchedule extends BaseObject implements Persistent
*/
public function setDbCueOut($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -91,7 +91,7 @@ abstract class BaseCcServiceRegister extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -112,7 +112,7 @@ abstract class BaseCcServiceRegister extends BaseObject implements Persistent
*/
public function setDbIp($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -154,7 +154,7 @@ abstract class BaseCcSess extends BaseObject implements Persistent
*/
public function setSessid($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -200,7 +200,7 @@ abstract class BaseCcSess extends BaseObject implements Persistent
*/
public function setLogin($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -460,7 +460,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -481,7 +481,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -502,7 +502,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbGenre($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -523,7 +523,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -544,7 +544,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbColor($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -565,7 +565,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbBackgroundColor($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -644,7 +644,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbLiveStreamUser($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -665,7 +665,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbLiveStreamPass($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -744,7 +744,7 @@ abstract class BaseCcShow extends BaseObject implements Persistent
*/
public function setDbImagePath($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -457,7 +457,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
*/
public function setDbTimezone($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -478,7 +478,7 @@ abstract class BaseCcShowDays extends BaseObject implements Persistent
*/
public function setDbDuration($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -495,7 +495,7 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -679,7 +679,7 @@ abstract class BaseCcShowInstances extends BaseObject implements Persistent
*/
public function setDbTimeFilled($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -175,7 +175,7 @@ abstract class BaseCcShowRebroadcast extends BaseObject implements Persistent
*/
public function setDbDayOffset($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -108,7 +108,7 @@ abstract class BaseCcStreamSetting extends BaseObject implements Persistent
*/
public function setDbKeyName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -129,7 +129,7 @@ abstract class BaseCcStreamSetting extends BaseObject implements Persistent
*/
public function setDbValue($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -150,7 +150,7 @@ abstract class BaseCcStreamSetting extends BaseObject implements Persistent
*/
public function setDbType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -499,7 +499,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbLogin($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -520,7 +520,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbPass($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -541,7 +541,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbType($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -562,7 +562,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbFirstName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -583,7 +583,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbLastName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -650,7 +650,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbSkypeContact($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -671,7 +671,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbJabberContact($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -692,7 +692,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbEmail($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -713,7 +713,7 @@ abstract class BaseCcSubjs extends BaseObject implements Persistent
*/
public function setDbCellPhone($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -217,7 +217,7 @@ abstract class BaseCcSubjsToken extends BaseObject implements Persistent
*/
public function setDbAction($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -238,7 +238,7 @@ abstract class BaseCcSubjsToken extends BaseObject implements Persistent
*/
public function setDbToken($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -1,5 +1,6 @@
<?php
/**
* Base class that represents a row from the 'cc_track_types' table.
*
@ -43,8 +44,8 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
/**
* The value for the visibility field.
* Note: this column has a database default value of: 'U'
* @var string
* Note: this column has a database default value of: true
* @var boolean
*/
protected $visibility;
@ -131,7 +132,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
/**
* Get the [visibility] column value.
*
* @return string
* @return boolean
*/
public function getDbVisibility()
{
@ -178,6 +179,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->modifiedColumns[] = CcTracktypesPeer::ID;
}
return $this;
} // setDbId()
@ -189,7 +191,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
*/
public function setDbCode($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -198,19 +200,28 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->modifiedColumns[] = CcTracktypesPeer::CODE;
}
return $this;
} // setDbCode()
/**
* Set the value of [visibility] column.
* Sets the value of the [visibility] column.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
*
* @param string $v new value
* @param boolean|integer|string $v The new value
* @return CcTracktypes The current object (for fluent API support)
*/
public function setDbVisibility($v)
{
if ($v !== null && is_numeric($v)) {
$v = (string) $v;
if ($v !== null) {
if (is_string($v)) {
$v = in_array(strtolower($v), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
} else {
$v = (boolean) $v;
}
}
if ($this->visibility !== $v) {
@ -218,6 +229,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->modifiedColumns[] = CcTracktypesPeer::VISIBILITY;
}
return $this;
} // setDbVisibility()
@ -229,7 +241,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
*/
public function setDbTypeName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -238,6 +250,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->modifiedColumns[] = CcTracktypesPeer::TYPE_NAME;
}
return $this;
} // setDbTypeName()
@ -249,7 +262,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -258,6 +271,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->modifiedColumns[] = CcTracktypesPeer::DESCRIPTION;
}
return $this;
} // setDbDescription()
@ -275,7 +289,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
return false;
}
if ($this->visibility !== '1') {
if ($this->visibility !== true) {
return false;
}
@ -311,7 +325,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$this->id = ($row[$startcol + 0] !== null) ? (int) $row[$startcol + 0] : null;
$this->code = ($row[$startcol + 1] !== null) ? (string) $row[$startcol + 1] : null;
$this->visibility = ($row[$startcol + 2] !== null) ? (string) $row[$startcol + 2] : null;
$this->visibility = ($row[$startcol + 2] !== null) ? (boolean) $row[$startcol + 2] : null;
$this->type_name = ($row[$startcol + 3] !== null) ? (string) $row[$startcol + 3] : null;
$this->description = ($row[$startcol + 4] !== null) ? (string) $row[$startcol + 4] : null;
$this->resetModified();
@ -383,6 +397,9 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
}
$this->hydrate($row, 0, true); // rehydrate
if ($deep) { // also de-associate any related objects?
} // if (deep)
}
/**
@ -674,6 +691,8 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$failureMap = array_merge($failureMap, $retval);
}
$this->alreadyInValidation = false;
}
@ -740,11 +759,10 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
* Defaults to BasePeer::TYPE_PHPNAME.
* @param boolean $includeLazyLoadColumns (optional) Whether to include lazy loaded columns. Defaults to true.
* @param array $alreadyDumpedObjects List of objects to skip to avoid recursion
* @param boolean $includeForeignObjects (optional) Whether to include hydrated related objects. Default to FALSE.
*
* @return array an associative array containing the field names (as keys) and field values
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array(), $includeForeignObjects = false)
public function toArray($keyType = BasePeer::TYPE_PHPNAME, $includeLazyLoadColumns = true, $alreadyDumpedObjects = array())
{
if (isset($alreadyDumpedObjects['CcTracktypes'][$this->getPrimaryKey()])) {
return '*RECURSION*';
@ -763,6 +781,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$result[$key] = $virtualColumn;
}
return $result;
}
@ -836,9 +855,9 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
if (array_key_exists($keys[0], $arr)) $this->setDbId($arr[$keys[0]]);
if (array_key_exists($keys[1], $arr)) $this->setDbCode($arr[$keys[1]]);
if (array_key_exists($keys[3], $arr)) $this->setDbVisibility($arr[$keys[2]]);
if (array_key_exists($keys[4], $arr)) $this->setDbTypeName($arr[$keys[3]]);
if (array_key_exists($keys[5], $arr)) $this->setDbDescription($arr[$keys[4]]);
if (array_key_exists($keys[2], $arr)) $this->setDbVisibility($arr[$keys[2]]);
if (array_key_exists($keys[3], $arr)) $this->setDbTypeName($arr[$keys[3]]);
if (array_key_exists($keys[4], $arr)) $this->setDbDescription($arr[$keys[4]]);
}
/**
@ -922,18 +941,6 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
$copyObj->setDbVisibility($this->getDbVisibility());
$copyObj->setDbTypeName($this->getDbTypeName());
$copyObj->setDbDescription($this->getDbDescription());
if ($deepCopy && !$this->startCopy) {
// important: temporarily setNew(false) because this affects the behavior of
// the getter/setter methods for fkey referrer objects.
$copyObj->setNew(false);
// store object hash to prevent cycle
$this->startCopy = true;
//unflag object copy
$this->startCopy = false;
} // if ($deepCopy)
if ($makeNew) {
$copyObj->setNew(true);
$copyObj->setDbId(NULL); // this is a auto-increment column, so set to default value
@ -987,7 +994,7 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
{
$this->id = null;
$this->code = null;
$this->visibility = false;
$this->visibility = null;
$this->type_name = null;
$this->description = null;
$this->alreadyInSave = false;
@ -1011,6 +1018,11 @@ abstract class BaseCcTracktypes extends BaseObject implements Persistent
*/
public function clearAllReferences($deep = false)
{
if ($deep && !$this->alreadyInClearAllReferencesDeep) {
$this->alreadyInClearAllReferencesDeep = true;
$this->alreadyInClearAllReferencesDeep = false;
} // if ($deep)
}

View File

@ -1,5 +1,6 @@
<?php
/**
* Base static class for performing query and update operations on the 'cc_track_types' table.
*
@ -57,6 +58,7 @@ abstract class BaseCcTracktypesPeer
*/
public static $instances = array();
/**
* holds an array of fieldnames
*
@ -216,7 +218,6 @@ abstract class BaseCcTracktypesPeer
return $count;
}
/**
* Selects one object from the DB.
*
@ -237,7 +238,6 @@ abstract class BaseCcTracktypesPeer
return null;
}
/**
* Selects several row from the DB.
*
@ -251,7 +251,6 @@ abstract class BaseCcTracktypesPeer
{
return CcTracktypesPeer::populateObjects(CcTracktypesPeer::doSelectStmt($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect() method to execute a PDOStatement.
*
@ -282,7 +281,6 @@ abstract class BaseCcTracktypesPeer
// BasePeer returns a PDOStatement
return BasePeer::doSelect($criteria, $con);
}
/**
* Adds an object to the instance pool.
*
@ -377,7 +375,6 @@ abstract class BaseCcTracktypesPeer
*/
public static function clearRelatedInstancePool()
{
}
/**
@ -447,7 +444,6 @@ abstract class BaseCcTracktypesPeer
return $results;
}
/**
* Populates an object of the default type or an object that inherit from the default.
*
@ -634,8 +630,8 @@ abstract class BaseCcTracktypesPeer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, PropelPDO $con = null)
{
public static function doDelete($values, PropelPDO $con = null)
{
if ($con === null) {
$con = Propel::getConnection(CcTracktypesPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);
}

View File

@ -1,22 +1,23 @@
<?php
/**
* Base class that represents a query for the 'cc_track_types' table.
*
*
*
* @method CcTracktypesQuery orderByDbId($order = Criteria::ASC) Order by the id column
* @method CcTracktypesQuery orderByDbCOde($order = Criteria::ASC) Order by the code column
* @method CcTracktypesQuery orderByDbCode($order = Criteria::ASC) Order by the code column
* @method CcTracktypesQuery orderByDbVisibility($order = Criteria::ASC) Order by the visibility column
* @method CcTracktypesQuery orderByDbTypeName($order = Criteria::ASC) Order by the type_name column
* @method CcTracktypesQuery orderByDbDescription($order = Criteria::ASC) Order by the description column
*
* @method CcTracktypesQuery groupByDbId() Group by the id column
* @method CcTracktypesQuery groupByDbCOde() Group by the code column
* @method CcTracktypesQuery groupByDbCode() Group by the code column
* @method CcTracktypesQuery groupByDbVisibility() Group by the visibility column
* @method CcTracktypesQuery groupByDbTypeName() Group by the type_name column
* @method CcTracktypesQuery groupByDbDescription() Group by the description column
*
* @method CcTracktypesQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
* @method CcTracktypesQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
* @method CcTracktypesQuery innerJoin($relation) Adds a INNER JOIN clause to the query
@ -25,16 +26,16 @@
* @method CcTracktypes findOneOrCreate(PropelPDO $con = null) Return the first CcTracktypes matching the query, or a new CcTracktypes object populated from the query conditions when no match is found
*
* @method CcTracktypes findOneByDbCode(string $code) Return the first CcTracktypes filtered by the code column
* @method CcTracktypes findOneByDbVisibility(string $visibility) Return the first CcTracktypes filtered by the visibility column
* @method CcTracktypes findOneByDbVisibility(boolean $visibility) Return the first CcTracktypes filtered by the visibility column
* @method CcTracktypes findOneByDbTypeName(string $type_name) Return the first CcTracktypes filtered by the type_name column
* @method CcTracktypes findOneByDbDescription(string $description) Return the first CcTracktypes filtered by the description column
*
* @method array findByDbId(int $id) Return CcTracktypes objects filtered by the id column
* @method array findByDbCode(string $code) Return CcTracktypes objects filtered by the code column
* @method array findByDbVisibility(string $visibility) Return CcTracktypes objects filtered by the visibility column
* @method array findByDbVisibility(boolean $visibility) Return CcTracktypes objects filtered by the visibility column
* @method array findByDbTypeName(string $type_name) Return CcTracktypes objects filtered by the type_name column
* @method array findByDbDescription(string $description) Return CcTracktypes objects filtered by the description column
*
* @package propel.generator.airtime.om
*/
abstract class BaseCcTracktypesQuery extends ModelCriteria
@ -306,32 +307,30 @@ abstract class BaseCcTracktypesQuery extends ModelCriteria
*
* Example usage:
* <code>
* $query->filterByDbVisibility('fooValue'); // WHERE visibility = 'fooValue'
* $query->filterByDbVisibility('%fooValue%'); // WHERE visibility LIKE '%fooValue%'
* $query->filterByDbVisibility(true); // WHERE visibility = true
* $query->filterByDbVisibility('yes'); // WHERE visibility = true
* </code>
*
* @param string $dbVisibility The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param boolean|string $dbVisibility The value to use as filter.
* Non-boolean arguments are converted using the following rules:
* * 1, '1', 'true', 'on', and 'yes' are converted to boolean true
* * 0, '0', 'false', 'off', and 'no' are converted to boolean false
* Check on string values is case insensitive (so 'FaLsE' is seen as 'false').
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcTracktypesQuery The current query, for fluid interface
*/
public function filterByDbVisibility($dbVisibility = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbVisibility)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbVisibility)) {
$dbVisibility = str_replace('*', '%', $dbVisibility);
$comparison = Criteria::LIKE;
}
if (is_string($dbVisibility)) {
$dbVisibility = in_array(strtolower($dbVisibility), array('false', 'off', '-', 'no', 'n', '0', '')) ? false : true;
}
return $this->addUsingAlias(CcTracktypesPeer::VISIBILITY, $dbVisibility, $comparison);
}
/**
* Filter the query on the first_name column
* Filter the query on the type_name column
*
* Example usage:
* <code>
@ -339,53 +338,53 @@ abstract class BaseCcTracktypesQuery extends ModelCriteria
* $query->filterByDbTypeName('%fooValue%'); // WHERE type_name LIKE '%fooValue%'
* </code>
*
* @param string $dbFirstName The value to use as filter.
* @param string $dbTypeName The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcTracktypesQuery The current query, for fluid interface
*/
public function filterByDbFirstName($dbFirstName = null, $comparison = null)
public function filterByDbTypeName($dbTypeName = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbFirstName)) {
if (is_array($dbTypeName)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbFirstName)) {
$dbFirstName = str_replace('*', '%', $dbFirstName);
} elseif (preg_match('/[\%\*]/', $dbTypeName)) {
$dbTypeName = str_replace('*', '%', $dbTypeName);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTracktypesPeer::FIRST_NAME, $dbFirstName, $comparison);
return $this->addUsingAlias(CcTracktypesPeer::TYPE_NAME, $dbTypeName, $comparison);
}
/**
* Filter the query on the last_name column
* Filter the query on the description column
*
* Example usage:
* <code>
* $query->filterByDbLastName('fooValue'); // WHERE last_name = 'fooValue'
* $query->filterByDbLastName('%fooValue%'); // WHERE last_name LIKE '%fooValue%'
* $query->filterByDbDescription('fooValue'); // WHERE description = 'fooValue'
* $query->filterByDbDescription('%fooValue%'); // WHERE description LIKE '%fooValue%'
* </code>
*
* @param string $dbLastName The value to use as filter.
* @param string $dbDescription The value to use as filter.
* Accepts wildcards (* and % trigger a LIKE)
* @param string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
*
* @return CcTracktypesQuery The current query, for fluid interface
*/
public function filterByDbLastName($dbLastName = null, $comparison = null)
public function filterByDbDescription($dbDescription = null, $comparison = null)
{
if (null === $comparison) {
if (is_array($dbLastName)) {
if (is_array($dbDescription)) {
$comparison = Criteria::IN;
} elseif (preg_match('/[\%\*]/', $dbLastName)) {
$dbLastName = str_replace('*', '%', $dbLastName);
} elseif (preg_match('/[\%\*]/', $dbDescription)) {
$dbDescription = str_replace('*', '%', $dbDescription);
$comparison = Criteria::LIKE;
}
}
return $this->addUsingAlias(CcTracktypesPeer::LAST_NAME, $dbLastName, $comparison);
return $this->addUsingAlias(CcTracktypesPeer::DESCRIPTION, $dbDescription, $comparison);
}
/**

View File

@ -354,7 +354,7 @@ abstract class BaseCcWebstream extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -375,7 +375,7 @@ abstract class BaseCcWebstream extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -396,7 +396,7 @@ abstract class BaseCcWebstream extends BaseObject implements Persistent
*/
public function setDbUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -417,7 +417,7 @@ abstract class BaseCcWebstream extends BaseObject implements Persistent
*/
public function setDbLength($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -528,7 +528,7 @@ abstract class BaseCcWebstream extends BaseObject implements Persistent
*/
public function setDbMime($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -223,7 +223,7 @@ abstract class BaseCcWebstreamMetadata extends BaseObject implements Persistent
*/
public function setDbLiquidsoapData($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -209,7 +209,7 @@ abstract class BaseCeleryTasks extends BaseObject implements Persistent
*/
public function setDbTaskId($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -255,7 +255,7 @@ abstract class BaseCeleryTasks extends BaseObject implements Persistent
*/
public function setDbName($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -299,7 +299,7 @@ abstract class BaseCeleryTasks extends BaseObject implements Persistent
*/
public function setDbStatus($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -151,7 +151,7 @@ abstract class BaseCloudFile extends BaseObject implements Persistent
*/
public function setStorageBackend($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -172,7 +172,7 @@ abstract class BaseCloudFile extends BaseObject implements Persistent
*/
public function setResourceId($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -374,7 +374,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -395,7 +395,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbTitle($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -416,7 +416,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbCreator($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -437,7 +437,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -458,7 +458,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbLanguage($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -479,7 +479,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbCopyright($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -500,7 +500,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbLink($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -521,7 +521,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesAuthor($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -542,7 +542,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesKeywords($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -563,7 +563,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesSummary($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -584,7 +584,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesSubtitle($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -605,7 +605,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesCategory($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -626,7 +626,7 @@ abstract class BasePodcast extends BaseObject implements Persistent
*/
public function setDbItunesExplicit($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -321,7 +321,7 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
*/
public function setDbDownloadUrl($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -342,7 +342,7 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
*/
public function setDbEpisodeGuid($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -363,7 +363,7 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
*/
public function setDbEpisodeTitle($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -384,7 +384,7 @@ abstract class BasePodcastEpisodes extends BaseObject implements Persistent
*/
public function setDbEpisodeDescription($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -243,7 +243,7 @@ abstract class BaseThirdPartyTrackReferences extends BaseObject implements Persi
*/
public function setDbService($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -264,7 +264,7 @@ abstract class BaseThirdPartyTrackReferences extends BaseObject implements Persi
*/
public function setDbForeignId($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}
@ -333,7 +333,7 @@ abstract class BaseThirdPartyTrackReferences extends BaseObject implements Persi
*/
public function setDbStatus($v)
{
if ($v !== null && is_numeric($v)) {
if ($v !== null) {
$v = (string) $v;
}

View File

@ -23,7 +23,7 @@ class LengthFormatter
$seconds = round($pieces[2], 1);
$seconds = number_format($seconds, 1);
list($seconds, $milliStr) = explode('.', $seconds);
[$seconds, $milliStr] = explode('.', $seconds);
if (intval($pieces[0]) !== 0) {
$hours = ltrim($pieces[0], '0');

View File

@ -353,7 +353,7 @@ class Application_Service_CalendarService
$con->beginTransaction();
//new starts,ends are in UTC
list($newStartsDateTime, $newEndsDateTime) = $this->validateShowMove(
[$newStartsDateTime, $newEndsDateTime] = $this->validateShowMove(
$deltaDay,
$deltaMin
);

View File

@ -122,7 +122,7 @@ class Application_Service_HistoryService
' FROM cc_files AS file' .
') AS file_md';
$fileMd = str_replace('%NON_NULL_FILE_SELECT%', join(', ', $nonNullFileSelect), $fileMd);
$fileMd = str_replace('%NON_NULL_FILE_SELECT%', implode(', ', $nonNullFileSelect), $fileMd);
//null files are from manually added data (filling in webstream info etc)
$nullFile = '(' .
@ -135,11 +135,11 @@ class Application_Service_HistoryService
//building the file inner query
$fileSqlQuery =
'SELECT ' . join(', ', $fileSelect) .
'SELECT ' . implode(', ', $fileSelect) .
" FROM {$historyFile}" .
" LEFT JOIN {$fileMd} USING (file_id)" .
' UNION' .
' SELECT ' . join(', ', $nullFileSelect) .
' SELECT ' . implode(', ', $nullFileSelect) .
" FROM {$nullFile}";
foreach ($fileMdFilters as $filter) {
@ -159,7 +159,7 @@ class Application_Service_HistoryService
}
$mainSqlQuery .=
'SELECT ' . join(', ', $mainSelect) .
'SELECT ' . implode(', ', $mainSelect) .
" FROM {$historyRange}";
if (isset($fileSqlQuery)) {
@ -214,7 +214,7 @@ class Application_Service_HistoryService
}
if (count($orderBys) > 0) {
$orders = join(', ', $orderBys);
$orders = implode(', ', $orderBys);
$mainSqlQuery .=
" ORDER BY {$orders}";
@ -340,7 +340,7 @@ class Application_Service_HistoryService
LEFT JOIN cc_files AS file ON (file.id = playout.file_id)) AS summary';
$mainSqlQuery .=
'SELECT ' . join(', ', $select) .
'SELECT ' . implode(', ', $select) .
" FROM {$fileSummaryTable}";
//-------------------------------------------------------------------------
@ -373,7 +373,7 @@ class Application_Service_HistoryService
}
if ($numOrderColumns > 0) {
$orders = join(', ', $orderBys);
$orders = implode(', ', $orderBys);
$mainSqlQuery .=
" ORDER BY {$orders}";

View File

@ -111,12 +111,12 @@ class Application_Service_MediaService
break; //Break out of the loop if we successfully read the file!
} catch (LibreTimeFileNotFoundException $e) {
//If we have no alternate filepaths left, then let the exception bubble up.
if (sizeof($filePaths) == 0) {
if (count($filePaths) == 0) {
throw $e;
}
}
//Retry with the next alternate filepath in the list
} while (sizeof($filePaths) > 0);
} while (count($filePaths) > 0);
exit;
}

View File

@ -456,7 +456,7 @@ class Application_Service_PodcastEpisodeService extends Application_Service_Thir
Logging::info($testenclosures);
// we need to check if this is an array otherwise sizeof will fail and stop this whole script
if (is_array($testenclosures)) {
$numenclosures = sizeof($testenclosures);
$numenclosures = count($testenclosures);
// now we loop through and look for a audio file and then stop the loop at the first one we find
for ($i = 0; $i < $numenclosures + 1; ++$i) {
$enclosure_attribs = array_values($testenclosures[$i]['attribs'])[0];

View File

@ -82,7 +82,7 @@ class Application_Service_PodcastService
array_push($categories, $category->get_scheme() . ':' . $category->get_term());
}
}
$podcastArray['category'] = htmlspecialchars(implode($categories));
$podcastArray['category'] = htmlspecialchars(implode('', $categories));
//TODO: put in constants
$itunesChannel = 'http://www.itunes.com/dtds/podcast-1.0.dtd';

View File

@ -298,7 +298,7 @@ class Application_Service_SchedulerService
$insert_sql = 'INSERT INTO cc_schedule (starts, ends, ' .
'clip_length, fade_in, fade_out, cue_in, cue_out, ' .
'file_id, stream_id, instance_id, position) VALUES ' .
implode($values, ',');
implode(',', $values);
Application_Common_Database::prepareAndExecute(
$insert_sql,
[],

View File

@ -1138,7 +1138,7 @@ SQL;
$time = explode(':', $rebroadcast['start_time']);
$offset = ['days' => $days[0], 'hours' => $time[0], 'mins' => $time[1]];
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
$showStartDate,
$showDay->getDbDuration(),
$offset
@ -1168,7 +1168,7 @@ SQL;
//DateTime object
$start = $showDay->getLocalStartDateAndTime();
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
$start,
$showDay->getDbDuration()
);
@ -1253,7 +1253,7 @@ SQL;
$previousDate = clone $start;
foreach ($datePeriod as $date) {
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
$date,
$duration
);
@ -1338,7 +1338,7 @@ SQL;
}
// We will only need this if the repeat type is MONTHLY_WEEKLY
list($weekNumberOfMonth, $dayOfWeek) =
[$weekNumberOfMonth, $dayOfWeek] =
self::getMonthlyWeeklyRepeatInterval(
new DateTime($first_show, new DateTimeZone($timezone))
);
@ -1353,7 +1353,7 @@ SQL;
}
while ($start->getTimestamp() < $end->getTimestamp()) {
list($utcStartDateTime, $utcEndDateTime) = $this->createUTCStartEndDateTime(
[$utcStartDateTime, $utcEndDateTime] = $this->createUTCStartEndDateTime(
$start,
$duration
);
@ -1932,7 +1932,7 @@ SQL;
$endDateTime = clone $startDateTime;
$duration = explode(':', $duration);
list($hours, $mins) = array_slice($duration, 0, 2);
[$hours, $mins] = array_slice($duration, 0, 2);
$endDateTime->add(new DateInterval("PT{$hours}H{$mins}M"));
$startDateTime->setTimezone(new DateTimeZone('UTC'));

View File

@ -10,41 +10,45 @@
"vendor/phpunit/dbunit/src/"
]
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/jooola/propel1"
}
],
"require": {
"james-heinrich/getid3": "dev-master",
"propel/propel1": "1.7.0-stable",
"aws/aws-sdk-php": "2.7.9",
"raven/raven": "0.12.0",
"composer/semver": "^3.2",
"james-heinrich/getid3": "^1.9",
"jooola/propel1": "dev-master",
"massivescale/celery-php": "^2.1",
"simplepie/simplepie": "1.5.6",
"zf1s/zend-application": "^1.13",
"composer/semver": "^3.1",
"php-amqplib/php-amqplib": "^2.6",
"php-amqplib/php-amqplib": "^2.12",
"simplepie/simplepie": "^1.5",
"zf1s/zend-acl": "^1.13",
"zf1s/zend-session": "^1.13",
"zf1s/zend-navigation": "^1.13",
"zf1s/zend-application": "^1.13",
"zf1s/zend-auth": "^1.13",
"zf1s/zend-cache": "^1.13",
"zf1s/zend-controller": "^1.13",
"zf1s/zend-log": "^1.13",
"zf1s/zend-version": "^1.13",
"zf1s/zend-rest": "^1.13",
"zf1s/zend-date": "^1.13",
"zf1s/zend-db": "^1.13",
"zf1s/zend-file-transfer": "^1.13",
"zf1s/zend-file": "^1.13",
"zf1s/zend-filter": "^1.13",
"zf1s/zend-form": "^1.13",
"zf1s/zend-http": "^1.13",
"zf1s/zend-json": "^1.13",
"zf1s/zend-layout": "^1.13",
"zf1s/zend-loader": "^1.13",
"zf1s/zend-auth": "^1.13",
"zf1s/zend-filter": "^1.13",
"zf1s/zend-json": "^1.13",
"zf1s/zend-form": "^1.13",
"zf1s/zend-db": "^1.13",
"zf1s/zend-file": "^1.13",
"zf1s/zend-file-transfer": "^1.13",
"zf1s/zend-http": "^1.13",
"zf1s/zend-date": "^1.13",
"zf1s/zend-view": "^1.13",
"zf1s/zend-log": "^1.13",
"zf1s/zend-navigation": "^1.13",
"zf1s/zend-rest": "^1.13",
"zf1s/zend-session": "^1.13",
"zf1s/zend-validate": "^1.13",
"zf1s/zend-cache": "^1.13"
"zf1s/zend-version": "^1.13",
"zf1s/zend-view": "^1.13"
},
"require-dev": {
"phpunit/phpunit": "^4.3",
"phpunit/dbunit": "^2.0",
"phpunit/phpunit": "^4.3",
"zf1s/zend-test": "^1.13"
}
}

1001
legacy/composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -167,7 +167,7 @@ class DatabaseSetup extends Setup
*/
private function createDatabaseTables()
{
$sqlDir = dirname(dirname(__DIR__)) . '/build/sql/';
$sqlDir = dirname(__DIR__, 2) . '/build/sql/';
$files = ['schema.sql', 'sequences.sql', 'views.sql', 'triggers.sql', 'defaultdata.sql'];
foreach ($files as $f) {
try {

View File

@ -1,24 +1,24 @@
<?php
define('CONFIG_PATH', dirname(dirname(__DIR__)) . '/application/configs/');
define('CONFIG_PATH', dirname(__DIR__, 2) . '/application/configs/');
require_once dirname(dirname(__DIR__)) . '/vendor/propel/propel1/runtime/lib/Propel.php';
require_once dirname(__DIR__, 2) . '/vendor/jooola/propel1/runtime/lib/Propel.php';
require_once CONFIG_PATH . 'conf.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcPref.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcPref.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcPrefPeer.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcPrefPeer.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcPrefQuery.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcPrefQuery.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/map/CcPrefTableMap.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/map/CcPrefTableMap.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcPref.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcPref.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcPrefPeer.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcPrefPeer.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcPrefQuery.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcPrefQuery.php';
/**
* User: sourcefabric

View File

@ -1,25 +1,25 @@
<?php
define('CONFIG_PATH', dirname(dirname(__DIR__)) . '/application/configs/');
define('CONFIG_PATH', dirname(__DIR__, 2) . '/application/configs/');
define('DEFAULT_STOR_DIR', '/srv/airtime/stor/');
require_once dirname(dirname(__DIR__)) . '/vendor/propel/propel1/runtime/lib/Propel.php';
require_once dirname(__DIR__, 2) . '/vendor/jooola/propel1/runtime/lib/Propel.php';
require_once CONFIG_PATH . 'conf.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/map/CcMusicDirsTableMap.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/map/CcMusicDirsTableMap.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcMusicDirsQuery.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcMusicDirsQuery.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcMusicDirsQuery.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcMusicDirsQuery.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcMusicDirs.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcMusicDirs.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcMusicDirs.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcMusicDirs.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/om/BaseCcMusicDirsPeer.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/om/BaseCcMusicDirsPeer.php';
require_once dirname(dirname(__DIR__)) . '/application/models/airtime/CcMusicDirsPeer.php';
require_once dirname(__DIR__, 2) . '/application/models/airtime/CcMusicDirsPeer.php';
/**
* Author: sourcefabric

View File

@ -1,6 +1,6 @@
<?php
define('BUILD_PATH', dirname(dirname(__DIR__)) . '/build/');
define('BUILD_PATH', dirname(__DIR__, 2) . '/build/');
define('AIRTIME_CONF_TEMP_PATH', '/etc/airtime/airtime.conf.temp');
define('RMQ_INI_TEMP_PATH', '/tmp/rabbitmq.ini.tmp');
@ -89,7 +89,7 @@ abstract class Setup
{
$string = '';
for ($i = 0; $i < $p_len; ++$i) {
$pos = mt_rand(0, strlen($p_chars) - 1);
$pos = random_int(0, strlen($p_chars) - 1);
$string .= $p_chars[$pos];
}

View File

@ -37,7 +37,7 @@ set_include_path(implode(PATH_SEPARATOR, [
set_include_path(implode(PATH_SEPARATOR, [
get_include_path(),
realpath(APPLICATION_PATH . '/../vendor/propel/propel1/runtime/lib'),
realpath(APPLICATION_PATH . '/../vendor/jooola/propel1/runtime/lib'),
]));
// Ensure library/ is on include_path
@ -78,7 +78,7 @@ set_include_path(APPLICATION_PATH . '/cloud_storage' . PATH_SEPARATOR . get_incl
require_once APPLICATION_PATH . '/configs/conf.php';
require_once 'propel/propel1/runtime/lib/Propel.php';
require_once 'jooola/propel1/runtime/lib/Propel.php';
Propel::init('../application/configs/airtime-conf-production.php');
Zend_Session::start();