Permalink
Browse files

Implemented detection for "FeverPHP"

(https://chrome.google.com/webstore/detail/gflkkfcnlgjimhccnhageickcoffgoea)
which is the equivalent for FirePHP in Google Chrome
  • Loading branch information...
1 parent 0101f58 commit da9ab6b7a84be6d4a8b3b346f21b1ba394209b09 @lorenzo lorenzo committed Jun 6, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 Lib/FireCake.php
View
@@ -142,10 +142,13 @@ public static function setOptions($options = array()) {
*/
public static function detectClientExtension() {
$ua = FireCake::getUserAgent();
- if (!preg_match('/\sFirePHP\/([\.|\d]*)\s?/si', $ua, $match) || !version_compare($match[1], '0.0.6', '>=')) {
- return false;
+ if (preg_match('/\sFirePHP\/([\.|\d]*)\s?/si', $ua, $match) && version_compare($match[1], '0.0.6', '>=')) {
+ return true;
}
- return true;
+ if (env('HTTP_X_FIREPHP_VERSION') && version_compare(env('HTTP_X_FIREPHP_VERSION'), '0.6', '>=')) {
+ return true;
+ }
+ return false;
}
/**

0 comments on commit da9ab6b

Please sign in to comment.