diff --git a/README.Fedora b/README.Fedora index 47ff1c079..57a576b4d 100644 --- a/README.Fedora +++ b/README.Fedora @@ -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 @@ -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 diff --git a/README.md b/README.md index 1c3eba551..5a9f37485 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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. @@ -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 diff --git a/tests/RenderDepotTest.php b/tests/RenderDepotTest.php index 55b557d7d..4f7dae9bd 100644 --- a/tests/RenderDepotTest.php +++ b/tests/RenderDepotTest.php @@ -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); diff --git a/wwwroot/inc/ajax-interface.php b/wwwroot/inc/ajax-interface.php index 2de477f36..1885a9f77 100644 --- a/wwwroot/inc/ajax-interface.php +++ b/wwwroot/inc/ajax-interface.php @@ -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(); @@ -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(); @@ -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(); diff --git a/wwwroot/inc/auth.php b/wwwroot/inc/auth.php index 2881dea65..8223826b5 100644 --- a/wwwroot/inc/auth.php +++ b/wwwroot/inc/auth.php @@ -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 () @@ -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. @@ -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); } diff --git a/wwwroot/inc/database.php b/wwwroot/inc/database.php index d4e36272d..1a5ef21ed 100644 --- a/wwwroot/inc/database.php +++ b/wwwroot/inc/database.php @@ -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; diff --git a/wwwroot/inc/deviceconfig.php b/wwwroot/inc/deviceconfig.php index 52a1f81fc..1569b83bb 100644 --- a/wwwroot/inc/deviceconfig.php +++ b/wwwroot/inc/deviceconfig.php @@ -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", @@ -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 diff --git a/wwwroot/inc/exceptions.php b/wwwroot/inc/exceptions.php index b5d6ec21b..f878d339d 100644 --- a/wwwroot/inc/exceptions.php +++ b/wwwroot/inc/exceptions.php @@ -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 { diff --git a/wwwroot/inc/functions.php b/wwwroot/inc/functions.php index d283e611a..b24ae8822 100644 --- a/wwwroot/inc/functions.php +++ b/wwwroot/inc/functions.php @@ -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) { @@ -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) @@ -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) { @@ -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']) { @@ -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; diff --git a/wwwroot/inc/install.php b/wwwroot/inc/install.php index 0b3184fd9..26b47777e 100644 --- a/wwwroot/inc/install.php +++ b/wwwroot/inc/install.php @@ -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')"; diff --git a/wwwroot/inc/interface-8021q.php b/wwwroot/inc/interface-8021q.php index 2856c8e01..ed38d2f33 100644 --- a/wwwroot/inc/interface-8021q.php +++ b/wwwroot/inc/interface-8021q.php @@ -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 diff --git a/wwwroot/inc/interface.php b/wwwroot/inc/interface.php index 3098e9d83..b22f56043 100644 --- a/wwwroot/inc/interface.php +++ b/wwwroot/inc/interface.php @@ -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 ({"; diff --git a/wwwroot/inc/navigation.php b/wwwroot/inc/navigation.php index 3309cc910..f38dba1df 100644 --- a/wwwroot/inc/navigation.php +++ b/wwwroot/inc/navigation.php @@ -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 @@ -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. */ diff --git a/wwwroot/inc/ophandlers.php b/wwwroot/inc/ophandlers.php index 0dd7b5eb7..27d00eb8e 100644 --- a/wwwroot/inc/ophandlers.php +++ b/wwwroot/inc/ophandlers.php @@ -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 @@ -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. @@ -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'), @@ -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) @@ -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 == '') @@ -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; diff --git a/wwwroot/inc/pre-init.php b/wwwroot/inc/pre-init.php index 105488513..3088c4fc0 100644 --- a/wwwroot/inc/pre-init.php +++ b/wwwroot/inc/pre-init.php @@ -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 diff --git a/wwwroot/inc/snmp.php b/wwwroot/inc/snmp.php index 0e46aa519..347c81f67 100644 --- a/wwwroot/inc/snmp.php +++ b/wwwroot/inc/snmp.php @@ -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) { @@ -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)) diff --git a/wwwroot/inc/upgrade.php b/wwwroot/inc/upgrade.php index 11a9c73ae..4f5f9a277 100644 --- a/wwwroot/inc/upgrade.php +++ b/wwwroot/inc/upgrade.php @@ -41,9 +41,9 @@ 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 "base" for your + - 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 your input and one of these search domains, you will + 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 config var. - QUICK_LINK_PAGES. Comma-separated list of RackTables pages to display links to them on top. @@ -70,7 +70,7 @@ , '0.20.1' => <<<'ENDOFTEXT' -The 0.20.0 release includes bug which 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. +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. Security context of 'ipaddress' page now includes tags from the network containing an IP address. This means that you should audit your permission rules to check there is no unintended allows of changing IPs based on network's tagset. Example: allow {client network} and {New York} @@ -141,7 +141,7 @@ 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 @@ -175,8 +175,8 @@ , ); -// At the moment we assume, that for any two releases we can -// sequentally execute all batches, that separate them, and +// At the moment we assume that for any two releases we can +// sequentally execute all batches that separate them, and // nothing will break. If this changes one day, the function // below will have to generate smarter upgrade paths, while // the upper layer will remain the same. @@ -400,7 +400,7 @@ function getUpgradeBatch ($batchid) $query[] = "INSERT INTO `Config` (varname, varvalue, vartype, emptyok, is_hidden, is_userdefined, description) VALUES ('SEARCH_DOMAINS','','string','yes','no','yes','DNS domain list (comma-separated) to search in FQDN attributes')"; - // update some config variables which changed their defaults in this verison + // update some config variables that changed their defaults in this verison replaceConfigVarValue ('SHOW_LAST_TAB', 'yes'); replaceConfigVarValue ('IPV4_TREE_SHOW_USAGE','no'); replaceConfigVarValue ('IPV4LB_LISTSRC', 'false', '{$typeid_4}');