Example #1
0
        if ($state != 0 && $state != 2) {
            $flag = 1;
            $text = _("Reunpack job is running: you can see it in");
            $text1 = _("jobqueue");
            $output .= "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
        } elseif (!empty($uploadunpack)) {
            $rc = $reunpackPlugin->AgentAdd($uploadpk);
            if (empty($rc)) {
                /* Need to refresh the screen */
                $this->vars['message'] = _("Unpack added to job queue");
                $flag = 1;
                $text = _("Reunpack job is running: you can see it in");
                $text1 = _("jobqueue");
                $output .= "<p> <font color=red>{$text} <a href='" . Traceback_uri() . "?mod=showjobs'>{$text1}</a></font></p>";
            } else {
                $text = _("Unpack of Upload failed");
                $this->vars['message'] = "{$text}: {$rc}";
            }
        }
        $text = _("File contents are not available in the repository.");
        $output .= "{$text}\n";
        $output .= $reunpackPlugin->ShowReunpackView($item, $flag);
        return $output;
    }
    public function Output()
    {
        return $this->ShowView(NULL, "browse");
    }
}
$NewPlugin = new ui_view();
$NewPlugin->Initialize();
Example #2
0
 public static function createWithSource($name, $src, $basePath = REASG_SELF_DIRECTORY)
 {
     $a = new ui_view();
     $a->name = str_replace('.', '_', $name);
     $a->initializeSource(self::getSourceWithIncludes($src, $basePath));
     return $a;
 }