Ejemplo n.º 1
0
 /**
  * Ends current action . Also a succes message can be specified  and is visible if there are no errors
  * @param string $succes_message
  * @param string $color
  */
 public static function end_action($succes_message = null, $color = 'default')
 {
     if (!self::$currentAction) {
         return;
     }
     if (!$succes_message) {
         $succes_message = self::$default_action_done_message;
     }
     if ('default' == $color) {
         $color = self::$default_action_done_color;
     }
     self::$currentAction['success_message'] = array('text' => $succes_message, 'color' => $color);
     if (!count(self::$currentAction['errors'])) {
         self::$totalOK++;
     }
     if (count(self::$currentAction['errors']) || self::$debug) {
         self::show_action();
     }
     self::$currentAction = null;
 }