/[cvs]/bareface/yakka/methods/YakkaMethodView.php
ViewVC logotype

Contents of /bareface/yakka/methods/YakkaMethodView.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations)
Sun Jan 5 00:22:26 2003 UTC (21 years, 6 months ago) by bareface
Branch: MAIN
init;

1 <?php
2
3 class YakkaMethodView {
4 function YakkaMethodView(&$engine) {
5 $this->engine = &$engine;
6 }
7
8 function run() {
9 /* getting pagesource from edit/create */
10 if ($pageSource = $this->engine->arguments->getArgument("page-source")) {
11 $this->engine->runtime->page->setSource($pageSource);
12 $this->engine->runtime->page->setModifyUser($this->engine->runtime->user);
13 $this->engine->runtime->page->save();
14 if ($pageParent = $this->engine->arguments->getArgument("page-parent")) {
15 $this->engine->runtime->page->copyGrantsOf($pageParent);
16 $this->engine->runtime->page->copyRevokesOf($pageParent);
17 }
18 }
19
20 /* login */
21 if (($username = $this->engine->arguments->getArgument("username")) && ($password = $this->engine->arguments->getArgument("password"))) {
22 $this->engine->runtime->user = new YakkaUser();
23 $this->engine->runtime->user->authenticate($username, $password);
24 $this->engine->session->user = $this->engine->runtime->user->toString();
25 }
26
27 return "<method id='view' access-privilege='read'/>";
28 }
29 }
30
31 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed