Changeset 283
- Timestamp:
- 09/05/08 02:02:41 (3 months ago)
- Files:
-
- trunk/Phergie/Plugin/Php.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Phergie/Plugin/Php.php
r278 r283 80 80 if (!isset($this->cache[$name])) { 81 81 $tmp = file_get_contents('http://php.net/manual/en/function.' . $name . '.php'); 82 if (!$this->errorStatus && strpos($tmp, '<p class="refpurpose dc-title">') !== false) {82 if (!$this->errorStatus && strpos($tmp, '<p class="refpurpose">') !== false) { 83 83 $contents = '[ ' . Phergie_Plugin_TinyUrl::get('http://php.net/' . $name) . ' ] '; 84 84 if (preg_match('/<div class="methodsynopsis dc-description">(.*?)<\/div>/mis', $tmp, $m)) { 85 85 $contents .= $this->decode($m[1]); 86 86 } 87 if (preg_match('/<p class="refpurpose dc-title">(.*?)<\/p>/mis', $tmp, $m)) {87 if (preg_match('/<p class="refpurpose">(.*?)<\/p>/mis', $tmp, $m)) { 88 88 $m = explode('-', $this->decode($m[1]), 2); 89 $contents .= ' -' . trim($m[1]);89 $contents .= ' ' . trim($m[1]); 90 90 } 91 91 $contents = trim(str_replace(' ,', ',', $contents));