function render_attributes() { if (!isset($this->attributes['action'])) { $this->attributes['action'] = $_SERVER['PHP_SELF']; if (isset($_REQUEST['popup'])) { $this->attributes['action'] .= '?popup=1'; } } parent::render_attributes(); }
function render_attributes() { if(!isset($this->attributes['action'])) { $this->attributes['action'] = $_SERVER['PHP_SELF']; $request = request :: instance(); if($request->has_attribute('popup')) $this->attributes['action'] .= '?popup=1'; } if(isset($this->attributes['https']) && $this->attributes['https']) { preg_match('~(http://)?([\w\.]*)(:[\d]*)?(.*)~', $_SERVER['HTTP_HOST'], $matches); $host = $matches[2]; $url = parse_url($_SERVER['PHP_SELF']); if (strpos($this->attributes['action'], '/') !== 0) { $host .= $url['path']; if (strrpos($host, '/') != (strlen($host) - 1)) $host .= '/'; } $this->attributes['action'] = "https://{$host}{$this->attributes['action']}"; unset($this->attributes['https']); } parent :: render_attributes(); }
function render_attributes() { if (!isset($this->attributes['action'])) { $this->attributes['action'] = $_SERVER['PHP_SELF']; $request = request::instance(); if ($request->has_attribute('popup')) { $this->attributes['action'] .= '?popup=1'; } } parent::render_attributes(); }