Created
April 25, 2014 12:35
-
-
Save azhurb/11288140 to your computer and use it in GitHub Desktop.
Fix NBU course update (issue #4053)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Index: server/lib/course.class.php | |
| IDEA additional info: | |
| Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP | |
| <+>UTF-8 | |
| =================================================================== | |
| --- server/lib/course.class.php (date 1397743696000) | |
| +++ server/lib/course.class.php (revision ) | |
| @@ -10,7 +10,7 @@ | |
| { | |
| public $db; | |
| public $cache_table; | |
| - public $content_url = 'http://www.bank.gov.ua/control/uk/curmetal/detail/currency?period=daily'; | |
| + public $content_url = 'http://www.bank.gov.ua/control/en/curmetal/detail/currency?period=daily'; | |
| public $codes = array(840, 978, 643); | |
| public function __construct(){ | |
| @@ -26,7 +26,7 @@ | |
| $result = array(); | |
| $content = file_get_contents($this->content_url); | |
| if ($content){ | |
| - preg_match("/<td class=\"date\">([\d,\.]+)<\/td>/",$content,$arr); | |
| + preg_match("/([\d]{2}\.[\d]{2}\.[\d]{4})<\/b>/",$content,$arr); | |
| $result['title'] = _('Exchange rate on').' '.$arr[1]; | |
| $result['on_date'] = $arr[1]; | |
| $result['data'] = array(); | |
| \ No newline at end of file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment