From 31f92327c12e0cfdb1754650455a9aabc3973924 Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Thu, 21 Jul 2016 23:02:11 +0600 Subject: [PATCH] Fixed naming (phpci -> php-censor) --- app/config.example.yml | 12 ++--- app/phinx.php | 4 +- bootstrap.php | 2 +- docs/en/config.md | 2 +- docs/en/configuring.md | 6 +-- docs/en/installing.md | 4 +- docs/en/logging.md | 6 +-- docs/en/plugins/codeception.md | 2 +- docs/en/plugins/slack_notify.md | 2 +- docs/en/plugins/xmpp.md | 2 +- docs/en/updating.md | 2 +- docs/en/workers/cron.md | 5 +- docs/en/workers/worker.md | 10 ++-- public/assets/css/AdminLTE-custom.css | 2 +- public/assets/js/{phpci.js => app.js} | 20 ++++---- public/assets/js/build.js | 6 +-- public/assets/js/init.js | 4 +- src/PHPCensor/Application.php | 16 +++--- src/PHPCensor/Builder.php | 4 +- src/PHPCensor/Command/CreateAdminCommand.php | 2 +- src/PHPCensor/Command/CreateBuildCommand.php | 2 +- src/PHPCensor/Command/DaemonCommand.php | 4 +- src/PHPCensor/Command/DaemoniseCommand.php | 2 +- src/PHPCensor/Command/InstallCommand.php | 28 +++++------ src/PHPCensor/Command/PollCommand.php | 4 +- src/PHPCensor/Command/RebuildCommand.php | 2 +- src/PHPCensor/Command/RebuildQueueCommand.php | 2 +- src/PHPCensor/Command/RunCommand.php | 4 +- src/PHPCensor/Command/UpdateCommand.php | 10 ++-- src/PHPCensor/Command/WorkerCommand.php | 6 +-- src/PHPCensor/Controller.php | 2 +- .../Controller/ProjectController.php | 2 +- .../Controller/SessionController.php | 16 +++--- .../Controller/SettingsController.php | 50 +++++++++---------- src/PHPCensor/Controller/UserController.php | 12 ++--- .../Controller/WebhookController.php | 4 +- src/PHPCensor/Helper/BuildInterpolator.php | 11 ++-- src/PHPCensor/Helper/Email.php | 12 ++--- src/PHPCensor/Helper/Github.php | 10 ++-- src/PHPCensor/Helper/Lang.php | 4 +- src/PHPCensor/Helper/LoginIsDisabled.php | 2 +- src/PHPCensor/Helper/SshKey.php | 2 +- src/PHPCensor/Helper/User.php | 2 +- src/PHPCensor/Languages/lang.da.php | 26 +++++----- src/PHPCensor/Languages/lang.de.php | 26 +++++----- src/PHPCensor/Languages/lang.el.php | 26 +++++----- src/PHPCensor/Languages/lang.en.php | 26 +++++----- src/PHPCensor/Languages/lang.es.php | 26 +++++----- src/PHPCensor/Languages/lang.fr.php | 26 +++++----- src/PHPCensor/Languages/lang.it.php | 26 +++++----- src/PHPCensor/Languages/lang.nl.php | 26 +++++----- src/PHPCensor/Languages/lang.pl.php | 26 +++++----- src/PHPCensor/Languages/lang.ru.php | 26 +++++----- src/PHPCensor/Languages/lang.uk.php | 26 +++++----- src/PHPCensor/Model/Build.php | 5 ++ src/PHPCensor/Model/Build/GithubBuild.php | 8 +-- src/PHPCensor/Plugin/Pdepend.php | 2 +- src/PHPCensor/Plugin/TechnicalDebt.php | 1 + src/PHPCensor/Service/BuildService.php | 6 +-- src/PHPCensor/View/BuildStatus/view.phtml | 2 +- src/PHPCensor/View/BuildsTable.phtml | 2 +- src/PHPCensor/View/ProjectForm.phtml | 2 +- src/PHPCensor/View/Session.phtml | 6 +-- src/PHPCensor/View/Settings/index.phtml | 12 ++--- src/PHPCensor/View/User/index.phtml | 2 +- src/PHPCensor/View/layout.phtml | 18 +++---- src/PHPCensor/Worker/BuildWorker.php | 2 +- .../Command/CreateAdminCommandTest.php | 2 +- .../Command/CreateBuildCommandTest.php | 2 +- .../PHPCensor/Command/InstallCommandTest.php | 6 +-- tests/PHPCensor/Plugin/EmailTest.php | 2 +- tests/PHPCensor/Plugin/PharTest.php | 16 +++--- .../Util/ComposerPluginInformationTest.php | 8 +-- tests/PHPCensor/Plugin/Util/ExecutorTest.php | 2 +- .../Plugin/Util/Fake/ExamplePluginFull.php | 5 +- tests/bootstrap.php | 2 +- 76 files changed, 357 insertions(+), 348 deletions(-) rename public/assets/js/{phpci.js => app.js} (95%) diff --git a/app/config.example.yml b/app/config.example.yml index a9f05ab2..6bd101ca 100644 --- a/app/config.example.yml +++ b/app/config.example.yml @@ -3,11 +3,11 @@ b8: servers: read: localhost write: localhost - name: phpci - username: root - password: root -phpci: - url: 'http://phpci.local' + name: php-censor-db + username: php-censor-user + password: php-censor-password +php-censor: + url: 'http://php-censor.local' worker: host: localhost - queue: phpci + queue: php-censor-queue diff --git a/app/phinx.php b/app/phinx.php index 6b901faa..e2a5dc7e 100644 --- a/app/phinx.php +++ b/app/phinx.php @@ -22,8 +22,8 @@ $conf = [ ], 'environments' => [ 'default_migration_table' => 'migration', - 'default_database' => 'phpci', - 'phpci' => [ + 'default_database' => 'php-censor', + 'php-censor' => [ 'adapter' => 'mysql', 'host' => end($writeServers), 'name' => $config->get('b8.database.name'), diff --git a/bootstrap.php b/bootstrap.php index 09aaa45e..27087f69 100644 --- a/bootstrap.php +++ b/bootstrap.php @@ -59,7 +59,7 @@ if (file_exists($configFile)) { } if (!defined('APP_URL') && !empty($config)) { - define('APP_URL', $config->get('phpci.url', '') . '/'); + define('APP_URL', $config->get('php-censor.url', '') . '/'); } if (!defined('IS_CONSOLE')) { diff --git a/docs/en/config.md b/docs/en/config.md index d0b169a2..50c41c73 100644 --- a/docs/en/config.md +++ b/docs/en/config.md @@ -1,7 +1,7 @@ Adding PHP Censor Support to Your Projects ------------------------------------------ -Similar to Travis CI, to support PHP Censor in your project, you simply need to add a `phpci.yml` file to the root of +Similar to Travis CI, to support PHP Censor in your project, you simply need to add a `.php-censor.yml` (`phpci.yml` for backward compatibility with PHPCI) file to the root of your repository. The file should look something like this: ```yml diff --git a/docs/en/configuring.md b/docs/en/configuring.md index ead4b194..b5c30077 100644 --- a/docs/en/configuring.md +++ b/docs/en/configuring.md @@ -3,11 +3,11 @@ Configuring PHP Censor The PHP Censor configuration on the server is automatically generated into the `config.yml` file during installation. One might need to also edit the file manually. -For example, one could log into phpci and go into the settings to disable it. But if you have already set up a username/password pair and have forgotten the password, and if the server is on a local network, and it's not sending the `forgot password` email, then editing the config file manually would be handy. To do so, just edit the `phpci` section in the config file (which is in [yaml format](https://en.wikipedia.org/wiki/YAML)), and add +For example, one could log into PHP Censor and go into the settings to disable it. But if you have already set up a username/password pair and have forgotten the password, and if the server is on a local network, and it's not sending the `forgot password` email, then editing the config file manually would be handy. To do so, just edit the `php-censor` section in the config file (which is in [yaml format](https://en.wikipedia.org/wiki/YAML)), and add - phpci: + php-censor: authentication_settings: state: 1 user_id: 1 -where you can get the user_id by logging into the mysql database and selecting your user ID from the `users` table in the `phpci` database. +where you can get the user_id by logging into the mysql database and selecting your user ID from the `users` table in the PHP Censor database. diff --git a/docs/en/installing.md b/docs/en/installing.md index 515c6a0f..0880aab1 100644 --- a/docs/en/installing.md +++ b/docs/en/installing.md @@ -19,7 +19,7 @@ Installing PHP Censor from Composer * Download Composer if you haven't already: `curl -sS https://getcomposer.org/installer | php` * Download PHP Censor: `./composer.phar create-project corpsee/php-censor php-censor --keep-vcs --no-dev` * Go to the newly created PHP Censor directory, and install Composer dependencies: `cd php-censor && ../composer.phar install` -* Run the PHP Censor installer: `./console phpci:install` +* Run the PHP Censor installer: `./console php-censor:install` * [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor. * [Set up the PHP Censor Worker](workers/worker.md), or you can run builds using the [daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHP Censor builds. @@ -30,6 +30,6 @@ Installing PHP Censor Manually * [Download PHP Censor](https://github.com/corpsee/php-censor/releases/latest) and unzip it. * Go to the PHP Censor directory: `cd /var/www/php-censor` * Install dependencies using Composer: `composer install` -* Install PHP Censor itself: `php ./console phpci:install` +* Install PHP Censor itself: `./console php-censor:install` * [Add a virtual host to your web server](virtual_host.md), pointing to the `public` directory within your new PHP Censor directory. You'll need to set up rewrite rules to point all non-existent requests to PHP Censor. * [Set up the PHP Censor Worker](workers/worker.md), or you can run builds using the [daemon](workers/daemon.md) or [a cron-job](workers/cron.md) to run PHP Censor builds. diff --git a/docs/en/logging.md b/docs/en/logging.md index 08e9a315..1b360b2f 100644 --- a/docs/en/logging.md +++ b/docs/en/logging.md @@ -4,7 +4,7 @@ Setting up Logging Basics ====== -The phpci codebase makes use of the [psr3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) logging standard. By default we use [Monolog](https://github.com/Seldaek/monolog) to handle the actual work implementing this standard. +The PHP Censor codebase makes use of the [PSR3](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-3-logger-interface.md) logging standard. By default we use [Monolog](https://github.com/Seldaek/monolog) to handle the actual work implementing this standard. How to Setup Logging (For people running a PHP Censor instance) =============================================================== @@ -22,9 +22,9 @@ return array( } ); ``` -This file should return an array of key value pairs. Each key tells phpci which command to attach the logger to (the underscore is a special value which matches all commands). For each command an array of [Monolog](https://github.com/Seldaek/monolog) handlers should be returned. In the example above we've used one that simply writes to the file system but in practise this could be any handler written for monolog. +This file should return an array of key value pairs. Each key tells PHP Censor which command to attach the logger to (the underscore is a special value which matches all commands). For each command an array of [Monolog](https://github.com/Seldaek/monolog) handlers should be returned. In the example above we've used one that simply writes to the file system but in practise this could be any handler written for monolog. -Once this file is created all plugins and core phpci functionality should start writing to the configured handlers. +Once this file is created all plugins and core PHP Censor functionality should start writing to the configured handlers. How to write to the Log (For people creating a new plugin) ========================================================== diff --git a/docs/en/plugins/codeception.md b/docs/en/plugins/codeception.md index db4e07e3..b0ed7f2a 100644 --- a/docs/en/plugins/codeception.md +++ b/docs/en/plugins/codeception.md @@ -10,7 +10,7 @@ Configuration * **config** - Required - Can be either a single string pointing to a Codeception configuration file, or an array of configuration file paths. By default this is called `codeception.yml` and will be in the root of your project. -* **args** - Optional - The string of arguments to be passed to the run command. **Important**, due to the assumption made on line [132](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L132) regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line [146](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L146) +* **args** - Optional - The string of arguments to be passed to the run command.**Important**, due to the assumption made on line [132](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L132) regarding the value of `--xml` being the next argument which will not be correct if the user provides arguments using this config param, you must specify `report.xml` before any user input arguments to satisfy the report processing on line [146](https://github.com/Block8/PHPCI/blob/master/PHPCI/Plugin/Codeception.php#L146) * **path** - Optional - The path from the root of your project to the root of the codeception _output directory diff --git a/docs/en/plugins/slack_notify.md b/docs/en/plugins/slack_notify.md index cd23a935..119b80f7 100644 --- a/docs/en/plugins/slack_notify.md +++ b/docs/en/plugins/slack_notify.md @@ -11,7 +11,7 @@ Configuration | Field | Required? | Description | |-------|-----------|-------------| | `webhook_url` | Yes | The URL to your Slack WebHook | -| `room` | No | Your Slack room name. Default - #phpci | +| `room` | No | Your Slack room name. Default - #php-censor | | `username` | No | The name to send the message as. Default - PHP Censor | | `icon` | No | The URL to the user icon or an emoji such as :ghost:. Default - The value configured on Slack's WebHook setup | | `message` | No | The message to send to the room. Default - `<%PROJECT_URI%|%PROJECT_TITLE%> - <%BUILD_URI%|Build #%BUILD%> has finished for commit <%COMMIT_URI%|%SHORT_COMMIT% (%COMMIT_EMAIL%)> on branch <%BRANCH_URI%|%BRANCH%>` | diff --git a/docs/en/plugins/xmpp.md b/docs/en/plugins/xmpp.md index e9448ca2..7e61a315 100644 --- a/docs/en/plugins/xmpp.md +++ b/docs/en/plugins/xmpp.md @@ -10,7 +10,7 @@ Installation ============ 1. On debian system (for example) use aptitude command to install sendxmpp -2. Add XMPP plugin in "complete" section of your phpci.yml +2. Add XMPP plugin in "complete" section of your `php-censor.yml` Configuration ============= diff --git a/docs/en/updating.md b/docs/en/updating.md index 039e3fdf..74a5380c 100644 --- a/docs/en/updating.md +++ b/docs/en/updating.md @@ -5,7 +5,7 @@ Updating PHP Censor to the latest release, or even dev-master updates is somethi 1. Go to your PHP Censor root folder in a Terminal. 2. Pull the latest code. This would look like this: `git pull` -3. Update the PHP Censor database: `./console phpci:update` +3. Update the PHP Censor database: `./console php-censor:update` 4. Update the composer and its packages: `composer self-update && composer update` 5. Return to the PHP Censor admin screens and check your desired plugins are still installed correctly. 7. Run a build to make sure everything is working as expected. diff --git a/docs/en/workers/cron.md b/docs/en/workers/cron.md index 526c0bae..2c31ccfc 100644 --- a/docs/en/workers/cron.md +++ b/docs/en/workers/cron.md @@ -11,7 +11,10 @@ Setting up the Cron Job You'll want to set up PHP Censor to run as a regular cronjob, so run `crontab -e` and enter the following: ```sh +* * * * * /usr/bin/php /path/to/phpci/console php-censor:run-builds + +# For backward compatibility with PHPCI * * * * * /usr/bin/php /path/to/phpci/console phpci:run-builds ``` -**Note:** Make sure you change the `/path/to/phpci` to the directory in which you installed PHP Censor, and update the PHP path if necessary. +**Note:** Make sure you change the `/path/to/php-censor` to the directory in which you installed PHP Censor, and update the PHP path if necessary. diff --git a/docs/en/workers/worker.md b/docs/en/workers/worker.md index 4bf97391..bed45755 100644 --- a/docs/en/workers/worker.md +++ b/docs/en/workers/worker.md @@ -18,13 +18,13 @@ Setting up the PHP Censor worker ### On a new installation -Setting up the worker on a new installation of PHP Censor is as simple as entering the appropriate values for your Beanstalkd server hostname and queue name when running the PHP Censor installer. By default, the installer assumes that you'll be using beanstalkd on `localhost` and will use the queue name `phpci`. +Setting up the worker on a new installation of PHP Censor is as simple as entering the appropriate values for your Beanstalkd server hostname and queue name when running the PHP Censor installer. By default, the installer assumes that you'll be using beanstalkd on `localhost` and will use the queue name `php-censor-queue`. ![PHP Censor Worker Installer](https://www.phptesting.org/media/render/f48f63699a04444630352643af18b643) ### On an existing installation -On an existing installation, to set up the worker, you simply need to add the beanstalkd host and queue names directly into your `config.yml` file. You should add a `worker` key beneath the `phpci` section, with the properties `host` and `queue` as outlined in the screenshot below: +On an existing installation, to set up the worker, you simply need to add the beanstalkd host and queue names directly into your `config.yml` file. You should add a `worker` key beneath the `php-censor` section, with the properties `host` and `queue` as outlined in the screenshot below: ![PHP Censor Worker Config](https://www.phptesting.org/media/render/9a88e9298670f2913f5798e68b94c9ed) @@ -33,7 +33,7 @@ Running the PHP Censor worker Once you've set up PHP Censor to add your jobs to a beanstalkd queue, you need to start the worker so that it can pick up and run your builds. On most servers, it is best to manage this using supervisord. The following instructions work on Ubuntu, but will need slight amendments for other distributions. -Using your preferred text editor, create a file named `phpci.conf` under `/etc/supervisor/conf.d`. In it, enter the following config: +Using your preferred text editor, create a file named `php-censor.conf` under `/etc/supervisor/conf.d`. In it, enter the following config: ``` [program:phpci] @@ -48,9 +48,9 @@ environment=HOME="/home/phpci",USER="phpci" numprocs=2 ``` -You'll need to edit the '/path/to/phpci', the `user` value and the `environment` value to suit your server. The user needs to be an actual system user with suitable permissions to execute PHP and PHP Censor. +You'll need to edit the '/path/to/php-censor', the `user` value and the `environment` value to suit your server. The user needs to be an actual system user with suitable permissions to execute PHP and PHP Censor. -Once you've created this file, simply restart supervisord using the command `service supervisor restart` and 2 instances of PHP Censor's worker should start immediately. You can verify this by running the command `ps aux | grep phpci`, which should give you output as follows: +Once you've created this file, simply restart supervisord using the command `service supervisor restart` and 2 instances of PHP Censor's worker should start immediately. You can verify this by running the command `ps aux | grep php-censor`, which should give you output as follows: ``` ➜ ~ ps aux | grep phpci diff --git a/public/assets/css/AdminLTE-custom.css b/public/assets/css/AdminLTE-custom.css index db061a5c..281517f5 100644 --- a/public/assets/css/AdminLTE-custom.css +++ b/public/assets/css/AdminLTE-custom.css @@ -1,4 +1,4 @@ -.phpci .main-header .logo, .phpci .main-header .logo:hover { +.app-layout .main-header .logo, .app-layout .main-header .logo:hover { background-image: url('/assets/img/php-censor-logo.png'); background-repeat: no-repeat; background-size: 40%; diff --git a/public/assets/js/phpci.js b/public/assets/js/app.js similarity index 95% rename from public/assets/js/phpci.js rename to public/assets/js/app.js index b767fe5f..df0fa789 100644 --- a/public/assets/js/phpci.js +++ b/public/assets/js/app.js @@ -56,28 +56,28 @@ var PHPCensor = { }, updateHeaderBuilds: function (data) { - $('.phpci-pending-list').empty(); - $('.phpci-running-list').empty(); + $('.app-pending-list').empty(); + $('.app-running-list').empty(); if (!data.pending.count) { - $('.phpci-pending').hide(); + $('.app-pending').hide(); } else { - $('.phpci-pending').show(); - $('.phpci-pending .header').text(Lang.get('n_builds_pending', data.pending.count)); + $('.app-pending').show(); + $('.app-pending .header').text(Lang.get('n_builds_pending', data.pending.count)); $.each(data.pending.items, function (idx, build) { - $('.phpci-pending-list').append(build.header_row); + $('.app-pending-list').append(build.header_row); }); } if (!data.running.count) { - $('.phpci-running').hide(); + $('.app-running').hide(); } else { - $('.phpci-running').show(); - $('.phpci-running .header').text(Lang.get('n_builds_running', data.running.count)); + $('.app-running').show(); + $('.app-running .header').text(Lang.get('n_builds_running', data.running.count)); $.each(data.running.items, function (idx, build) { - $('.phpci-running-list').append(build.header_row); + $('.app-running-list').append(build.header_row); }); } diff --git a/public/assets/js/build.js b/public/assets/js/build.js index c1c24120..d4fd8433 100644 --- a/public/assets/js/build.js +++ b/public/assets/js/build.js @@ -116,13 +116,13 @@ var Build = Class.extend({ renderOrder.push($(this).attr('id')); }); - localStorage.setItem('phpci-plugin-order', JSON.stringify(renderOrder)); + localStorage.setItem('app-plugin-order', JSON.stringify(renderOrder)); }, renderPlugins: function() { var self = this; var rendered = []; - var renderOrder = localStorage.getItem('phpci-plugin-order'); + var renderOrder = localStorage.getItem('app-plugin-order'); if (renderOrder) { renderOrder = JSON.parse(renderOrder); @@ -135,7 +135,7 @@ var Build = Class.extend({ // Plugins have changed, clear the order. if (typeof self.plugins[key] == 'undefined') { - localStorage.setItem('phpci-plugin-order', []); + localStorage.setItem('app-plugin-order', []); } self.renderPlugin(self.plugins[key]); diff --git a/public/assets/js/init.js b/public/assets/js/init.js index 45e978ab..75cb36c5 100644 --- a/public/assets/js/init.js +++ b/public/assets/js/init.js @@ -16,7 +16,7 @@ $(function () { }); function bindAppDeleteEvents () { - $('.phpci-app-delete-build').on('click', function (e) { + $('.app-delete-build').on('click', function (e) { e.preventDefault(); confirmDelete(e.target.href, 'Build').onClose = function () { @@ -26,7 +26,7 @@ function bindAppDeleteEvents () { return false; }); - $('.phpci-app-delete-user').on('click', function (e) { + $('.app-delete-user').on('click', function (e) { e.preventDefault(); confirmDelete(e.target.href, 'User', true); diff --git a/src/PHPCensor/Application.php b/src/PHPCensor/Application.php index 632ded94..6eebdb9e 100644 --- a/src/PHPCensor/Application.php +++ b/src/PHPCensor/Application.php @@ -37,15 +37,15 @@ class Application extends b8\Application // Inlined as a closure to fix "using $this when not in object context" on 5.3 $validateSession = function () { - if (!empty($_SESSION['phpci_user_id'])) { - $user = b8\Store\Factory::getStore('User')->getByPrimaryKey($_SESSION['phpci_user_id']); + if (!empty($_SESSION['php-censor-user-id'])) { + $user = b8\Store\Factory::getStore('User')->getByPrimaryKey($_SESSION['php-censor-user-id']); if ($user) { - $_SESSION['phpci_user'] = $user; + $_SESSION['php-censor-user'] = $user; return true; } - unset($_SESSION['phpci_user_id']); + unset($_SESSION['php-censor-user-id']); } return false; @@ -62,7 +62,7 @@ class Application extends b8\Application $response->setResponseCode(401); $response->setContent(''); } else { - $_SESSION['phpci_login_redirect'] = substr($request->getPath(), 1); + $_SESSION['php-censor-login-redirect'] = substr($request->getPath(), 1); $response = new RedirectResponse($response); $response->setHeader('Location', APP_URL . 'session/login'); } @@ -156,15 +156,15 @@ class Application extends b8\Application protected function shouldSkipAuth() { $config = b8\Config::getInstance(); - $state = (bool)$config->get('phpci.authentication_settings.state', false); - $userId = $config->get('phpci.authentication_settings.user_id', 0); + $state = (bool)$config->get('php-censor.authentication_settings.state', false); + $userId = $config->get('php-censor.authentication_settings.user_id', 0); if (false !== $state && 0 != (int)$userId) { $user = b8\Store\Factory::getStore('User') ->getByPrimaryKey($userId); if ($user) { - $_SESSION['phpci_user'] = $user; + $_SESSION['php-censor-user'] = $user; return true; } } diff --git a/src/PHPCensor/Builder.php b/src/PHPCensor/Builder.php index 61480aed..f6836b38 100644 --- a/src/PHPCensor/Builder.php +++ b/src/PHPCensor/Builder.php @@ -136,7 +136,7 @@ class Builder implements LoggerAwareInterface public function setConfigArray($config) { if (is_null($config) || !is_array($config)) { - throw new \Exception(Lang::get('missing_phpci_yml')); + throw new \Exception(Lang::get('missing_app_yml')); } $this->config = $config; @@ -429,7 +429,7 @@ class Builder implements LoggerAwareInterface $pluginFactory->registerResource( function () use ($self) { - $factory = new MailerFactory($self->getSystemConfig('phpci')); + $factory = new MailerFactory($self->getSystemConfig('php-censor')); return $factory->getSwiftMailerFromConfig(); }, null, diff --git a/src/PHPCensor/Command/CreateAdminCommand.php b/src/PHPCensor/Command/CreateAdminCommand.php index 208f9b68..e151847f 100644 --- a/src/PHPCensor/Command/CreateAdminCommand.php +++ b/src/PHPCensor/Command/CreateAdminCommand.php @@ -44,7 +44,7 @@ class CreateAdminCommand extends Command protected function configure() { $this - ->setName('phpci:create-admin') + ->setName('php-censor:create-admin') ->setDescription(Lang::get('create_admin_user')); } diff --git a/src/PHPCensor/Command/CreateBuildCommand.php b/src/PHPCensor/Command/CreateBuildCommand.php index 1ee1adb7..134cf186 100644 --- a/src/PHPCensor/Command/CreateBuildCommand.php +++ b/src/PHPCensor/Command/CreateBuildCommand.php @@ -53,7 +53,7 @@ class CreateBuildCommand extends Command protected function configure() { $this - ->setName('phpci:create-build') + ->setName('php-censor:create-build') ->setDescription(Lang::get('create_build_project')) ->addArgument('projectId', InputArgument::REQUIRED, Lang::get('project_id_argument')) ->addOption('commit', null, InputOption::VALUE_OPTIONAL, Lang::get('commit_id_option')) diff --git a/src/PHPCensor/Command/DaemonCommand.php b/src/PHPCensor/Command/DaemonCommand.php index 449c27d6..f31a4b6f 100644 --- a/src/PHPCensor/Command/DaemonCommand.php +++ b/src/PHPCensor/Command/DaemonCommand.php @@ -58,7 +58,7 @@ class DaemonCommand extends Command protected function configure() { $this - ->setName('phpci:daemon') + ->setName('php-censor:daemon') ->setDescription('Initiates the daemon to run commands.') ->addArgument( 'state', InputArgument::REQUIRED, 'start|stop|status' @@ -113,7 +113,7 @@ class DaemonCommand extends Command $this->logger->info("Trying to start the daemon"); - $cmd = "nohup %sdaemonise phpci:daemonise > %s 2>&1 &"; + $cmd = "nohup %sdaemonise php-censor:daemonise > %s 2>&1 &"; $command = sprintf($cmd, BIN_DIR, $this->logFilePath); $output = $exitCode = null; exec($command, $output, $exitCode); diff --git a/src/PHPCensor/Command/DaemoniseCommand.php b/src/PHPCensor/Command/DaemoniseCommand.php index 8f5d03ab..48f2300e 100644 --- a/src/PHPCensor/Command/DaemoniseCommand.php +++ b/src/PHPCensor/Command/DaemoniseCommand.php @@ -56,7 +56,7 @@ class DaemoniseCommand extends Command protected function configure() { $this - ->setName('phpci:daemonise') + ->setName('php-censor:daemonise') ->setDescription('Starts the daemon to run commands.'); } diff --git a/src/PHPCensor/Command/InstallCommand.php b/src/PHPCensor/Command/InstallCommand.php index f849795b..95fb8b10 100644 --- a/src/PHPCensor/Command/InstallCommand.php +++ b/src/PHPCensor/Command/InstallCommand.php @@ -40,7 +40,7 @@ class InstallCommand extends Command $defaultPath = APP_DIR . 'config.yml'; $this - ->setName('phpci:install') + ->setName('php-censor:install') ->addOption('url', null, InputOption::VALUE_OPTIONAL, Lang::get('installation_url')) ->addOption('db-host', null, InputOption::VALUE_OPTIONAL, Lang::get('db_host')) ->addOption('db-port', null, InputOption::VALUE_OPTIONAL, Lang::get('db_port')) @@ -54,7 +54,7 @@ class InstallCommand extends Command ->addOption('queue-disabled', null, InputOption::VALUE_NONE, 'Don\'t ask for queue details') ->addOption('queue-server', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue server hostname') ->addOption('queue-name', null, InputOption::VALUE_OPTIONAL, 'Beanstalkd queue name') - ->setDescription(Lang::get('install_phpci')); + ->setDescription(Lang::get('install_app')); } /** @@ -70,7 +70,7 @@ class InstallCommand extends Command $output->writeln(''); $output->writeln('******************'); - $output->writeln(' '.Lang::get('welcome_to_phpci').''); + $output->writeln(' '.Lang::get('welcome_to_app').''); $output->writeln('******************'); $output->writeln(''); @@ -99,7 +99,7 @@ class InstallCommand extends Command // ---- // Get basic installation details (URL, etc) // ---- - $conf['phpci'] = $this->getPhpciConfigInformation($input, $output); + $conf['php-censor'] = $this->getConfigInformation($input, $output); $this->writeConfigFile($conf); $this->setupDatabase($output); @@ -121,7 +121,7 @@ class InstallCommand extends Command // Check PHP version: if (!(version_compare(PHP_VERSION, '5.3.8') >= 0)) { $output->writeln(''); - $output->writeln(''.Lang::get('phpci_php_req').''); + $output->writeln(''.Lang::get('app_php_req').''); $errors = true; } @@ -217,9 +217,9 @@ class InstallCommand extends Command * @param OutputInterface $output * @return array */ - protected function getPhpciConfigInformation(InputInterface $input, OutputInterface $output) + protected function getConfigInformation(InputInterface $input, OutputInterface $output) { - $phpci = []; + $config = []; /** @var $helper QuestionHelper */ $helper = $this->getHelperSet()->get('question'); @@ -235,15 +235,15 @@ class InstallCommand extends Command if ($url = $input->getOption('url')) { $url = $urlValidator($url); } else { - $question = new Question(Lang::get('enter_phpci_url')); + $question = new Question(Lang::get('enter_app_url')); $question->setValidator($urlValidator); $url = $helper->ask($input, $output, $question); } - $phpci['url'] = $url; - $phpci['worker'] = $this->getQueueInformation($input, $output, $helper); + $config['url'] = $url; + $config['worker'] = $this->getQueueInformation($input, $output, $helper); - return $phpci; + return $config; } /** @@ -275,7 +275,7 @@ class InstallCommand extends Command } if (!$rtn['queue'] = $input->getOption('queue-name')) { - $questionName = new Question('Enter the queue (tube) name to use [phpci]: ', 'phpci'); + $questionName = new Question('Enter the queue (tube) name to use [php-censor-queue]: ', 'php-censor-queue'); $rtn['queue'] = $helper->ask($input, $output, $questionName); } @@ -307,12 +307,12 @@ class InstallCommand extends Command } if (!$dbName = $input->getOption('db-name')) { - $questionDb = new Question(Lang::get('enter_db_name'), 'phpci'); + $questionDb = new Question(Lang::get('enter_db_name'), 'php-censor-db'); $dbName = $helper->ask($input, $output, $questionDb); } if (!$dbUser = $input->getOption('db-user')) { - $questionUser = new Question(Lang::get('enter_db_user'), 'phpci'); + $questionUser = new Question(Lang::get('enter_db_user'), 'php-censor-user'); $dbUser = $helper->ask($input, $output, $questionUser); } diff --git a/src/PHPCensor/Command/PollCommand.php b/src/PHPCensor/Command/PollCommand.php index d7fa8048..cd79d7b3 100644 --- a/src/PHPCensor/Command/PollCommand.php +++ b/src/PHPCensor/Command/PollCommand.php @@ -41,7 +41,7 @@ class PollCommand extends Command protected function configure() { $this - ->setName('phpci:poll-github') + ->setName('php-censor:poll-github') ->setDescription(Lang::get('poll_github')); } @@ -54,7 +54,7 @@ class PollCommand extends Command $yaml = file_get_contents(APP_DIR . 'config.yml'); $this->settings = $parser->parse($yaml); - $token = $this->settings['phpci']['github']['token']; + $token = $this->settings['php-censor']['github']['token']; if (!$token) { $this->logger->error(Lang::get('no_token')); diff --git a/src/PHPCensor/Command/RebuildCommand.php b/src/PHPCensor/Command/RebuildCommand.php index 548fe267..bbc42d38 100644 --- a/src/PHPCensor/Command/RebuildCommand.php +++ b/src/PHPCensor/Command/RebuildCommand.php @@ -58,7 +58,7 @@ class RebuildCommand extends Command protected function configure() { $this - ->setName('phpci:rebuild') + ->setName('php-censor:rebuild') ->setDescription('Re-runs the last run build.'); } diff --git a/src/PHPCensor/Command/RebuildQueueCommand.php b/src/PHPCensor/Command/RebuildQueueCommand.php index 4cd3628d..c1a2af63 100644 --- a/src/PHPCensor/Command/RebuildQueueCommand.php +++ b/src/PHPCensor/Command/RebuildQueueCommand.php @@ -50,7 +50,7 @@ class RebuildQueueCommand extends Command protected function configure() { $this - ->setName('phpci:rebuild-queue') + ->setName('php-censor:rebuild-queue') ->setDescription('Rebuilds the PHP Censor worker queue.'); } diff --git a/src/PHPCensor/Command/RunCommand.php b/src/PHPCensor/Command/RunCommand.php index 5e507745..2b4fede5 100644 --- a/src/PHPCensor/Command/RunCommand.php +++ b/src/PHPCensor/Command/RunCommand.php @@ -64,7 +64,7 @@ class RunCommand extends Command protected function configure() { $this - ->setName('phpci:run-builds') + ->setName('php-censor:run-builds') ->setDescription(Lang::get('run_all_pending')) ->addOption('debug', null, null, 'Run PHP Censor in Debug Mode'); } @@ -159,7 +159,7 @@ class RunCommand extends Command $running = $store->getByStatus(1); $rtn = []; - $timeout = Config::getInstance()->get('phpci.build.failed_after', 1800); + $timeout = Config::getInstance()->get('php-censor.build.failed_after', 1800); foreach ($running['items'] as $build) { /** @var \PHPCI\Model\Build $build */ diff --git a/src/PHPCensor/Command/UpdateCommand.php b/src/PHPCensor/Command/UpdateCommand.php index 20013b7f..180460d1 100644 --- a/src/PHPCensor/Command/UpdateCommand.php +++ b/src/PHPCensor/Command/UpdateCommand.php @@ -38,8 +38,8 @@ class UpdateCommand extends Command protected function configure() { $this - ->setName('phpci:update') - ->setDescription(Lang::get('update_phpci')); + ->setName('php-censor:update') + ->setDescription(Lang::get('update_app')); } /** @@ -51,7 +51,7 @@ class UpdateCommand extends Command return; } - $output->write(Lang::get('updating_phpci')); + $output->write(Lang::get('updating_app')); shell_exec(ROOT_DIR . 'vendor/bin/phinx migrate -c "' . APP_DIR . 'phinx.php"'); @@ -61,8 +61,8 @@ class UpdateCommand extends Command protected function verifyInstalled() { $config = Config::getInstance(); - $phpciUrl = $config->get('phpci.url'); + $url = $config->get('php-censor.url'); - return !empty($phpciUrl); + return !empty($url); } } diff --git a/src/PHPCensor/Command/WorkerCommand.php b/src/PHPCensor/Command/WorkerCommand.php index eea084dd..b3942f58 100644 --- a/src/PHPCensor/Command/WorkerCommand.php +++ b/src/PHPCensor/Command/WorkerCommand.php @@ -49,7 +49,7 @@ class WorkerCommand extends Command protected function configure() { $this - ->setName('phpci:worker') + ->setName('php-censor:worker') ->setDescription('Runs the PHP Censor build worker.') ->addOption('debug', null, null, 'Run PHP Censor in Debug Mode'); } @@ -72,7 +72,7 @@ class WorkerCommand extends Command define('DEBUG_MODE', true); } - $config = Config::getInstance()->get('phpci.worker', []); + $config = Config::getInstance()->get('php-censor.worker', []); if (empty($config['host']) || empty($config['queue'])) { $error = 'The worker is not configured. You must set a host and queue in your config.yml file.'; @@ -81,7 +81,7 @@ class WorkerCommand extends Command $worker = new BuildWorker($config['host'], $config['queue']); $worker->setLogger($this->logger); - $worker->setMaxJobs(Config::getInstance()->get('phpci.worker.max_jobs', -1)); + $worker->setMaxJobs(Config::getInstance()->get('php-censor.worker.max_jobs', -1)); $worker->startWorker(); } } diff --git a/src/PHPCensor/Controller.php b/src/PHPCensor/Controller.php index 4de5105e..2b6f508b 100644 --- a/src/PHPCensor/Controller.php +++ b/src/PHPCensor/Controller.php @@ -125,6 +125,6 @@ class Controller extends \b8\Controller */ protected function currentUserIsAdmin() { - return $_SESSION['phpci_user']->getIsAdmin(); + return $_SESSION['php-censor-user']->getIsAdmin(); } } diff --git a/src/PHPCensor/Controller/ProjectController.php b/src/PHPCensor/Controller/ProjectController.php index d187c516..1b7b792e 100644 --- a/src/PHPCensor/Controller/ProjectController.php +++ b/src/PHPCensor/Controller/ProjectController.php @@ -113,7 +113,7 @@ class ProjectController extends PHPCensor\Controller throw new NotFoundException(Lang::get('project_x_not_found', $projectId)); } - $email = $_SESSION['phpci_user']->getEmail(); + $email = $_SESSION['php-censor-user']->getEmail(); $build = $this->buildService->createBuild($project, null, urldecode($branch), $email); if ($this->buildService->queueError) { diff --git a/src/PHPCensor/Controller/SessionController.php b/src/PHPCensor/Controller/SessionController.php index 863d0f83..089813e5 100644 --- a/src/PHPCensor/Controller/SessionController.php +++ b/src/PHPCensor/Controller/SessionController.php @@ -54,7 +54,7 @@ class SessionController extends Controller if ($user && password_verify($this->getParam('password', ''), $user->getHash())) { session_regenerate_id(true); - $_SESSION['phpci_user_id'] = $user->getId(); + $_SESSION['php-censor-user-id'] = $user->getId(); $response = new b8\Http\Response\RedirectResponse(); $response->setHeader('Location', $this->getLoginRedirect()); return $response; @@ -104,8 +104,8 @@ class SessionController extends Controller */ public function logout() { - unset($_SESSION['phpci_user']); - unset($_SESSION['phpci_user_id']); + unset($_SESSION['php-censor-user']); + unset($_SESSION['php-censor-user-id']); session_destroy(); @@ -166,8 +166,8 @@ class SessionController extends Controller $hash = password_hash($this->getParam('password'), PASSWORD_DEFAULT); $user->setHash($hash); - $_SESSION['phpci_user'] = $this->userStore->save($user); - $_SESSION['phpci_user_id'] = $user->getId(); + $_SESSION['php-censor-user'] = $this->userStore->save($user); + $_SESSION['php-censor-user-id'] = $user->getId(); $response = new b8\Http\Response\RedirectResponse(); $response->setHeader('Location', APP_URL); @@ -188,9 +188,9 @@ class SessionController extends Controller { $rtn = APP_URL; - if (!empty($_SESSION['phpci_login_redirect'])) { - $rtn .= $_SESSION['phpci_login_redirect']; - $_SESSION['phpci_login_redirect'] = null; + if (!empty($_SESSION['php-censor-login-redirect'])) { + $rtn .= $_SESSION['php-censor-login-redirect']; + $_SESSION['php-censor-login-redirect'] = null; } return $rtn; diff --git a/src/PHPCensor/Controller/SettingsController.php b/src/PHPCensor/Controller/SettingsController.php index 8316bd79..89288849 100644 --- a/src/PHPCensor/Controller/SettingsController.php +++ b/src/PHPCensor/Controller/SettingsController.php @@ -57,23 +57,23 @@ class SettingsController extends Controller $this->view->settings = $this->settings; $basicSettings = []; - if (isset($this->settings['phpci']['basic'])) { - $basicSettings = $this->settings['phpci']['basic']; + if (isset($this->settings['php-censor']['basic'])) { + $basicSettings = $this->settings['php-censor']['basic']; } $buildSettings = []; - if (isset($this->settings['phpci']['build'])) { - $buildSettings = $this->settings['phpci']['build']; + if (isset($this->settings['php-censor']['build'])) { + $buildSettings = $this->settings['php-censor']['build']; } $emailSettings = []; - if (isset($this->settings['phpci']['email_settings'])) { - $emailSettings = $this->settings['phpci']['email_settings']; + if (isset($this->settings['php-censor']['email_settings'])) { + $emailSettings = $this->settings['php-censor']['email_settings']; } $authSettings = []; - if (isset($this->settings['phpci']['authentication_settings'])) { - $authSettings = $this->settings['phpci']['authentication_settings']; + if (isset($this->settings['php-censor']['authentication_settings'])) { + $authSettings = $this->settings['php-censor']['authentication_settings']; } $this->view->configFile = APP_DIR . 'config.yml'; @@ -84,8 +84,8 @@ class SettingsController extends Controller $this->view->authenticationSettings = $this->getAuthenticationForm($authSettings); $this->view->isWriteable = $this->canWriteConfig(); - if (!empty($this->settings['phpci']['github']['token'])) { - $this->view->githubUser = $this->getGithubUser($this->settings['phpci']['github']['token']); + if (!empty($this->settings['php-censor']['github']['token'])) { + $this->view->githubUser = $this->getGithubUser($this->settings['php-censor']['github']['token']); } return $this->view->render(); @@ -98,9 +98,9 @@ class SettingsController extends Controller { $this->requireAdmin(); - $this->settings['phpci']['github']['id'] = $this->getParam('githubid', ''); - $this->settings['phpci']['github']['secret'] = $this->getParam('githubsecret', ''); - $error = $this->storeSettings(); + $this->settings['php-censor']['github']['id'] = $this->getParam('githubid', ''); + $this->settings['php-censor']['github']['secret'] = $this->getParam('githubsecret', ''); + $error = $this->storeSettings(); $response = new b8\Http\Response\RedirectResponse(); @@ -120,8 +120,8 @@ class SettingsController extends Controller { $this->requireAdmin(); - $this->settings['phpci']['email_settings'] = $this->getParams(); - $this->settings['phpci']['email_settings']['smtp_encryption'] = $this->getParam('smtp_encryption', 0); + $this->settings['php-censor']['email_settings'] = $this->getParams(); + $this->settings['php-censor']['email_settings']['smtp_encryption'] = $this->getParam('smtp_encryption', 0); $error = $this->storeSettings(); @@ -143,7 +143,7 @@ class SettingsController extends Controller { $this->requireAdmin(); - $this->settings['phpci']['build'] = $this->getParams(); + $this->settings['php-censor']['build'] = $this->getParams(); $error = $this->storeSettings(); @@ -165,7 +165,7 @@ class SettingsController extends Controller { $this->requireAdmin(); - $this->settings['phpci']['basic'] = $this->getParams(); + $this->settings['php-censor']['basic'] = $this->getParams(); $error = $this->storeSettings(); $response = new b8\Http\Response\RedirectResponse(); @@ -186,8 +186,8 @@ class SettingsController extends Controller { $this->requireAdmin(); - $this->settings['phpci']['authentication_settings']['state'] = $this->getParam('disable_authentication', 0); - $this->settings['phpci']['authentication_settings']['user_id'] = $_SESSION['phpci_user_id']; + $this->settings['php-censor']['authentication_settings']['state'] = $this->getParam('disable_authentication', 0); + $this->settings['php-censor']['authentication_settings']['user_id'] = $_SESSION['php-censor-user-id']; $error = $this->storeSettings(); @@ -208,7 +208,7 @@ class SettingsController extends Controller public function githubCallback() { $code = $this->getParam('code', null); - $github = $this->settings['phpci']['github']; + $github = $this->settings['php-censor']['github']; if (!is_null($code)) { $http = new HttpClient(); @@ -219,7 +219,7 @@ class SettingsController extends Controller if ($resp['success']) { parse_str($resp['body'], $resp); - $this->settings['phpci']['github']['token'] = $resp['access_token']; + $this->settings['php-censor']['github']['token'] = $resp['access_token']; $this->storeSettings(); $response = new b8\Http\Response\RedirectResponse(); @@ -269,8 +269,8 @@ class SettingsController extends Controller $field->setContainerClass('form-group'); $form->addField($field); - if (isset($this->settings['phpci']['github']['id'])) { - $field->setValue($this->settings['phpci']['github']['id']); + if (isset($this->settings['php-censor']['github']['id'])) { + $field->setValue($this->settings['php-censor']['github']['id']); } $field = new Form\Element\Text('githubsecret'); @@ -281,8 +281,8 @@ class SettingsController extends Controller $field->setContainerClass('form-group'); $form->addField($field); - if (isset($this->settings['phpci']['github']['secret'])) { - $field->setValue($this->settings['phpci']['github']['secret']); + if (isset($this->settings['php-censor']['github']['secret'])) { + $field->setValue($this->settings['php-censor']['github']['secret']); } $field = new Form\Element\Submit(); diff --git a/src/PHPCensor/Controller/UserController.php b/src/PHPCensor/Controller/UserController.php index ea14dfc8..b25e94a7 100644 --- a/src/PHPCensor/Controller/UserController.php +++ b/src/PHPCensor/Controller/UserController.php @@ -61,7 +61,7 @@ class UserController extends Controller */ public function profile() { - $user = $_SESSION['phpci_user']; + $user = $_SESSION['php-censor-user']; if ($this->request->getMethod() == 'POST') { $name = $this->getParam('name', null); @@ -72,12 +72,12 @@ class UserController extends Controller $chosenLang = $this->getParam('language', $currentLang); if ($chosenLang !== $currentLang) { - setcookie('phpcilang', $chosenLang, time() + (10 * 365 * 24 * 60 * 60), '/'); + setcookie('php-censor-language', $chosenLang, time() + (10 * 365 * 24 * 60 * 60), '/'); Lang::setLanguage($chosenLang); } - $_SESSION['phpci_user'] = $this->userService->updateUser($user, $name, $email, $password); - $user = $_SESSION['phpci_user']; + $_SESSION['php-censor-user'] = $this->userService->updateUser($user, $name, $email, $password); + $user = $_SESSION['php-censor-user']; $this->view->updated = 1; } @@ -87,8 +87,8 @@ class UserController extends Controller $values = $user->getDataArray(); - if (array_key_exists('phpcilang', $_COOKIE)) { - $values['language'] = $_COOKIE['phpcilang']; + if (array_key_exists('php-censor-language', $_COOKIE)) { + $values['language'] = $_COOKIE['php-censor-language']; } $form = new Form(); diff --git a/src/PHPCensor/Controller/WebhookController.php b/src/PHPCensor/Controller/WebhookController.php index fa1b80b7..29405690 100644 --- a/src/PHPCensor/Controller/WebhookController.php +++ b/src/PHPCensor/Controller/WebhookController.php @@ -292,7 +292,7 @@ class WebhookController extends Controller } $headers = []; - $token = Config::getInstance()->get('phpci.github.token'); + $token = Config::getInstance()->get('php-censor.github.token'); if (!empty($token)) { $headers[] = 'Authorization: token ' . $token; @@ -303,7 +303,7 @@ class WebhookController extends Controller $http->setHeaders($headers); //for large pull requests, allow grabbing more then the default number of commits - $custom_per_page = Config::getInstance()->get('phpci.github.per_page'); + $custom_per_page = Config::getInstance()->get('php-censor.github.per_page'); $params = []; if ($custom_per_page) { $params["per_page"] = $custom_per_page; diff --git a/src/PHPCensor/Helper/BuildInterpolator.php b/src/PHPCensor/Helper/BuildInterpolator.php index 3ab9e09a..0229fa50 100644 --- a/src/PHPCensor/Helper/BuildInterpolator.php +++ b/src/PHPCensor/Helper/BuildInterpolator.php @@ -27,11 +27,12 @@ class BuildInterpolator /** * Sets the variables that will be used for interpolation. - * @param Build $build + * + * @param Build $build * @param string $buildPath - * @param string $phpCiUrl + * @param string $url */ - public function setupInterpolationVars(Build $build, $buildPath, $phpCiUrl) + public function setupInterpolationVars(Build $build, $buildPath, $url) { $this->interpolation_vars = []; $this->interpolation_vars['%PHPCI%'] = 1; @@ -45,9 +46,9 @@ class BuildInterpolator $this->interpolation_vars['%PROJECT%'] = $build->getProjectId(); $this->interpolation_vars['%BUILD%'] = $build->getId(); $this->interpolation_vars['%PROJECT_TITLE%'] = $build->getProjectTitle(); - $this->interpolation_vars['%PROJECT_URI%'] = $phpCiUrl . "project/view/" . $build->getProjectId(); + $this->interpolation_vars['%PROJECT_URI%'] = $url . "project/view/" . $build->getProjectId(); $this->interpolation_vars['%BUILD_PATH%'] = $buildPath; - $this->interpolation_vars['%BUILD_URI%'] = $phpCiUrl . "build/view/" . $build->getId(); + $this->interpolation_vars['%BUILD_URI%'] = $url . "build/view/" . $build->getId(); $this->interpolation_vars['%PHPCI_COMMIT%'] = $this->interpolation_vars['%COMMIT%']; $this->interpolation_vars['%PHPCI_SHORT_COMMIT%'] = $this->interpolation_vars['%SHORT_COMMIT%']; $this->interpolation_vars['%PHPCI_COMMIT_MESSAGE%'] = $this->interpolation_vars['%COMMIT_MESSAGE%']; diff --git a/src/PHPCensor/Helper/Email.php b/src/PHPCensor/Helper/Email.php index 3014863c..be345890 100644 --- a/src/PHPCensor/Helper/Email.php +++ b/src/PHPCensor/Helper/Email.php @@ -100,14 +100,14 @@ class Email /** * Send the email. * - * @param Builder $phpci + * @param Builder $builder * * @return bool|int */ - public function send(Builder $phpci) + public function send(Builder $builder) { - $smtpServer = $this->config->get('phpci.email_settings.smtp_address'); - $phpci->logDebug(sprintf("SMTP: '%s'", !empty($smtpServer) ? 'true' : 'false')); + $smtpServer = $this->config->get('php-censor.email_settings.smtp_address'); + $builder->logDebug(sprintf("SMTP: '%s'", !empty($smtpServer) ? 'true' : 'false')); if (empty($smtpServer)) { return $this->sendViaMail(); @@ -152,7 +152,7 @@ class Email */ protected function sendViaSwiftMailer() { - $factory = new MailerFactory($this->config->get('phpci')); + $factory = new MailerFactory($this->config->get('php-censor')); $mailer = $factory->getSwiftMailerFromConfig(); $message = \Swift_Message::newInstance($this->subject) @@ -177,7 +177,7 @@ class Email */ protected function getFrom() { - $email = $this->config->get('phpci.email_settings.from_address', self::DEFAULT_FROM); + $email = $this->config->get('php-censor.email_settings.from_address', self::DEFAULT_FROM); if (empty($email)) { $email = self::DEFAULT_FROM; diff --git a/src/PHPCensor/Helper/Github.php b/src/PHPCensor/Helper/Github.php index 99d21171..a2b46168 100644 --- a/src/PHPCensor/Helper/Github.php +++ b/src/PHPCensor/Helper/Github.php @@ -70,14 +70,14 @@ class Github */ public function getRepositories() { - $token = Config::getInstance()->get('phpci.github.token'); + $token = Config::getInstance()->get('php-censor.github.token'); if (!$token) { return null; } $cache = Cache::getCache(Cache::TYPE_APC); - $rtn = $cache->get('phpci_github_repos'); + $rtn = $cache->get('php-censor-github-repos'); if (!$rtn) { $orgs = $this->makeRequest('/user/orgs', ['access_token' => $token]); @@ -97,7 +97,7 @@ class Github } } - $cache->set('phpci_github_repos', $rtn); + $cache->set('php-censor-github-repos', $rtn); } return $rtn; @@ -115,7 +115,7 @@ class Github */ public function createPullRequestComment($repo, $pullId, $commitId, $file, $line, $comment) { - $token = Config::getInstance()->get('phpci.github.token'); + $token = Config::getInstance()->get('php-censor.github.token'); if (!$token) { return null; @@ -150,7 +150,7 @@ class Github */ public function createCommitComment($repo, $commitId, $file, $line, $comment) { - $token = Config::getInstance()->get('phpci.github.token'); + $token = Config::getInstance()->get('php-censor.github.token'); if (!$token) { return null; diff --git a/src/PHPCensor/Helper/Lang.php b/src/PHPCensor/Helper/Lang.php index 04771261..ed5e2b9f 100644 --- a/src/PHPCensor/Helper/Lang.php +++ b/src/PHPCensor/Helper/Lang.php @@ -132,7 +132,7 @@ class Lang self::loadAvailableLanguages(); // Try cookies first: - if (isset($_COOKIE) && array_key_exists('phpcilang', $_COOKIE) && self::setLanguage($_COOKIE['phpcilang'])) { + if (isset($_COOKIE) && array_key_exists('php-censor-language', $_COOKIE) && self::setLanguage($_COOKIE['php-censor-language'])) { return; } @@ -151,7 +151,7 @@ class Lang } // Try the installation default language: - $language = $config->get('phpci.basic.language', null); + $language = $config->get('php-censor.basic.language', null); if (self::setLanguage($language)) { return; } diff --git a/src/PHPCensor/Helper/LoginIsDisabled.php b/src/PHPCensor/Helper/LoginIsDisabled.php index 18fd81ac..9d07ef95 100644 --- a/src/PHPCensor/Helper/LoginIsDisabled.php +++ b/src/PHPCensor/Helper/LoginIsDisabled.php @@ -30,7 +30,7 @@ class LoginIsDisabled unset($method, $params); $config = Config::getInstance(); - $state = (bool) $config->get('phpci.authentication_settings.state', false); + $state = (bool) $config->get('php-censor.authentication_settings.state', false); return (false !== $state); } diff --git a/src/PHPCensor/Helper/SshKey.php b/src/PHPCensor/Helper/SshKey.php index fd13624d..38e009a4 100644 --- a/src/PHPCensor/Helper/SshKey.php +++ b/src/PHPCensor/Helper/SshKey.php @@ -39,7 +39,7 @@ class SshKey $return = ['private_key' => '', 'public_key' => '']; - $output = @shell_exec('ssh-keygen -t rsa -b 2048 -f '.$keyFile.' -N "" -C "deploy@phpci"'); + $output = @shell_exec('ssh-keygen -t rsa -b 2048 -f '.$keyFile.' -N "" -C "deploy@php-censor"'); if (!empty($output)) { $pub = file_get_contents($keyFile . '.pub'); diff --git a/src/PHPCensor/Helper/User.php b/src/PHPCensor/Helper/User.php index 90affa7f..88d9b416 100644 --- a/src/PHPCensor/Helper/User.php +++ b/src/PHPCensor/Helper/User.php @@ -25,7 +25,7 @@ class User */ public function __call($method, $params = []) { - $user = $_SESSION['phpci_user']; + $user = $_SESSION['php-censor-user']; if (!is_object($user)) { return null; diff --git a/src/PHPCensor/Languages/lang.da.php b/src/PHPCensor/Languages/lang.da.php index b223705a..893d448c 100644 --- a/src/PHPCensor/Languages/lang.da.php +++ b/src/PHPCensor/Languages/lang.da.php @@ -12,7 +12,7 @@ return [ 'language' => 'Sprog', // Log in: - 'log_in_to_phpci' => 'Log ind i PHP Censor', + 'log_in_to_app' => 'Log ind i PHP Censor', 'login_error' => 'Forkert email-adresse eller adgangskode', 'forgotten_password_link' => 'Har du glemt din adgangskode?', 'reset_emailed' => 'Vi har sendt dig en email med et link til at nulstille din adgangskode.', @@ -238,7 +238,7 @@ Services sektionen under dit Bitbucket-repository.', 'github_application' => 'GitHub-applikation', 'github_sign_in' => 'Før du kan bruge GitHub skal du logge ind og give PHP Censor adgang til din konto.', - 'github_phpci_linked' => 'PHP Censor blev tilsluttet din GitHub-konto.', + 'github_app_linked' => 'PHP Censor blev tilsluttet din GitHub-konto.', 'github_where_to_find' => 'Hvor disse findes...', 'github_where_help' => 'Hvis du ejer applikationen du ønsker at bruge kan du finde denne information i applications under indstillinger.', @@ -295,10 +295,10 @@ du kører composer update.', 'admin_pass' => 'Administrator-adgangskode', 'admin_email' => 'Administrators email-adresse', 'config_path' => 'Konfigurations-fil', - 'install_phpci' => 'Installér PHP Censor', - 'welcome_to_phpci' => 'Velkommen til PHP Censor', + 'install_app' => 'Installér PHP Censor', + 'welcome_to_app' => 'Velkommen til PHP Censor', 'please_answer' => 'Besvar venligst følgende spørgsmål:', - 'phpci_php_req' => 'PHP Censor kræver minimum PHP version 5.3.8 for at fungere.', + 'app_php_req' => 'PHP Censor kræver minimum PHP version 5.3.8 for at fungere.', 'extension_required' => 'Extension påkrævet: %s', 'function_required' => 'PHP Censor behøver adgang til funktion %s() i PHP. Er den deaktiveret i php.ini?', 'requirements_not_met' => 'PHP Censor kan ikke installeres da nogle krav ikke opfyldtes. @@ -308,24 +308,24 @@ Kontrollér venligst nedenstående fejl før du fortsætter.', 'enter_name' => 'Administrator-navn: ', 'enter_email' => 'Administrators email-adresse: ', 'enter_password' => 'Administrator-adgangskode: ', - 'enter_phpci_url' => 'Din PHP Censor URL (eksempelvis "http://phpci.local"): ', + 'enter_app_url' => 'Din PHP Censor URL (eksempelvis "http://php-censor.local"): ', 'enter_db_host' => 'Indtast dit MySQL-hostnavn [localhost]: ', - 'enter_db_name' => 'Indtast dit MySQL database-navn [phpci]: ', - 'enter_db_user' => 'Indtast dit MySQL-brugernavn [phpci]: ', + 'enter_db_name' => 'Indtast dit MySQL database-navn [php-censor-db]: ', + 'enter_db_user' => 'Indtast dit MySQL-brugernavn [php-censor-user]: ', 'enter_db_pass' => 'Indtast dit MySQL-password: ', 'could_not_connect' => 'PHP Censor kunne ikke forbinde til MySQL med de angivning oplysninger. Forsøg igen.', 'setting_up_db' => 'Indlæser database...', 'user_created' => 'Brugerkonto oprettet!', 'failed_to_create' => 'PHP Censor kunne ikke oprette din administrator-konto.', 'config_exists' => 'PHP Censor konfigurationsfilen findes og er ikke tom.', - 'update_instead' => 'Hvis du forsøgte at opdatere PHP Censor, forsøg da venligst med phpci:update istedet.', + 'update_instead' => 'Hvis du forsøgte at opdatere PHP Censor, forsøg da venligst med php-censor:update istedet.', // Update - 'update_phpci' => 'Opdatér databasen med ændrede modeller', - 'updating_phpci' => 'Opdaterer PHP Censor-database:', + 'update_app' => 'Opdatér databasen med ændrede modeller', + 'updating_app' => 'Opdaterer PHP Censor-database:', 'not_installed' => 'PHP Censor lader til ikke at være installeret.', - 'install_instead' => 'Installér venligst PHP Censor via phpci:install istedet.', + 'install_instead' => 'Installér venligst PHP Censor via php-censor:install istedet.', // Poll Command 'poll_github' => 'Check via GitHub om et build skal startes.', @@ -354,7 +354,7 @@ Kontrollér venligst nedenstående fejl før du fortsætter.', 'marked_as_failed' => 'Build %d blev markeret som fejlet pga. timeout.', // Builder - 'missing_phpci_yml' => 'Dette projekt har ingen phpci.yml fil, eller filen er tom.', + 'missing_app_yml' => 'Dette projekt har ingen phpci.yml fil, eller filen er tom.', 'build_success' => 'BUILD SUCCES', 'build_failed' => 'BUILD FEJLET', 'removing_build' => 'Fjerner Build', diff --git a/src/PHPCensor/Languages/lang.de.php b/src/PHPCensor/Languages/lang.de.php index 3203a270..8e9c945d 100644 --- a/src/PHPCensor/Languages/lang.de.php +++ b/src/PHPCensor/Languages/lang.de.php @@ -12,7 +12,7 @@ return [ 'language' => 'Sprache', // Log in: - 'log_in_to_phpci' => 'In PHP Censor einloggen', + 'log_in_to_app' => 'In PHP Censor einloggen', 'login_error' => 'Fehlerhafte Emailadresse oder fehlerhaftes Passwort', 'forgotten_password_link' => 'Passwort vergessen?', 'reset_emailed' => 'Wir haben Ihnen einen Link geschickt, um Ihr Passwort zurückzusetzen', @@ -248,7 +248,7 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab 'build_settings' => 'Buildeinstellungen', 'github_application' => 'GitHub-Applikation', 'github_sign_in' => 'Bevor Sie anfangen GitHub zu verwenden, müssen Sie sich erst einloggen und PHP Censor Zugriff auf Ihr Nutzerkonto gewähren', - 'github_phpci_linked' => 'PHP Censor wurde erfolgreich mit Ihrem GitHub-Konto verknüpft.', + 'github_app_linked' => 'PHP Censor wurde erfolgreich mit Ihrem GitHub-Konto verknüpft.', 'github_where_to_find' => 'Wo Sie diese finden...', 'github_where_help' => 'Wenn Sie der Besitzer der Applikation sind, die Sie gerne verwenden möchten, können Sie diese Einstellungen in Ihrem "applications @@ -318,10 +318,10 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab 'admin_pass' => 'Administratorpasswort', 'admin_email' => 'Emailadresse des Administrators', 'config_path' => 'Dateipfad für Konfiguration', - 'install_phpci' => 'PHP Censor installieren', - 'welcome_to_phpci' => 'Willkommen bei PHP Censor', + 'install_app' => 'PHP Censor installieren', + 'welcome_to_app' => 'Willkommen bei PHP Censor', 'please_answer' => 'Bitte beantworten Sie die folgenden Fragen:', - 'phpci_php_req' => 'PHP Censor benötigt mindestens PHP 5.3.8 um zu funktionieren.', + 'app_php_req' => 'PHP Censor benötigt mindestens PHP 5.3.8 um zu funktionieren.', 'extension_required' => 'Benötigte Extensions: %s', 'function_required' => 'PHP Censor muss die Funktion %s() aufrufen können. Ist sie in php.ini deaktiviert?', 'requirements_not_met' => 'PHP Censor konnte nicht installiert werden, weil nicht alle Bedingungen erfüllt sind. @@ -331,24 +331,24 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab 'enter_name' => 'Name des Administrators: ', 'enter_email' => 'Emailadresse des Administrators: ', 'enter_password' => 'Passwort des Administrators: ', - 'enter_phpci_url' => 'Ihre PHP Censor-URL (z.B. "http://phpci.local"): ', + 'enter_app_url' => 'Ihre PHP Censor-URL (z.B. "http://php-censor.local"): ', 'enter_db_host' => 'Bitte geben Sie Ihren MySQL-Host ein [localhost]: ', - 'enter_db_name' => 'Bitte geben Sie Ihren MySQL-Namen ein [phpci]: ', - 'enter_db_user' => 'Bitte geben Sie Ihren MySQL-Benutzernamen ein [phpci]: ', + 'enter_db_name' => 'Bitte geben Sie Ihren MySQL-Namen ein [php-censor-db]: ', + 'enter_db_user' => 'Bitte geben Sie Ihren MySQL-Benutzernamen ein [php-censor-user]: ', 'enter_db_pass' => 'Bitte geben Sie Ihr MySQL-Passwort ein: ', 'could_not_connect' => 'PHP Censor konnte wegen folgender Details nicht mit MySQL verbinden. Bitte versuchen Sie es erneut.', 'setting_up_db' => 'Ihre Datenbank wird aufgesetzt... ', 'user_created' => 'Benutzerkonto wurde erstellt!', 'failed_to_create' => 'PHP Censor konnte Ihr Administratorenkonto nicht erstellen.', 'config_exists' => 'Die PHP Censor-Konfigurationsdatei existiert und ist nicht leer..', - 'update_instead' => 'Falls Sie versucht haben PHP Censor zu aktualisieren, benutzen Sie bitte stattdessen phpci:update.', + 'update_instead' => 'Falls Sie versucht haben PHP Censor zu aktualisieren, benutzen Sie bitte stattdessen php-censor:update.', // Update - 'update_phpci' => 'Datenbank wird aktualisiert, um den Änderungen der Models zu entsprechen.', - 'updating_phpci' => 'Aktualisiere PHP Censor-Datenbank:', + 'update_app' => 'Datenbank wird aktualisiert, um den Änderungen der Models zu entsprechen.', + 'updating_app' => 'Aktualisiere PHP Censor-Datenbank:', 'not_installed' => 'PHP Censor scheint nicht installiert zu sein.', - 'install_instead' => 'Bitte installieren Sie PHP Censor stattdessen via phpci:install.', + 'install_instead' => 'Bitte installieren Sie PHP Censor stattdessen via php-censor:install.', // Poll Command 'poll_github' => 'GitHub abfragen, um herauszufinden, ob ein Build gestartet werden muss.', @@ -377,7 +377,7 @@ generiert. Um es zu verwenden, fügen Sie einfach den folgenden Public Key im Ab 'marked_as_failed' => 'Build %d wegen Zeitüberschreitung als fehlgeschlagen markiert.', // Builder - 'missing_phpci_yml' => 'Dieses Projekt beinhaltet keine phpci.yml-Datei, oder sie ist leer.', + 'missing_app_yml' => 'Dieses Projekt beinhaltet keine phpci.yml-Datei, oder sie ist leer.', 'build_success' => 'BUILD ERFOLGREICH', 'build_failed' => 'BUILD FEHLGESCHLAGEN', 'removing_build' => 'Entferne Build.', diff --git a/src/PHPCensor/Languages/lang.el.php b/src/PHPCensor/Languages/lang.el.php index 678080bf..c7418389 100644 --- a/src/PHPCensor/Languages/lang.el.php +++ b/src/PHPCensor/Languages/lang.el.php @@ -12,7 +12,7 @@ return [ 'language' => 'Γλώσσα', // Log in: - 'log_in_to_phpci' => 'Είσοδος στο PHP Censor', + 'log_in_to_app' => 'Είσοδος στο PHP Censor', 'login_error' => 'Λάθος διεύθυνση e-mail ή κωδικός πρόσβασης', 'forgotten_password_link' => 'Ξεχάσατε τον κωδικό σας;', 'reset_emailed' => 'Σας έχουμε αποσταλεί ένα σύνδεσμο για να επαναφέρετε τον κωδικό πρόσβασής σας.', @@ -240,7 +240,7 @@ Services του Bitbucket αποθετηρίου σας.', 'github_application' => 'GitHub Εφαρμογή', 'github_sign_in' => 'Πριν αρχίσετε να χρησιμοποιείτε το GitHub, θα πρέπει να συνδεθείται και να δώσει το PHP Censor πρόσβαση στο λογαριασμό σας.', - 'github_phpci_linked' => 'Το PHP Censor συνδέθηκε με επιτυχία με το λογαριασμό Github.', + 'github_app_linked' => 'Το PHP Censor συνδέθηκε με επιτυχία με το λογαριασμό Github.', 'github_where_to_find' => 'Πού να βρείτε αυτά ...', 'github_where_help' => 'Εάν έχετε στην κατοχή σας την εφαρμογή που θέλετε να χρησιμοποιήσετε, μπορείτε να βρείτε αυτές τις πληροφορίες στην περιοχή Ρυθμίσεις εφαρμογών ', @@ -297,10 +297,10 @@ Services του Bitbucket αποθετηρίου σας.', 'admin_pass' => 'Κωδικός πρόσβασης διαχειριστή', 'admin_email' => 'Διεύθυνση email διαχειριστή', 'config_path' => 'Διαδρομή αρχείου ρυθμίσεων', - 'install_phpci' => 'Εγκατάσταση PHP Censor', - 'welcome_to_phpci' => 'Καλώς ήρθατε στο PHP Censor', + 'install_app' => 'Εγκατάσταση PHP Censor', + 'welcome_to_app' => 'Καλώς ήρθατε στο PHP Censor', 'please_answer' => 'Παρακαλώ απαντήστε στις ακόλουθες ερωτήσεις:', - 'phpci_php_req' => 'Το PHP Censor απαιτεί τουλάχιστον την έκδοση PHP 5.3.8 για να λειτουργήσει', + 'app_php_req' => 'Το PHP Censor απαιτεί τουλάχιστον την έκδοση PHP 5.3.8 για να λειτουργήσει', 'extension_required' => 'Απαιτούμενη επέκταση: %s ', 'function_required' => 'Το PHP Censor πρέπει να είναι σε θέση να καλέσει την %s() συνάρτηση. Είναι απενεργοποιημένη στο php.ini;', 'requirements_not_met' => 'Το PHP Censor δεν μπορεί να εγκατασταθεί, καθώς όλες οι απαιτήσεις δεν ικανοποιούνται. @@ -310,24 +310,24 @@ Services του Bitbucket αποθετηρίου σας.', 'enter_name' => 'Όνομα διαχειριστή: ', 'enter_email' => 'Ηλ. Διεύθυνση διαχειριστή: ', 'enter_password' => 'Κωδικός πρόσβασης διαχειριστή: ', - 'enter_phpci_url' => 'Ο URL σύνδεσμος σας για το PHP Censor ("http://phpci.local" για παράδειγμα): ', + 'enter_app_url' => 'Ο URL σύνδεσμος σας για το PHP Censor ("http://php-censor.local" για παράδειγμα): ', 'enter_db_host' => 'Παρακαλώ εισάγετε τον MySQL οικοδεσπότη σας [localhost]: ', - 'enter_db_name' => 'Παρακαλώ εισάγετε το όνομα της MySQL βάσης δεδομένων σας [phpci]: ', - 'enter_db_user' => 'Παρακαλώ εισάγετε το όνομα χρήστη της MySQL σας [phpci]: ', + 'enter_db_name' => 'Παρακαλώ εισάγετε το όνομα της MySQL βάσης δεδομένων σας [php-censor-db]: ', + 'enter_db_user' => 'Παρακαλώ εισάγετε το όνομα χρήστη της MySQL σας [php-censor-user]: ', 'enter_db_pass' => 'Παρακαλώ εισάγετε τον κωδικό χρήστη της MySQL σας: ', 'could_not_connect' => 'Το PHP Censor δεν μπόρεσε να συνδεθεί με την MySQL με τα στοχεία που δώσατε. Παρακαλώ δοκιμάστε ξανά.', 'setting_up_db' => 'Γίνεται ρύθμιση της βάσης δεδομένων σας ...', 'user_created' => 'Λογαριασμός χρήστη δημιουργήθηκε!', 'failed_to_create' => 'Το PHP Censor απέτυχε να δημιουργήσει το λογαριασμό διαχειριστή σας.', 'config_exists' => 'Το αρχείο ρυθμίσεων PHP Censor υπάρχει και δεν είναι άδειο.', - 'update_instead' => 'Εάν προσπαθούσατε να ενημερώσετε PHP Censor, παρακαλούμε χρησιμοποιήστε καλύτερα το phpci:update αντ \'αυτού.', + 'update_instead' => 'Εάν προσπαθούσατε να ενημερώσετε PHP Censor, παρακαλούμε χρησιμοποιήστε καλύτερα το php-censor:update αντ \'αυτού.', // Update - 'update_phpci' => 'Ενημέρωστε την βάση δεδομένων ώστε να αντικατοπτρίζει τροποποιημένα μοντέλα.', - 'updating_phpci' => 'Γίνεται ενημέρωση της βάσης δεδομένων PHP Censor:', + 'update_app' => 'Ενημέρωστε την βάση δεδομένων ώστε να αντικατοπτρίζει τροποποιημένα μοντέλα.', + 'updating_app' => 'Γίνεται ενημέρωση της βάσης δεδομένων PHP Censor:', 'not_installed' => 'Το PHP Censor δεν φένεται να είναι εγκατεστημένο', - 'install_instead' => 'Παρακαλούμε εγκαταστήστε το PHP Censor καλύτερα με το phpci:install αντ \'αυτού.', + 'install_instead' => 'Παρακαλούμε εγκαταστήστε το PHP Censor καλύτερα με το php-censor:install αντ \'αυτού.', // Poll Command 'poll_github' => 'Δημοσκόπηση στο GitHub για να ελέγξετε αν θα πρέπει να ξεκινήσει μια κατασκευή.', @@ -356,7 +356,7 @@ Services του Bitbucket αποθετηρίου σας.', 'marked_as_failed' => 'Η κατασκεύη %d επισημάνθηκε ως αποτυχημένη λόγω χρονικού ορίου', // Builder - 'missing_phpci_yml' => 'Το έργο δεν περιέχει το αρχείο phpci.yml ή είναι άδειο.', + 'missing_app_yml' => 'Το έργο δεν περιέχει το αρχείο phpci.yml ή είναι άδειο.', 'build_success' => 'ΚΑΤΑΣΚΕΥΗ ΕΠΙΤΥΧΗΣ', 'build_failed' => 'ΚΑΤΑΣΚΕΥΗ ΑΠΕΤΥΧΕ', 'removing_build' => 'Γίνεται αφαίρεση κατασκευής', diff --git a/src/PHPCensor/Languages/lang.en.php b/src/PHPCensor/Languages/lang.en.php index d25c85a4..2380f4c1 100644 --- a/src/PHPCensor/Languages/lang.en.php +++ b/src/PHPCensor/Languages/lang.en.php @@ -12,7 +12,7 @@ return [ 'language' => 'Language', // Log in: - 'log_in_to_phpci' => 'Log in to PHP Censor', + 'log_in_to_app' => 'Log in to PHP Censor', 'login_error' => 'Incorrect email address or password', 'forgotten_password_link' => 'Forgotten your password?', 'reset_emailed' => 'We\'ve emailed you a link to reset your password.', @@ -260,7 +260,7 @@ PHP Censor', 'github_application' => 'GitHub Application', 'github_sign_in' => 'Before you can start using GitHub, you need to sign in and grant PHP Censor access to your account.', - 'github_phpci_linked' => 'PHP Censor is successfully linked to GitHub account.', + 'github_app_linked' => 'PHP Censor is successfully linked to GitHub account.', 'github_where_to_find' => 'Where to find these...', 'github_where_help' => 'If you own the application you would like to use, you can find this information within your applications settings area.', @@ -340,10 +340,10 @@ PHP Censor', 'admin_pass' => 'Admin Password', 'admin_email' => 'Admin Email Address', 'config_path' => 'Config File Path', - 'install_phpci' => 'Install PHP Censor', - 'welcome_to_phpci' => 'Welcome to PHP Censor', + 'install_app' => 'Install PHP Censor', + 'welcome_to_app' => 'Welcome to PHP Censor', 'please_answer' => 'Please answer the following questions:', - 'phpci_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.', + 'app_php_req' => 'PHP Censor requires at least PHP 5.3.8 to function.', 'extension_required' => 'Extension required: %s', 'function_required' => 'PHP Censor needs to be able to call the %s() function. Is it disabled in php.ini?', 'requirements_not_met' => 'PHP Censor cannot be installed, as not all requirements are met. @@ -353,25 +353,25 @@ PHP Censor', 'enter_name' => 'Admin Name: ', 'enter_email' => 'Admin Email: ', 'enter_password' => 'Admin Password: ', - 'enter_phpci_url' => 'Your PHP Censor URL ("http://phpci.local" for example): ', + 'enter_app_url' => 'Your PHP Censor URL ("http://php-censor.local" for example): ', 'enter_db_host' => 'Please enter your MySQL host [localhost]: ', 'enter_db_port' => 'Please enter your MySQL port [3306]: ', - 'enter_db_name' => 'Please enter your MySQL database name [phpci]: ', - 'enter_db_user' => 'Please enter your MySQL username [phpci]: ', + 'enter_db_name' => 'Please enter your MySQL database name [php-censor-db]: ', + 'enter_db_user' => 'Please enter your MySQL username [php-censor-user]: ', 'enter_db_pass' => 'Please enter your MySQL password: ', 'could_not_connect' => 'PHP Censor could not connect to MySQL with the details provided. Please try again.', 'setting_up_db' => 'Setting up your database... ', 'user_created' => 'User account created!', 'failed_to_create' => 'PHP Censor failed to create your admin account.', 'config_exists' => 'The PHP Censor config file exists and is not empty.', - 'update_instead' => 'If you were trying to update PHP Censor, please use phpci:update instead.', + 'update_instead' => 'If you were trying to update PHP Censor, please use php-censor:update instead.', // Update - 'update_phpci' => 'Update the database to reflect modified models.', - 'updating_phpci' => 'Updating PHP Censor database: ', + 'update_app' => 'Update the database to reflect modified models.', + 'updating_app' => 'Updating PHP Censor database: ', 'not_installed' => 'PHP Censor does not appear to be installed.', - 'install_instead' => 'Please install PHP Censor via phpci:install instead.', + 'install_instead' => 'Please install PHP Censor via php-censor:install instead.', // Poll Command 'poll_github' => 'Poll GitHub to check if we need to start a build.', @@ -403,7 +403,7 @@ PHP Censor', 'marked_as_failed' => 'Build %d marked as failed due to timeout.', // Builder - 'missing_phpci_yml' => 'This project does not contain a phpci.yml file, or it is empty.', + 'missing_app_yml' => 'This project does not contain a phpci.yml file, or it is empty.', 'build_success' => 'BUILD SUCCESS', 'build_failed' => 'BUILD FAILED', 'removing_build' => 'Removing Build.', diff --git a/src/PHPCensor/Languages/lang.es.php b/src/PHPCensor/Languages/lang.es.php index a9d6e745..9dc9da69 100644 --- a/src/PHPCensor/Languages/lang.es.php +++ b/src/PHPCensor/Languages/lang.es.php @@ -12,7 +12,7 @@ return [ 'language' => 'Lenguaje', // Log in: - 'log_in_to_phpci' => 'Ingresar a PHP Censor', + 'log_in_to_app' => 'Ingresar a PHP Censor', 'login_error' => 'Email o contraseña incorrectos', 'forgotten_password_link' => '¿Olvidaste tu contraseña?', 'reset_emailed' => 'Te hemos enviado un email para reiniciar tu contraseña.', @@ -235,7 +235,7 @@ PHP Censor', 'github_application' => 'Aplicación GitHub', 'github_sign_in' => 'Antes de comenzar a utilizar GitHub, tienes que ingresar y permitir el acceso a tu cuenta a PHP Censor.', - 'github_phpci_linked' => 'PHP Censor ha sido conectado a tu cuenta GitHub.', + 'github_app_linked' => 'PHP Censor ha sido conectado a tu cuenta GitHub.', 'github_where_to_find' => 'Donde encontrar estos...', 'github_where_help' => 'Si eres priopietario de la aplicaión que quieres usar, puedes encontrar esta información en el área de configuración de aplicaciones.', @@ -291,10 +291,10 @@ PHP Censor', 'admin_pass' => 'Clave del Admin', 'admin_email' => 'Email de Admin', 'config_path' => 'Ruta al archivo config', - 'install_phpci' => 'Instalar PHP Censor', - 'welcome_to_phpci' => 'Bienvenido a PHP Censor', + 'install_app' => 'Instalar PHP Censor', + 'welcome_to_app' => 'Bienvenido a PHP Censor', 'please_answer' => 'Por favor, responde las siguientes preguntas:', - 'phpci_php_req' => 'PHP Censor requiere al menos PHP 5.3.8 para funcionar.', + 'app_php_req' => 'PHP Censor requiere al menos PHP 5.3.8 para funcionar.', 'extension_required' => 'Extensión requerida: %s', 'function_required' => 'PHP Censor debe poder invocar la función %s(). Está deshabilitada en php.ini?', 'requirements_not_met' => 'PHP Censor no pudo ser instalado, ya que no se cumplen todos los requerimientos. @@ -304,24 +304,24 @@ PHP Censor', 'enter_name' => 'Nombre del Admin:', 'enter_email' => 'Email del Admin:', 'enter_password' => 'Contraseña de Admin:', - 'enter_phpci_url' => 'La URL de PHP Censor ("Por ejemplo: http://phpci.local"): ', + 'enter_app_url' => 'La URL de PHP Censor ("Por ejemplo: http://php-censor.local"): ', 'enter_db_host' => 'Por favor, ingresa el servidor MySQL [localhost]: ', - 'enter_db_name' => 'Por favor, ingresa el nombre de la base de datos MySQL [phpci]: ', - 'enter_db_user' => 'Por favor, ingresa el usuario MySQL [phpci]: ', + 'enter_db_name' => 'Por favor, ingresa el nombre de la base de datos MySQL [php-censor-db]: ', + 'enter_db_user' => 'Por favor, ingresa el usuario MySQL [php-censor-user]: ', 'enter_db_pass' => 'Por favor, ingresa la contraseña MySQL: ', 'could_not_connect' => 'PHP Censor no pudo conectarse a MySQL con los datos dados. Por favor, intenta nuevamente.', 'setting_up_db' => 'Configurando base de datos... ', 'user_created' => '¡Cuenta de usuario creada!', 'failed_to_create' => 'PHP Censor no pudo crear la cuenta de admin.', 'config_exists' => 'El archivo config de PHP Censor ya existe y no es vacío.', - 'update_instead' => 'Si está intentando actualizar PHP Censor, por favor, utiliza phpci:update.', + 'update_instead' => 'Si está intentando actualizar PHP Censor, por favor, utiliza php-censor:update.', // Update - 'update_phpci' => 'Actuliza la base de datos para reflejar los modelos actualizados.', - 'updating_phpci' => 'Actualizando base de datos PHP Censor: ', + 'update_app' => 'Actuliza la base de datos para reflejar los modelos actualizados.', + 'updating_app' => 'Actualizando base de datos PHP Censor: ', 'not_installed' => 'PHP Censor no está instalado.', - 'install_instead' => 'Por favor, instala PHP Censor via phpci:install.', + 'install_instead' => 'Por favor, instala PHP Censor via php-censor:install.', // Poll Command 'poll_github' => 'Chequear en GitHub si se necesita comenzar un Build.', @@ -344,7 +344,7 @@ PHP Censor', 'marked_as_failed' => 'Build %d falló debido a timeout.', // Builder - 'missing_phpci_yml' => 'Este proyecto no contiene el archivo phpci.yml o está vacío.', + 'missing_app_yml' => 'Este proyecto no contiene el archivo phpci.yml o está vacío.', 'build_success' => 'BUILD EXITOSO', 'build_failed' => 'BUILD FALLIDO', 'removing_build' => 'Eliminando Build.', diff --git a/src/PHPCensor/Languages/lang.fr.php b/src/PHPCensor/Languages/lang.fr.php index 33d9a6fc..b49ab357 100644 --- a/src/PHPCensor/Languages/lang.fr.php +++ b/src/PHPCensor/Languages/lang.fr.php @@ -12,7 +12,7 @@ return [ 'language' => 'Langue', // Log in: - 'log_in_to_phpci' => 'Connectez-vous à PHP Censor', + 'log_in_to_app' => 'Connectez-vous à PHP Censor', 'login_error' => 'Adresse email ou mot de passe invalide', 'forgotten_password_link' => 'Mot de passe oublié ?', 'reset_emailed' => 'Nous vous avons envoyé un email avec un lien pour réinitialiser votre mot de passe.', @@ -244,7 +244,7 @@ PHP Censor', 'github_application' => 'Application GitHub', 'github_sign_in' => 'Avant de commencer à utiliser GitHub, vous devez vous connecter et autoriser PHP Censor à accéder à votre compte.', - 'github_phpci_linked' => 'PHP Censor s\'est connecté avec succès au compte GitHub.', + 'github_app_linked' => 'PHP Censor s\'est connecté avec succès au compte GitHub.', 'github_where_to_find' => 'Où trouver ces informations...', 'github_where_help' => 'Si vous souhaitez utiliser une application qui vous appartient, vous pouvez trouver ces informations dans la zone de paramètres applications.', @@ -312,10 +312,10 @@ PHP Censor', 'admin_pass' => 'Mot de passe admin', 'admin_email' => 'Adresse email de l\'admin', 'config_path' => 'Chemin vers le fichier de configuration', - 'install_phpci' => 'Installer PHP Censor', - 'welcome_to_phpci' => 'Bienvenue sur PHP Censor', + 'install_app' => 'Installer PHP Censor', + 'welcome_to_app' => 'Bienvenue sur PHP Censor', 'please_answer' => 'Merci de répondre aux questions suivantes :', - 'phpci_php_req' => 'PHP Censor requiert au moins PHP 5.3.8 pour fonctionner.', + 'app_php_req' => 'PHP Censor requiert au moins PHP 5.3.8 pour fonctionner.', 'extension_required' => 'Extensions requises : %s', 'function_required' => 'PHP Censor doit être capable d\'appeler la fonction %s(). Est-ce qu\'elle est désactivée dans votre php.ini?', 'requirements_not_met' => 'PHP Censor ne peut pas être installé parce que toutes les conditions requises ne sont pas respectées. @@ -325,24 +325,24 @@ PHP Censor', 'enter_name' => 'Nom de l\'admin: ', 'enter_email' => 'Email de l\'admin: ', 'enter_password' => 'Mot de passe de l\'admin: ', - 'enter_phpci_url' => 'Votre URL vers PHP Censor (par exemple "http://phpci.local"): ', + 'enter_app_url' => 'Votre URL vers PHP Censor (par exemple "http://php-censor.local"): ', 'enter_db_host' => 'Merci d\'entrer le nom d\'hôte MySQL [localhost]: ', - 'enter_db_name' => 'Merci d\'entrer le nom de la base MySQL [phpci]: ', - 'enter_db_user' => 'Merci d\'entrer le nom d\'utilisateur MySQL [phpci]: ', + 'enter_db_name' => 'Merci d\'entrer le nom de la base MySQL [php-censor-db]: ', + 'enter_db_user' => 'Merci d\'entrer le nom d\'utilisateur MySQL [php-censor-user]: ', 'enter_db_pass' => 'Merci d\'entrer le mot de passe MySQL: ', 'could_not_connect' => 'PHP Censor ne peut pas se connecter à MySQL à partir des informations fournies. Veuillez réessayer..', 'setting_up_db' => 'Paramétrage de la base de données... ', 'user_created' => 'Le compte utilisateur a été créé !', 'failed_to_create' => 'PHP Censor n\'a pas réussi à créer votre compte admin.', 'config_exists' => 'Le fichier de configuration PHP Censor existe et n\'est pas vide.', - 'update_instead' => 'Si vous essayez de mettre à jour PHP Censor, merci d\'utiliser la commande phpci:update.', + 'update_instead' => 'Si vous essayez de mettre à jour PHP Censor, merci d\'utiliser la commande php-censor:update.', // Update - 'update_phpci' => 'Mise à jour de la base de données pour refléter les modifications apportées aux modèles.', - 'updating_phpci' => 'Mise à jour de la base de données PHP Censor : ', + 'update_app' => 'Mise à jour de la base de données pour refléter les modifications apportées aux modèles.', + 'updating_app' => 'Mise à jour de la base de données PHP Censor : ', 'not_installed' => 'PHP Censor n\'a pas l\'air d\'être installé.', - 'install_instead' => 'Merci d\'installer PHP Censor grâce à la commande phpci:install.', + 'install_instead' => 'Merci d\'installer PHP Censor grâce à la commande php-censor:install.', // Poll Command 'poll_github' => 'Demander à GitHub de vérifier si nous devons démarrer un build.', @@ -371,7 +371,7 @@ PHP Censor', 'marked_as_failed' => 'Le build %d a été marqué échoué à cause d\'un timeout.', // Builder - 'missing_phpci_yml' => 'Ce projet ne contient pas de fichier phpci.yml, ou il est vide.', + 'missing_app_yml' => 'Ce projet ne contient pas de fichier phpci.yml, ou il est vide.', 'build_success' => 'BUILD RÉUSSI', 'build_failed' => 'BUILD ÉCHOUÉ', 'removing_build' => 'Suppression du build.', diff --git a/src/PHPCensor/Languages/lang.it.php b/src/PHPCensor/Languages/lang.it.php index 11ce0dd8..903914c5 100644 --- a/src/PHPCensor/Languages/lang.it.php +++ b/src/PHPCensor/Languages/lang.it.php @@ -12,7 +12,7 @@ return [ 'language' => 'Lingua', // Log in: - 'log_in_to_phpci' => 'Accedi a PHP Censor', + 'log_in_to_app' => 'Accedi a PHP Censor', 'login_error' => 'Indirizzo email o password errati', 'forgotten_password_link' => 'Hai dimenticato la tua password?', 'reset_emailed' => 'Ti abbiamo inviato un link via email per ripristinare la tua password.', @@ -241,7 +241,7 @@ PHP Censor', 'github_application' => 'Applicazione GitHub', 'github_sign_in' => 'Prima di poter iniziare ad usare GitHub, è necessario collegarsi e garantire a PHP Censor l\'accesso al tuo account.', - 'github_phpci_linked' => 'PHP Censor è stato collegato correttamente al tuo account GitHub.', + 'github_app_linked' => 'PHP Censor è stato collegato correttamente al tuo account GitHub.', 'github_where_to_find' => 'Dove trovare queste...', 'github_where_help' => 'Se sei il proprietario dell\'applicazione, puoi trovare queste informazioni nell\'area delle configurazioni dell\'applicazione.', @@ -297,10 +297,10 @@ PHP Censor', 'admin_pass' => 'Password dell\'amministratore', 'admin_email' => 'Email dell\'amministratore', 'config_path' => 'Percorso del file di configurazione', - 'install_phpci' => 'Installa PHP Censor', - 'welcome_to_phpci' => 'Benvenuto in PHP Censor', + 'install_app' => 'Installa PHP Censor', + 'welcome_to_app' => 'Benvenuto in PHP Censor', 'please_answer' => 'Per favore rispondi alle seguenti domande:', - 'phpci_php_req' => 'PHP Censor richiede come minimo PHP 5.3.8 per funzionare.', + 'app_php_req' => 'PHP Censor richiede come minimo PHP 5.3.8 per funzionare.', 'extension_required' => 'Le estensioni richieste sono: %s', 'function_required' => 'PHP Censor richiede di poter chiamare la funzione %s(). Questa funzionalità è disabibiltata nel php.ini?', @@ -311,24 +311,24 @@ PHP Censor', 'enter_name' => 'Nome dell\'amministratore: ', 'enter_email' => 'Email dell\'amministratore: ', 'enter_password' => 'Password dell\'amministratore: ', - 'enter_phpci_url' => 'L\'URL di PHP Censor ("http://phpci.locale" ad esempio): ', + 'enter_app_url' => 'L\'URL di PHP Censor ("http://php-censor.locale" ad esempio): ', 'enter_db_host' => 'Per favore inserisci l\'host MySQL [localhost]: ', - 'enter_db_name' => 'Per favore inserisci il nome MySQL [phpci]: ', - 'enter_db_user' => 'Per favore inserisci l\'username MySQL [phpci]: ', + 'enter_db_name' => 'Per favore inserisci il nome MySQL [php-censor-db]: ', + 'enter_db_user' => 'Per favore inserisci l\'username MySQL [php-censor-user]: ', 'enter_db_pass' => 'Per favore inserisci la password MySQL: ', 'could_not_connect' => 'PHP Censor non può connettersi a MySQL con le informazioni fornite. Per favore prova ancora.', 'setting_up_db' => 'Configurzione del tuo database... ', 'user_created' => 'Account utente creato!', 'failed_to_create' => 'PHP Censor non è riuscito a creare il tuo account amministrativo.', 'config_exists' => 'Il file di configurazione di PHP Censor esiste e non è vuoto.', - 'update_instead' => 'Se stai cercando di aggiornare PHP Censor, per favore usa phpci:update.', + 'update_instead' => 'Se stai cercando di aggiornare PHP Censor, per favore usa php-censor:update.', // Update - 'update_phpci' => 'Aggiorna il database per riflettere le modifiche ai model.', - 'updating_phpci' => 'Aggiornamenti del database di PHP Censor: ', + 'update_app' => 'Aggiorna il database per riflettere le modifiche ai model.', + 'updating_app' => 'Aggiornamenti del database di PHP Censor: ', 'not_installed' => 'PHP Censor sembra non essere installato.', - 'install_instead' => 'Per favore installa PHP Censor tramite phpci:install.', + 'install_instead' => 'Per favore installa PHP Censor tramite php-censor:install.', // Poll Command 'poll_github' => 'Richiesta a GitHub per verificare se è necessario avviare una build.', @@ -357,7 +357,7 @@ PHP Censor', 'marked_as_failed' => 'Build %d è stata contrassegnata come fallita per un timeout.', // Builder - 'missing_phpci_yml' => 'Questo progetto non contiene il file phpci.yml, o il file è vuoto.', + 'missing_app_yml' => 'Questo progetto non contiene il file phpci.yml, o il file è vuoto.', 'build_success' => 'BUILD PASSATA', 'build_failed' => 'BUILD FALLITA', 'removing_build' => 'Rimozione build.', diff --git a/src/PHPCensor/Languages/lang.nl.php b/src/PHPCensor/Languages/lang.nl.php index 5623d4ab..e26b2534 100644 --- a/src/PHPCensor/Languages/lang.nl.php +++ b/src/PHPCensor/Languages/lang.nl.php @@ -12,7 +12,7 @@ return [ 'language' => 'Taal', // Log in: - 'log_in_to_phpci' => 'Log in op PHP Censor', + 'log_in_to_app' => 'Log in op PHP Censor', 'login_error' => 'Incorrect e-mailadres of wachtwoord', 'forgotten_password_link' => 'Wachtwoord vergeten?', 'reset_emailed' => 'We hebben je een link gemaild om je wachtwoord opnieuw in te stellen.', @@ -240,7 +240,7 @@ niet goed opgeslagen tot dit opgelost is.', 'github_application' => 'GitHub toepassing', 'github_sign_in' => 'Vooraleer je GitHub kan gebruiken, dien je in te loggen en PHP Censor toegang te verlenen tot je account.', - 'github_phpci_linked' => 'PHP werd succesvol gelinkt aan je GitHub account.', + 'github_app_linked' => 'PHP werd succesvol gelinkt aan je GitHub account.', 'github_where_to_find' => 'Waar zijn deze te vinden...', 'github_where_help' => 'Indien je eigenaar bent van de toepassing die je wens te gebruiken, kan je deze informatie in je applications instellingen pagina vinden.', @@ -297,10 +297,10 @@ keer je composer update uitvoert.', 'admin_pass' => 'Administrator wachtwoord', 'admin_email' => 'Administrator e-mailadres', 'config_path' => 'Pad naar configuratiebestand', - 'install_phpci' => 'Installeer PHP Censor', - 'welcome_to_phpci' => 'Welkom bij PHP Censor', + 'install_app' => 'Installeer PHP Censor', + 'welcome_to_app' => 'Welkom bij PHP Censor', 'please_answer' => 'Gelieve onderstaande vragen te beantwoorden:', - 'phpci_php_req' => 'PHP Censor heeft ten minste PHP 5.3.8 nodig om te werken.', + 'app_php_req' => 'PHP Censor heeft ten minste PHP 5.3.8 nodig om te werken.', 'extension_required' => 'Extensie benodigd: %s', 'function_required' => 'PHP Censor moet functie %s() kunnen aanroepen. Is deze uitgeschakeld in php.ini?', 'requirements_not_met' => 'PHP Censor kan niet worden geïnstalleerd omdat niet aan alle vereisten is voldaan. @@ -310,24 +310,24 @@ Gelieve de fouten na te kijken vooraleer verder te gaan.', 'enter_name' => 'Administrator naam: ', 'enter_email' => 'Administrator e-mailadres: ', 'enter_password' => 'Administrator wachtwoord: ', - 'enter_phpci_url' => 'Je PHP Censor URL (bijvoorbeeld "http://phpci.local"): ', + 'enter_app_url' => 'Je PHP Censor URL (bijvoorbeeld "http://php-censor.local"): ', 'enter_db_host' => 'Vul je MySQL host in [localhost]: ', - 'enter_db_name' => 'Vul je MySQL databasenaam in [phpci]: ', - 'enter_db_user' => 'Vul je MySQL gebruikersnaam in [phpci]: ', + 'enter_db_name' => 'Vul je MySQL databasenaam in [php-censor-db]: ', + 'enter_db_user' => 'Vul je MySQL gebruikersnaam in [php-censor-user]: ', 'enter_db_pass' => 'Vul je MySQL watchtwoord in: ', 'could_not_connect' => 'PHP Censor kon met deze gegevens geen verbinding maken met MySQL. Gelieve opnieuw te proberen.', 'setting_up_db' => 'Database wordt aangemaakt...', 'user_created' => 'Gebruikersprofiel aangemaakt!', 'failed_to_create' => 'PHP Censor kon je administratorprofiel niet aanmaken.', 'config_exists' => 'Het PHP Censor configuratiebestand bestaat en is niet leeg.', - 'update_instead' => 'Liever phpci:update te gebruiken indien je PHP Censor probeerde te updaten, ', + 'update_instead' => 'Liever php-censor:update te gebruiken indien je PHP Censor probeerde te updaten, ', // Update - 'update_phpci' => 'Update de database naar het beeld van gewijzigde modellen.', - 'updating_phpci' => 'PHP Censor database wordt geüpdatet:', + 'update_app' => 'Update de database naar het beeld van gewijzigde modellen.', + 'updating_app' => 'PHP Censor database wordt geüpdatet:', 'not_installed' => 'PHP Censor lijkt niet geïnstalleerd te zijn.', - 'install_instead' => 'Gelieve PHP Censor via phpci:install te installeren.', + 'install_instead' => 'Gelieve PHP Censor via php-censor:install te installeren.', // Poll Command 'poll_github' => 'Poll GitHub om te controleren of we een build moeten starten.', @@ -356,7 +356,7 @@ Gelieve de fouten na te kijken vooraleer verder te gaan.', 'marked_as_failed' => 'Build %d gemarkeerd als falende door timeout.', // Builder - 'missing_phpci_yml' => 'Dit project bevat geen phpci.yml bestand, of het is leeg.', + 'missing_app_yml' => 'Dit project bevat geen phpci.yml bestand, of het is leeg.', 'build_success' => 'BUILD SUCCES', 'build_failed' => 'BUILD GEFAALD', 'removing_build' => 'Build wordt verwijderd.', diff --git a/src/PHPCensor/Languages/lang.pl.php b/src/PHPCensor/Languages/lang.pl.php index 41528000..551b9bcf 100644 --- a/src/PHPCensor/Languages/lang.pl.php +++ b/src/PHPCensor/Languages/lang.pl.php @@ -12,7 +12,7 @@ return [ 'language' => 'Język', // Log in: - 'log_in_to_phpci' => 'Zaloguj się do PHP Censor', + 'log_in_to_app' => 'Zaloguj się do PHP Censor', 'login_error' => 'Nieprawidłowy email lub hasło', 'forgotten_password_link' => 'Zapomniałeś hasła?', 'reset_emailed' => 'Email z linkiem resetującym hasło został wysłany.', @@ -242,7 +242,7 @@ dopóki nie będzie to naprawione.', 'build_settings' => 'Ustawienia budowania', 'github_application' => 'Aplikacja GitHub', 'github_sign_in' => 'Zanim będzie można zacząć korzystać z GitHub, musisz najpierw Sign in, a następnie udzielić dostęp dla PHP Censor do Twojego konta.', - 'github_phpci_linked' => 'PHP Censor zostało pomyślnie połączone z konten GitHub.', + 'github_app_linked' => 'PHP Censor zostało pomyślnie połączone z konten GitHub.', 'github_where_to_find' => 'Gdzie można znaleźć...', 'github_where_help' => 'Jeśli to jest Twoja aplikacjia i chcesz jej użyć to więcej informacji znajdziesz w sekcji ustawień: applications', @@ -298,10 +298,10 @@ wywołaniu polecenia composer update.', 'admin_pass' => 'Hasło Admina', 'admin_email' => 'Adres Email Admina', 'config_path' => 'Ścieżka Pliku Config', - 'install_phpci' => 'Zainstaluj PHP Censor', - 'welcome_to_phpci' => 'Witaj w PHP Censor', + 'install_app' => 'Zainstaluj PHP Censor', + 'welcome_to_app' => 'Witaj w PHP Censor', 'please_answer' => 'Odpowiedz na poniższe pytania:', - 'phpci_php_req' => 'PHP Censor wymaga przynajmniej PHP 5.3.8 do prawidłowego funkcjonowania.', + 'app_php_req' => 'PHP Censor wymaga przynajmniej PHP 5.3.8 do prawidłowego funkcjonowania.', 'extension_required' => 'Wymagane rozszerzenie: %s', 'function_required' => 'PHP Censor musi mieć możliwość wywołania funkcji %s(). Czy ona jest wyłączona w php.ini?', 'requirements_not_met' => 'Nie można zainstalować PHP Censor, ponieważ nie wszystkie wymagania zostały spełnione. @@ -311,24 +311,24 @@ Przejrzyj powyższą listę błędów przed kontynuowaniem.', 'enter_name' => 'Imię Admina: ', 'enter_email' => 'Email Admina: ', 'enter_password' => 'Hasło Admina: ', - 'enter_phpci_url' => 'URL PHP Censor (na przykład "http://phpci.local"): ', + 'enter_app_url' => 'URL PHP Censor (na przykład "http://php-censor.local"): ', 'enter_db_host' => 'Wpisz hosta MySQL [host lokalny]: ', - 'enter_db_name' => 'Wpisz nazwę bazy danych MySQL [phpci]: ', - 'enter_db_user' => 'Wpisz nazwę użytkownika MySQL [phpci]: ', + 'enter_db_name' => 'Wpisz nazwę bazy danych MySQL [php-censor-db]: ', + 'enter_db_user' => 'Wpisz nazwę użytkownika MySQL [php-censor-user]: ', 'enter_db_pass' => 'Wpisz hasło MySQL: ', 'could_not_connect' => 'Z podanymi ustawieniami PHP Censor nie udało się połączyć z MySQL. Spróbuj ponownie.', 'setting_up_db' => 'Ustawianie Twojej bazy danych...', 'user_created' => 'Utworzono konto użytkownika!', 'failed_to_create' => 'PHP Censor nie udało się założyc Twojego konta administratora.', 'config_exists' => 'Plik konfiguracji PHP Censor istnieje i nie jest pusty.', - 'update_instead' => 'Jeśli próbowałeś zaktualizować PHP Censor, użyj phpci:update.', + 'update_instead' => 'Jeśli próbowałeś zaktualizować PHP Censor, użyj php-censor:update.', // Update - 'update_phpci' => 'Zaktualizuj bazę danych zgodnie ze zmodyfikowanymi modelami.', - 'updating_phpci' => 'Aktualizacja bazy danych PHP Censor:', + 'update_app' => 'Zaktualizuj bazę danych zgodnie ze zmodyfikowanymi modelami.', + 'updating_app' => 'Aktualizacja bazy danych PHP Censor:', 'not_installed' => 'Wygląda na to, że PHP Censor nie jest zainstalowane.', - 'install_instead' => 'Proszę zainstalować PHP Censor poprzez phpci:install', + 'install_instead' => 'Proszę zainstalować PHP Censor poprzez php-censor:install', // Poll Command 'poll_github' => 'Odpytuj GitHub, aby sprawdzić czy należy uruchomić budowę.', @@ -357,7 +357,7 @@ Przejrzyj powyższą listę błędów przed kontynuowaniem.', 'marked_as_failed' => 'Budowanie %d nie powiodło się z powodu przekroczenia limitu czasu.', // Builder - 'missing_phpci_yml' => 'Projekt nie zawiera pliku phpci.yml lub projekt jest pusty.', + 'missing_app_yml' => 'Projekt nie zawiera pliku phpci.yml lub projekt jest pusty.', 'build_success' => 'BUDOWANIE ZAKOŃCZONE SUKCESEM', 'build_failed' => 'BUDOWANIE NIE POWIODŁO SIĘ', 'removing_build' => 'Usuwanie Budowania.', diff --git a/src/PHPCensor/Languages/lang.ru.php b/src/PHPCensor/Languages/lang.ru.php index 24e4fa4f..b423b656 100644 --- a/src/PHPCensor/Languages/lang.ru.php +++ b/src/PHPCensor/Languages/lang.ru.php @@ -12,7 +12,7 @@ return [ 'language' => 'язык', // Log in: - 'log_in_to_phpci' => 'Войти в PHP Censor', + 'log_in_to_app' => 'Войти в PHP Censor', 'login_error' => 'Неправильный email или пароль', 'forgotten_password_link' => 'Забыли пароль?', 'reset_emailed' => 'Вы получите письмо со ссылкой на сброс пароля.', @@ -250,7 +250,7 @@ PHP Censor', 'github_application' => 'GitHub приложение', 'github_sign_in' => 'Перед тем как начать использовать GitHub аккаунт, вам необходимо войти и разрешить доступ для PHP Censor до вашего аккаунта.', - 'github_phpci_linked' => 'PHP Censor успешно привязал GitHub аккаунт.', + 'github_app_linked' => 'PHP Censor успешно привязал GitHub аккаунт.', 'github_where_to_find' => 'Где это найти...', 'github_where_help' => 'Если вы владелец приложения, которое вы хотели бы использовать, то вы можете найти информацию об этом в разделе applications настроек.', @@ -329,10 +329,10 @@ PHP Censor', 'admin_pass' => 'Пароль администратора', 'admin_email' => 'Email администратора', 'config_path' => 'Путь до файла конфигурации', - 'install_phpci' => 'Установить PHP Censor', - 'welcome_to_phpci' => 'Добро пожаловать в PHP Censor', + 'install_app' => 'Установить PHP Censor', + 'welcome_to_app' => 'Добро пожаловать в PHP Censor', 'please_answer' => 'Пожалуйста, ответьте на несколько вопросов:', - 'phpci_php_req' => 'PHP Censor необходима для работы версия PHP не ниже 5.3.8.', + 'app_php_req' => 'PHP Censor необходима для работы версия PHP не ниже 5.3.8.', 'extension_required' => 'Требуется расширение PHP: %s', 'function_required' => 'PHP Censor необходима возможность вызывать %s() функцию. Она выключена в php.ini?', 'requirements_not_met' => 'PHP Censor не может быть установлен, пока не все требования выполнены. @@ -342,25 +342,25 @@ PHP Censor', 'enter_name' => 'Имя администратора: ', 'enter_email' => 'Email администратора: ', 'enter_password' => 'Пароль администратора: ', - 'enter_phpci_url' => 'URL-адрес вашего PHP Censor (например: "http://phpci.local"): ', + 'enter_app_url' => 'URL-адрес вашего PHP Censor (например: "http://php-censor.local"): ', 'enter_db_host' => 'Пожалуйста, введите хост MySQL [localhost]: ', 'enter_db_port' => 'Пожалуйста, введите порт MySQL [3306]: ', - 'enter_db_name' => 'Пожалуйста, введите имя базы данных MySQL [phpci]: ', - 'enter_db_user' => 'Пожалуйста, введите пользователя MySQL [phpci]: ', + 'enter_db_name' => 'Пожалуйста, введите имя базы данных MySQL [php-censor-db]: ', + 'enter_db_user' => 'Пожалуйста, введите пользователя MySQL [php-censor-user]: ', 'enter_db_pass' => 'Пожалуйста, введите пароль MySQL: ', 'could_not_connect' => 'PHP Censor не может подключится к MySQL с переданными параметрами. Пожалуйста, попробуйте еще раз.', 'setting_up_db' => 'Установка базы данных... ', 'user_created' => 'Аккаунт пользователя создан!', 'failed_to_create' => 'PHP Censor не удалось создать аккаунт администратора.', 'config_exists' => 'Файл конфигурации PHP Censor уже существует, и он не пустой.', - 'update_instead' => 'Если вы собираетесь обновить PHP Censor, пожалуйста, используйте команду phpci:update.', + 'update_instead' => 'Если вы собираетесь обновить PHP Censor, пожалуйста, используйте команду php-censor:update.', // Update - 'update_phpci' => 'Обновите базу данных с учетом обновленных моделей.', - 'updating_phpci' => 'Обновление базы данных PHP Censor: ', + 'update_app' => 'Обновите базу данных с учетом обновленных моделей.', + 'updating_app' => 'Обновление базы данных PHP Censor: ', 'not_installed' => 'PHP Censor не может быть установлен.', - 'install_instead' => 'Пожалуйста, установите PHP Censor с помощью команды phpci:install.', + 'install_instead' => 'Пожалуйста, установите PHP Censor с помощью команды php-censor:install.', // Poll Command 'poll_github' => 'Опрос GitHub для проверки запуска сборки.', @@ -389,7 +389,7 @@ PHP Censor', 'marked_as_failed' => 'Сборка %d отмечена как неудавшаяся из-за превышения лимита времени.', // Builder - 'missing_phpci_yml' => 'Этот проект не содержит файла phpci.yml, или файл пустой.', + 'missing_app_yml' => 'Этот проект не содержит файла phpci.yml, или файл пустой.', 'build_success' => 'СБОРКА УСПЕШНА', 'build_failed' => 'СБОРКА ПРОВАЛЕНА', 'removing_build' => 'Удаление сборки.', diff --git a/src/PHPCensor/Languages/lang.uk.php b/src/PHPCensor/Languages/lang.uk.php index a0d01d38..0f07d0ec 100644 --- a/src/PHPCensor/Languages/lang.uk.php +++ b/src/PHPCensor/Languages/lang.uk.php @@ -12,7 +12,7 @@ return [ 'language' => 'Мова', // Log in: - 'log_in_to_phpci' => 'Увійти до PHP Censor', + 'log_in_to_app' => 'Увійти до PHP Censor', 'login_error' => 'Невірний email або пароль', 'forgotten_password_link' => 'Забули свій пароль?', 'reset_emailed' => 'Ми відправили вам посилання для скидання вашого паролю.', @@ -240,7 +240,7 @@ PHP Censor', 'github_application' => 'GitHub додаток', 'github_sign_in' => 'Перед початком користування GitHub, вам необхідно увійти та надати доступ для PHP Censor до вашого аккаунту.', - 'github_phpci_linked' => 'PHP Censor успішно зв\'язаний з аккаунтом GitHub.', + 'github_app_linked' => 'PHP Censor успішно зв\'язаний з аккаунтом GitHub.', 'github_where_to_find' => 'Де це знайти...', 'github_where_help' => 'Якщо ви є власником додатку, який би ви хотіли використовувати, то ви можете знайти інформацію про це у розділі налаштувань ваших додатків.', @@ -297,10 +297,10 @@ PHP Censor', 'admin_pass' => 'Пароль адміністратора', 'admin_email' => 'Email адреса адміністратора', 'config_path' => 'Шлях до файла конфігурації', - 'install_phpci' => 'Встановити PHP Censor', - 'welcome_to_phpci' => 'Ласкаво просимо до PHP Censor', + 'install_app' => 'Встановити PHP Censor', + 'welcome_to_app' => 'Ласкаво просимо до PHP Censor', 'please_answer' => 'Будь ласка, дайте відповідь на наступні питання:', - 'phpci_php_req' => 'PHP Censor вимагає для роботи, принаймні, версію PHP 5.3.8.', + 'app_php_req' => 'PHP Censor вимагає для роботи, принаймні, версію PHP 5.3.8.', 'extension_required' => 'Необхідне розширення: %s', 'function_required' => 'PHP Censor необхідна можливість викликати функцію %s(). Вона відключена у php.ini?', 'requirements_not_met' => 'Неможливо встановити PHP Censor, оскільки не всі вимоги виконані. @@ -310,24 +310,24 @@ PHP Censor', 'enter_name' => 'Ім’я адміністратора: ', 'enter_email' => 'Email адміністратора: ', 'enter_password' => 'Пароль адміністратора: ', - 'enter_phpci_url' => 'URL адреса вашого PHP Censor (наприклад, "http://phpci.local"): ', + 'enter_app_url' => 'URL адреса вашого PHP Censor (наприклад, "http://php-censor.local"): ', 'enter_db_host' => 'Будь ласка, введіть хост MySQL [localhost]: ', - 'enter_db_name' => 'Будь ласка, введить ім’я бази даних MySQL [phpci]: ', - 'enter_db_user' => 'Будь ласка, введить ім’я користувача MySQL [phpci]: ', + 'enter_db_name' => 'Будь ласка, введить ім’я бази даних MySQL [php-censor-db]: ', + 'enter_db_user' => 'Будь ласка, введить ім’я користувача MySQL [php-censor-user]: ', 'enter_db_pass' => 'Будь ласка, введить ваш пароль MySQL: ', 'could_not_connect' => 'PHP Censor не може підключитися до MySQL із наданими параметрами. Будь ласка, спробуйте ще раз.', 'setting_up_db' => 'Налаштування вашої бази даних...', 'user_created' => 'Аккаунт користувача створено!', 'failed_to_create' => 'PHP Censor не вдалося створити ваш аккаунт адміністратора.', 'config_exists' => 'Файл конфігурації PHP Censor вже існує та не є порожнім.', - 'update_instead' => 'Якщо ви збираєтесь оновити PHP Censor, будь ласка, використовуйте команду phpci:update.', + 'update_instead' => 'Якщо ви збираєтесь оновити PHP Censor, будь ласка, використовуйте команду php-censor:update.', // Update - 'update_phpci' => 'Оновити базу даних для відображення змінених моделей.', - 'updating_phpci' => 'Оновлення бази даних PHP Censor:', + 'update_app' => 'Оновити базу даних для відображення змінених моделей.', + 'updating_app' => 'Оновлення бази даних PHP Censor:', 'not_installed' => 'Неможливо встановити PHP Censor.', - 'install_instead' => 'Будь ласка, встановіть PHP Censor через команду phpci:install.', + 'install_instead' => 'Будь ласка, встановіть PHP Censor через команду php-censor:install.', // Poll Command 'poll_github' => 'Зробити запит до GitHub для перевірки запуску збірки.', @@ -356,7 +356,7 @@ PHP Censor', 'marked_as_failed' => 'Збірка %d відмічена як невдала через перевищення ліміту часу.', // Builder - 'missing_phpci_yml' => 'Цей проект не містить файл phpci.yml або він є порожнім.', + 'missing_app_yml' => 'Цей проект не містить файл phpci.yml або він є порожнім.', 'build_success' => 'ЗБІРКА УСПІШНА', 'build_failed' => 'ЗБІРКА НЕВДАЛА', 'removing_build' => 'Видалення збірки.', diff --git a/src/PHPCensor/Model/Build.php b/src/PHPCensor/Model/Build.php index 939c3623..d413638f 100644 --- a/src/PHPCensor/Model/Build.php +++ b/src/PHPCensor/Model/Build.php @@ -104,6 +104,11 @@ class Build extends BuildBase $build_config = $this->getProject()->getBuildConfig(); } + // Try .php-censor.yml + if (is_file($buildPath . '/.php-censor.yml')) { + $build_config = file_get_contents($buildPath . '/.php-censor.yml'); + } + // Try .phpci.yml if (is_file($buildPath . '/.phpci.yml')) { $build_config = file_get_contents($buildPath . '/.phpci.yml'); diff --git a/src/PHPCensor/Model/Build/GithubBuild.php b/src/PHPCensor/Model/Build/GithubBuild.php index 93d0e2d0..8204267a 100644 --- a/src/PHPCensor/Model/Build/GithubBuild.php +++ b/src/PHPCensor/Model/Build/GithubBuild.php @@ -45,7 +45,7 @@ class GithubBuild extends RemoteGitBuild */ public function sendStatusPostback() { - $token = Config::getInstance()->get('phpci.github.token'); + $token = Config::getInstance()->get('php-censor.github.token'); if (empty($token) || empty($this->data['id'])) { return; @@ -80,11 +80,11 @@ class GithubBuild extends RemoteGitBuild break; } - $phpciUrl = Config::getInstance()->get('phpci.url'); + $url = Config::getInstance()->get('php-censor.url'); $params = [ 'state' => $status, - 'target_url' => $phpciUrl . '/build/view/' . $this->getId(), + 'target_url' => $url . '/build/view/' . $this->getId(), 'description' => $description, 'context' => 'PHP Censor', ]; @@ -176,7 +176,7 @@ class GithubBuild extends RemoteGitBuild $remoteUrl = $this->getExtra('remote_url'); $remoteBranch = $this->getExtra('remote_branch'); - $cmd = 'cd "%s" && git checkout -b phpci/' . $this->getId() . ' %s && git pull -q --no-edit %s %s'; + $cmd = 'cd "%s" && git checkout -b php-censor/' . $this->getId() . ' %s && git pull -q --no-edit %s %s'; $success = $builder->executeCommand($cmd, $cloneTo, $this->getBranch(), $remoteUrl, $remoteBranch); } } catch (\Exception $ex) { diff --git a/src/PHPCensor/Plugin/Pdepend.php b/src/PHPCensor/Plugin/Pdepend.php index 7e21a54d..221e1cdb 100644 --- a/src/PHPCensor/Plugin/Pdepend.php +++ b/src/PHPCensor/Plugin/Pdepend.php @@ -104,7 +104,7 @@ class Pdepend implements Plugin $this->directory ); - $config = $this->phpci->getSystemConfig('phpci'); + $config = $this->phpci->getSystemConfig('php-censor'); if ($success) { $this->phpci->logSuccess( diff --git a/src/PHPCensor/Plugin/TechnicalDebt.php b/src/PHPCensor/Plugin/TechnicalDebt.php index 2ae458ed..0f34cdc4 100755 --- a/src/PHPCensor/Plugin/TechnicalDebt.php +++ b/src/PHPCensor/Plugin/TechnicalDebt.php @@ -151,6 +151,7 @@ class TechnicalDebt implements PHPCensor\Plugin, PHPCensor\ZeroConfigPlugin $files = []; $ignores = $this->ignore; + $ignores[] = '.php-censor.yml'; $ignores[] = 'phpci.yml'; $ignores[] = '.phpci.yml'; diff --git a/src/PHPCensor/Service/BuildService.php b/src/PHPCensor/Service/BuildService.php index 4de9b31f..0459defc 100644 --- a/src/PHPCensor/Service/BuildService.php +++ b/src/PHPCensor/Service/BuildService.php @@ -160,12 +160,12 @@ class BuildService } $config = Config::getInstance(); - $settings = $config->get('phpci.worker', []); + $settings = $config->get('php-censor.worker', []); if (!empty($settings['host']) && !empty($settings['queue'])) { try { $jobData = [ - 'type' => 'phpci.build', + 'type' => 'php-censor.build', 'build_id' => $build->getId(), ]; @@ -179,7 +179,7 @@ class BuildService json_encode($jobData), PheanstalkInterface::DEFAULT_PRIORITY, PheanstalkInterface::DEFAULT_DELAY, - $config->get('phpci.worker.job_timeout', 600) + $config->get('php-censor.worker.job_timeout', 600) ); } catch (\Exception $ex) { $this->queueError = true; diff --git a/src/PHPCensor/View/BuildStatus/view.phtml b/src/PHPCensor/View/BuildStatus/view.phtml index f602af76..443ef100 100644 --- a/src/PHPCensor/View/BuildStatus/view.phtml +++ b/src/PHPCensor/View/BuildStatus/view.phtml @@ -20,7 +20,7 @@ - + diff --git a/src/PHPCensor/View/BuildsTable.phtml b/src/PHPCensor/View/BuildsTable.phtml index 3280b7aa..c5284297 100644 --- a/src/PHPCensor/View/BuildsTable.phtml +++ b/src/PHPCensor/View/BuildsTable.phtml @@ -78,7 +78,7 @@ switch($build->getStatus()) diff --git a/src/PHPCensor/View/ProjectForm.phtml b/src/PHPCensor/View/ProjectForm.phtml index 96f28ee9..9f2e2701 100644 --- a/src/PHPCensor/View/ProjectForm.phtml +++ b/src/PHPCensor/View/ProjectForm.phtml @@ -31,7 +31,7 @@ window.return_url = ; get('phpci.github', null); +$gh = \b8\Config::getInstance()->get('php-censor.github', null); if($gh) { print 'window.github_app_id = ' . json_encode($gh['id']) . ';' . PHP_EOL; diff --git a/src/PHPCensor/View/Session.phtml b/src/PHPCensor/View/Session.phtml index c8d8c039..a1bbce3c 100644 --- a/src/PHPCensor/View/Session.phtml +++ b/src/PHPCensor/View/Session.phtml @@ -2,7 +2,7 @@ - <?php Lang::out('log_in_to_phpci'); ?> + <?php Lang::out('log_in_to_app'); ?> @@ -38,7 +38,7 @@ width: 350px; } - #phpci-logo img { + #logo img { margin-bottom: 30px; } @@ -47,7 +47,7 @@
-
diff --git a/src/PHPCensor/View/Settings/index.phtml b/src/PHPCensor/View/Settings/index.phtml index e7a3dfc7..e76b77f1 100644 --- a/src/PHPCensor/View/Settings/index.phtml +++ b/src/PHPCensor/View/Settings/index.phtml @@ -52,21 +52,21 @@ - +

- + @@ -105,7 +105,7 @@

- +

@@ -123,7 +123,7 @@

- Be careful: This setting disables authentication and uses your current admin account for all actions within phpci with admin rights. + Be careful: This setting disables authentication and uses your current admin account for all actions within PHP Censor with admin rights.

diff --git a/src/PHPCensor/View/User/index.phtml b/src/PHPCensor/View/User/index.phtml index d0b48c27..84eac454 100644 --- a/src/PHPCensor/View/User/index.phtml +++ b/src/PHPCensor/View/User/index.phtml @@ -46,7 +46,7 @@
diff --git a/src/PHPCensor/View/layout.phtml b/src/PHPCensor/View/layout.phtml index 0effb32a..d1a31d63 100644 --- a/src/PHPCensor/View/layout.phtml +++ b/src/PHPCensor/View/layout.phtml @@ -34,19 +34,19 @@ - + - +
- +