Skip to content

Commit

Permalink
Removed wiki links from setup script and user preferences
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrp committed Nov 3, 2013
1 parent a67e41a commit 858b20d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 72 deletions.
30 changes: 0 additions & 30 deletions libraries/config/FormDisplay.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,6 @@ private function _displayFieldInput(

$opts = array(
'doc' => $this->getDocLink($system_path),
'wiki' => $this->getWikiLink($system_path),
'show_restore_default' => $show_restore_default,
'userprefs_allow' => $userprefs_allow,
'userprefs_comment' => PMA_langName($system_path, 'cmt', ''));
Expand Down Expand Up @@ -708,35 +707,6 @@ public function getDocLink($path)
);
}

/**
* Returns link to wiki
*
* @param string $path Path to wiki
*
* @return string
*/
public function getWikiLink($path)
{
$opt_name = $this->_getOptName($path);
if (substr($opt_name, 0, 7) == 'Servers') {
$opt_name = substr($opt_name, 8);
if (strpos($opt_name, 'AllowDeny') === 0) {
$opt_name = str_replace('_', '_.28', $opt_name) . '.29';
}
}
$test = substr($path, 0, 6);
if ($test == 'Import') {
$opt_name = substr($opt_name, 7);
if ($opt_name == 'format') {
$opt_name = 'format_2';
}
}
if ($test == 'Export') {
$opt_name = substr($opt_name, 7);
}
return PMA_linkURL('http://wiki.phpmyadmin.net/pma/Config#' . $opt_name);
}

/**
* Changes path so it can be used in URLs
*
Expand Down
17 changes: 4 additions & 13 deletions libraries/config/FormDisplay.tpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ function PMA_displayFieldsetTop($title = '', $description = '', $errors = null,
* o values_disabled - (array)list of disabled values (keys from values)
* o comment - (string) tooltip comment
* o comment_warning - (bool) whether this comments warns about something
* o wiki - (string) wiki link
*
* @param string $path config option path
* @param string $name config option name
Expand Down Expand Up @@ -147,7 +146,6 @@ function PMA_displayInput($path, $name, $type, $value, $description = '',
$icon_init = array(
'edit' => array('b_edit.png', ''),
'help' => array('b_help.png', __('Documentation')),
'info' => array('s_info.png', __('Wiki')),
'reload' => array('s_reload.png', ''),
'tblops' => array('b_tblops.png', '')
);
Expand Down Expand Up @@ -204,18 +202,11 @@ function PMA_displayInput($path, $name, $type, $value, $description = '',
echo '<th>';
echo '<label for="' . htmlspecialchars($path) . '">' . $name . '</label>';

if (! empty($opts['doc']) || ! empty($opts['wiki'])) {
if (! empty($opts['doc'])) {
echo '<span class="doc">';
if (! empty($opts['doc'])) {
echo '<a href="' . $opts['doc']
. '" target="documentation">' . $icons['help'] . '</a>';
echo "\n";
}
if (! empty($opts['wiki'])) {
echo '<a href="' . $opts['wiki']
. '" target="wiki">' . $icons['info'] . '</a>';
echo "\n";
}
echo '<a href="' . $opts['doc']
. '" target="documentation">' . $icons['help'] . '</a>';
echo "\n";
echo '</span>';
}

Expand Down
2 changes: 0 additions & 2 deletions setup/frames/index.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,6 @@
// Display language list
$opts = array(
'doc' => $form_display->getDocLink('DefaultLang'),
'wiki' => $form_display->getWikiLink('DefaultLang'),
'values' => array(),
'values_escaped' => true);
foreach ($all_languages as $each_lang_key => $each_lang) {
Expand All @@ -234,7 +233,6 @@
// Display server list
$opts = array(
'doc' => $form_display->getDocLink('ServerDefault'),
'wiki' => $form_display->getWikiLink('ServerDefault'),
'values' => array(),
'values_disabled' => array());
if ($cf->getServerCount() > 0) {
Expand Down
27 changes: 0 additions & 27 deletions test/classes/config/PMA_FormDisplay_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,33 +349,6 @@ public function testGetDocLink()
);
}

/**
* Test for FormDisplay::getWikiLink
*
* @return void
*/
public function testGetWikiLink()
{
$this->assertEquals(
"./url.php?url=http%3A%2F%2Fwiki.phpmyadmin.net%2Fpma%2FConfig%23" .
"AllowDeny.29&amp;server=0&amp;lang=en&amp;token=token",
$this->object->getWikiLink('Servers/1/AllowDeny')
);

$this->assertEquals(
"./url.php?url=http%3A%2F%2Fwiki.phpmyadmin.net%2Fpma%2FConfig%23" .
"format_2&amp;server=0&amp;lang=en&amp;token=token",
$this->object->getWikiLink('Import/format')
);

$this->assertEquals(
"./url.php?url=http%3A%2F%2Fwiki.phpmyadmin.net%2Fpma%2FConfig%23" .
"test&amp;server=0&amp;lang=en&amp;token=token",
$this->object->getWikiLink('Export/test')
);

}

/**
* Test for FormDisplay::_getOptName
*
Expand Down

0 comments on commit 858b20d

Please sign in to comment.