Permalink
Browse files

moving cake to a sub directory

git-svn-id: https://svn.cakephp.org/repo/trunk/cake@106 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
phpnut committed May 15, 2005
1 parent d832800 commit cd86555549ac17aeaa28abecaf450b49ce5ae663
View
@@ -0,0 +1,7 @@
+<IfModule mod_rewrite.c>
+ RewriteEngine on
+ RewriteRule ^$ public/ [L]
+
+ #RewriteCond %{REQUEST_URI} !^/cake$
+ RewriteRule (.*) public/$1 [L]
+</IfModule>
View
@@ -0,0 +1,104 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose: AppController
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.app
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+/**
+ * Enter description here...
+ *
+ *
+ * @package cake
+ * @subpackage cake.app
+ * @since Cake v 0.2.9
+ *
+ */
+class AppController extends Controller {
+
+/**
+ * Enter description here...
+ *
+ * @param unknown_type $tags
+ * @param unknown_type $active
+ * @return unknown
+ */
+ function tags_as_links ($tags, $active=array()) {
+ $tags = is_array($tags)? $tags: Tag::split_tags($tags);
+
+ $links = array();
+ foreach ($tags as $tag) {
+
+ if (in_array($tag, $active))
+ $url_tags = $this->array_except($active, $tag);
+ else
+ $url_tags = array_merge($active, array($tag));
+
+ $url = '/memes/with_tags/'.$this->tags_to_url($url_tags);
+
+ $links[] = $this->link_to($tag, $url, in_array($tag, $active)? array('class'=>'active_tag'): null);
+ }
+
+ return join(' ', $links);
+ }
+
+/**
+ * Enter description here...
+ *
+ * @param unknown_type $array
+ * @param unknown_type $except
+ * @return unknown
+ */
+ function array_except ($array, $except) {
+ if (!is_array($except)) $except = array($except);
+ $out = array();
+
+ foreach ($array as $k=>$v) {
+ if (!in_array($v, $except))
+ $out[$k] = $v;
+ }
+
+ return $out;
+ }
+
+/**
+ * Enter description here...
+ *
+ * @param unknown_type $tags
+ * @return unknown
+ */
+ function tags_to_url ($tags) {
+ $out = array();
+ foreach ($tags as $tag)
+ $out[] = urlencode($tag);
+
+ return join('+', $out);
+ }
+
+}
+
+?>
View
@@ -0,0 +1,44 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose: AppModel
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.app
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+/**
+ * Enter description here...
+ *
+ *
+ * @package cake
+ * @subpackage cake.app
+ * @since Cake v 0.2.9
+ *
+ */
+class AppModel extends Model {
+}
+
+?>
No changes.
No changes.
@@ -0,0 +1,14 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
+<head>
+ <title><?=$title_for_layout?></title>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+ <link rel="stylesheet" type="text/css" href="<?=$BASE?>/css/default.css" />
+</head>
+
+<body>
+
+<?=$content_for_layout?>
+
+</body>
+</html>
@@ -0,0 +1,11 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
+<html>
+<head>
+<title><?=$code?> <?=$name?></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<body>
+<h1><?=$name?></h1>
+<p><?=$message?></p>
+</body>
+</html>
@@ -0,0 +1,19 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="pl" xml:lang="pl">
+<head>
+<title><?=$page_title?></title>
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<meta http-equiv="Refresh" content="<?=$time?>;url=<?=$url?>" />
+<style><!--
+P { text-align:center; font:bold 1.1em sans-serif }
+A { color:#444; text-decoration:none }
+A:HOVER { text-decoration: underline; color:#44E }
+--></style>
+</head>
+
+<body>
+
+<p><a href="<?=$url?>"><?=$message?></a></p>
+
+</body>
+</html>
No changes.
View
@@ -0,0 +1,41 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose:
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.config
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+$DATABASE_CONFIG = array(
+ 'devel' => array(
+ 'host' => 'localhost',
+ 'login' => 'www',
+ 'password' => 'www',
+ 'database' => 'ease'
+ )
+);
+
+?>
@@ -0,0 +1,41 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose:
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.config
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+$DATABASE_CONFIG = array(
+ 'devel' => array(
+ 'host' => 'localhost',
+ 'login' => 'cake',
+ 'password' => 'cake',
+ 'database' => 'cake'
+ )
+);
+
+?>
View
@@ -0,0 +1,42 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose:
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.config
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+# Homepage
+$Route->connect ('/', array('controller'=>'Memes', 'action'=>'add'));
+
+# Tags
+$Route->connect ('/tags/popular', array('controller'=>'Tags', 'action'=>'popular'));
+$Route->connect ('/tags/*', array('controller'=>'Memes', 'action'=>'with_tags'));
+
+# Default route
+$Route->connect ('/:controller/:action/*');
+
+?>
View
@@ -0,0 +1,44 @@
+<?PHP
+//////////////////////////////////////////////////////////////////////////
+// + $Id$
+// +------------------------------------------------------------------+ //
+// + Cake <http://sputnik.pl/cake> + //
+// + Copyright: (c) 2005 Michal Tatarynowicz + //
+// + + //
+// + Author(s): (c) 2005 Michal Tatarynowicz <tatarynowicz@gmail.com> + //
+// + + //
+// +------------------------------------------------------------------+ //
+// + Licensed under the Public Domain Licence + //
+// +------------------------------------------------------------------+ //
+//////////////////////////////////////////////////////////////////////////
+
+/**
+ * Purpose:
+ * Enter description here...
+ *
+ * @filesource
+ * @modifiedby $LastChangedBy$
+ * @lastmodified $Date$
+ * @author Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @copyright Copyright (c) 2005, Michal Tatarynowicz <tatarynowicz@gmail.com>
+ * @package cake
+ * @subpackage cake.config
+ * @since Cake v 0.2.9
+ * @version $Revision$
+ * @license Public_Domain
+ *
+ */
+
+# Homepage
+$Route->connect ('/', array('controller'=>'Pages', 'action'=>'view', 'home'));
+
+# Source browser
+#$Route->connect ('/sources/*', array('controller'=>'Sources', 'action'=>'index'));
+
+# Content pages
+#$Route->connect ('/*', array('controller'=>'Pages', 'action'=>'view'));
+
+# Default route
+$Route->connect ('/:controller/:action/*');
+
+?>
View
@@ -0,0 +1,7 @@
+///////////////////////////////////////////////////////////////////////////////////////////////////////////
+// +---------------------------------------------------------------------------------------------------+ //
+// + $Id$
+// + Last Modified: $Date$
+// + Modified By: $LastChangedBy$
+// +---------------------------------------------------------------------------------------------------+ //
+///////////////////////////////////////////////////////////////////////////////////////////////////////////
Oops, something went wrong.

0 comments on commit cd86555

Please sign in to comment.