projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge remote branch 'origin/core/1.1.2/maint' into core/master
[platal.git]
/
classes
/
plwizard.php
diff --git
a/classes/plwizard.php
b/classes/plwizard.php
index
f630020
..
656b957
100644
(file)
--- a/
classes/plwizard.php
+++ b/
classes/plwizard.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-20
09
Polytechnique.org *
+ * Copyright (C) 2003-20
11
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-29,7
+29,7
@@
interface PlWizardPage
/** Build a new instance of the class
* associated with the given wizard master.
*/
/** Build a new instance of the class
* associated with the given wizard master.
*/
- public function __construct(PlWizard
&
$wiz);
+ public function __construct(PlWizard $wiz);
/** Return the name of the templace describing the page.
*/
/** Return the name of the templace describing the page.
*/
@@
-37,7
+37,7
@@
interface PlWizardPage
/** Prepare the page by assigning to it any useful value.
*/
/** Prepare the page by assigning to it any useful value.
*/
- public function prepare(PlPage
&
$page, $id);
+ public function prepare(PlPage $page, $id);
/** Process information resulting of the application of the page.
* This function must return a clue indicating the next page to show.
/** Process information resulting of the application of the page.
* This function must return a clue indicating the next page to show.
@@
-156,10
+156,10
@@
class PlWizard
return new $page($this);
}
return new $page($this);
}
- public function apply(PlPage
&
$smarty, $baseurl, $pgid = null, $mode = 'normal')
+ public function apply(PlPage $smarty, $baseurl, $pgid = null, $mode = 'normal')
{
{
- if ($this->stateless && (isset($this->lookup[$pgid]) || isset($this->pages[$pgid]))) {
- $curpage = is_numeric($pgid) ? $pgid : $this->lookup[$pgid];
+ if ($this->stateless && (isset($this->lookup[$pgid]) || isset($this->pages[$pgid]))) {
+ $curpage = is_numeric($pgid) ? $pgid : $this->lookup[$pgid];
} else if ($this->stateless && is_null($pgid)) {
$curpage = 0;
} else {
} else if ($this->stateless && is_null($pgid)) {
$curpage = 0;
} else {
@@
-174,7
+174,7
@@
class PlWizard
$page = $this->getPage(Post::i('valid_page'));
$curpage = Post::i('valid_page');
$success = false;
$page = $this->getPage(Post::i('valid_page'));
$curpage = Post::i('valid_page');
$success = false;
- $next = $page->process(
&
$success);
+ $next = $page->process($success);
$last = $curpage;
switch ($next) {
case PlWizard::FIRST_PAGE:
$last = $curpage;
switch ($next) {
case PlWizard::FIRST_PAGE:
@@
-222,7
+222,7
@@
class PlWizard
$page = $this->getPage($curpage);
}
if ($mode == 'ajax') {
$page = $this->getPage($curpage);
}
if ($mode == 'ajax') {
-
header('Content-Type: text/html; charset=utf-8'
);
+
pl_content_headers("text/html"
);
$smarty->changeTpl($this->layout, NO_SKIN);
$smarty->assign('wiz_run_ajax', true);
} else {
$smarty->changeTpl($this->layout, NO_SKIN);
$smarty->assign('wiz_run_ajax', true);
} else {