Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: pyrocms/pyrocms
...
head fork: pyrocms/pyrocms
Checking mergeability… Don't worry, you can still create the pull request.
  • 13 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
View
3  .gitignore
@@ -5,7 +5,6 @@
.idea
assets/cache/*
system/cms/cache/*
-system/cms/config/database.php
system/cms/logs/log-*.php
nbproject/
uploads/*
@@ -48,4 +47,4 @@ addons/shared_addons/plugins/*
!addons/shared_addons/field_types
addons/shared_addons/field_types/*
!addons/shared_addons/field_types/index.html
-system/cms/config/config.php
+system/cms/config/config.php
View
26 Boxfile
@@ -0,0 +1,26 @@
+web1:
+ name: 'pyrocms'
+
+ # Directories specified here are not managed by Git but rather via SSH or the PyroCMS interface
+ shared_writable_dirs: [/system/cms/cache, /system/cms/logs, /uploads, /addons, /assets/cache]
+
+
+ # PHP Config Overrides
+ php_extensions: [mysqli, curl, gd, mbstring, eaccelerator]
+ php_error_reporting: 'E_ALL'
+ php_display_errors: On
+ php_short_open_tag: Off
+ php_default_mimetype: text/html
+ php_max_execution_time: 30
+ php_max_input_time: 60
+ php_post_max_size: 25M
+ php_file_uploads: On
+ php_upload_max_filesize: 20M
+ php_max_file_uploads: 20
+
+db1:
+ name: 'site'
+
+global:
+ env:
+ - PYRO_ENV: development
View
9 Boxfile.install
@@ -0,0 +1,9 @@
+web1:
+
+ after_deploy:
+
+ # The database connection is set up in the main Boxfile, so run the installer
+ - "curl -s http://${APP_NAME}.pagodabox.com/installer/index.php/quick_install"
+
+ # PHP Config Overrides
+ php_extensions: [mysql, mbstring]
View
77 installer/controllers/quick_install.php
@@ -0,0 +1,77 @@
+<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+/**
+ * @author Jerel Unruh - PyroCMS development team
+ * @package PyroCMS
+ * @subpackage Installer
+ * @category Application
+ * @since v2.0.2
+ *
+ * Quick Installer
+ */
+class Quick_install extends CI_Controller
+{
+
+ public function index()
+ {
+ // set the user info for our throw-away account
+ $data = array('user_name' => 'default',
+ 'user_email' => 'default@site.com',
+ 'site_ref' => 'default',
+ 'user_firstname' => 'Default',
+ 'user_lastname' => 'User',
+ 'user_password' => 'password',
+ 'database' => $_SERVER['DB1_NAME']);
+
+ // If they're using the quick install then
+ // the server must supply the database auth details
+ $this->session->set_userdata(array(
+ 'hostname' => $_SERVER['DB1_HOST'],
+ 'username' => $_SERVER['DB1_USER'],
+ 'password' => $_SERVER['DB1_PASS'],
+ 'port' => $_SERVER['DB1_PORT']
+ ));
+
+ // add this to $post since that's where the
+ // module_import library expects it to be
+ $_POST['database'] = $_SERVER['DB1_NAME'];
+ $_POST['port'] = $_SERVER['DB1_PORT'];
+
+ $this->installer_lib->install($data, TRUE);
+
+ //define the default user email to be used in the settings module install
+ define('DEFAULT_EMAIL', $data['user_email']);
+
+ // set the supported languages to be saved in Settings for emails and .etc
+ // modules > settings > details.php uses this
+ require_once(dirname(FCPATH).'/system/cms/config/language.php');
+
+ define('DEFAULT_LANG', $config['default_language']);
+
+ // Import the modules
+ $this->load->library('module_import');
+ $this->module_import->import_all();
+
+ // output the results to their terminal
+ echo PHP_EOL.
+ '*************************************************************'.PHP_EOL.
+ '* '.PHP_EOL.
+ '* PyroCMS has installed successfully! '.PHP_EOL.
+ '* Login to your new installation at http://'.$_SERVER['HTTP_HOST'].PHP_EOL.
+ '* The default email is "default@site.com" and the password is "password".'.PHP_EOL.
+ '* Change this promptly!'.PHP_EOL.
+ '* '.PHP_EOL.
+ '*************************************************************'.PHP_EOL.
+ PHP_EOL;
+ }
+}
+
+// This is for using the the settings
+// library in PyroCMS when installing. This is a
+// copy of the function that exists in
+// system/cms/core/My_Controller.php
+function ci()
+{
+ return get_instance();
+}
+
+/* End of file installer.php */
View
2  system/cms/config/config.php
@@ -26,7 +26,7 @@
| variable so that it is blank.
|
*/
-$config['index_page'] = 'index.php';
+$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
View
95 system/cms/config/database.php
@@ -0,0 +1,95 @@
+<?php defined('BASEPATH') OR exit('No direct script access allowed');
+/*
+| -------------------------------------------------------------------
+| DATABASE CONNECTIVITY SETTINGS
+| -------------------------------------------------------------------
+| This file will contain the settings needed to access your database.
+|
+| For complete instructions please consult the 'Database Connection'
+| page of the User Guide.
+|
+| -------------------------------------------------------------------
+| EXPLANATION OF VARIABLES
+| -------------------------------------------------------------------
+|
+| ['hostname'] The hostname of your database server.
+| ['username'] The username used to connect to the database
+| ['password'] The password used to connect to the database
+| ['database'] The name of the database you want to connect to
+| ['dbdriver'] The database type. ie: mysql. Currently supported:
+ mysql, mysqli, postgre, odbc, mssql
+| ['dbprefix'] You can add an optional prefix, which will be added
+| to the table name when using the Active Record class
+| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
+| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
+| ['active_r'] TRUE/FALSE - Whether to load the active record class
+| ['cache_on'] TRUE/FALSE - Enables/disables query caching
+| ['cachedir'] The path to the folder where cache files should be stored
+|
+| The $active_group variable lets you choose which connection group to
+| make active. By default there is only one group (the "default" group).
+|
+*/
+
+// Development
+$db[PYRO_DEVELOPMENT] = array(
+ 'hostname' => $_SERVER['DB1_HOST'],
+ 'username' => $_SERVER['DB1_USER'],
+ 'password' => $_SERVER['DB1_PASS'],
+ 'database' => $_SERVER['DB1_NAME'],
+ 'dbdriver' => 'mysqli',
+ 'dbprefix' => '',
+ 'active_r' => TRUE,
+ 'pconnect' => FALSE,
+ 'db_debug' => TRUE,
+ 'cache_on' => FALSE,
+ 'char_set' => 'utf8',
+ 'dbcollat' => 'utf8_unicode_ci',
+ 'port' => $_SERVER['DB1_PORT'],
+
+ // 'Tough love': Forces strict mode to test your app for best compatibility
+ 'stricton' => TRUE,
+);
+
+$db[PYRO_STAGING] = array(
+ 'hostname' => $_SERVER['DB1_HOST'],
+ 'username' => $_SERVER['DB1_USER'],
+ 'password' => $_SERVER['DB1_PASS'],
+ 'database' => $_SERVER['DB1_NAME'],
+ 'dbdriver' => 'mysqli',
+ 'active_r' => TRUE,
+ 'pconnect' => FALSE,
+ 'db_debug' => FALSE,
+ 'cache_on' => FALSE,
+ 'char_set' => 'utf8',
+ 'dbcollat' => 'utf8_unicode_ci',
+ 'port' => $_SERVER['DB1_PORT'],
+);
+
+// Production
+$db[PYRO_PRODUCTION] = array(
+ 'hostname' => $_SERVER['DB1_HOST'],
+ 'username' => $_SERVER['DB1_USER'],
+ 'password' => $_SERVER['DB1_PASS'],
+ 'database' => $_SERVER['DB1_NAME'],
+ 'dbdriver' => 'mysqli',
+ 'active_r' => TRUE,
+ 'pconnect' => FALSE,
+ 'db_debug' => FALSE,
+ 'cache_on' => FALSE,
+ 'char_set' => 'utf8',
+ 'dbcollat' => 'utf8_unicode_ci',
+ 'port' => $_SERVER['DB1_PORT'],
+);
+
+
+// Check the configuration group in use exists
+if ( ! array_key_exists(ENVIRONMENT, $db))
+{
+ show_error(sprintf(lang('error_invalid_db_group'), ENVIRONMENT));
+}
+
+// Assign the group to be used
+$active_group = ENVIRONMENT;
+
+/* End of file database.php */
View
2  system/cms/modules/pages/details.php
@@ -232,7 +232,7 @@ public function install()
array(
'slug' => 'default',
'page_id' => 1,
- 'body' => '<p>Welcome to our homepage. We have not quite finished setting up our website yet, but please add us to your bookmarks and come back soon.</p>',
+ 'body' => '<p>Congratulations! You have successfully set up your Pagoda Box Quick Install instance. You may log in using "<strong>default@site.com</strong>" and "<strong>password</strong>". As soon as you are logged in go to <a href="{{ url:site }}edit-profile">Edit Profile</a> to change your user information.</p><p>Next, delete the installer folder and your site will be ready for traffic.</p>',
'parsed' => '',
'type' => 'wysiwyg-advanced',
'sort' => 1,

No commit comments for this range

Something went wrong with that request. Please try again.