Permalink
Browse files

Development updates prior to GitHub migration.

  • Loading branch information...
1 parent 9142494 commit f82594bf64111091f66a99778433417b372cc664 @ryancramerdesign committed Apr 26, 2011
Showing with 1,941 additions and 585 deletions.
  1. +7 −0 .gitignore
  2. +7 −66 README.txt
  3. +4 −2 htaccess.txt
  4. +5 −7 index.php
  5. +16 −9 install.php
  6. +470 −369 site-default/install/install.sql
  7. +2 −1 site-default/modules/Helloworld.module
  8. +13 −0 site-default/templates/home.php
  9. +1 −3 site-default/templates/page.php
  10. +1 −1 site-default/templates/search.php
  11. +2 −0 upgrade.php
  12. +1 −0 wire/core/InputfieldWrapper.php
  13. +66 −2 wire/core/Page.php
  14. +128 −11 wire/core/PageFinder.php
  15. +9 −3 wire/core/Pages.php
  16. +272 −0 wire/core/PagesAccess.php
  17. +28 −1 wire/core/Permission.php
  18. +5 −3 wire/core/ProcessController.php
  19. +1 −1 wire/core/ProcessWire.php
  20. +10 −0 wire/core/Role.php
  21. +2 −1 wire/core/Sanitizer.php
  22. +1 −0 wire/core/SaveableItems.php
  23. +1 −1 wire/core/Session.php
  24. +24 −0 wire/core/Template.php
  25. +6 −0 wire/core/Templates.php
  26. +13 −4 wire/core/User.php
  27. +1 −1 wire/core/Users.php
  28. +1 −1 wire/modules/Fieldtype/FieldtypeFile.module
  29. +1 −1 wire/modules/Fieldtype/FieldtypePassword.module
  30. +2 −2 wire/modules/Inputfield/InputfieldPage.module
  31. +42 −2 wire/modules/Inputfield/InputfieldPassword.module
  32. +46 −15 wire/modules/PagePermissions.module
  33. +1 −0 wire/modules/PageRender.module
  34. +346 −0 wire/modules/Process/ProcessForgotPassword.module
  35. +1 −0 wire/modules/Process/ProcessHome.module
  36. +1 −1 wire/modules/Process/ProcessList.module
  37. +4 −4 wire/modules/Process/ProcessLogin/ProcessLogin.css
  38. +58 −33 wire/modules/Process/ProcessLogin/ProcessLogin.module
  39. +2 −2 wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module
  40. +47 −3 wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module
  41. +17 −2 wire/modules/Process/ProcessPageView.module
  42. +114 −0 wire/modules/Process/ProcessProfile/ProcessProfile.module
  43. +56 −0 wire/modules/Process/ProcessTemplate/ProcessTemplate.js
  44. +78 −13 wire/modules/Process/ProcessTemplate/ProcessTemplate.module
  45. +12 −4 wire/templates-admin/default.php
  46. +11 −6 wire/templates-admin/styles/ui.css
  47. +5 −10 wire/templates-admin/topnav.inc
