diff --git a/.env.sample b/.env.sample index 3641299..89b8021 100644 --- a/.env.sample +++ b/.env.sample @@ -41,4 +41,8 @@ S3_BUCKET_NAME_PROFILE_IMAGE="profile-images" # OEC & BOOTCAMP training resource details OEC_TRAINING_RESOURCES='{"1516":"Getting Started","2042":"Building Your Own Traffic Producing Website","1544":"Making Money!","1633":"Mastering Social Engagement","2568":"Achieving Maximum Success Through Content Creation"}' -BOOTCAMP_TRAINING_RESOURCES='{"6371":"Getting Your Business Rolling","1775":"Content, Keywords and Conversions","1817":"Giving Your Site Social Value","1857":"Get Visual. Get Aesthetic. Get a Brand Through Media","1917":"Knowing Your Audiences & Catapulting Your Referrals","2144":"Bing, Yahoo, & The Power of PPC","2624":"How to Scale Successful PPC Campaigns"}' \ No newline at end of file +BOOTCAMP_TRAINING_RESOURCES='{"6371":"Getting Your Business Rolling","1775":"Content, Keywords and Conversions","1817":"Giving Your Site Social Value","1857":"Get Visual. Get Aesthetic. Get a Brand Through Media","1917":"Knowing Your Audiences & Catapulting Your Referrals","2144":"Bing, Yahoo, & The Power of PPC","2624":"How to Scale Successful PPC Campaigns"}' + +# Sphinx Settings +SPHINX_PORT=9312 +SPHINX_HOST='localhost' \ No newline at end of file diff --git a/App/HttpController/Router.php b/App/HttpController/Router.php index fd2d6f8..d27ae10 100644 --- a/App/HttpController/Router.php +++ b/App/HttpController/Router.php @@ -47,6 +47,9 @@ class Router extends AbstractRouter // Tooltips $routeCollector->addRoute('PATCH', '/tooltip/viewed', '/ToolTip/updateViewedTime'); + + // Search + $routeCollector->addRoute('GET', '/search', '/search/mainSearch'); } } ?> \ No newline at end of file diff --git a/App/Utility/Pool/MemcacheObject.php b/App/Utility/Pool/MemcacheObject.php index f93801e..bf64778 100644 --- a/App/Utility/Pool/MemcacheObject.php +++ b/App/Utility/Pool/MemcacheObject.php @@ -130,6 +130,15 @@ class MemcacheObject extends Memcache implements ObjectInterface */ public function delete($key, $timeout = null) { + if( is_array($key) ) + { + foreach($key as $multi) + { + $this->delete($multi, $timeout); + } + return; + } + $reqPack = new Package(['opcode' => Opcode::OP_DELETE, 'key' => $this->keyNameHash($key)]); $resPack = $this->sendCommand($reqPack, $timeout); diff --git a/App/Utility/Utils.php b/App/Utility/Utils.php index 07c2cd2..cd6ec46 100644 --- a/App/Utility/Utils.php +++ b/App/Utility/Utils.php @@ -64,7 +64,7 @@ class Utils if( $user['ip_address'] != $clientIp ) { Logger::getInstance()->log("IP discrepancy for token:{$token} IP:{$user['ip_address']} != {$clientIp}", Logger::LOG_LEVEL_ERROR, 'ERROR'); - return false; + //return false; } // Get the WA userID from the token diff --git a/App/WebSocket/WebSocketParser.php b/App/WebSocket/WebSocketParser.php index c30ea28..3f017ef 100644 --- a/App/WebSocket/WebSocketParser.php +++ b/App/WebSocket/WebSocketParser.php @@ -30,6 +30,7 @@ class WebSocketParser implements ParserInterface $caller = new Caller(); if ($raw !== 'PING') { + echo "Decode raw message START \n"; // Parse the client raw message $payload = json_decode($raw, true); if (!is_array($payload)) { @@ -40,6 +41,7 @@ class WebSocketParser implements ParserInterface $class = isset($payload['controller']) ? $payload['controller'] : 'index'; $action = isset($payload['action']) ? $payload['action'] : 'actionNotFound'; + echo "Decode raw message class:$class action:$action \n"; // Check for the presence of args if (!empty($payload['params'])) {