Skip to content

Commit

Permalink
Remove funcitons.js. Only used by search.php which hasn't made sense …
Browse files Browse the repository at this point in the history
…for many many many

years.

Could be the reason why Google is blocking us today..
  • Loading branch information
bjori committed Oct 24, 2013
1 parent 65d542a commit 8e87088
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 65 deletions.
1 change: 0 additions & 1 deletion error.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@
"bugstats" => "http://bugs.php.net/bugstats.php",
"phpdochowto" => "https://wiki.php.net/doc/howto",
"rev" => "http://doc.php.net/php/$LANG/revcheck.php",
"functions.js.txt" => "http://svn.php.net/phpdoc/doc-base/trunk/scripts/quickref",
"release/5_3_0.php" => "/releases/5_3_0.php", // PHP 5.3.0 release announcement had a typo
"ideas.php" => "http://wiki.php.net/ideas", // BC
);
Expand Down
2 changes: 0 additions & 2 deletions functions.js

This file was deleted.

1 change: 0 additions & 1 deletion include/layout.inc
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ function site_footer($config = array())
"<a href=\"/mirror.php\">This unofficial mirror</a> is operated at:");
$last_updated = strftime("%c %Z", $LAST_UPDATED);
$layout_helper = ($PAGE_COLUMNS > 2 ? "</div>" : "");
//$functionsjs = (in_array("functionsjs", $config) ? "\n<script src=\"" . $_SERVER['STATIC_ROOT'] . '/functions.js" type="text/javascript"></script>' : '');

// Automate the Copyright year
$current_year = date('Y');
Expand Down
27 changes: 2 additions & 25 deletions search.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,29 +111,7 @@
);
site_header("Search", array("link" => array($link), "current" => "docs"));
?>
<p>
The autocompleting search feature is accessible via the form elements at the top
right of php.net pages. You should be able to use this feature in a reasonably modern
browser by selecting the 'function list' search option and typing in some letters
into the searchbox. Features:
</p>
<ul>
<li>Dynamically changing list of function names starting with the substring you typed</li>
<li>Navigate in the list with up and down keys</li>
<li>Autocomplete with pressing the space key</li>
<li>Go to a function by clicking on its name with your mouse</li>
</ul>
<p>
If you are not interested in this feature, you can turn it
off for yourself on the <a href="/my.php">My PHP.net</a> page.
</p>
<p>
In case you find any bugs, <a href="http://bugs.php.net/">we are interested</a>
in a detailed writeup, including JS error messages, operating system and browser
information. The source code of this feature is released under the PHP License and
is available <a href="http://svn.php.net/phpdoc/doc-base/trunk/scripts/quickref">from the
PHP SVN server</a> without any support.
</p>
This page is no longer functioning, and will be removed shortly.
<?php
if (FALSE) {
if (isset($EXPL_LANG)) {
Expand Down Expand Up @@ -181,6 +159,5 @@
</form>
<?php
}
echo '<script type="text/javascript">loadSuggestCode();</script>';
site_footer(array("functionsjs"));
site_footer();
}
36 changes: 0 additions & 36 deletions userprefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,39 +40,3 @@ function boldEvents()
}
}

// Load function name suggestion code (for search box)
function loadSuggestCode()
{
searchEnabled = true;
// Force default turnoff for buggy Mac browsers
if (navigator.userAgent.toLowerCase().indexOf('mac') > 0) {
searchEnabled = false;
}

myphpnet = getCookie('MYPHPNET');
if (typeof(myphpnet) == "string") {
myphpnet_parts = myphpnet.split(",");
if (myphpnet_parts.length > 3) {
if (myphpnet_parts[3] == '1') {
searchEnabled = false;
}
// Enable if user explicity wanted to enable it
// Important for Mac users, who get disabled by default
else if (myphpnet_parts[3] == '0') {
searchEnabled = true;
}
}
}
if (searchEnabled && document.getElementsByTagName && document.createElement) {
var elems = document.getElementsByTagName("*");
for (var i = 0; i < elems.length; i++) {
if (elems[i].tagName.toLowerCase() == 'head') {
var scriptElem = document.createElement('script');
scriptElem.setAttribute('type', 'text/javascript');
scriptElem.setAttribute('src', '/functions.js');
elems[i].appendChild(scriptElem);
break;
}
}
}
}

0 comments on commit 8e87088

Please sign in to comment.