Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HuasoFoundries/phpPgAdmin6.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Figueroa <amenadiel@gmail.com>2018-05-11 00:33:45 +0300
committerFelipe Figueroa <amenadiel@gmail.com>2018-05-11 00:33:45 +0300
commit74f8dcf7961f4543874a30268e1fd869e1fbfd90 (patch)
tree2c2eac6dd6c04c9b79a2c9a018f9041272287d64 /src/controllers/FulltextController.php
parentf4fff1d90777778576174c46338fd9f87869f6a5 (diff)
parametrize controller title to reduce duplication when calling printHeader
Diffstat (limited to 'src/controllers/FulltextController.php')
-rw-r--r--src/controllers/FulltextController.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/controllers/FulltextController.php b/src/controllers/FulltextController.php
index 2313d38d..573d9d50 100644
--- a/src/controllers/FulltextController.php
+++ b/src/controllers/FulltextController.php
@@ -15,6 +15,7 @@ use PHPPgAdmin\Decorators\Decorator;
*/
class FulltextController extends BaseController
{
+ public $controller_title = 'strschemas';
/**
* Default method to render the controller according to the action parameter.
*/
@@ -27,7 +28,7 @@ class FulltextController extends BaseController
return $this->doSubTree($_REQUEST['what']);
}
- $this->printHeader($this->lang['strschemas']);
+ $this->printHeader();
$this->printBody();
if (isset($_POST['cancel'])) {
@@ -305,7 +306,7 @@ class FulltextController extends BaseController
echo '<p>', sprintf($this->lang['strconfdropftsconfig'], $this->misc->printVal($_REQUEST['ftscfg'])), "</p>\n";
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"dropconfig\" />\n";
echo '<input type="hidden" name="database" value="', htmlspecialchars($_REQUEST['database']), "\" />\n";
@@ -335,7 +336,7 @@ class FulltextController extends BaseController
echo '<p>', sprintf($this->lang['strconfdropftsdict'], $this->misc->printVal($_REQUEST['ftsdict'])), "</p>\n";
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<p><input type=\"checkbox\" id=\"cascade\" name=\"cascade\" /> <label for=\"cascade\">{$this->lang['strcascade']}</label></p>\n";
echo "<p><input type=\"hidden\" name=\"action\" value=\"dropdict\" />\n";
echo '<input type="hidden" name="database" value="', htmlspecialchars($_REQUEST['database']), "\" />\n";
@@ -395,7 +396,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreateconfig'], 'pg.ftscfg.create');
$this->printMsg($msg);
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
// conf name
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>\n";
@@ -411,7 +412,7 @@ class FulltextController extends BaseController
while (!$ftscfgs->EOF) {
$data->fieldClean($ftscfgs->fields['schema']);
$data->fieldClean($ftscfgs->fields['name']);
- $tplname = $ftscfgs->fields['schema'].'.'.$ftscfgs->fields['name'];
+ $tplname = $ftscfgs->fields['schema'] . '.' . $ftscfgs->fields['name'];
$tpls[$tplname] = serialize([
'name' => $ftscfgs->fields['name'],
'schema' => $ftscfgs->fields['schema'],
@@ -432,7 +433,7 @@ class FulltextController extends BaseController
while (!$ftsparsers->EOF) {
$data->fieldClean($ftsparsers->fields['schema']);
$data->fieldClean($ftsparsers->fields['name']);
- $parsername = $ftsparsers->fields['schema'].'.'.$ftsparsers->fields['name'];
+ $parsername = $ftsparsers->fields['schema'] . '.' . $ftsparsers->fields['name'];
$ftsparsers_[$parsername] = serialize([
'parser' => $ftsparsers->fields['name'],
@@ -538,7 +539,7 @@ class FulltextController extends BaseController
// Fetch all FTS parsers from the database
$ftsparsers = $data->getFtsParsers();
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n";
@@ -842,7 +843,7 @@ class FulltextController extends BaseController
$this->printTitle($this->lang['strftscreatedict'], 'pg.ftsdict.create');
$this->printMsg($msg);
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n\t\t<th class=\"data left required\">{$this->lang['strname']}</th>\n";
echo "\t\t<td class=\"data1\"><input name=\"formName\" size=\"32\" maxlength=\"{$data->_maxNameLen}\" value=\"",
@@ -858,7 +859,7 @@ class FulltextController extends BaseController
while (!$ftstpls->EOF) {
$data->fieldClean($ftstpls->fields['schema']);
$data->fieldClean($ftstpls->fields['name']);
- $tplname = $ftstpls->fields['schema'].'.'.$ftstpls->fields['name'];
+ $tplname = $ftstpls->fields['schema'] . '.' . $ftstpls->fields['name'];
$tpls[$tplname] = serialize([
'name' => $ftstpls->fields['name'],
'schema' => $ftstpls->fields['schema'],
@@ -997,7 +998,7 @@ class FulltextController extends BaseController
$_POST['formName'] = $_REQUEST['ftsdict'];
}
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n";
@@ -1066,7 +1067,7 @@ class FulltextController extends BaseController
$this->printTrail('ftscfg'); // TODO: proper breadcrumbs
$this->printTitle($this->lang['strdrop'], 'pg.ftscfg.alter');
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
// Case of multiaction drop
if (isset($_REQUEST['ma'])) {
@@ -1129,7 +1130,7 @@ class FulltextController extends BaseController
$_POST['ftscfg'] = $_REQUEST['ftscfg'];
}
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n";
@@ -1234,7 +1235,7 @@ class FulltextController extends BaseController
$mappings = $data->getFtsMappings($_POST['ftscfg']);
- echo '<form action="'.\SUBFOLDER."/src/views/fulltext\" method=\"post\">\n";
+ echo '<form action="' . \SUBFOLDER . "/src/views/fulltext\" method=\"post\">\n";
echo "<table>\n";
echo "\t<tr>\n";
echo "\t\t<th class=\"data left required\">{$this->lang['strftsmapping']}</th>\n";