racktables
3 years agoadd support for double quotes in the search string
Denis Ovsienko [Tue, 6 Dec 2016 16:28:36 +0000 (16:28 +0000)] 
add support for double quotes in the search string

Make it possible to search for substrings that include space(s), for
example, searching for "mail server" (with the quotes) will no longer
return those records that contain only "mail" or only "server" or "mail
backup server". However, the query will still match "e-mail server" as
before. Add some tests.

* parseSearchTerms(): a new function to implement the syntax more
  complex than possible with just explode()
* getSearchResultByField(): use the above
* searchHandler(): ditto

3 years agoshowPathAndSearch(): put HTML escaping right
Denis Ovsienko [Tue, 6 Dec 2016 12:03:44 +0000 (12:03 +0000)] 
showPathAndSearch(): put HTML escaping right

Instead of calling htmlspecialchars() on the data from $_REQUEST, which
has already been escaped, use the normal means to access and escape the
request data. This fixes " and similar entities in the search
INPUT. Fixup a helper function to use $sic too while at it.

3 years agoSNMP sync support for Huawei CE5850-HI
Alexey Andriyanov [Thu, 24 Nov 2016 10:30:17 +0000 (13:30 +0300)] 
SNMP sync support for Huawei CE5850-HI

3 years agofixup zebra table markup after commit e2b4528
Denis Ovsienko [Wed, 23 Nov 2016 23:34:03 +0000 (23:34 +0000)] 
fixup zebra table markup after commit e2b4528

The recent change to renderTableViewer() had a side effect in that the
newly added THEAD element numbered its TRs from 1 and the subsequent
TBODY element numbered its TRs from 1 (once again) making the resulting
table markup incorrect at the top.

Solve this by specifying the "zebra" and "zebra0" classes to work within
TBODY only. This way all the existing code that keeps all TRs in the
implicit TBODY continues to work as before and the code that puts any
header TRs into a THEAD can just use the "zebra0" class for the table.
Update renderTableViewer() to do exactly that and be slightly simpler.

3 years agofix database authentication after commit 07a10e0
Denis Ovsienko [Wed, 23 Nov 2016 12:16:34 +0000 (12:16 +0000)] 
fix database authentication after commit 07a10e0

That change had broken the database (default) authentication source:

Configuration error
$LDAP_options has not been defined (see secret.php)

In authenticate() move the checks common to both LDAP and database
sources into a helper function assertHTTPCredentialsReceived() and use a
separate case block for each of the sources for clarity.

With those changes made the LDAP configuration check still remains done
after the credentials presence check to preserve the behaviour
established a long time ago.

3 years agogetVlanRow: fix NotFound error handling
Alexey Andriyanov [Tue, 22 Nov 2016 07:21:19 +0000 (10:21 +0300)] 
getVlanRow: fix NotFound error handling

Fixes: 4a4f2614

3 years agorestore LDAP cache cleanup as a CLI script
Denis Ovsienko [Sat, 5 Nov 2016 15:17:36 +0000 (15:17 +0000)] 
restore LDAP cache cleanup as a CLI script

* constructLDAPOptions(): factor out of authenticated_via_ldap() (see
  also commit 88a9274) and add a check
* authenticate(): update to call the above
* cleanup_ldap_cache.php: a new wrapper script for discardLDAPCache()

3 years agoFixed a bug introduced in 489f843c2abdf5592cdfac8ecfc43465a6b64697
Garry Shtern [Wed, 2 Nov 2016 14:44:16 +0000 (09:44 -0500)] 
Fixed a bug introduced in 489f843c2abdf5592cdfac8ecfc43465a6b64697

3 years agodisable cleaning up expired LDAP cache rows
Alexey Andriyanov [Wed, 2 Nov 2016 10:59:43 +0000 (13:59 +0300)] 
disable cleaning up expired LDAP cache rows

This clean-up was causing even successful cache lookup request to wait
until all the locked rows are released. In case when LDAP service
does not respond sometimes, this cleaning-up code was causing every
logged-in request to wait until ldap connection attempt times out.

It would be better to not clear expired cache rows at all.

