diff --git a/app/config/core.php b/app/config/core.php index 47d22b76b..27ab90bcb 100644 --- a/app/config/core.php +++ b/app/config/core.php @@ -39,6 +39,10 @@ if(function_exists('apache_get_modules')) { define ('BASE_URL', $_SERVER['SCRIPT_NAME']); } +} +else +{ + define ('BASE_URL', $_SERVER['SCRIPT_NAME']); } /** diff --git a/app/config/tags.ini.php b/app/config/tags.ini.php index 7d0bc014e..2c926b450 100644 --- a/app/config/tags.ini.php +++ b/app/config/tags.ini.php @@ -60,19 +60,19 @@ checkbox = "" radio = "" ; Tag template for a select opening tag. -selectStart = "" ; Tag template for a select opening tag. -selectMultipleStart = "" ; Tag template for an empty select option tag. -selectEmpty = "" +selectempty = "" ; Tag template for a select option tag. -selectOption = "" +selectoption = "" ; Tag template for a closing select tag. -selectEnd = "" +selectend = "" ; Tag template for a password tag. password = "" @@ -87,16 +87,16 @@ submit = "" image =" " ; Tag template for a table header tag. -tableHeader = "%s" +tableheader = "%s" ; Tag template for table headers row tag. -tableHeaderRow = "%s" +tableheaderrow = "%s" ; Tag template for a table cell tag. -tableCell = "%s" +tablecell = "%s" ; Tag template for a table row tag. -tableRow = "%s" +tablerow = "%s" ; Tag template for a CSS link tag. css = "" @@ -105,7 +105,7 @@ css = "" charset = "" ; Tag template for inline JavaScript. -javascriptBlock = "" +javascriptblock = "" ; Tag template for included JavaScript. -javascriptLink = "" \ No newline at end of file +javascriptlink = "" \ No newline at end of file diff --git a/app/webroot/css/cake.default.css b/app/webroot/css/cake.default.css index b55469d6e..f23ddf9e0 100644 --- a/app/webroot/css/cake.default.css +++ b/app/webroot/css/cake.default.css @@ -152,16 +152,15 @@ a:hover padding: 10px; } -***Please Leave Powered by Cake****/ - #pb-cake { - width: 752px; - margin-top: 0px; - margin-left: auto; - margin-right: auto; - padding-right: 6px; - text-align: right; - } - - #pb-cake a{ - padding: 0; - } \ No newline at end of file +/***Please Leave Powered by Cake****/ +#pb-cake { + width: 752px; + margin-top: 0px; + margin-left: auto; + margin-right: auto; + padding-right: 6px; + text-align: right; +} +#pb-cake a{ + padding: 0; +} diff --git a/cake/dispatcher.php b/cake/dispatcher.php index ec4b4bb96..79950eca0 100644 --- a/cake/dispatcher.php +++ b/cake/dispatcher.php @@ -234,80 +234,80 @@ class Dispatcher extends Object * * @return string Base URL */ - function baseUrl() - { + function baseUrl() + { + $htaccess = null; $base = null; - if (defined('BASE_URL')) - { + $this->webroot = ''; + if (defined('BASE_URL')) + { $base = BASE_URL; - } - - $docRoot = $_SERVER['DOCUMENT_ROOT']; - $scriptName = $_SERVER['PHP_SELF']; + } + + $docRoot = $_SERVER['DOCUMENT_ROOT']; + $scriptName = $_SERVER['PHP_SELF']; - - // if document root ends with 'webroot', it's probably correctly set + // If document root ends with 'webroot', it's probably correctly set $r = null; - if (preg_match('/\\/'.APP_DIR.'\/'.WEBROOT_DIR.'(\/)?$/i', $docRoot)) + if (preg_match('/'.APP_DIR.'\\'.DS.WEBROOT_DIR.'/', $docRoot)) { - $this->webroot = DS; - //return preg_match('/\\/index.php(\/)?$/i', $scriptName, $r)? $base.$r[1]: $base; - if (preg_match('/\\/index.php(\/)?$/i', $scriptName, $r)) + $this->webroot = '/'; + if (preg_match('/^(.*)\/index\.php$/', $scriptName, $r)) { if(!empty($r[1])) { - return $base.$r[1]; + return $r[1]; } - else - { - return $base; - } - } - else - { - return $base; } } else { - if(empty($base)){ - $isDir = explode('/', setUri()); - $first = $isDir[1]; - $webPath[] = DS.$first.DS; - foreach ($isDir as $dirName) - { - if(!empty($dirName) && is_dir($docRoot.$first.DS.$dirName)) - { - $webPath[] = $dirName.DS; - } - } - $webroot = implode('', $webPath); - $base = substr($webroot, 0, -1); - } - else + if (defined('BASE_URL')) { $webroot =setUri(); - } - $this->webroot = preg_replace('/(?:'.APP_DIR.'(.*)|index\\.php(.*))/i', '', $webroot).APP_DIR.DS.WEBROOT_DIR.DS; - // document root is probably not set to Cake 'webroot' dir - if (preg_match('/\\/index.php(\/)?$/i', $scriptName, $r)) + $htaccess = preg_replace('/(?:'.APP_DIR.'(.*)|index\\.php(.*))/i', '', $webroot).APP_DIR.'/'.WEBROOT_DIR.'/'; + } + // Document root is probably not set to Cake 'webroot' dir + if(APP_DIR === 'app') { - if(!empty($r[1])) + if (preg_match('/^(.*)\\/'.APP_DIR.'\\/'.WEBROOT_DIR.'\\/index\\.php$/', $scriptName, $regs)) { - return $base.$r[1]; + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = $regs[1].'/'; + return $regs[1]; } else { + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = '/'; return $base; } } else { + if (preg_match('/^(.*)\\/'.WEBROOT_DIR.'\\/index\\.php$/', $scriptName, $regs)) + { + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = $regs[1].'/'; + return $regs[1]; + } + else + { + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = '/'; + return $base; + } + } + //Fallback if all others fail + if (preg_match('/^(.*)\\/index\\.php$/', $scriptName, $regs)) + { + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = $regs[1].'/'; + return $regs[1]; + } + else + { + !empty($htaccess)? $this->webroot = $htaccess : $this->webroot = '/'; return $base; } } + return $base; } - /** * Displays an error page (e.g. 404 Not found). diff --git a/cake/libs/view/helpers/html.php b/cake/libs/view/helpers/html.php index 3cefdc206..48de056ff 100644 --- a/cake/libs/view/helpers/html.php +++ b/cake/libs/view/helpers/html.php @@ -424,8 +424,7 @@ class HtmlHelper extends Helper function image($path, $htmlAttributes = null, $return = false) { $url = $this->webroot.IMAGES_URL.$path; - $alt = isset($htmlAttributes['alt']) ? $htmlAttributes['alt'] : ""; - return $this->output(sprintf($this->tags['image'], $url, $alt, $this->parseHtmlOptions($htmlAttributes, null, '', ' ')), $return); + return $this->output(sprintf($this->tags['image'], $url, $this->parseHtmlOptions($htmlAttributes, null, '', ' ')), $return); } /** diff --git a/cake/libs/view/templates/layouts/default.thtml b/cake/libs/view/templates/layouts/default.thtml index 3a82704fb..163b2fac4 100644 --- a/cake/libs/view/templates/layouts/default.thtml +++ b/cake/libs/view/templates/layouts/default.thtml @@ -1,15 +1,15 @@ -CakePHP : a rapid development framework :: <?=$title_for_layout?> - -charsetTag('UTF-8')?> -cssTag('cake.default')?> +CakePHP :: A Rapid Development Framework :: <?php echo $title_for_layout?> + +charsetTag('UTF-8')?> +cssTag('cake.default')?>
- +
+ + diff --git a/cake/libs/view/templates/pages/home.thtml b/cake/libs/view/templates/pages/home.thtml index cf0ad8245..7db24c405 100644 --- a/cake/libs/view/templates/pages/home.thtml +++ b/cake/libs/view/templates/pages/home.thtml @@ -17,7 +17,7 @@ Our primary goal is to provide a structured framework that enables PHP users at to rapidly develop robust web applications, without any loss to flexibility.

What's New

-

Release 0.10.0_dev with:

+

Release 0.10.0.1073_dev with: