diff --git a/.gitattribute b/.gitattribute deleted file mode 100644 index d664430..0000000 --- a/.gitattribute +++ /dev/null @@ -1,16 +0,0 @@ -# Force LF for all text files -* text=auto eol=lf - -# Ensure specific file types always use LF -*.sh text eol=lf -*.js text eol=lf -*.php text eol=lf -*.html text eol=lf -*.css text eol=lf -*.json text eol=lf -*.md text eol=lf - -# Keep binary files untouched -*.png binary -*.jpg binary -*.gif binary diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100755 index 2952fb1..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,74 +0,0 @@ -stages: - - prepare - - build - - test - - update - - deploy - -variables: - TIMEZONE: "America/New_York" # For the system in general - DATE_TIMEZONE: ${TIMEZONE} # For PHP - - GIT_DEPTH: 1 - GITLAB_API_URL: ${CI_API_V4_URL} - TARGET_BRANCH: ${CI_COMMIT_REF_NAME} # This is the branch chosen in the `Pipeline Schedule` - TARGET_REMOTE: "https://${GITLAB_USERNAME}:${GITLAB_ACCESS_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_NAMESPACE}/${CI_PROJECT_NAME}.git" - - # These could/should be overridden in an extending job: - UPDATE_BRANCH_PREFIX: "update_PHP_deps_" # Used for the update branch name, it will be followed by the datetime - GIT_USER: "DependBot" # Used for the update commit - GIT_EMAIL: "webmaster@thetempusproject.com" # Used for the update commit - GITLAB_USERNAME: "root" # Used for pushing the new branch and opening the MR - GITLAB_ACCESS_TOKEN: "glpat-PKEmivGtBfbz4DVPdhzk" # Used for pushing the new branch and opening the MR - MERGE_IF_SUCCESSFUL: "true" # Set to true, to merge automatically if the pipeline succeeds - SECONDS_BETWEEN_POOLING: 10 # Nbr of seconds between checking if the MR pipeline is successful, so then it will merge - JOB_GIT_FLAGS: "" - JOB_CURL_FLAGS: "" - JOB_COMPOSER_FLAGS: "" - -composer_update: - stage: update - rules: - - if: '$CI_COMMIT_BRANCH == "main"' - image: composer:latest - interruptible: true # allows to stop the job if a newer pipeline starts, saving resources and allowing new jobs to start because job concurrency is limited - script: - - git ${JOB_GIT_FLAGS} fetch origin ${TARGET_BRANCH} - - git ${JOB_GIT_FLAGS} checkout ${TARGET_BRANCH} - - git reset --hard origin/main - - git pull --allow-unrelated-histories - - export DATE_TIME="$(date '+%Y%m%d%H%M%S')" - - export MR_BRANCH="${UPDATE_BRANCH_PREFIX}${DATE_TIME}" - - git ${JOB_GIT_FLAGS} checkout -b "${MR_BRANCH}" - - composer update ${JOB_COMPOSER_FLAGS} - - if [ "$(git diff)" == "" ]; then echo "No updates needed!"; exit 0; fi - - export TITLE="Update PHP dependencies [${DATE_TIME}]" - - git ${JOB_GIT_FLAGS} commit -a -m "${TITLE}" - - git ${JOB_GIT_FLAGS} push "${TARGET_REMOTE}" "${MR_BRANCH}" - artifacts: - paths: - - vendor/ - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - vendor/ - -prepare: - stage: prepare - script: - - echo "Preparing environment..." - -build: - stage: build - script: - - echo "Building the project..." - -test: - stage: test - script: - - echo "Running tests..." - -deploy: - stage: deploy - script: - - echo "Deploying the project..." \ No newline at end of file diff --git a/app/images/ttp-github.png b/app/images/ttp-github.png deleted file mode 100755 index 4786f5d..0000000 Binary files a/app/images/ttp-github.png and /dev/null differ diff --git a/app/images/ttp-gitlab.png b/app/images/ttp-gitlab.png deleted file mode 100644 index 9637ee2..0000000 Binary files a/app/images/ttp-gitlab.png and /dev/null differ diff --git a/app/images/ttp-install.png b/app/images/ttp-install.png deleted file mode 100755 index aace68d..0000000 Binary files a/app/images/ttp-install.png and /dev/null differ diff --git a/app/images/ttp.png b/app/images/ttp.png deleted file mode 100755 index 31bec2e..0000000 Binary files a/app/images/ttp.png and /dev/null differ diff --git a/app/views/admin/dashboard/dash.html b/app/views/admin/dashboard/dash.html index 7f0d4c0..240d46a 100755 --- a/app/views/admin/dashboard/dash.html +++ b/app/views/admin/dashboard/dash.html @@ -18,28 +18,4 @@ {blogDash} - - -Results -
-
- -
- -
- -
-
- - - - - -
- -
-
-
-
- {searchResults}
\ No newline at end of file diff --git a/app/views/changes/ttp.html b/app/views/changes/ttp.html index 126fa1a..ab74bed 100644 --- a/app/views/changes/ttp.html +++ b/app/views/changes/ttp.html @@ -42,7 +42,7 @@
  • Removed unused code
  • View organization
  • -

    +

    Tag @@ -139,7 +139,7 @@

  • Bugfixes
  • Comment updates
  • -

    +

    Tag @@ -157,7 +157,7 @@

  • Composer update
  • Switch to composer dependencies for front-end assets
  • -

    +

    Tag @@ -174,7 +174,7 @@

    -

    +

    Tag @@ -191,7 +191,7 @@

    -

    +

    Tag @@ -209,7 +209,7 @@

  • Numerous bugfixes
  • Composer update
  • -

    +

    Tag @@ -233,7 +233,7 @@

  • Composer updates
  • Readme update
  • -

    +

    Tag diff --git a/app/views/install/adminUser.html b/app/views/install/adminUser.html deleted file mode 100755 index 62fd173..0000000 --- a/app/views/install/adminUser.html +++ /dev/null @@ -1,35 +0,0 @@ -{installer-nav} -

    -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/agreement.html b/app/views/install/agreement.html deleted file mode 100755 index 5db62c6..0000000 --- a/app/views/install/agreement.html +++ /dev/null @@ -1,16 +0,0 @@ -{installer-nav} -
    -
    -
    -
    - {TERMS} -
    -
    -
    - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/check.html b/app/views/install/check.html deleted file mode 100755 index 682d383..0000000 --- a/app/views/install/check.html +++ /dev/null @@ -1,23 +0,0 @@ -{installer-nav} -
    -
    -
    -

    Requirements

    -
      -
    • PHP version greater than 5.6
    • -
    • Session storage must be enabled
    • -
    • PHP mail must be enabled.
    • -
    • Safe mode must be disabled.
    • -
    • Rewrite rule must be on
    • -
    • file uploads must be on
    • -
    • mysql_pdo must be enabled
    • -
    -
    -
    - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/complete.html b/app/views/install/complete.html deleted file mode 100755 index bce6d2f..0000000 --- a/app/views/install/complete.html +++ /dev/null @@ -1,32 +0,0 @@ -
    -
    -
    - -
    - -
    - -

    Success

    - -

    - The Tempus Project has been successfully installed. -

    -

    - You can now log in and manage your site or jump straight into building your new features! -

    - -

    - Some plugins may need additional configuration and there are already some pre-made resources to get you started. (Both in the files and the Admin Panel) -

    - - -
    -
    -
    diff --git a/app/views/install/configure.html b/app/views/install/configure.html deleted file mode 100755 index f57ed14..0000000 --- a/app/views/install/configure.html +++ /dev/null @@ -1,44 +0,0 @@ -
    - {installer-nav} -
    -
    - Configure -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/models.html b/app/views/install/models.html deleted file mode 100755 index bbad39d..0000000 --- a/app/views/install/models.html +++ /dev/null @@ -1,37 +0,0 @@ -
    - {installer-nav} -
    -
    -

    All models are required for proper installation of The Tempus Project. In this step, we will add the database tables required for these models. In the next step, you'll be able to select which plugins you would like installed.

    -
    - - - - - - - - - {LOOP} - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    Model NameVersion
    {name}{version}
    - No models to install. -
    - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/nav.html b/app/views/install/nav.html deleted file mode 100755 index a1e937a..0000000 --- a/app/views/install/nav.html +++ /dev/null @@ -1,12 +0,0 @@ - \ No newline at end of file diff --git a/app/views/install/plugins.html b/app/views/install/plugins.html deleted file mode 100755 index ea67132..0000000 --- a/app/views/install/plugins.html +++ /dev/null @@ -1,45 +0,0 @@ -
    - {installer-nav} -
    -
    -

    - The Tempus Project was built to utilize all of the plugins provided with the installer. You can choose not to enable any one of them, but it may negatively impact the operation of your site. -

    -
    - - - - - - - - - - {LOOP} - - - - - - {/LOOP} - {ALT} - - - - {/ALT} - -
    Plugin NameVersion - -
    {name}{version} - -
    - No models to install. -
    - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/resources.html b/app/views/install/resources.html deleted file mode 100755 index 64c77a8..0000000 --- a/app/views/install/resources.html +++ /dev/null @@ -1,16 +0,0 @@ -
    - {installer-nav} -
    -
    -

    - Some models such as groups will need additional database resources and configurations to function properly. In this step, we will install those features. -

    -
    - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/routing.html b/app/views/install/routing.html deleted file mode 100755 index 77a95ce..0000000 --- a/app/views/install/routing.html +++ /dev/null @@ -1,18 +0,0 @@ -
    - {installer-nav} -
    -
    -

    The Tempus Project uses rewrites in htaccess files (Apache), or location directives (Nginx), to automatically route all incoming traffic through the app. In this step, we will help set-up and then test that the required configurations have been made.

    -

    Apache Users

    -

    In this step, we will attempt to generate the appropriate files for Apache servers.

    -

    Nginx Users

    -

    If you are using Nginx, you will need to update your server's configuration manually. Please see the documentation, for convenience, an example configuration has been provided with TheTempusProject and can be found in the app/resources directory.

    -
    - -
    -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/start.html b/app/views/install/start.html deleted file mode 100755 index 3384e77..0000000 --- a/app/views/install/start.html +++ /dev/null @@ -1,13 +0,0 @@ -
    -
    -
    - {installer-nav} -

    Welcome to The Tempus Project Installer.

    -

    This installer will guide you through the process of installing and configuring The Tempus Project. Do not forget to delete this file once you have completed installation.

    -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/terms.html b/app/views/install/terms.html deleted file mode 100644 index 199b517..0000000 --- a/app/views/install/terms.html +++ /dev/null @@ -1,16 +0,0 @@ -
    - {installer-nav} -
    -
    -
    - {TERMS} -
    -
    -
    - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/user.html b/app/views/install/user.html deleted file mode 100644 index 6133376..0000000 --- a/app/views/install/user.html +++ /dev/null @@ -1,35 +0,0 @@ -
    - {installer-nav} -
    -
    -
    -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - -
    - -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/verify.html b/app/views/install/verify.html deleted file mode 100644 index 61ae0a1..0000000 --- a/app/views/install/verify.html +++ /dev/null @@ -1,23 +0,0 @@ -
    - {installer-nav} -
    -
    -

    Requirements

    -
      -
    • PHP version greater than 5.6
    • -
    • Session storage must be enabled
    • -
    • PHP mail must be enabled.
    • -
    • Safe mode must be disabled.
    • -
    • Rewrite rule must be on
    • -
    • file uploads must be on
    • -
    • mysql_pdo must be enabled
    • -
    -
    -
    - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/app/views/install/welcome.html b/app/views/install/welcome.html deleted file mode 100644 index 62fd726..0000000 --- a/app/views/install/welcome.html +++ /dev/null @@ -1,17 +0,0 @@ -
    -
    -
    -
    - {installer-nav} -

    Welcome to The Tempus Project Installer.

    -

    - This installer will guide you through the process of installing and configuring The Tempus Project. Do not forget to delete this file once you have completed installation. -

    -
    - -
    -
    -
    -
    -
    -
    \ No newline at end of file diff --git a/install.php b/install.php deleted file mode 100755 index 75a59a2..0000000 --- a/install.php +++ /dev/null @@ -1,407 +0,0 @@ - - * @link https://TheTempusProject.com - * @license https://opensource.org/licenses/MIT [MIT LICENSE] - */ -namespace TheTempusProject\Controllers; - -require_once 'bin/autoload.php'; - -use TheTempusProject\TheTempusProject; -use TheTempusProject\Classes\Controller; -use TheTempusProject\Classes\Plugin; -use TheTempusProject\Classes\Installer; -use TheTempusProject\Classes\Forms; -use TheTempusProject\Models\User; -use TheTempusProject\Classes\Email; -use TheTempusProject\Bedrock\Functions\Code; -use TheTempusProject\Bedrock\Functions\Check; -use TheTempusProject\Bedrock\Functions\Cookie; -use TheTempusProject\Bedrock\Functions\Input; -use TheTempusProject\Bedrock\Functions\Upload; -use TheTempusProject\Bedrock\Functions\Hash; -use TheTempusProject\Bedrock\Functions\Session; -use TheTempusProject\Houdini\Classes\Issues; -use TheTempusProject\Houdini\Classes\Views; -use TheTempusProject\Houdini\Classes\Components; -use TheTempusProject\Houdini\Classes\Template; -use TheTempusProject\Hermes\Functions\Redirect; -use TheTempusProject\Hermes\Functions\Route; -use TheTempusProject\Canary\Bin\Canary as Debug; - -class Install extends Controller { - private $installer; - private $location = false; - private $steps = [ - 'Welcome', - 'Terms', - 'Verify', - 'Configure', - 'Routing', - 'Models', - 'Plugins', - 'Install', - 'Resources', - 'User', - 'Complete', - ]; - - /** - * This is the main builder for the rest of the controller. It mostly handle template variables used on all pages. - */ - public function __construct() { - parent::__construct(); - self::$title = 'TP Installer'; - self::$pageDescription = 'This is the install script for The Tempus Project.'; - $this->installer = new Installer(); - Template::noIndex(); - Template::noFollow(); - foreach ( $this->steps as $step ) { - Components::set( 'menu-' . $step, 'disabled' ); - } - if ( $this->checkSession() !== false ) { - $this->location = $this->getStep(); - Components::set( 'menu-' . ucfirst( $this->location ), 'active' ); - } else { - Components::set( 'menu-Welcome', 'active' ); - } - Components::set( 'installer-nav', Views::simpleView( 'install.nav' ) ); - } - - /** - * This method will reset the install hash, set the saved install step, update the session and cookie, and refresh if required. - * - * @param string $page - * @param boolean $redirect - * @return void - */ - public function nextStep( $page, $redirect = false ) { - $newHash = Code::genInstall(); - $this->installer->setNode( 'installHash', $newHash, true ); - $this->installer->setNode( 'installStep', $page, true ); - Session::put( 'installHash', $newHash ); - Cookie::put( 'installHash', $newHash ); - if ( $redirect === true ) { - Redirect::reload(); - } - return true; - } - - public function checkSession() { - if ( empty( $this->installer->getNode('installHash') ) ) { - Debug::error( 'install hash not found on file.' ); - return false; - } - $session = Session::get( 'installHash' ); - $cookie = Cookie::get( 'installHash' ); - $file = $this->installer->getNode('installHash'); - - if ( ! $session && ! $cookie ) { - Debug::error( 'install hash not found in session or cookie.' ); - return false; - } - if ( $cookie && ! $session ) { - if ( $cookie !== $file ) { - Debug::error( 'install cookie did not match install file.' ); - Cookie::delete( 'installHash' ); - return false; - } - Debug::error( 'cookie matches file, using as session' ); - Session::put( 'installHash', $cookie ); - return true; - } - if ( $session !== $file ) { - Debug::error( 'session did not match file, deleting session' ); - Session::delete( 'installHash' ); - return false; - } - return true; - } - - public function getStep() { - if ( !empty( $this->installer->getNode('installStep') ) ) { - return $this->installer->getNode('installStep'); - } - Debug::error( 'install status not found.' ); - return false; - } - - /** - * The index method is called on the first request and all requests thereafter and is responsible for routing - * the current request to the appropriate installer step/method. - */ - public function index() { - if ( false === $this->location ) { - return $this->welcome(); - } - // this seems dumb, i could probably do this better - $location = $this->location; - return $this->$location(); - } - - /** - * The welcome method is is just a page to submit a form and save the install.json for the first time. - */ - public function welcome() { - if ( Forms::Check( 'installStart' ) ) { - return $this->nextStep( 'terms', true ); - } - // dv( $_POST ); - if ( Input::exists('submit') ) { - Issues::add( 'error', ['There was an error with the Installation.' => Check::userErrors()] ); - } - Views::view( 'install.start' ); - } - - /** - * The terms step is pretty straight forward. You simply need to continue to the next step, understanding - * that you agree to these terms when you continue the installation. - */ - public function terms() { - if ( Forms::Check( 'installAgreement' ) ) { - return $this->nextStep( 'verify', true ); - } - if ( Input::exists( 'submit' ) ) { - Issues::add( 'error', [ 'There was an error with the Installation.' => Check::userErrors() ] ); - } - Components::set( 'TERMS', Views::simpleView( 'terms' ) ); - Views::view( 'install.agreement' ); - } - - /** - * There is a small list a of requirements for the application to run properly. These are things like sessions, emails, cookies, etc. - * This step verifies that all of these features are working as expected. - */ - public function verify() { - if ( Forms::Check( 'installCheck' ) ) { - return $this->nextStep( 'configure', true ); - } - if ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with the Installation.' => array_merge( Check::userErrors(), Check::systemErrors() )] ); - } - Views::view( 'install.check' ); - } - - /** - * One of the most important steps for installation, is the configuration. In this step, we will define some very core settings - * for the app including the app's name and database credentials. - */ - public function configure() { - if ( Forms::Check( 'installConfigure' ) ) { - $logo = 'images/logo.png'; - if ( Input::exists( 'logo' ) && Upload::image( 'logo', 'System' ) ) { - $logo = 'Uploads/Images/System/' . Upload::last(); - } - TheTempusProject::$activeConfig->load( BEDROCK_CONFIG_JSON ); - $baseConfig = TheTempusProject::$configMatrix; - $baseConfig['main']['logo']['value'] = $logo; - $baseConfig['main']['name']['value'] = Input::postNull( 'siteName' ); - $baseConfig['main']['template']['value'] = $baseConfig['main']['template']['default']; - $baseConfig['main']['tokenEnabled']['value'] = $baseConfig['main']['tokenEnabled']['default']; - $baseConfig['main']['loginLimit']['value'] = $baseConfig['main']['loginLimit']['default']; - $baseConfig['database']['dbEnabled']['value'] = $baseConfig['database']['dbEnabled']['default']; - $baseConfig['database']['dbHost']['value'] = Input::postNull( 'dbHost' ); - $baseConfig['database']['dbMaxQuery']['value'] = $baseConfig['database']['dbMaxQuery']['default']; - $baseConfig['database']['dbName']['value'] = Input::postNull( 'dbName' ); - $baseConfig['database']['dbPassword']['value'] = Input::postNull( 'dbPassword' ); - $baseConfig['database']['dbPrefix']['value'] = Input::postNull( 'dbPrefix' ); - $baseConfig['database']['dbUsername']['value'] = Input::postNull( 'dbUsername' ); - if ( ! TheTempusProject::$activeConfig->generate( CONFIG_JSON, $baseConfig ) ) { - return Issues::add( 'error', 'Config file already exists so the installer has been halted. If there was an error with installation, please delete app/config/config.json manually and try again. The installer should automatically bring you back to this step.' ); - } - Session::flash( 'success', 'Config saved successfully.' ); - return $this->nextStep( 'routing', true ); - } - if ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] ); - } - Views::view( 'install.configure' ); - } - - /** - * For the application to function properly on nginx or apache, the web servers must be configured correctly. - * Depending on which server you use, this step will help you set up and test the routing required for the - * application to function as expected. - */ - public function routing() { - if ( Input::exists( 'submit' ) && Forms::Check( 'installRouting' ) ) { - // if its Apache, attempt to generate the htaccess file before testing - if ( Check::isApache() ) { - if ( !$this->installer->checkHtaccess() ) { - if ( !$this->installer->saveHtaccess() ) { - Issues::add( 'error', 'There was an unexpected error when generating your htaccess file. Please see the error logs for more information.' ); - } - } - } - // Apache should have the htaccess now, and Nginx should have been configured this way out of the box - if ( Route::testRouting() ) { - Session::flash( 'success', 'Routing is working as expected.' ); - return $this->nextStep( 'models', true ); - } else { - Issues::add( 'error', 'Could not verify url routing' ); - } - // routing is busted, if its Apache, we already have the error from htaccess generation - // so Nginx is the only one that needs more info - if ( Check::isNginx() ) { - Issues::add( 'error', 'There appears to be an issue with your configuration. Certain urls are not being routed as expected.' ); - } - } elseif ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] ); - } - Views::view( 'install.routing' ); - } - - /** - * Since models are required for the proper function of the app, this step is required and has no selection to make. - * This step will install all the required models excluding resources. - */ - public function models() { - $errors = []; - $options = [ 'installResources' => false ]; - $models = $this->installer->getModelList( MODEL_DIRECTORY ); - if ( Input::exists( 'submit' ) && Forms::Check( 'installModels' ) ) { - $error = false; - foreach ( $models as $model ) { - $result = $this->installer->installModel( $model, $options ); - - if ( $result === false ) { - $error = true; - continue; - } - } - if ( $error ) { - Issues::add( 'error', [ 'There was an error with the Installation.' => $this->installer->getErrors() ] ); - } else { - Session::flash( 'success', [ 'Models Have been installed successfully.' => $this->installer->getErrors() ] ); - return $this->nextStep( 'plugins', true ); - } - } elseif ( Input::exists( 'submit' ) ) { - Issues::add( 'error', [ 'There was an error with your form.' => Check::userErrors() ] ); - } - Views::view( 'install.models', $models ); - } - - /** - * This step will allow the user to install any plugins currently available for installing excluding resources. - */ - public function plugins() { - $errors = []; - $options = [ 'resources_installed' => false ]; - $plugins = $this->installer->getAvailablePlugins(); - $selected_plugins = Input::post( 'P_' ); - - if ( Input::exists( 'submit' ) && Forms::Check( 'installPlugins' ) ) { - $error = false; - foreach ( $plugins as $plugin ) { - if ( ! in_array( $plugin->name, $selected_plugins ) ) { - continue; - } - $result = $this->installer->installPlugin( $plugin, $options ); - - if ( !$result ) { - $error = true; - continue; - } - Plugin::enable( $plugin->name, true ); - } - if ( $error ) { - Issues::add( 'error', ['There was an error with the Installation.' => $this->installer->getErrors()] ); - } else { - Session::flash( 'success', [ 'Plugins Have been installed successfully.' => $this->installer->getErrors() ] ); - return $this->nextStep( 'resources', true ); - } - } elseif ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] ); - } - Views::view( 'install.plugins', $plugins ); - } - - /** - * The resource step will cycle through the partially installed models and install any missing resources. - */ - public function resources() { - $errors = []; - if ( Input::exists( 'submit' ) && Forms::Check( 'installResources' ) ) { - $error = false; - $allModules = $this->installer->getModules(true); - foreach ( $allModules as $name => $module ) { - if ( empty( $module ) || 'unknown' === $name || empty( $name ) || empty( $module['installedVersion'] ) ) { - continue; - } - - if ( 'plugin' == $module['type'] ) { - $installResult = $this->installer->installPlugin( (object) $module, [ 'resources_installed' => true ], false ); - } else { - $installResult = $this->installer->installModel( (object) $module, [ 'installResources' => true ], false ); - } - if ( !$installResult ) { - $error = true; - } - } - if ( $error ) { - Issues::add( 'error', ['There was an error with the Installation.' => $this->installer->getErrors()] ); - } else { - Session::flash( 'success', ['Resources have been installed successfully.' => $this->installer->getErrors()] ); - return $this->nextStep( 'user', true ); - } - } elseif ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] ); - } - Views::view( 'install.resources' ); - } - - /** - * This is the registration step; allowing the installer to create the super admin account. - */ - public function user() { - if ( Input::exists( 'submit' ) && Forms::Check( 'installAdminUser' ) ) { - $user = new User(); - if ( !$user->create( [ - 'username' => Input::post( 'newUsername' ), - 'password' => Hash::make( Input::post( 'userPassword' ) ), - 'email' => Input::post( 'userEmail' ), - 'lastLogin' => time(), - 'registered' => time(), - 'confirmed' => 1, - 'terms' => 1, - 'userGroup' => 1, - ] ) ) { - Issues::add( 'error', 'There was an error creating the admin user.' ); - return; - } - $this->nextStep( 'complete' ); - return $this->complete( true ); - } elseif ( Input::exists( 'submit' ) ) { - Issues::add( 'error', ['There was an error with your form.' => Check::userErrors()] ); - } - Views::view( 'install.adminUser' ); - } - - /** - * This is the final step of installation. On first load it will send an email and show the final view. - * It will then redirect to the index controller and prompt the user to delete this file on any subsequent loads. - * - * @param bool $sendEmail - */ - public function complete( $sendEmail = false ) { - if ( $sendEmail ) { - Issues::add( 'success', 'The Tempus Project has been installed successfully.' ); - Email::send( Input::post( 'email' ), 'install', null, [ 'template' => true ] ); - return Views::view( 'install.complete' ); - } - Session::flash( 'notice', 'Installation has been completed. Updates and installation can be managed in the admin panel. Please delete the install.php file.' ); - Redirect::to( 'home/index' ); - } -} - -$app = new TheTempusProject(); -$app->setUrl( 'install/index' ); -$app->load(); -exit; \ No newline at end of file diff --git a/manifest.webmanifest b/manifest.webmanifest index 7af15a5..3c82045 100755 --- a/manifest.webmanifest +++ b/manifest.webmanifest @@ -7,8 +7,8 @@ "background_color": "#7d7f83", "theme_color": "#3fa9f5", "icons": [ - { "src": "/images/logoWhite192.png", "type": "image/png", "sizes": "192x192" }, - { "src": "/images/logoWhite512.png", "type": "image/png", "sizes": "512x512" }, + { "src": "/images/logo192.png", "type": "image/png", "sizes": "192x192" }, + { "src": "/images/logo512.png", "type": "image/png", "sizes": "512x512" }, { "src": "/images/icon-mask.png", "type": "image/png", "sizes": "512x512", "purpose": "maskable" } ], "screenshots": [