\r
public function wescoRef() {\r
global $core;\r
- $r = $core->con->select('SELECT url FROM wescoref WHERE ref="' . $core->con->escape($this->args['ref']) . '"');\r
+\r
+ $ref = ltrim(substr($this->args['ref'], 4), '0');\r
+\r
+ $r = $core->con->select('SELECT url FROM wescoref WHERE ref="' . $core->con->escape($ref) . '"');\r
if ($r->count()) {\r
header('Location: ' . $r->url);\r
exit;\r
}\r
-\r
-\r
$cache = ROOT . '/cache/wesco/' . $this->args['ref'];\r
if (file_exists($cache)) {\r
header('Location: ' . file_get_contents($cache));\r
exit;\r
}\r
- $url = 'http://www.wesco-eshop.fr/catalogsearch/result/?q=' . $this->args['ref'];\r
+ $url = 'http://www.wesco-eshop.fr/catalogsearch/result/?q=' . $ref;\r
$doc = new DOMDocument();\r
$doc->loadHTML(file_get_contents($url));\r
$x = simplexml_import_dom($doc);\r
protected function _transfertPhonegap($os, $package, $destination) {
if ($os == 'android') {
- $this->_rsync($package, '/home/dev/Works/Phonegap/Projects/' . $destination, true);
+ $this->_rsync($package, '/home/dev/Phonegap/Projects/' . $destination, true);
`/usr/local/bin/updatephonegapandroid`;
} else if ($os == 'ios') {
`sudo /usr/local/bin/remountmac`;