| @@ 192-219 (lines=28) @@ | ||
| 189 | return $link; |
|
| 190 | } |
|
| 191 | ||
| 192 | public static function linkImage() |
|
| 193 | { |
|
| 194 | $args = func_get_args(); |
|
| 195 | ||
| 196 | if (!isset($args[0])) { |
|
| 197 | $args[0] = null; |
|
| 198 | } |
|
| 199 | ||
| 200 | if (!isset($args[1])) { |
|
| 201 | $args[1] = null; |
|
| 202 | } |
|
| 203 | ||
| 204 | $args[2] = false; |
|
| 205 | ||
| 206 | $page = $args[0]; |
|
| 207 | $req_site = static::$site; |
|
| 208 | ||
| 209 | if ((strpos($page, '/') !== false) && (preg_match('/^([A-Z][A-Za-z0-9-_]*)\/(.*)$/', $page, $matches) === 1) && OSCOM::siteExists($matches[1], false)) { |
|
| 210 | $req_site = $matches[1]; |
|
| 211 | $page = $matches[2]; |
|
| 212 | } |
|
| 213 | ||
| 214 | $args[0] = $req_site . '/' . static::getConfig('http_images_path', $req_site) . $page; |
|
| 215 | ||
| 216 | $url = forward_static_call_array('static::link', $args); |
|
| 217 | ||
| 218 | return $url; |
|
| 219 | } |
|
| 220 | ||
| 221 | public static function linkPublic() |
|
| 222 | { |
|
| @@ 221-248 (lines=28) @@ | ||
| 218 | return $url; |
|
| 219 | } |
|
| 220 | ||
| 221 | public static function linkPublic() |
|
| 222 | { |
|
| 223 | $args = func_get_args(); |
|
| 224 | ||
| 225 | if (!isset($args[0])) { |
|
| 226 | $args[0] = null; |
|
| 227 | } |
|
| 228 | ||
| 229 | if (!isset($args[1])) { |
|
| 230 | $args[1] = null; |
|
| 231 | } |
|
| 232 | ||
| 233 | $args[2] = false; |
|
| 234 | ||
| 235 | $page = $args[0]; |
|
| 236 | $req_site = static::$site; |
|
| 237 | ||
| 238 | if ((strpos($page, '/') !== false) && (preg_match('/^([A-Z][A-Za-z0-9-_]*)\/(.*)$/', $page, $matches) === 1) && OSCOM::siteExists($matches[1], false)) { |
|
| 239 | $req_site = $matches[1]; |
|
| 240 | $page = $matches[2]; |
|
| 241 | } |
|
| 242 | ||
| 243 | $args[0] = 'Shop/public/Sites/' . $req_site . '/' . $page; |
|
| 244 | ||
| 245 | $url = forward_static_call_array('static::link', $args); |
|
| 246 | ||
| 247 | return $url; |
|
| 248 | } |
|
| 249 | ||
| 250 | public static function redirect() |
|
| 251 | { |
|