2
0
forked from Wavyzz/dolibarr

Updated mobiledetect to 2.8.17

This commit is contained in:
Raphaël Doursenaud
2015-12-07 13:53:59 +01:00
parent 8904828069
commit 9257bfc5df
49 changed files with 10846 additions and 2201 deletions

View File

@@ -34,6 +34,7 @@
require_once '../Mobile_Detect.php';
$detect = new Mobile_Detect;
$deviceType = ($detect->isMobile() ? ($detect->isTablet() ? 'tablet' : 'phone') : 'computer');
$scriptVersion = $detect->getScriptVersion();
@@ -157,7 +158,7 @@ $scriptVersion = $detect->getScriptVersion();
<p>This is a <b><?php echo $deviceType; ?></b>. Your UA is <b class="<?php echo $deviceType; ?>"><?php echo htmlentities($_SERVER['HTTP_USER_AGENT']); ?></b></p>
<p class="infoText">Please help us improve the mobile detection by choosing the correct answer.<br>
Before sending an answer double check if you are using the browser in 'Desktop mode'.<br>
Before sending an answer double check that you are using the browser in its normal mode, not in 'Desktop mode'.<br>
You can contribute by:<br>
1. <a href="https://github.com/serbanghita/Mobile-Detect">forking</a> the project<br>
2. <a href="https://github.com/serbanghita/Mobile-Detect/issues/new?body=Please%20specify%20the%20User-Agent.%20Go%20to%20http://is.gd/mobiletest%20and%20copy-paste%20it%20here.">submiting an issue</a><br>
@@ -250,6 +251,19 @@ $scriptVersion = $detect->getScriptVersion();
<td class="randomcrap"><?php var_dump($detect->isWhateverYouWant()); ?></td>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="2">Debug</th>
</tr>
<tr>
<td>Matching Regex</td>
<td><?php var_dump($detect->getMatchingRegex()); ?></td>
</tr>
<tr>
<td>Matching Array</td>
<td><?php var_dump($detect->getMatchesArray()); ?></td>
</tr>
</tbody>
</table>
</section>