3 years agovrpReadLLDPStatus: support VRP V200R008+ (part2)
Alexey Andriyanov [Mon, 31 Oct 2016 13:01:14 +0000 (16:01 +0300)] 
vrpReadLLDPStatus: support VRP V200R008+ (part2)

This is an addition to commit 952dd6
Support new if-id type names

3 years agovrpReadLLDPStatus: support VRP V200R008+
Alexey Andriyanov [Mon, 31 Oct 2016 12:46:41 +0000 (15:46 +0300)] 
vrpReadLLDPStatus: support VRP V200R008+

Interface subtype 'local' is now printed as 'Locally assigned'

3 years agoadding processors and switch for Ubiquiti 184/head
Joe Passavanti [Sun, 30 Oct 2016 18:23:14 +0000 (11:23 -0700)] 
adding processors and switch for Ubiquiti

specifically model ES-48-LITE

3 years agoadding Ubiquiti ES-48 Switch to dictionary
Joe Passavanti [Sun, 30 Oct 2016 18:21:06 +0000 (11:21 -0700)] 
adding Ubiquiti ES-48 Switch to dictionary

3 years agoeliminate a few more wildcard SELECTs
Denis Ovsienko [Fri, 28 Oct 2016 11:04:02 +0000 (12:04 +0100)] 
eliminate a few more wildcard SELECTs

The only two instances that remain after this change stand for generic
functions that cannot be fixed in a simple way.

* SLBTriplet::getTripletsByIP()
* getUpgradeBatch()
* convertSLBTablesToBinIPs()

3 years agoadd a missing BR to renderChapterEditor()
Denis Ovsienko [Fri, 28 Oct 2016 10:11:44 +0000 (11:11 +0100)] 
add a missing BR to renderChapterEditor()

(for visual consistency)

3 years agofix a PHP warning in renderNewVSForm()
Denis Ovsienko [Thu, 27 Oct 2016 22:12:40 +0000 (23:12 +0100)] 
fix a PHP warning in renderNewVSForm()

PHP Notice:  Only variables should be passed by reference in
.../wwwroot/inc/slb-interface.php on line 549

$ php --version
PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies

3 years agomodify more functions not to assume default values
Denis Ovsienko [Tue, 25 Oct 2016 09:37:59 +0000 (10:37 +0100)] 
modify more functions not to assume default values

Refine straightforward cases where the only effect of the default value
was to hide a warning about a mandatory argument having no value.

* commitDeleteObject()
* commitResetObject()
* getMolecule()
* getOperationMolecules()
* commitDeleteChapter()
* loadThumbCache()
* getAllUnlinkedFiles()
* getFilesOfEntity()

3 years agoMerge pull request #183 from xornet-sl/maintenance-0.20.x
Alexey Andriyanov [Fri, 21 Oct 2016 13:34:02 +0000 (16:34 +0300)] 
Merge pull request #183 from xornet-sl/maintenance-0.20.x

devices communication fixes

3 years agofix nxos4 vlanif interface parsing 183/head
Vladimir Sukhonosov [Fri, 21 Oct 2016 13:21:45 +0000 (16:21 +0300)] 
fix nxos4 vlanif interface parsing

Nexus switches has different first field border on vlanifs
Example:
-----------------------------------------------------------------------
Port             Name            Status    Vlan      Duplex  Speed Type
-----------------------------------------------------------------------
mgmt0            --              connected routed    full    a-100   --
...
Lo0              --              connected routed    auto    auto    --
Vlan1         --                 down      routed    auto    auto    --
              ^
              ^ problem here

3 years agofix config save prompt on force10 switches
Vladimir Sukhonosov [Fri, 21 Oct 2016 13:28:25 +0000 (16:28 +0300)] 
fix config save prompt on force10 switches

3 years agoMerge pull request #182 from shazaum/maintenance-0.20.x
Denis Ovsienko [Wed, 19 Oct 2016 18:58:13 +0000 (19:58 +0100)] 
Merge pull request #182 from shazaum/maintenance-0.20.x

3 years agoAdd more item: Xenserver versions and HP Storage 182/head
Shazaum [Wed, 19 Oct 2016 18:42:15 +0000 (16:42 -0200)] 
Add more item: Xenserver versions and HP Storage

