Skip to content

Commit

Permalink
refine use of which/that in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
infrastation committed Sep 25, 2017
1 parent b3908f5 commit d32264d
Show file tree
Hide file tree
Showing 17 changed files with 49 additions and 48 deletions.
6 changes: 3 additions & 3 deletions README.Fedora
Expand Up @@ -3,10 +3,10 @@ RUNNING RACKTABLES ON A FEDORA SYSTEM

Most files in Fedora package of RackTables application reside in the
/usr/share/RackTables directory regardless of package version. It is
assumed, that this directory is never directly used in httpd's "document
assumed that this directory is never directly used in httpd's "document
root" setting. Instead a symlink or a PHP "require" construct should be
used for the index.php (and ONLY index.php) file based on some other
directory, which is actually used as wwwroot. This greatly improves
directory that is the actual wwwroot. This greatly improves
security and allows for the two use cases described below.

1. Single RackTables instance per server. By default the application
Expand All @@ -33,7 +33,7 @@ config directory per each instance. Each of the directories will feature
an own secret.php file configured for its own MySQL database.

For example, 3 virtual hosts should provide an independent RackTables
application each. It is assumed, that httpd is already configured for the
application each. It is assumed that httpd is already configured for the
virtual hosts using respective directories:

/var/www/vhosts/racktables.example1.com
Expand Down
10 changes: 5 additions & 5 deletions README.md
Expand Up @@ -56,7 +56,7 @@ for RackTables is Apache httpd.
#### 1.3.a. Debian 7 with nginx
Remember to adjust `server_name` in `server {}` section, otherwise your logout link
will point to localhost (and thus fail).
Notice, that fpm.sock is advised, keep the rest on default configuration, or
Notice that fpm.sock is advised, keep the rest on default configuration, or
tweak to your needs. You may need to set `fastcgi_read_timeout 600;` if you use
some external addons like fping, which may take some time in certain situations.
Please note that setting aggresive caching for php scripts may result in stale
Expand Down Expand Up @@ -187,7 +187,7 @@ Database triggers are used for some data consistency measures. The database
user account must have the 'TRIGGER' privilege, which was introduced in
MySQL 5.1.7.

The `IPV4OBJ_LISTSRC` configuration option is reset to an expression which enables
The `IPV4OBJ_LISTSRC` configuration option is reset to an expression that enables
the IP addressing feature for all object types except those listed.

Tags could now be assigned on the Edit/Properties tab using a text input with
Expand Down Expand Up @@ -257,7 +257,7 @@ This release intoduces two new configuration options:

### Upgrading to 0.20.1

The 0.20.0 release includes bug which breaks IP networks' capacity displaying on
The 0.20.0 release includes a bug that breaks IP networks' capacity displaying on
32-bit architecture machines. To fix this, this release makes use of PHP's BC
Math module. It is a new reqiurement. Most PHP distributions have this module
already enabled, but if yours does not - you need yo recompile PHP.
Expand Down Expand Up @@ -317,9 +317,9 @@ and Linux gateway support contributed by Ilya Evseev) are not working any more
and waiting to be forward-ported to new gateways API. Sorry for that.

