Merge branch 'devel' of dev.sourcefabric.org:airtime into devel
This commit is contained in:
commit
7a3c2db2bf
|
@ -813,8 +813,8 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$data[$j["name"]] = $j["value"];
|
$data[$j["name"]] = $j["value"];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['add_show_hosts'] = $this->_getParam('hosts');
|
$data['add_show_hosts'] = $this->_getParam('hosts');
|
||||||
$data['add_show_day_check'] = $this->_getParam('days');
|
$data['add_show_day_check'] = $this->_getParam('days');
|
||||||
|
|
||||||
if ($data['add_show_day_check'] == "") {
|
if ($data['add_show_day_check'] == "") {
|
||||||
$data['add_show_day_check'] = null;
|
$data['add_show_day_check'] = null;
|
||||||
|
@ -828,10 +828,14 @@ class ScheduleController extends Zend_Controller_Action
|
||||||
$this->view->addNewShow = true;
|
$this->view->addNewShow = true;
|
||||||
$this->view->newForm = $this->view->render(
|
$this->view->newForm = $this->view->render(
|
||||||
'schedule/add-show-form.phtml');
|
'schedule/add-show-form.phtml');
|
||||||
|
Logging::debug("Show creation succeeded");
|
||||||
|
Logging::sparse_debug( $data );
|
||||||
} else {
|
} else {
|
||||||
$this->view->addNewShow = true;
|
$this->view->addNewShow = true;
|
||||||
$this->view->form = $this->view->render('
|
$this->view->form = $this->view->render('
|
||||||
schedule/add-show-form.phtml');
|
schedule/add-show-form.phtml');
|
||||||
|
Logging::debug("Show creation failed");
|
||||||
|
Logging::sparse_debug( $data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,6 +69,10 @@ class Logging {
|
||||||
|
|
||||||
public static function debug($p_msg)
|
public static function debug($p_msg)
|
||||||
{
|
{
|
||||||
|
if (!(defined('APPLICATION_ENV') && APPLICATION_ENV == "development")) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$bt = debug_backtrace();
|
$bt = debug_backtrace();
|
||||||
|
|
||||||
$caller = array_shift($bt);
|
$caller = array_shift($bt);
|
||||||
|
@ -78,11 +82,16 @@ class Logging {
|
||||||
$caller = array_shift($bt);
|
$caller = array_shift($bt);
|
||||||
$function = $caller['function'];
|
$function = $caller['function'];
|
||||||
|
|
||||||
|
$logger = self::getLogger();
|
||||||
if (defined('APPLICATION_ENV') && APPLICATION_ENV == "development") {
|
$logger->debug("[$file : $function() : line $line] - ".self::toString($p_msg));
|
||||||
$logger = self::getLogger();
|
}
|
||||||
$logger->debug("[$file : $function() : line $line] - ".self::toString($p_msg));
|
// kind of like debug but for printing arrays more compactly (skipping
|
||||||
}
|
// empty elements
|
||||||
|
|
||||||
|
public static function debug_sparse(array $p_msg)
|
||||||
|
{
|
||||||
|
Logging::debug("Sparse output:");
|
||||||
|
Logging::debug( array_filter($p_msg) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function enablePropelLogging()
|
public static function enablePropelLogging()
|
||||||
|
|
Loading…
Reference in New Issue