Installer minor changes
This commit is contained in:
parent
0efce34cf9
commit
d148d8f468
|
@ -5,7 +5,7 @@
|
||||||
<form method="post" action="" class="forms">
|
<form method="post" action="" class="forms">
|
||||||
<label>
|
<label>
|
||||||
<?php $Language->p('Username') ?>
|
<?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>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Email
|
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>
|
<div class="forms-desc"><?php $Language->p('email-will-not-be-publicly-displayed') ?></div>
|
||||||
</label>
|
</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);
|
define('JSON_PRETTY_PRINT', 128);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Check if JSON encode and decode are enabled.
|
||||||
|
define('JSON', function_exists('json_encode'));
|
||||||
|
|
||||||
// Helpers class
|
// Helpers class
|
||||||
include(PATH_HELPERS.'sanitize.class.php');
|
include(PATH_HELPERS.'sanitize.class.php');
|
||||||
include(PATH_HELPERS.'valid.class.php');
|
include(PATH_HELPERS.'valid.class.php');
|
||||||
|
@ -272,25 +275,25 @@ What\'s next:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function checkPOST($_POST)
|
function checkPOST($args)
|
||||||
{
|
{
|
||||||
// Check empty password
|
// Check empty password
|
||||||
if(empty($_POST['password']))
|
if(empty($args['password']))
|
||||||
{
|
{
|
||||||
return '<div>The password field is empty</div>';
|
return '<div>The password field is empty</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check invalid email
|
// 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>';
|
return '<div>Your email address is invalid.</div><div id="jscompleteEmail">Proceed anyway!</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
// Sanitize email
|
// Sanitize email
|
||||||
$email = sanitize::email($_POST['email']);
|
$email = sanitize::email($args['email']);
|
||||||
|
|
||||||
// Install Bludit
|
// Install Bludit
|
||||||
install($_POST['password'], $email, $_POST['language']);
|
install($args['password'], $email, $args['language']);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins Site Body Begin -->
|
||||||
<?php Theme::plugins('onSiteBodyBegin') ?>
|
<?php Theme::plugins('onSiteBodyBegin') ?>
|
||||||
|
|
||||||
<!-- Layout -->
|
<!-- Layout -->
|
||||||
|
@ -47,7 +47,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins Site Body End -->
|
||||||
<?php Theme::plugins('onSiteBodyEnd') ?>
|
<?php Theme::plugins('onSiteBodyEnd') ?>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -47,7 +47,5 @@ html, button, input, select, textarea,
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins Site Head -->
|
||||||
<?php
|
<?php Theme::plugins('onSiteHead') ?>
|
||||||
Theme::plugins('onSiteHead');
|
|
||||||
?>
|
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
<!-- Post content -->
|
<!-- Post content -->
|
||||||
<div class="post-content">
|
<div class="post-content">
|
||||||
<?php
|
<?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)
|
echo $Post->content(false)
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -47,6 +47,7 @@
|
||||||
|
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
|
|
||||||
|
<!-- Paginator for posts -->
|
||||||
<?php
|
<?php
|
||||||
echo Paginator::html();
|
echo Paginator::html();
|
||||||
?>
|
?>
|
|
@ -1,7 +1,5 @@
|
||||||
<h1 class="title"><?php echo $Site->title() ?></h1>
|
<h1 class="title"><?php echo $Site->title() ?></h1>
|
||||||
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
<h2 class="slogan"><?php echo $Site->slogan() ?></h2>
|
||||||
|
|
||||||
<!-- Plugins -->
|
<!-- Plugins Sidebar -->
|
||||||
<?php
|
<?php Theme::plugins('onSiteSidebar'); ?>
|
||||||
Theme::plugins('onSiteSidebar');
|
|
||||||
?>
|
|
Loading…
Reference in New Issue