Two new config variables appeared in this version:
- `SEARCH_DOMAINS`. Comma-separated list of DNS domains which are considered
- `SEARCH_DOMAINS`. Comma-separated list of DNS domains that are considered
"base" for your network. If RackTables search engine finds multiple objects
based on your search input, but there is only one which FQDN consists of
based on your search input, but there is only one that has FQDN consisting of
your input and one of these search domains, you will be redirected to this
object and other results will be discarded. Such behavior was unconditional
since 0.19.3, which caused many objections from users. So welcome this
Expand Down
2 changes: 1 addition & 1 deletion tests/RenderDepotTest.php
Expand Up @@ -9,7 +9,7 @@ class RenderDepotTest extends RTTestCase
public function setUp ()
{
@session_start();
// create a nameless shelf which contains a modem (re: ticket #1115)
// create a nameless shelf that contains a modem (re: ticket #1115)
$this->shelf_id = commitAddObject (NULL, NULL, 3, NULL);
$this->modem_id = commitAddObject ('unit test modem', NULL, 13, NULL);
commitLinkEntities ('object', $this->shelf_id, 'object', $this->modem_id);
Expand Down
6 changes: 3 additions & 3 deletions wwwroot/inc/ajax-interface.php
Expand Up @@ -12,7 +12,7 @@
*/

// retrieves ports link status from switch and formats results to dynamic-HTML
// returns array which could be packed into json and passed to client's browser
// Returns an array to be encoded in JSON and passed to client's browser.
function formatPortLinkHints ($object_id)
{
$result = array();
Expand Down Expand Up @@ -46,7 +46,7 @@ function formatPortLinkHints ($object_id)
}

// retrieves MAC address list from switch and formats results to dynamic-HTML
// returns array which could be packed into json and passed to client's browser
// Returns an array to be encoded in JSON and passed to client's browser.
function formatPortMacHints ($object_id)
{
$result = array();
Expand Down Expand Up @@ -76,7 +76,7 @@ function formatPortMacHints ($object_id)
}

// retrieves port configs from switch and formats results to dynamic-HTML
// returns array which could be packed into json and passed to client's browser
// Returns an array to be encoded in JSON and passed to client's browser.
function formatPortConfigHints ($object_id, $R = NULL)
{
$result = array();
Expand Down
8 changes: 4 additions & 4 deletions wwwroot/inc/auth.php
Expand Up @@ -13,7 +13,7 @@
*/

// This function ensures that we don't continue without a legitimate
// username and password (also make sure, that both are present, this
// username and password (also make sure that both are present, this
// is especially useful for LDAP auth code to not deceive itself with
// anonymous binding). It also initializes $remote_* and $*_tags vars.
function authenticate ()
Expand Down Expand Up @@ -159,7 +159,7 @@ function permitted ($p = NULL, $t = NULL, $o = NULL, $annex = array())
// There are several levels of context for the target entity, at least one for entities
// belonging directly to the tree root. Each level's context is a union of given
// container's tags and the tags of the contained entities.
// The universal problem originates from the fact, that certain rules may change
// The universal problem originates from the fact that certain rules may change
// their product as context level changes, thus forcing some final decision (but not
// adding a lack of it). With rule code being principles and context cascade being
// circumstances, there are two uttermost approaches or moralities.
Expand All @@ -172,9 +172,9 @@ function permitted ($p = NULL, $t = NULL, $o = NULL, $annex = array())
// same rule, trying to evaluate it against the next level (and next, and next...),
// until all levels are tried. Only then go on to the next rule.
//
// With the above being simple discrete algorythms, I believe, that they very reliably
// With the above being simple discrete algorythms, I believe that they very reliably
// replicate human behavior. This gives a vast ground for further research, so I would
// only note, that the morale used in RackTables is "principles first".
// only note that the morale used in RackTables is "principles first".
return gotClearanceForTagChain ($subject);
}

Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/database.php
Expand Up @@ -5590,7 +5590,7 @@ function upd8021QPort ($instance = 'desired', $object_id, $port_name, $port, $be
// native VLAN ID doesn't belong to the allowed list, don't issue
// INSERT query, which would always trigger an FK exception.
// This function indicates an error, but doesn't revert it, so it is
// assummed, that the calling function performs necessary transaction wrapping.
// assummed that the calling function performs necessary transaction wrapping.
// A record on a port with none VLANs allowed makes no sense regardless of port mode.
if ($port['mode'] != 'trunk' && ! count ($port['allowed']))
return 0;
Expand Down
6 changes: 3 additions & 3 deletions wwwroot/inc/deviceconfig.php
Expand Up @@ -1200,7 +1200,7 @@ function nxos4TranslatePushQueue ($dummy_object_id, $queue, $dummy_vlan_names)
}

// Get a list of VLAN management pseudo-commands and return a text
// of real vendor-specific commands, which implement the work.
// of real vendor-specific commands that implement the work.
// This work is done in two rounds:
// 1. For "add allowed" and "rem allowed" commands detect continuous
// sequences of VLAN IDs and replace them with ranges of form "A-B",
Expand Down Expand Up @@ -2550,8 +2550,8 @@ function eos4Read8021QConfig ($input)
# In IOS there is one "interface" section for each port with all 802.1Q configuration
# maintained as text lines in the first place. These lines are eventually translated
# into effective configuration of the port. E.g. access and trunk VLAN settings can
# co-exist in IOS, it is switchport mode (set either statically or dynamically)
# defining, which settings are used by the port. Likewise, it is possible to "assign"
# co-exist in IOS, it is switchport mode (set either statically or dynamically) that
# defines which settings are used by the port. Likewise, it is possible to "assign"
# any VLAN to any port regardless if the VLAN itself exists.
#
# In ROS the configuration is maintained in port's effective switchport state in the
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/exceptions.php
Expand Up @@ -255,7 +255,7 @@ public function dispatch()
}
}

# "Permission denied" is a very common case, which in some situations is
# "Permission denied" is a very common case that in some situations is
# treated as a "soft" error.
class RTPermissionDenied extends RackTablesError
{
Expand Down
11 changes: 6 additions & 5 deletions wwwroot/inc/functions.php
Expand Up @@ -1653,7 +1653,7 @@ function tagNameOnChain ($tagname, $tagchain)
}

