CC-4572: Adding a playlist to a show in Now Playing page fails, interface greys out
- bug with php 5.3.2 with DateTime::createFromFormat() - fixed with workaround
This commit is contained in:
parent
562c509939
commit
3f1df49221
5 changed files with 71 additions and 21 deletions
|
@ -44,11 +44,16 @@ class CcBlockcontents extends BaseCcBlockcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadein($v)
|
public function setDbFadein($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -58,7 +63,7 @@ class CcBlockcontents extends BaseCcBlockcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadein = $dt->format('H:i:s.u');
|
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN;
|
$this->modifiedColumns[] = CcBlockcontentsPeer::FADEIN;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -72,11 +77,16 @@ class CcBlockcontents extends BaseCcBlockcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeout($v)
|
public function setDbFadeout($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -86,7 +96,7 @@ class CcBlockcontents extends BaseCcBlockcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadeout = $dt->format('H:i:s.u');
|
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT;
|
$this->modifiedColumns[] = CcBlockcontentsPeer::FADEOUT;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -43,11 +43,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadein($v)
|
public function setDbFadein($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -57,7 +62,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadein = $dt->format('H:i:s.u');
|
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -71,11 +76,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeout($v)
|
public function setDbFadeout($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -85,7 +95,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadeout = $dt->format('H:i:s.u');
|
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -107,11 +107,16 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeIn($v)
|
public function setDbFadeIn($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -120,7 +125,7 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->fade_in = $dt->format('H:i:s.u');
|
$this->fade_in = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -134,11 +139,16 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeOut($v)
|
public function setDbFadeOut($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -148,7 +158,7 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fade_out = $dt->format('H:i:s.u');
|
$this->fade_in = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_OUT;
|
$this->modifiedColumns[] = CcSchedulePeer::FADE_OUT;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -43,11 +43,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadein($v)
|
public function setDbFadein($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -57,7 +62,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadein = $dt->format('H:i:s.u');
|
$this->fadein = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEIN;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -71,11 +76,16 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeout($v)
|
public function setDbFadeout($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -85,7 +95,7 @@ class CcPlaylistcontents extends BaseCcPlaylistcontents {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fadeout = $dt->format('H:i:s.u');
|
$this->fadeout = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
$this->modifiedColumns[] = CcPlaylistcontentsPeer::FADEOUT;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -107,11 +107,16 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeIn($v)
|
public function setDbFadeIn($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -120,7 +125,7 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
throw new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->fade_in = $dt->format('H:i:s.u');
|
$this->fade_in = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
$this->modifiedColumns[] = CcSchedulePeer::FADE_IN;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
@ -134,11 +139,16 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
*/
|
*/
|
||||||
public function setDbFadeOut($v)
|
public function setDbFadeOut($v)
|
||||||
{
|
{
|
||||||
|
$microsecond = 0;
|
||||||
if ($v instanceof DateTime) {
|
if ($v instanceof DateTime) {
|
||||||
$dt = $v;
|
$dt = $v;
|
||||||
}
|
}
|
||||||
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
else if (preg_match('/^[0-9]{1,2}(\.\d{1,6})?$/', $v)) {
|
||||||
$dt = DateTime::createFromFormat("s.u", $v);
|
// in php 5.3.2 createFromFormat() with "u" is not supported(bug)
|
||||||
|
// Hence we need to do parsing.
|
||||||
|
$info = explode('.', $v);
|
||||||
|
$microsecond = $info[1];
|
||||||
|
$dt = DateTime::createFromFormat("s", $info[0]);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
try {
|
try {
|
||||||
|
@ -148,7 +158,7 @@ class CcSchedule extends BaseCcSchedule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->fade_out = $dt->format('H:i:s.u');
|
$this->fade_out = $dt->format('H:i:s').".".$microsecond;
|
||||||
$this->modifiedColumns[] = CcSchedulePeer::FADE_OUT;
|
$this->modifiedColumns[] = CcSchedulePeer::FADE_OUT;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue