Changeset 1076088
- Timestamp:
- 01/26/2015 04:26:50 PM (11 years ago)
- Location:
- vanilla-forums/trunk
- Files:
-
- 2 edited
-
functions.php (modified) (1 diff)
-
plugin.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
vanilla-forums/trunk/functions.php
r834602 r1076088 179 179 function vf_validate_url($url) { 180 180 $html = vf_rest($url); 181 $wr_pos = strpos($html, 'WebRoot" value="'); 182 if ($wr_pos > 0) { 183 $webroot = substr($html, $wr_pos + 16); 184 $webroot = substr($webroot, 0, strpos($webroot, '"')); 185 return $webroot; 186 } else { 187 return FALSE; 181 $formats = array( 182 '"WebRoot":"', // 2.2 183 '\'WebRoot\' : "', // 2.0.18.13+ and 2.1.1+ 184 'WebRoot" value="' // legacy 185 ); 186 187 foreach ($formats as $format) { 188 if ($chars = strpos($html, $format)) { 189 $offset = $chars + strlen(stripslashes($format)); 190 return vf_parse_webroot($html, $offset); 191 } 188 192 } 193 194 return FALSE; 195 } 196 197 /** 198 * Parse URL at start of HTML. 199 * 200 * @param string $html 201 * @param int $start 202 * @return string URL. 203 */ 204 function vf_parse_webroot($html, $start) { 205 $webroot = substr($html, $start); 206 $webroot = substr($webroot, 0, strpos($webroot, '"')); 207 $webroot = stripslashes($webroot); 208 return $webroot; 189 209 } 190 210 -
vanilla-forums/trunk/plugin.php
r834602 r1076088 4 4 Plugin URI: http://vanillaforums.org/addons/ 5 5 Description: Integrates Vanilla Forums with Wordpress: embedded blog comments, embedded forum, single sign on, and Wordpress widgets. 6 Version: 1.1.1 46 Version: 1.1.16 7 7 Author: Todd Burry 8 8 Author URI: http://www.vanillaforums.org/ … … 60 60 1.1.15 61 61 - Added the full role names to the list of roles sent on sso. 62 1.1.16 63 - Fixed webroot parsing in url vaidation function 62 64 63 65 Copyright 2010 Vanilla Forums Inc
Note: See TracChangeset
for help on using the changeset viewer.