// Return TRUE, if two tags chains differ (order of tags doesn't matter).
// Assume, that neither of the lists contains duplicates.
// Assume that neither of the lists contains duplicates.
// FIXME: a faster, than O(x^2) method is possible for this calculation.
function tagChainCmp ($chain1, $chain2)
{
Expand Down Expand Up @@ -3327,7 +3327,7 @@ function getTagChart ($limit = 0, $realm = 'total', $special_tags = array())
if (++$done == $limit)
break;
}
// ...then make sure, that every item of the special list is shown
// ...then make sure that every item of the special list is shown
// (using the same sort order)
$extra = array();
foreach ($special_tags as $taginfo)
Expand Down Expand Up @@ -3500,7 +3500,7 @@ function decodeVLANCK ($string)
return array ($matches[1], $matches[2]);
}

// Return VLAN name formatted for HTML output (note, that input
// Return VLAN name formatted for HTML output (note that input
// argument comes from database unescaped).
function formatVLANAsOption ($vlaninfo)
{
Expand Down Expand Up @@ -3877,7 +3877,7 @@ function generate8021QDeployOps ($vswitch, $device_vlanlist, $before, $changes)
{
// Before removing each old VLAN as such it is necessary to unassign
// ports from it (to remove VLAN from each ports' list of "allowed"
// VLANs). This change in turn requires, that a port's "native"
// VLANs). This change in turn requires that a port's "native"
// VLAN isn't set to the one being removed from its "allowed" list.
switch ($port['old_mode'] . '->' . $port['new_mode'])
{
Expand Down Expand Up @@ -5597,7 +5597,8 @@ function getOutputOf ($func_name)
}
}

// calls function which can be overriden in $hook array. Takes any number of additional parameters
// Calls a function taking into account the overrides specified in the
// $hook array. Takes any number of additional parameters.
function callHook ($hook_name)
{
global $hook;
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/install.php
Expand Up @@ -1403,7 +1403,7 @@ function get_pseudo_file ($name)
(29,'uint','Sort order'),
(30,'dict','Mgmt type'),
-- ^^^^^ Any new 'default' attributes must go above this line! ^^^^^
-- Primary key value 9999 makes sure, that AUTO_INCREMENT on server restart
-- Primary key value 9999 makes sure that AUTO_INCREMENT on server restart
-- doesn't drop below 10000 (other code relies on this, site-specific
-- attributes are assigned IDs starting from 10000).
(9999,'string','base MAC address')";
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/interface-8021q.php
Expand Up @@ -1305,7 +1305,7 @@ function checkColumnOfRadios8021Q (prefix, numRows, suffix)
$right_text = serializeVLANPack ($item['right']);
// enable, but consider each option independently
// Don't accept running VLANs not in domain, and
// don't offer anything, that VST will deny.
// don't offer anything that VST will deny.
// Consider domain and template constraints.
$radio_attrs = array ('left' => '', 'asis' => ' checked', 'right' => '');
if
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/interface.php
Expand Up @@ -4459,7 +4459,7 @@ function renderEntityTags ($entity_id)
if (count ($taglist) > getConfigVar ('TAGS_QUICKLIST_THRESHOLD'))
{
$minilist = getTagChart (getConfigVar ('TAGS_QUICKLIST_SIZE'), etypeByPageno(), $target_given_tags);
// It could happen, that none of existing tags have been used in the current realm.
// It could happen that none of existing tags have been used in the current realm.
if (count ($minilist))
{
$js_code = "tag_cb.setTagShortList ({";
Expand Down
4 changes: 2 additions & 2 deletions wwwroot/inc/navigation.php
Expand Up @@ -6,7 +6,7 @@

/*
This file contains a series of arrays, which define RackTables as a tree
This file contains a series of arrays that define RackTables as a tree
of discrete views ("pages"). Each such page may be in turn split info a set of
"tabs". In the latter case it is also possible to define a set of "operations"
for a particular combination of page and tab (location). These operations
Expand All @@ -15,7 +15,7 @@
defined and validated in ophandlers.php).
Every page split into tabs must define a tab internally named "default". It is
assumed, that this default tab never defines any operations and thus remains
assumed that this default tab never defines any operations and thus remains
read-only.
*/
Expand Down
14 changes: 7 additions & 7 deletions wwwroot/inc/ophandlers.php
Expand Up @@ -11,12 +11,12 @@
navigation.php). Most of the ophandlers are meant to perform one specific
action, for example, to set a name of an object. Each such action often
requires a set of parameters (e. g. ID of the object and the new name),
and it is responsibility of each ophandler function to verify, that all
and it is responsibility of each ophandler function to verify that all
necessary parameters are provided by the user and have proper values. There
is a number of helper functions to make such verification simpler.
Errors occuring in ophandlers are typically indicated with exceptions of
assorted classes. Namely, an "InvalidRequestArgException" class means, that
assorted classes. Namely, an "InvalidRequestArgException" class means that
at least one of the parameters provided by the user is not acceptable. This
is a "soft" error, which gets displayed in the standard message area of
otherwise usual interface. A different case is "InvalidArgException", which
Expand All @@ -33,7 +33,7 @@
means of showError() and showSuccess() functions. The messages are not
displayed immediately, because successfull ophandlers are expected to
return only the new URL, where the user will be immediately redirected to
(it is also possible to return an empty string to mean, that the current
(it is also possible to return an empty string to mean that the current
logical location remains the same). The page at the "next" location is
supposed to translate message buffer into the standard message area.
Expand Down Expand Up @@ -315,7 +315,7 @@ function handles the most trivial actions, which map to a single INSERT,
'arglist' => array
(
// Technically dict_key is enough to delete, but including chapter_id into
// WHERE clause makes sure, that the action actually happends for the same
// WHERE clause makes sure that the action actually happends for the same
// chapter that authorization was granted for.
array ('url_argname' => 'chapter_no', 'table_colname' => 'chapter_id', 'assertion' => 'uint'),
array ('url_argname' => 'dict_key', 'assertion' => 'uint'),
Expand Down Expand Up @@ -1177,7 +1177,7 @@ function updateObjectAllocation ()
$object_id = getBypassValue();
$object = spotEntity ('object', $object_id);
$changecnt = 0;
// Get a list of rack ids which are parents of the object
// Get a list of rack ids that are parents of the object
$parentRacks = reduceSubarraysToColumn (getParents ($object, 'rack'), 'id');
$workingRacksData = array();
foreach ($_REQUEST['rackmulti'] as $cand_id)
Expand Down Expand Up @@ -1626,7 +1626,7 @@ function addRealServers ()
setFuncMessages (__FUNCTION__, array ('OK' => 37, 'ERR1' => 131));
$format = genericAssertion ('format', 'string');
$ngood = 0;
// Keep in mind, that the text will have HTML entities (namely '>') escaped.
// Keep in mind that the text will have HTML entities (namely '>') escaped.
foreach (explode ("\n", dos2unix (genericAssertion ('rawtext', 'string'))) as $line)
{
if ($line == '')
Expand Down Expand Up @@ -2168,7 +2168,7 @@ function rollTags ()
return;
}
// Even if the user requested an empty tag list, don't bail out, but process existing
// tag chains with "zero" extra. This will make sure, that the stuff processed will
// tag chains with "zero" extra. This will make sure that the stuff processed will
// have its chains refined to "normal" form.
$extratags = isset ($_REQUEST['taglist']) ? $_REQUEST['taglist'] : array();
$n_ok = 0;
Expand Down
2 changes: 1 addition & 1 deletion wwwroot/inc/pre-init.php
Expand Up @@ -65,7 +65,7 @@ function connectDB()
(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// Cancel one specific SQL mode option that RackTables has been non-compliant
// with but which used to be off by default until MySQL 5.7. As soon as
// with, but which used to be off by default until MySQL 5.7. As soon as
// respective SQL queries and table columns become compliant with those options
// stop changing @@SQL_MODE but still keep SET NAMES in place.
// RackTables requires the strict SQL mode, which is not enabled by default
Expand Down
4 changes: 2 additions & 2 deletions wwwroot/inc/snmp.php
Expand Up @@ -4138,7 +4138,7 @@ function updateStickerForCell ($cell, $attr_id, $new_value)
commitUpdateAttrValue ($cell['id'], $attr_id, $new_value);
}

// Accept "X-Y" on input and make sure, that PortInterfaceCompat contains
// Accept "X-Y" on input and make sure that PortInterfaceCompat contains
// a record with IIF id = X and OIF id = Y.
function checkPIC ($port_type_id)
{
Expand Down Expand Up @@ -4378,7 +4378,7 @@ function doSwitchSNMPmining ($objectInfo, $device)
# 1991.1.1.2.2.1.1.2.1 = STRING: "FLS-24G 24-port Management Module"
# 1991.1.1.2.2.1.1.2.3 = STRING: "FLS-1XG 1-port 10G Module (1-XFP)"
# 1991.1.1.2.2.1.1.2.4 = STRING: "FLS-1XG 1-port 10G Module (1-XFP)"
# (assuming, that the device has 2 XFP modules in slots 3 and 4).
# (assuming that the device has 2 XFP modules in slots 3 and 4).

foreach ($device->snmpwalkoid ('enterprises.1991.1.1.2.2.1.1.2') as $module_raw)
if (preg_match ('/^STRING: "(FGS-1XG1XGC|FGS-2XGC) /i', $module_raw))
Expand Down

0 comments on commit d32264d

Please sign in to comment.