Skip to content
Browse files

Fix calling method of html helper

Conflicts:

	app/Plugin/Install/View/Install/data.ctp
	app/Plugin/Install/View/Install/finish.ctp
	app/Plugin/Install/View/Install/index.ctp
  • Loading branch information...
1 parent 533d499 commit 90a8a3a6ca68b779ae90da7371e5bb9109e0030a @kiang kiang committed with yandod Apr 3, 2012
View
12 app/Plugin/Install/View/Install/data.ctp
@@ -0,0 +1,12 @@
+<div class="install">
+ <h2><?php echo $this->pageTitle; ?></h2>
+ <p><?php echo __('Loading initial data to database which you configured.')?></p>
+ <?php
+ echo $this->Html->link(__('Click here to build your database'), array(
+ 'plugin' => 'install',
+ 'controller' => 'install',
+ 'action' => 'data',
+ 'run' => 1,
+ ));
+ ?>
+</div>
View
28 app/Plugin/Install/View/Install/finish.ctp
@@ -0,0 +1,28 @@
+<div class="install">
+ <h2><?php echo $this->pageTitle; ?></h2>
+
+ <p>
+ Welcome page: <?php echo $this->Html->link(Router::url('/', true), Router::url('/', true)); ?><br />
+ Username: admin<br />
+ Password: admin
+ </p>
+
+ <br />
+ <br />
+
+ <p>
+ <?php echo __('Delete the installation directory <strong>/app/Plugin/install</strong>.') ?>
+ </p>
+
+ <br />
+ <br />
+
+ <?php
+ echo $this->Html->link(__('Click here to delete installation files'), array(
+ 'plugin' => 'install',
+ 'controller' => 'install',
+ 'action' => 'finish',
+ 'delete' => 1,
+ ));
+ ?>
+</div>
View
67 app/Plugin/Install/View/Install/index.ctp
@@ -0,0 +1,67 @@
+<div class="install index">
+ <?php
+ $check = true;
+ $cmd = "";
+ // tmp is writable
+ if (is_writable(TMP)) {
+ echo '<p class="success">' . __('Your tmp directory is writable.') . '('.TMP.')</p>';
+ } else {
+ $check = false;
+ echo '<p class="error">' . __('Your tmp directory is NOT writable.').'</p>';
+ $cmd .= 'chmod -R 777 '.TMP."\n";
+ }
+
+ // Config is writable
+ if (is_writable(APP.'Config')) {
+ echo '<p class="success">' . __('Your Config directory is writable.') . '('.APP.'Config'.')</p>';
+ } else {
+ $check = false;
+ echo '<p class="error">' . __('Your Config directory is NOT writable.').'</p>';
+ $cmd .= 'chmod -R 777 '.APP.'Config'."\n";
+ }
+
+ // files is writable
+ if (is_writable(APP.'files')) {
+ echo '<p class="success">' . __('Your files directory is writable.') . '('.APP.'files'.')</p>';
+ } else {
+ $check = false;
+ echo '<p class="error">' . __('Your files directory is NOT writable.').'</p>';
+ $cmd .= 'chmod -R 777 '.APP.'files'."\n";
+ }
+
+ // Plugin is writable
+ if (is_writable(APP.'Plugin')) {
+ echo '<p class="success">' . __('Your Plugin directory is writable.') . '('.APP.'Plugin'.')</p>';
+ } else {
+ $check = false;
+ echo '<p class="error">' . __('Your Plugin directory is NOT writable.').'</p>';
+ $cmd .= 'chmod -R 777 '.APP.'Plugin';
+ }
+
+ // routing
+ if (isset($file['status']) && $file['status'] === 'OK') {
+ echo '<p class="success">' . __('Your routing is working well.').'</p>';
+ } else {
+ $check = false;
+ echo '<p class="error">' . __('Your routing is NOT working well.').'</p>';
+ echo '<p class="error">' . __('Please activate mod_rewrite and .htaccess.').'</p>';
+ echo '<p class="error">' . __('Or uncomment "//Configure::write(\'App.baseUrl\', env(\'SCRIPT_NAME\'));" in app/Config/core.php and remove all .htaccess.').'</p>';
+ }
+
+
+ // php version
+ // if (phpversion() > 5) {
+ // echo '<p class="success">' . sprintf(__('PHP version %s > 5'), phpversion()) . '</p>';
+ // } else {
+ // $check = false;
+ // echo '<p class="error">' . sprintf(__('PHP version %s < 5'), phpversion()) . '</p>';
+ // }
+
+ if ($check) {
+ echo '<p>' . $this->Html->link(__('Click here to begin installation'), array('action' => 'database')) . '</p>';
+ } else {
+ echo '<p>' . __('Installation cannot continue as minimum requirements are not met.') . '</p>';
+ echo '<textarea cols="60" rows="6">'.$cmd.'</textarea>';
+ }
+ ?>
+</div>

0 comments on commit 90a8a3a

Please sign in to comment.
Something went wrong with that request. Please try again.