Exemplo n.º 1
0
function vmTrace($notice, $force = FALSE)
{
    if ($force || tsmConfig::showDebug()) {
        ob_start();
        echo '<pre>';
        debug_print_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 10);
        echo '</pre>';
        $body = ob_get_contents();
        ob_end_clean();
        if (tsmConfig::$echoDebug) {
            echo $notice . ' <pre>' . $body . '</pre>';
        } else {
            if (tsmConfig::$logDebug) {
                logInfo($body, $notice);
            } else {
                $app = JFactory::getApplication();
                $app->enqueueMessage($notice . ' ' . $body . ' ');
            }
        }
    }
}
Exemplo n.º 2
0
 function saveorder()
 {
     vRequest::vmCheckToken();
     $cid = vRequest::getInt($this->_cidName, vRequest::getInt('cid', array()));
     $order = vRequest::getInt('order', array());
     $model = tmsModel::getModel($this->_cname);
     if (!$model->saveorder($cid, $order)) {
         $msg = 'error';
     } else {
         if (JFactory::getApplication()->isAdmin() and tsmConfig::showDebug()) {
             $msg = tsmText::sprintf('com_tsmart_NEW_ORDERING_SAVEDF', $this->mainLangKey);
         } else {
             $msg = tsmText::sprintf('com_tsmart_NEW_ORDERING_SAVED');
         }
     }
     $this->setRedirect($this->redirectPath, $msg);
 }