Installer minor changes
This commit is contained in:
parent
0efce34cf9
commit
d148d8f468
|
@ -5,7 +5,7 @@
|
|||
<form method="post" action="" class="forms">
|
||||
<label>
|
||||
<?php $Language->p('Username') ?>
|
||||
<input type="text" name="username" class="width-50">
|
||||
<input type="text" name="username" class="width-50" value="<?php echo (isset($_POST['username'])?$_POST['username']:'') ?>">
|
||||
</label>
|
||||
|
||||
<label>
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
<label>
|
||||
Email
|
||||
<input type="text" name="email" class="width-50">
|
||||
<input type="text" name="email" class="width-50" value="<?php echo (isset($_POST['email'])?$_POST['email']:'') ?>">
|
||||
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
|
||||
</label>
|
||||
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
Set the correct permissions on this directory.
|
||||
Check the documentation: http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
13
install.php
13
install.php
|
@ -36,6 +36,9 @@ if(!defined('JSON_PRETTY_PRINT')) {
|
|||
define('JSON_PRETTY_PRINT', 128);
|
||||
}
|
||||
|
||||
// Check if JSON encode and decode are enabled.
|
||||
define('JSON', function_exists('json_encode'));
|
||||
|
||||
// Helpers class
|
||||
include(PATH_HELPERS.'sanitize.class.php');
|
||||
include(PATH_HELPERS.'valid.class.php');
|
||||
|
@ -272,25 +275,25 @@ What\'s next:
|
|||
return true;
|
||||
}
|
||||
|
||||
function checkPOST($_POST)
|
||||
function checkPOST($args)
|
||||
{
|
||||
// Check empty password
|
||||
if(empty($_POST['password']))
|
||||
if(empty($args['password']))
|
||||
{
|
||||
return '<div>The password field is empty</div>';
|
||||
}
|
||||
|
||||
// Check invalid email
|
||||
if( !Valid::email($_POST['email']) && ($_POST['noCheckEmail']=='0') )
|
||||
if( !Valid::email($args['email']) && ($args['noCheckEmail']=='0') )
|
||||
{
|
||||
return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>';
|
||||
}
|
||||
|
||||
// Sanitize email
|
||||
$email = sanitize::email($_POST['email']);
|
||||
$email = sanitize::email($args['email']);
|
||||
|
||||
// Install Bludit
|
||||
install($_POST['password'], $email, $_POST['language']);
|
||||
install($args['password'], $email, $args['language']);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<!-- Plugins -->
|
||||
<!-- Plugins Site Body Begin -->
|
||||
<?php Theme::plugins('onSiteBodyBegin') ?>
|
||||
|
||||
<!-- Layout -->
|
||||
|
@ -47,7 +47,7 @@
|
|||
|
||||
</div>
|
||||
|
||||
<!-- Plugins -->
|
||||
<!-- Plugins Site Body End -->
|
||||
<?php Theme::plugins('onSiteBodyEnd') ?>
|
||||
|
||||
</body>
|
||||
|
|
|
@ -47,7 +47,5 @@ html, button, input, select, textarea,
|
|||
}
|
||||
</style>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php
|
||||
Theme::plugins('onSiteHead');
|
||||
?>
|
||||
<!-- Plugins Site Head -->
|
||||
<?php Theme::plugins('onSiteHead') ?>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<!-- Post content -->
|
||||
<div class="post-content">
|
||||
<?php
|
||||
// FALSE to get the first part of the post
|
||||
// Call the method with FALSE to get the first part of the post
|
||||
echo $Post->content(false)
|
||||
?>
|
||||
</div>
|
||||
|
@ -47,6 +47,7 @@
|
|||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<!-- Paginator for posts -->
|
||||
<?php
|
||||
echo Paginator::html();
|
||||
?>
|
|
@ -1,7 +1,5 @@
|
|||
<h1 class="title"><?php echo $Site->title() ?></h1>
|
||||
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
||||
|
||||
<!-- Plugins -->
|
||||
<?php
|
||||
Theme::plugins('onSiteSidebar');
|
||||
?>
|
||||
<!-- Plugins Sidebar -->
|
||||
<?php Theme::plugins('onSiteSidebar'); ?>
|
Loading…
Reference in New Issue