3 years agoAdd version FreeBSD 11.X
Shazaum [Wed, 19 Oct 2016 17:47:09 +0000 (15:47 -0200)] 
Add version FreeBSD 11.X

3 years agomanage some empty lines
Denis Ovsienko [Wed, 19 Oct 2016 16:05:27 +0000 (17:05 +0100)] 
manage some empty lines

3 years agoAdd new version OpenBSD and add new hw hp proliant 181/head
Shazaum [Wed, 19 Oct 2016 13:04:31 +0000 (11:04 -0200)] 
Add new version OpenBSD and add new hw hp proliant

3 years agofixup a message in travis_setup_mysql.sh
Denis Ovsienko [Tue, 18 Oct 2016 15:38:24 +0000 (16:38 +0100)] 
fixup a message in travis_setup_mysql.sh

3 years agorenderCell(): add a mouse hint for files (#1663)
Denis Ovsienko [Tue, 18 Oct 2016 14:33:16 +0000 (15:33 +0100)] 
renderCell(): add a mouse hint for files (#1663)

3 years agoreplaceFile(): use the correct message code
Denis Ovsienko [Tue, 18 Oct 2016 14:29:39 +0000 (15:29 +0100)] 
replaceFile(): use the correct message code

3 years agorefine renderDataIntegrityReport()
Denis Ovsienko [Tue, 18 Oct 2016 11:55:01 +0000 (12:55 +0100)] 
refine renderDataIntegrityReport()

Rewrite remaining SELECTs without the wildcard.

3 years agoTravis CI: the folding did not work, use a script
Denis Ovsienko [Tue, 18 Oct 2016 09:58:59 +0000 (10:58 +0100)] 
Travis CI: the folding did not work, use a script

For some reason folding did not work as expected in the "before_script"
section. So long as I could not find a way to make it work afterwards,
move the relevant shell commands to a separate script of its own, which
now also allows to have a better script with shell constructs.

3 years agoTravis CI: fold before_script up
Denis Ovsienko [Mon, 17 Oct 2016 19:19:50 +0000 (20:19 +0100)] 
Travis CI: fold before_script up

3 years agorefine renderDataIntegrityReport()
Denis Ovsienko [Mon, 17 Oct 2016 17:05:45 +0000 (18:05 +0100)] 
refine renderDataIntegrityReport()

Rewrite a few SELECTs without the wildcard.

3 years agonew Huawei dict items
Alexey Andriyanov [Sat, 15 Oct 2016 21:34:15 +0000 (00:34 +0300)] 
new Huawei dict items

3 years agopatchectiRequest: proper indents
Alexey Andriyanov [Sat, 15 Oct 2016 21:33:15 +0000 (00:33 +0300)] 
patchectiRequest: proper indents

3 years agofixup HTML in renderPortsInfo()
Denis Ovsienko [Tue, 11 Oct 2016 08:23:07 +0000 (09:23 +0100)] 
fixup HTML in renderPortsInfo()

3 years agoMerge pull request #178 from edsonlara/maintenance-0.20.x
Alexey Andriyanov [Wed, 7 Sep 2016 14:30:40 +0000 (17:30 +0300)] 
Merge pull request #178 from edsonlara/maintenance-0.20.x

CSRF support for 0.8.8h cacti images

3 years agoBetter regexp code in proxyCactiRequest 178/head
Edson [Wed, 7 Sep 2016 14:08:30 +0000 (10:08 -0400)] 
Better regexp code in proxyCactiRequest

3 years agoReplaced substr with regexp in proxyCactiRequest
Edson [Wed, 7 Sep 2016 14:04:06 +0000 (10:04 -0400)] 
Replaced substr with regexp in proxyCactiRequest

3 years agoCSRF support for 0.8.8h cacti images
Edson [Tue, 6 Sep 2016 21:34:59 +0000 (17:34 -0400)] 
CSRF support for 0.8.8h cacti images

3 years agorenderTableViewer(): support more customization
Denis Ovsienko [Tue, 6 Sep 2016 10:16:42 +0000 (11:16 +0100)] 
renderTableViewer(): support more customization

Add an optional argument to override the default set of attributes of
the TABLE element when required. Make it possible to specify custom
class for each individual TR element through the "_tr_class" array
element. This proved to be useful in a local plug-in and can
potentially be reused in the main code.

3 years agoMerge pull request #176 from github138/portnameautocompl
Alexey Andriyanov [Mon, 29 Aug 2016 12:33:52 +0000 (15:33 +0300)] 
Merge pull request #176 from github138/portnameautocompl

    add jquery ui autocomplete to object ip tab ( Allocations ) OS Interface

3 years agomove code into printNewItemTR () 176/head
github138 [Mon, 29 Aug 2016 07:58:38 +0000 (09:58 +0200)] 
move code into printNewItemTR ()
* renderIPForObject ()  printNewItemTR (): add object_id parameter
* renderIPAddressAllocations (): add aid attribute to bond_name fields and id to <tr>
* renderIPAddressAllocations () printNewItemTR (): make js use own rows object_id

3 years agoadd OS interface autocomplete to renderIPAddressAllocations ()
github138 [Fri, 26 Aug 2016 13:49:06 +0000 (15:49 +0200)] 
add OS interface autocomplete to renderIPAddressAllocations ()

3 years ago add jquery ui autocomplete to object ip tab ( Allocations )
github138 [Fri, 26 Aug 2016 12:46:17 +0000 (14:46 +0200)] 
add jquery ui autocomplete to object ip tab ( Allocations )
    lists object port names as OS Interface

    * renderIPForObject (): add autocomplete
    * getAutocompleteListAJAX (): add realms "bond_name", use label/value results
    * popup (): use label/value result

3 years agorenderTableViewer(): produce THEAD and TBODY
Denis Ovsienko [Fri, 5 Aug 2016 17:52:11 +0000 (18:52 +0100)] 
renderTableViewer(): produce THEAD and TBODY

3 years agogetUpgradeBatch(): spell lastInsertID consistently
Denis Ovsienko [Fri, 29 Jul 2016 10:39:35 +0000 (11:39 +0100)] 
getUpgradeBatch(): spell lastInsertID consistently

3 years agomake lettercase consistent for PDO::rollBack()
Denis Ovsienko [Thu, 28 Jul 2016 08:32:22 +0000 (09:32 +0100)] 
make lettercase consistent for PDO::rollBack()

* importDPData()
* doVSMigrate()

3 years agobugfix: use of udefined variable
Alexey Andriyanov [Fri, 22 Jul 2016 14:21:33 +0000 (17:21 +0300)] 
bugfix: use of udefined variable

queryTerminal: hide_warnings was not always defined
Fixes: ad80d546

3 years agoadd IN() SQL keyword support
Denis Ovsienko [Tue, 19 Jul 2016 12:04:58 +0000 (13:04 +0100)] 
add IN() SQL keyword support

Extend makeWhereSQL() to translate an array value given for a column to
an IN(...) expression. This makes the new syntax immediately available
in usePreparedDeleteBlade() and usePreparedUpdateBlade(). Add a test.
Switch linkPorts() to usePreparedUpdateBlade() to show how it works.

3 years agotests: refine ObjectPortTest
Denis Ovsienko [Tue, 19 Jul 2016 11:54:17 +0000 (12:54 +0100)] 
tests: refine ObjectPortTest

Assert that the call to linkPorts() removes the comment for the ports.

3 years agosimplify RackTablesError::formatString()
Denis Ovsienko [Fri, 15 Jul 2016 10:58:18 +0000 (11:58 +0100)] 
simplify RackTablesError::formatString()

3 years agofix code style up in exceptions.php
Denis Ovsienko [Fri, 15 Jul 2016 10:49:03 +0000 (11:49 +0100)] 
fix code style up in exceptions.php

It is difficult for a pull request reviewer to demand code style in the
new code when the old code does not conform.

* RackTablesError::dispatch()
* EntityNotFoundException::__construct()
* EntityNotFoundException::dispatch()
* ERetryNeeded::__construct()
* InvalidArgException::__construct()
* RTPermissionDenied::dispatch()
* dumpArray()
* stringTrace()
* printPDOException()
* printGenericException()
* printException()

4 years agotests: cover user account functions
Denis Ovsienko [Thu, 14 Jul 2016 11:38:16 +0000 (12:38 +0100)] 
tests: cover user account functions

* commitCreateUserAccount()
* getAccountSearchResult()
* getUserIDByUsername()
* commitUpdateUserAccount()

4 years agotests: use assertNull() where it fits
Denis Ovsienko [Thu, 14 Jul 2016 11:14:33 +0000 (12:14 +0100)] 
tests: use assertNull() where it fits

Also fixup lettercase to the one used in PHPUnit documentation.

4 years agotests: cover getRowInfo()
Denis Ovsienko [Wed, 13 Jul 2016 13:08:36 +0000 (14:08 +0100)] 
tests: cover getRowInfo()

4 years agotests: do all rackspace functions in one test
Denis Ovsienko [Wed, 13 Jul 2016 12:57:07 +0000 (13:57 +0100)] 
tests: do all rackspace functions in one test

This avoids duplicate setup/teardown work, which seems to spend most of
the CPU time in this class.

4 years agofix PDO Exception for mysql 5.7 171/head
github138 [Tue, 12 Jul 2016 12:30:30 +0000 (14:30 +0200)] 
fix PDO Exception for mysql 5.7
* getRowInfo: add Location.id to GROUP

4 years agoformatRealmName(): add two missing realms
Denis Ovsienko [Thu, 7 Jul 2016 15:05:01 +0000 (16:05 +0100)] 
formatRealmName(): add two missing realms

This fixes unexpected output in renderDataIntegrityReport().

4 years agotests: cover more config var functions
Denis Ovsienko [Thu, 7 Jul 2016 12:09:48 +0000 (13:09 +0100)] 
tests: cover more config var functions

* setUserConfigVar()
* resetUserConfigVar()

4 years agofixup a few configuration variable functions
Denis Ovsienko [Thu, 7 Jul 2016 12:01:22 +0000 (13:01 +0100)] 
fixup a few configuration variable functions

It does not matter much in the short-lived context of an ophandler
function but for a CLI script it is important that the result remains
consistent regardless of exact sequence of calls, which internally
depends on the cache properly maintaned.

* setConfigVar(): update the cached default value and consider the user's
  value to fix bugs
* setUserConfigVar(): set 'is_altered' to fix a bug
* resetUserConfigVar(): don't make changes unless required and undo the
  user-specific override to fix a bug
* loadConfigDefaults(): fixup code style

4 years agodictionary: refresh Solaris set of rows
Denis Ovsienko [Wed, 6 Jul 2016 16:29:31 +0000 (17:29 +0100)] 
dictionary: refresh Solaris set of rows

4 years agotests: fix a typo in README.md
Denis Ovsienko [Wed, 6 Jul 2016 10:27:24 +0000 (11:27 +0100)] 
tests: fix a typo in README.md

4 years agotests: cover setConfigVar() and getConfigVar()
Denis Ovsienko [Wed, 6 Jul 2016 10:11:20 +0000 (11:11 +0100)] 
tests: cover setConfigVar() and getConfigVar()

4 years agotests: use count() in GetRowsCountTest
Denis Ovsienko [Wed, 6 Jul 2016 08:29:47 +0000 (09:29 +0100)] 
tests: use count() in GetRowsCountTest

4 years agotests: have "Test" at the end of each class name
Denis Ovsienko [Wed, 6 Jul 2016 08:22:06 +0000 (09:22 +0100)] 
tests: have "Test" at the end of each class name

4 years agorectify getConfigVar()
Denis Ovsienko [Tue, 5 Jul 2016 13:52:38 +0000 (14:52 +0100)] 
rectify getConfigVar()

Don't specify a default value for a mandatory argument, reword a
comment and don't test for an empty string as setConfigVar() doesn't
do that anyway.

4 years agorackcode.js: "define" is a RackCode keyword too
Denis Ovsienko [Tue, 5 Jul 2016 11:14:30 +0000 (12:14 +0100)] 
rackcode.js: "define" is a RackCode keyword too

4 years agoapply RackTables-specific changes to CodeMirror
Denis Ovsienko [Tue, 5 Jul 2016 11:14:15 +0000 (12:14 +0100)] 
apply RackTables-specific changes to CodeMirror

4 years agoupgrade CodeMirror from 3.22 to 3.24
Denis Ovsienko [Tue, 5 Jul 2016 11:02:40 +0000 (12:02 +0100)] 
upgrade CodeMirror from 3.22 to 3.24

4 years agorevert to pristine CodeMirror-3.22
Denis Ovsienko [Tue, 5 Jul 2016 10:57:32 +0000 (11:57 +0100)] 
revert to pristine CodeMirror-3.22

4 years agorevert some changes from commit 6edc799 (GH #159)
Denis Ovsienko [Mon, 4 Jul 2016 13:29:23 +0000 (14:29 +0100)] 
revert some changes from commit 6edc799 (GH #159)

It turns out, the zebra pattern works well for tables that did not use
any style before but does not work well for network address lists, which
have been using their own colour coding for a long time. Revert those
specific changes only.

* renderIPv4NetworkAddresses()
* renderIPv6NetworkAddresses()

4 years agoadd 1000Base-BX40 and 1000Base-BX80 (Mantis #1645)
Denis Ovsienko [Mon, 4 Jul 2016 10:42:52 +0000 (11:42 +0100)] 
add 1000Base-BX40 and 1000Base-BX80 (Mantis #1645)

4 years agoget_pseudo_file(): fix row order in Attribute
Denis Ovsienko [Fri, 1 Jul 2016 14:46:27 +0000 (15:46 +0100)] 
get_pseudo_file(): fix row order in Attribute

4 years agoMerge pull request #170 from xornet-sl/maintenance-0.20.x
Alexey Andriyanov [Thu, 30 Jun 2016 17:29:18 +0000 (20:29 +0300)] 
Merge pull request #170 from xornet-sl/maintenance-0.20.x

Add SNMP support for Catalyst 2960S-48TS-L

4 years agoAdd SNMP support for Catalyst 2960S-48TS-L 170/head
Vladimir Sukhonosov [Thu, 30 Jun 2016 17:07:05 +0000 (20:07 +0300)] 
Add SNMP support for Catalyst 2960S-48TS-L

4 years agosimplify renderPatchCableHeapSummary()
Denis Ovsienko [Thu, 30 Jun 2016 12:19:08 +0000 (13:19 +0100)] 
simplify renderPatchCableHeapSummary()

Make use of renderTableViewer().

4 years agoupdateTag(): do not override argument name
Denis Ovsienko [Thu, 30 Jun 2016 10:01:12 +0000 (11:01 +0100)] 
updateTag(): do not override argument name

It turns out the gain of this was zero as assertValidParentId() throws
an exception constructed for "parent_id" already. Moreover, this
override was affecting all IRAE exceptions in the same try-block as
those inherit from IAE.

4 years agomove a variable assignment out of foreach()
Denis Ovsienko [Wed, 29 Jun 2016 12:05:06 +0000 (13:05 +0100)] 
move a variable assignment out of foreach()

* renderIPSpaceRecords()

4 years agoadd jquery ui autocomplete to port link dialog filter fields 168/head
github138 [Mon, 27 Jun 2016 12:12:49 +0000 (14:12 +0200)] 
add jquery ui autocomplete to port link dialog filter fields

* getAutocompleteListAJAX(): new function to handle autocomplete requests
* renderPopupPortSelector(): add autocomplete code

4 years agoresetUIConfig(): add a comment
Denis Ovsienko [Sun, 26 Jun 2016 20:18:49 +0000 (21:18 +0100)] 
resetUIConfig(): add a comment

4 years agodictionary: add recent Ubuntu Linux releases
Denis Ovsienko [Sun, 26 Jun 2016 12:35:21 +0000 (13:35 +0100)] 
dictionary: add recent Ubuntu Linux releases

4 years agoremove a couple no-op assignments
Denis Ovsienko [Sun, 26 Jun 2016 12:29:18 +0000 (13:29 +0100)] 
remove a couple no-op assignments

* formatPortLinkHints()
* formatPortMacHints()

4 years agoeliminate a few hard-coded image URIs
Denis Ovsienko [Sun, 26 Jun 2016 12:10:16 +0000 (13:10 +0100)] 
eliminate a few hard-coded image URIs

* interface-lib.php: register 4 existing images
* formatPortLinkHints(): use getImageHREF() and array_fetch()
* renderPortsInfo(): idem

4 years agorefine commitUpdateAttrValue()
Denis Ovsienko [Fri, 24 Jun 2016 14:49:47 +0000 (15:49 +0100)] 
refine commitUpdateAttrValue()

Rewrite the SELECT without the wildcard, don't duplicate attribute ID
in the error message, put an exception class right, add one helper
variable and dismiss another. Add a comment.

4 years agogetAttrValues(): rearrange variables for clarity
Denis Ovsienko [Fri, 24 Jun 2016 14:49:02 +0000 (15:49 +0100)] 
getAttrValues(): rearrange variables for clarity

4 years agotests: cover some attributes functions
Denis Ovsienko [Fri, 24 Jun 2016 14:38:02 +0000 (15:38 +0100)] 
tests: cover some attributes functions

* commitUpdateAttrValue()
* getAttrValues()

4 years agodeprecate array_sub()
Denis Ovsienko [Fri, 24 Jun 2016 09:36:43 +0000 (10:36 +0100)] 
deprecate array_sub()

* array_sub(): add a comment
* buildVSMigratePlan(): use array_diff_key() instead

4 years agoloadEntityTags(): do not specify default values
Denis Ovsienko [Thu, 23 Jun 2016 19:26:32 +0000 (20:26 +0100)] 
loadEntityTags(): do not specify default values

In this function both arguments are mandatory so that suppressing the
PHP warning about the missing argument(s) is wrong.

4 years agoremove a stale comment
Denis Ovsienko [Thu, 23 Jun 2016 10:02:48 +0000 (11:02 +0100)] 
remove a stale comment

The main group of SELECTs in the comment has been implemented in
renderDataIntegrityReport() for a while. The final SELECT had been
superseded with a foreign key.

4 years agotests: cover groupBy()
Denis Ovsienko [Wed, 22 Jun 2016 10:57:14 +0000 (11:57 +0100)] 
tests: cover groupBy()

4 years agogroupBy(): add argument type checks
Denis Ovsienko [Wed, 22 Jun 2016 10:56:50 +0000 (11:56 +0100)] 
groupBy(): add argument type checks

4 years agotests: cover reduceSubarraysToColumn()
Denis Ovsienko [Mon, 20 Jun 2016 10:35:07 +0000 (11:35 +0100)] 
tests: cover reduceSubarraysToColumn()

4 years agoreduceSubarraysToColumn(): add an arg. type check
Denis Ovsienko [Mon, 20 Jun 2016 10:34:37 +0000 (11:34 +0100)] 
reduceSubarraysToColumn(): add an arg. type check

4 years agoinit inplace edit spans only once 166/head
github138 [Fri, 17 Jun 2016 12:52:58 +0000 (14:52 +0200)] 
init inplace edit spans only once

4 years agoreindexById(): remove a no-op test condition
Denis Ovsienko [Fri, 17 Jun 2016 10:18:24 +0000 (11:18 +0100)] 
reindexById(): remove a no-op test condition

The array_key_exists() check was a hangover from commit e22d097.

4 years agotests: cover reindexById()
Denis Ovsienko [Fri, 17 Jun 2016 10:12:15 +0000 (11:12 +0100)] 
tests: cover reindexById()

4 years agoreindexById(): add an argument type check
Denis Ovsienko [Fri, 17 Jun 2016 09:09:09 +0000 (10:09 +0100)] 
reindexById(): add an argument type check

4 years agomkA(): clarify error messages
Denis Ovsienko [Wed, 15 Jun 2016 08:55:03 +0000 (09:55 +0100)] 
mkA(): clarify error messages

4 years agowork around MySQL 5.7 SQL mode (#1547, #1635)
Denis Ovsienko [Tue, 14 Jun 2016 15:19:12 +0000 (16:19 +0100)] 
work around MySQL 5.7 SQL mode (#1547, #1635)

Use a temporary workaround to make RackTables work with MySQL 5.7
before proper bugfixes have been made. Commit 8ea0abc was the first
step in that direction and its commit message explains the problem.

4 years agoremove a misleading ChangeLog entry
Denis Ovsienko [Tue, 14 Jun 2016 15:12:13 +0000 (16:12 +0100)] 
remove a misleading ChangeLog entry

RackTables already requires MySQL 5.1.7 or newer since release 0.20.7.