TimeTrex Community Edition v16.2.0
This commit is contained in:
12
vendor/cbschuld/browser.php/.travis.yml
vendored
Normal file
12
vendor/cbschuld/browser.php/.travis.yml
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
language: php
|
||||
|
||||
dist: trusty
|
||||
|
||||
php:
|
||||
- 7.4
|
||||
- 7.3
|
||||
|
||||
install: composer install
|
||||
|
||||
script: phpunit --configuration phpunit.xml.dist
|
||||
|
113
vendor/cbschuld/browser.php/CHANGELOG.md
vendored
Normal file
113
vendor/cbschuld/browser.php/CHANGELOG.md
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
# Changelog
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project **attempts** to adhere to [Semantic Versioning](https://semver.org/spec/v2.0.0.html) while applying
|
||||
changes when it socially makes sense.
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [1.9.4] - 2019-07-09
|
||||
### Added
|
||||
- Added better support for Firefox Mobile
|
||||
- Added support for the Brave browser
|
||||
- Added support for the UCBrowser
|
||||
- Added more tests for specific User Agents and more IE tests (removed duplicate UAs as well)
|
||||
|
||||
## [1.9.3] - 2019-07-08
|
||||
### Added
|
||||
- Added support for curl, wget and the Palemoon browser
|
||||
|
||||
## [1.9.2] - 2019-06-26
|
||||
### Added
|
||||
- PHPUnit Tests for Firefox, Opera and Chrome (3684 tests, 7368 assertions)
|
||||
- Stronger tests for Firefox and Chrome
|
||||
### Removed
|
||||
- Dropped support for 5.x PHP due to updates to PHPUnit and legacy nature of 5.X
|
||||
|
||||
## [1.9.1] - 2019-06-19
|
||||
### Added
|
||||
6/19/2019: Update (Version 1.9.1)
|
||||
* Added Firefox iOS (gejobj)
|
||||
* Corrected 'Vivalidi' to 'Vivaldi' (adaxi)
|
||||
* Reset enhancement (yahasana)
|
||||
* Enforce using precise distribution until End Of Life for Travis CI (bburnichon)
|
||||
* Lazy load browser class on demand (bburnichon)
|
||||
|
||||
## 1.9.0 - 2010-08-20
|
||||
### Added
|
||||
* Added MSN Explorer Browser
|
||||
* Added Bing/MSN Robot
|
||||
* Added the Android Platform
|
||||
### Fixed
|
||||
* Fixed issue with Android 1.6/2.2
|
||||
|
||||
## 1.8.0 - 2010-04-27
|
||||
## Fixed
|
||||
* Added iPad support
|
||||
|
||||
## 1.7.0 - 2010-03-07
|
||||
### Added
|
||||
* Added FreeBSD Platform
|
||||
* Added OpenBSD Platform
|
||||
* Added NetBSD Platform
|
||||
* Added SunOS Platform
|
||||
* Added OpenSolaris Platform
|
||||
* Added support of the Iceweazel Browser
|
||||
* Added isChromeFrame() call to check if chromeframe is in use
|
||||
* Moved the Opera check in front of the Firefox check due to legacy Opera User Agents
|
||||
* Added the __toString() method (Thanks Deano)
|
||||
## Removed
|
||||
* Almost all of Gary's original code has been replaced
|
||||
## Fixed
|
||||
* Version 1.7 was a *MAJOR* Rebuild (preg_match and other *slow* routine removal(s)) included the following
|
||||
|
||||
## 0.0.9 - 2008-12-09
|
||||
### Fixed
|
||||
* removed an unused constant and renamed the constructor to use the PHP magic method __construct (thanks to Robin for locating the legacy constant and suggesting the use of the magic method).
|
||||
|
||||
## 0.0.8 - 2009-11-08
|
||||
### Fixed
|
||||
* A lot of changes to the script, thank you to everyone for the suggestions and emails. This release should add all of the requested features. Added BlackBerry, mobile detection, Opera Mini support, robot detection, Opera 10's UserAgent mess, detection for IceCat and Shiretoko!
|
||||
|
||||
## 0.0.7 - 2009-04-27
|
||||
### Fixed
|
||||
* John pointed out a terrible typo (see below) - removed the typo
|
||||
|
||||
## 0.0.6 - 2009-04-22
|
||||
### Added
|
||||
* added support for GoogleBot, the W3C Validator and Yahoo! Slurp
|
||||
|
||||
## 0.0.5 - 2009-03-14
|
||||
### Added
|
||||
* added support for the iPod; added iPod and iPhone as platforms; added Google.s Android
|
||||
|
||||
## 0.0.4 - 2009-02-24
|
||||
### Fixed
|
||||
* fixed typo in the usage! (thanks Adam!)
|
||||
|
||||
## 0.0.3 - 2009-02-19
|
||||
### Fixed
|
||||
* updated typical usage to show a correct example! (thanks David!)
|
||||
* Updated the version detection for Amaya
|
||||
* Updated the version detection for Firefox
|
||||
* Updated the version detection for Lynx
|
||||
* Updated the version detection for WebTV
|
||||
* Updated the version detection for NetPositive
|
||||
* Updated the version detection for IE
|
||||
* Updated the version detection for OmniWeb
|
||||
* Updated the version detection for iCab
|
||||
* Updated the version detection for Safari
|
||||
* Updated Safari to remove mobile devices (iPhone)
|
||||
### Added
|
||||
* Added version detectionf for edge via [pixelbacon](https://github.com/pixelbacon)
|
||||
* Added detection for Chrome
|
||||
* Added detection for iPhone
|
||||
* Added detection for robots
|
||||
* Added detection for mobile devices
|
||||
* Added detection for BlackBerry
|
||||
* Added detection for iPhone
|
||||
* Added detection for iPad
|
||||
* Added detection for Android
|
||||
### Removed
|
||||
* Removed Netscape checks
|
7
vendor/cbschuld/browser.php/LICENSE.md
vendored
Normal file
7
vendor/cbschuld/browser.php/LICENSE.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
Copyright 2013 - 2019 Chris Schuld <chris@chrisschuld.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
112
vendor/cbschuld/browser.php/README.md
vendored
Normal file
112
vendor/cbschuld/browser.php/README.md
vendored
Normal file
@@ -0,0 +1,112 @@
|
||||
# cbschuld/browser.php
|
||||
|
||||
[](https://travis-ci.org/cbschuld/Browser.php)
|
||||
|
||||
Helps detect the user's browser and platform at the PHP level via the user agent
|
||||
|
||||
|
||||
## Installation
|
||||
|
||||
You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/):
|
||||
|
||||
composer require cbschuld/browser.php
|
||||
|
||||
If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency:
|
||||
|
||||
composer require --dev cbschuld/browser.php
|
||||
|
||||
|
||||
## Typical Usage:
|
||||
|
||||
```php
|
||||
$browser = new Browser();
|
||||
if( $browser->getBrowser() == Browser::BROWSER_FIREFOX && $browser->getVersion() >=10 ) {
|
||||
echo 'You have FireFox version 10 or greater';
|
||||
}
|
||||
```
|
||||
|
||||
## Browser Detection
|
||||
|
||||
This solution identifies the following Browsers and does a best-guess on the version:
|
||||
|
||||
* Opera (`Browser::BROWSER_OPERA`)
|
||||
* WebTV (`Browser::BROWSER_WEBTV`)
|
||||
* NetPositive (`Browser::BROWSER_NETPOSITIVE`)
|
||||
* Edge (`Browser::BROWSER_EDGE`)
|
||||
* Internet Explorer (`Browser::BROWSER_IE`)
|
||||
* Pocket Internet Explorer (`Browser::BROWSER_POCKET_IE`)
|
||||
* Galeon (`Browser::BROWSER_GALEON`)
|
||||
* Konqueror (`Browser::BROWSER_KONQUEROR`)
|
||||
* iCab (`Browser::BROWSER_ICAB`)
|
||||
* OmniWeb (`Browser::BROWSER_OMNIWEB`)
|
||||
* Phoenix (`Browser::BROWSER_PHOENIX`)
|
||||
* Firebird (`Browser::BROWSER_FIREBIRD`)
|
||||
* UCBrowser (`Browser::BROWSER_UCBROWSER`)
|
||||
* Firefox (`Browser::BROWSER_FIREFOX`)
|
||||
* Mozilla (`Browser::BROWSER_MOZILLA`)
|
||||
* Palemoon (`Browser::BROWSER_PALEMOON`)
|
||||
* curl (`Browser::BROWSER_CURL`)
|
||||
* wget (`Browser::BROWSER_WGET`)
|
||||
* Amaya (`Browser::BROWSER_AMAYA`)
|
||||
* Lynx (`Browser::BROWSER_LYNX`)
|
||||
* Safari (`Browser::BROWSER_SAFARI`)
|
||||
* Playstation (`Browser::BROWSER_PLAYSTATION`)
|
||||
* iPhone (`Browser::BROWSER_IPHONE`)
|
||||
* iPod (`Browser::BROWSER_IPOD`)
|
||||
* Google.s Android(`Browser::BROWSER_ANDROID`)
|
||||
* Google.s Chrome(`Browser::BROWSER_CHROME`)
|
||||
* GoogleBot(`Browser::BROWSER_GOOGLEBOT`)
|
||||
* Yahoo!.s Slurp(`Browser::BROWSER_SLURP`)
|
||||
* W3C.s Validator(`Browser::BROWSER_W3CVALIDATOR`)
|
||||
* BlackBerry(`Browser::BROWSER_BLACKBERRY`)
|
||||
|
||||
## Operating System Detection
|
||||
|
||||
This solution identifies the following Operating Systems:
|
||||
|
||||
* Windows (`Browser::PLATFORM_WINDOWS`)
|
||||
* Windows CE (`Browser::PLATFORM_WINDOWS_CE`)
|
||||
* Apple (`Browser::PLATFORM_APPLE`)
|
||||
* Linux (`Browser::PLATFORM_LINUX`)
|
||||
* Android (`Browser::PLATFORM_ANDROID`)
|
||||
* OS/2 (`Browser::PLATFORM_OS2`)
|
||||
* BeOS (`Browser::PLATFORM_BEOS`)
|
||||
* iPhone (`Browser::PLATFORM_IPHONE`)
|
||||
* iPod (`Browser::PLATFORM_IPOD`)
|
||||
* BlackBerry (`Browser::PLATFORM_BLACKBERRY`)
|
||||
* FreeBSD (`Browser::PLATFORM_FREEBSD`)
|
||||
* OpenBSD (`Browser::PLATFORM_OPENBSD`)
|
||||
* NetBSD (`Browser::PLATFORM_NETBSD`)
|
||||
* SunOS (`Browser::PLATFORM_SUNOS`)
|
||||
* OpenSolaris (`Browser::PLATFORM_OPENSOLARIS`)
|
||||
* iPad (`Browser::PLATFORM_IPAD`)
|
||||
|
||||
## History and Legacy
|
||||
|
||||
Detecting the user's browser type and version is helpful in web applications that harness some of the newer bleeding edge concepts. With the browser type and version you can notify users about challenges they may experience and suggest they upgrade before using such application. Not a great idea on a large scale public site; but on a private application this type of check can be helpful.
|
||||
|
||||
In an active project of mine we have a pretty graphically intensive and visually appealing user interface which leverages a lot of transparent PNG files. Because we all know how great IE6 supports PNG files it was necessary for us to tell our users the lack of power their browser has in a kind way.
|
||||
|
||||
Searching for a way to do this at the PHP layer and not at the client layer was more of a challenge than I would have guessed; the only script available was written by Gary White and Gary no longer maintains this script because of reliability. I do agree 100% with Gary about the readability; however, there are realistic reasons to desire the user.s browser and browser version and if your visitor is not echoing a false user agent we can take an educated guess.
|
||||
|
||||
I based this solution off of Gary White's original work but have since replaced all of his original code. Either way, thank you to Gary. Sadly, I never was able to get in touch with him regarding this solution.
|
||||
|
||||
## Testing
|
||||
|
||||
The testing with PHPUnit against known user agents available in tests/lists. Each file is tab delimited with the following fields:
|
||||
|
||||
User Agent, User Agent Type, Browser, Version, Operating System, Operating System Version
|
||||
|
||||
eg
|
||||
```
|
||||
Opera/9.80 (X11; Linux i686; Ubuntu/14.10) Presto/2.12.388 Version/12.16 Browser Opera 12.16 Linux Linux
|
||||
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1 Browser Chrome 14.0.835.186 Macintosh OS X 10_7_2
|
||||
```
|
||||
|
||||
Tests can be run by phpunit:
|
||||
|
||||
```bash
|
||||
vendor/phpunit/phpunit/phpunit
|
||||
```
|
||||
|
||||
|
32
vendor/cbschuld/browser.php/composer.json
vendored
Normal file
32
vendor/cbschuld/browser.php/composer.json
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "cbschuld/browser.php",
|
||||
"description": "A PHP Class to detect a user's Browser. This encapsulation provides a breakdown of the browser and the version of the browser using the browser's user-agent string. This is not a guaranteed solution but provides an overall accurate way to detect what browser a user is using.",
|
||||
"keywords": [
|
||||
"browser",
|
||||
"user agent",
|
||||
"detection"
|
||||
],
|
||||
"homepage": "https://chrisschuld.com/projects/browser-php-detecting-a-users-browser-from-php/",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Chris Schuld",
|
||||
"email": "chris@chrisschuld.com",
|
||||
"homepage": "https://chrisschuld.com"
|
||||
}
|
||||
],
|
||||
"autoload": {
|
||||
"classmap": ["src/Browser.php"]
|
||||
},
|
||||
"require": {
|
||||
"php": ">=7.2"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-master": "1.9.x-dev"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8"
|
||||
}
|
||||
}
|
1535
vendor/cbschuld/browser.php/composer.lock
generated
vendored
Normal file
1535
vendor/cbschuld/browser.php/composer.lock
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
8
vendor/cbschuld/browser.php/phpunit.xml.dist
vendored
Normal file
8
vendor/cbschuld/browser.php/phpunit.xml.dist
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit colors="true" bootstrap="vendor/autoload.php">
|
||||
<testsuites>
|
||||
<testsuite name="Test Suite">
|
||||
<directory>./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
1841
vendor/cbschuld/browser.php/src/Browser.php
vendored
Normal file
1841
vendor/cbschuld/browser.php/src/Browser.php
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user