View
@@ -1,6 +1,12 @@
.DS_Store?
*.old
*.old/*
+*.new
+*.new/*
+old
+old/*
+*.1
+*.1/*
sess_*
*.cache
*.swp
@@ -16,3 +22,4 @@ site
site-skyscrapers
.htaccess
tmp
+upgrade.php
View
@@ -1,70 +1,11 @@
-ABOUT PROCESSWIRE
----------------------------------------------------------------------------
-ProcessWire is an open source content management system (CMS) and web
-application framework aimed at the needs of designers, developers and their
-clients. ProcessWire gives you more control over your fields, templates and
-markup than other platforms, and provides a powerful template system that
-works the way you do. Not to mention, ProcessWire's API makes working with
-your content easy and enjoyable. Managing and developing a site in
-ProcessWire is shockingly simple compared to what you may be used to.
-
ABOUT THIS VERSION
----------------------------------------------------------------------------
-This version is a developer preview, primarily for testing and introducing
-ProcessWire to other web designers and developers. This version is not
-intended for production use and there are likely to be some changes before
-the stable release. Please contact Ryan with any bugs or issues you may
-encounter at http://ryancramer.com/contact/
-
-
-REQUIREMENTS
----------------------------------------------------------------------------
-1. A web server running Apache.
-2. PHP version 5.2.4 or greater.
-3. MySQL 5.0.15 or greater.
-4. Apache must have mod_rewrite enabled.
-5. Apache must support .htaccess files.
-
-
-INSTALLATION FROM ZIP
----------------------------------------------------------------------------
-
-1. Unzip the ProcessWire installation file to the location where you want it
- installed on your web server.
-
-2. Load the location that you unzipped (or uploaded) the files to in your web
- browser. This will initiate the ProcessWire installer. The installer will
- guide you through the rest of the installation.
-
-
-INSTALLATION FROM GIT
----------------------------------------------------------------------------
-
-1. Git clone ProcessWire to the place where you want to install it.
-
-2. Load the location where you installed ProcessWire into your browser.
- This will initiate the ProcessWire installer. The installer will guide
- you through the rest of the installation.
-
-
-TROUBLESHOOTING
----------------------------------------------------------------------------
-If you run into a blank screen or an error you don't expect, turn on debug
-mode by doing the following:
-
-1. Edit this file:
- /site/config.php
-
-2. Find this line:
- $config->debug = false;
-
-3. Change the 'false' to 'true', like below, and save.
- $config->debug = true;
-
-This can be found near the bottom of the file. It will make PHP and
-ProcessWire report all errors, warnings, notices, etc. Of course, you'll
-want to set it back to false once you've resolved any issues.
+------------------
+This is a ProcessWire 2.1 development version and it's posted here just
+for testing by a few individuals. While you certainly can attempt to
+install it, I don't recommend doing so unless you've already talked with
+Ryan because this is not a stable version. Instead you should download
+ProcessWire 2.0 at http://processwire.com/download/
HAVE QUESTIONS, NEED HELP, OR FOUND A BUG?
@@ -73,5 +14,5 @@ Please contact Ryan at:
http://www.ryancramer.com/contact/
-ProcessWire, Copyright 2010 by Ryan Cramer
+ProcessWire, Copyright 2011 by Ryan Cramer
View
@@ -67,10 +67,12 @@ DirectoryIndex index.php index.html index.htm
# -----------------------------------------------------------------------------------------------
# Optional: Set a rewrite base if rewrites aern't working properly on your server.
+ # And if your site directory starts with a "~" you will most likely have to use this.
# -----------------------------------------------------------------------------------------------
# RewriteBase /
- # RewriteBase /pw
+ # RewriteBase /pw/
+ # RewriteBase /~user/
# -----------------------------------------------------------------------------------------------
# Access Restrictions: Keep web users out of dirs that begin with a period
@@ -107,7 +109,7 @@ DirectoryIndex index.php index.html index.htm
# Ensure that the URL follows the name-format specification required by ProcessWire
# -----------------------------------------------------------------------------------------------
- RewriteCond %{REQUEST_URI} "^[-_.a-zA-Z0-9/]*$"
+ RewriteCond %{REQUEST_URI} "^/~?[-_.a-zA-Z0-9/]*$"
# -----------------------------------------------------------------------------------------------
# If the request is for a file or directory that physically exists on the server,
View
@@ -11,15 +11,15 @@
* of any changes made in this file.
*
* ProcessWire 2.x
- * Copyright (C) 2010 by Ryan Cramer
+ * Copyright (C) 2011 by Ryan Cramer
* Licensed under GNU/GPL v2, see LICENSE.TXT
*
* http://www.processwire.com
* http://www.ryancramer.com
*
*/
-define("PROCESSWIRE", 200);
+define("PROCESSWIRE", 201);
/**
* Build the ProcessWire configuration
@@ -38,9 +38,7 @@ function ProcessWireBootConfig() {
if(isset($_SERVER['HTTP_HOST'])) {
// when serving pages from a web server
- $docRoot = rtrim($_SERVER['DOCUMENT_ROOT'], '/');
- if(strpos($rootPath, $docRoot) !== 0) $docRoot = rtrim(realpath($docRoot), '/');
- $rootURL = substr($rootPath, strlen($docRoot)) . '/';
+ $rootURL = dirname($_SERVER['SCRIPT_NAME']) . '/';
} else {
// when included from another app or command line script
$rootURL = '/';
@@ -90,10 +88,10 @@ function ProcessWireBootConfig() {
* Include system and user-specified configuration options
*
*/
- require("$rootPath/$wireDir/config.php");
+ include("$rootPath/$wireDir/config.php");
$configFile = "$rootPath/$siteDir/config.php";
$configFileDev = "$rootPath/$siteDir/config-dev.php";
- @require(is_file($configFileDev) ? $configFileDev : $configFile);
+ @include(is_file($configFileDev) ? $configFileDev : $configFile);
/*
* If debug mode is on then echo all errors, if not then disable all error reporting
View
@@ -275,7 +275,7 @@ protected function profileImport($mysqli) {
if(!is_file("{$profile}install.sql")) die("No installation profile found in {$profile}");
// checks to see if the database exists using an arbitrary query (could just as easily be something else)
- $result = $mysqli->query("SHOW COLUMNS FROM users_roles");
+ $result = $mysqli->query("SHOW COLUMNS FROM pages");
if(self::replaceDB || !$result || $result->num_rows == 0) {
@@ -369,7 +369,8 @@ protected function adminAccount() {
echo "<h2>4. Create Admin Account</h2>" .
"<p>The account you create here will have superuser access, so please make sure to create a strong password.</p>" .
"<p><label>Username<br /><input type='text' name='username' value='admin' /></label></p>" .
- "<p><label>Password<br /><input type='text' name='userpass' value='' /></label></p>";
+ "<p><label>Password<br /><input type='text' name='userpass' value='' /></label></p>" .
+ "<p><label>E-Mail Address<br /><input type='text' name='useremail' value='' /></label></p>";
$this->btn("Create Account", 5);
}
@@ -381,18 +382,24 @@ protected function adminAccountSave($wire) {
return $this->adminAccount();
}
- $superuser = $wire->roles->get("superuser");
- $user = new User();
+ $superuser = $wire->roles->get("name=superuser");
+
+ $user = $wire->users->get($wire->config->superUserPageID);
+ if(!$user->id) {
+ $user = new User();
+ $user->id = $wire->config->superUserPageID;
+ }
$user->name = $wire->input->post->username;
$user->pass = $wire->input->post->userpass;
- $pass = $user->pass;
+ $user->email = $wire->input->post->useremail;
+ $pass = htmlentities($wire->input->post->userpass);
- if($user->name != $wire->input->post->username || $user->pass != $wire->input->post->userpass) {
- $this->err("Your username or password contained characters that aren't accepted at this time. Please try another.");
+ if($user->name != $wire->input->post->username) {
+ $this->err("Your username contained characters that aren't accepted at this time. Please try another.");
return $this->adminAccount();
}
- $user->addRole($superuser);
+ if(!$user->roles->has("superuser")) $user->roles->add($superuser);
try {
$wire->users->save($user);
@@ -437,7 +444,7 @@ protected function welcome() {
public function execute() {
- $title = "ProcessWire 2.0 Installation";
+ $title = "ProcessWire 2.1 Installation";
require("./wire/templates-admin/install-head.inc");
if(isset($_POST['step'])) switch($_POST['step']) {
Oops, something went wrong.

0 comments on commit f82594b

Please sign in to comment.