Skip to content
This repository has been archived by the owner on Apr 6, 2022. It is now read-only.

Commit

Permalink
Added ability to put menu before or after hours
Browse files Browse the repository at this point in the history
  • Loading branch information
ryankanno committed Jul 8, 2011
1 parent ac4cf29 commit 6af8145
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions protected/components/TwitterHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,12 @@ public static function isValidFormat($tweet) {
}

public static function parseTruckTweet($tweet_text) {
preg_match('/^@streetgrindzapp\s+(?P<menu_url>http:\/\/.*?)?\s*(?P<start>\d+)-(?P<end>\d+)\s*$/', $tweet_text, $matches);
return $matches;
if (preg_match('/^@streetgrindzapp\s+(?P<menu_url>http:\/\/.*?)?\s*(?P<start>\d+)-(?P<end>\d+)\s*$/', $tweet_text, $matches)) {
return $matches;
} else {
preg_match('/^@streetgrindzapp\s+(?P<start>\d+)-(?P<end>\d+)\s*(?P<menu_url>http:\/\/.*?)?\s*$/', $tweet_text, $matches);
return $matches;
}
}

/**
Expand Down

0 comments on commit 6af8145

Please sign in to comment.