Bug fixes
This commit is contained in:
parent
6af40b3dfe
commit
d8a5c98fa9
|
@ -24,7 +24,7 @@
|
||||||
<option value="editor">Editor</option>
|
<option value="editor">Editor</option>
|
||||||
<option value="admin">Administrator</option>
|
<option value="admin">Administrator</option>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">You can choose the user's privilege. The editor role only can write pages and posts.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">You can enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="advancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">You can enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="advancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -40,7 +40,7 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">You can choose the user's privilege. The editor role only can write pages and posts.</div>
|
||||||
</label>
|
</label>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<label>
|
<label>
|
||||||
Email
|
Email
|
||||||
<input type="text" name="email" class="width-50" value="<?php echo $_user['email'] ?>">
|
<input type="text" name="email" class="width-50" value="<?php echo $_user['email'] ?>">
|
||||||
<div class="forms-desc">Email will not be publicly displayed.</div>
|
<div class="forms-desc">Email will not be publicly displayed. Recommended for recovery password and notifications.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="submit" class="btn btn-blue" value="Save" name="user-email">
|
<input type="submit" class="btn btn-blue" value="Save" name="user-email">
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
echo '<p class="advOptions">You can enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
echo '<p class="advOptions">Enable more features at <a href="'.HTML_PATH_ADMIN_ROOT.'settings#advanced">Settings->Advanced->Writting Settings</a></p>';
|
||||||
echo '<div id="advancedOptions" style="display:none">';
|
echo '<div id="advancedOptions" style="display:none">';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -18,25 +18,25 @@
|
||||||
<label>
|
<label>
|
||||||
Site title
|
Site title
|
||||||
<input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>">
|
<input type="text" name="title" class="width-50" value="<?php echo $Site->title() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">Use this field to name your site, it will appear at the top of every page of your site.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Site slogan
|
Site slogan
|
||||||
<input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>">
|
<input type="text" name="slogan" class="width-50" value="<?php echo $Site->slogan() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">Use this field to add a catchy prhase on your site.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Site description
|
Site description
|
||||||
<input type="text" name="description" class="width-50" value="<?php echo $Site->description() ?>">
|
<input type="text" name="description" class="width-50" value="<?php echo $Site->description() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">You can add a site description to provide a short bio or description of your site.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Footer text
|
Footer text
|
||||||
<input type="text" name="footer" class="width-50" value="<?php echo $Site->footer() ?>">
|
<input type="text" name="footer" class="width-50" value="<?php echo $Site->footer() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">You can add a small text on the bottom of every page. eg: copyright, owner, dates, etc.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="submit" class="btn" value="Save" name="form-general">
|
<input type="submit" class="btn" value="Save" name="form-general">
|
||||||
|
@ -59,13 +59,13 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Number of posts you want to show on the home page.</div>
|
<div class="forms-desc">Number of posts to show per page.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Site URL
|
Site URL
|
||||||
<input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>">
|
<input type="text" name="url" class="width-50" value="<?php echo $Site->url() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">The URL of your site.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<h4>Writting Settings</h4>
|
<h4>Writting Settings</h4>
|
||||||
|
@ -73,8 +73,8 @@
|
||||||
<ul class="forms-list">
|
<ul class="forms-list">
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>>
|
<input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>>
|
||||||
<label for="advancedOptions">Advanced options when writing.</label>
|
<label for="advancedOptions">Advanced options</label>
|
||||||
<div class="forms-desc">Add/edit friendly URL, description and tags.</div>
|
<div class="forms-desc">Add or edit description, tags or modify the friendly URL.</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">Select your site's language.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<label for="timezone">
|
<label for="timezone">
|
||||||
|
@ -138,7 +138,7 @@
|
||||||
<label>
|
<label>
|
||||||
Locale
|
Locale
|
||||||
<input type="text" name="locale" class="width-50" value="<?php echo $Site->locale() ?>">
|
<input type="text" name="locale" class="width-50" value="<?php echo $Site->locale() ?>">
|
||||||
<div class="forms-desc">Small and concise description of the field ???</div>
|
<div class="forms-desc">You can use this field to define a set of parameters related to the languege, country and special preferences.</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="submit" class="btn" value="Save" name="form-regional">
|
<input type="submit" class="btn" value="Save" name="form-regional">
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
echo '<td>'.$field['lastName'].'</td>';
|
echo '<td>'.$field['lastName'].'</td>';
|
||||||
echo '<td>'.$field['role'].'</td>';
|
echo '<td>'.$field['role'].'</td>';
|
||||||
echo '<td>'.$field['email'].'</td>';
|
echo '<td>'.$field['email'].'</td>';
|
||||||
echo '<td>'.$field['registered'].'</td>';
|
echo '<td>'.Date::format($field['registered'], '%d %B').'</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
|
@ -218,9 +218,9 @@ Congratulations, you have installed **Bludit** successfully!
|
||||||
What\'s next:
|
What\'s next:
|
||||||
---
|
---
|
||||||
- Administrate your Bludit from the [Admin Area](./admin/)
|
- Administrate your Bludit from the [Admin Area](./admin/)
|
||||||
- Follow Bludit on [Twitter](https://twitter.com/bludit) / Facebook / Google+
|
- Follow Bludit on [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / Google+
|
||||||
- Visit the forum for support
|
- Visit the [forum](http://forum.bludit.com) for support
|
||||||
- Read the documentation for more information
|
- Read the [documentation](http://docs.bludit.com) for more information
|
||||||
- Share with your friend :D';
|
- Share with your friend :D';
|
||||||
|
|
||||||
file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX);
|
file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX);
|
||||||
|
|
|
@ -27,7 +27,7 @@ class dbJSON
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Log::set(__METHOD__.LOG_SEP.'File '.$file.' dosent exists');
|
Log::set(__METHOD__.LOG_SEP.'File '.$file.' does not exists');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ class dbSite extends dbJSON
|
||||||
'uriPage'=> array('inFile'=>false, 'value'=>'/'),
|
'uriPage'=> array('inFile'=>false, 'value'=>'/'),
|
||||||
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
|
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
|
||||||
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
||||||
'url'=> array('inFile'=>false, 'value'=>''),
|
//'url'=> array('inFile'=>false, 'value'=>''),
|
||||||
'advancedOptions'=> array('inFile'=>false, 'value'=>'false')
|
'advancedOptions'=> array('inFile'=>false, 'value'=>'false')
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -6,8 +6,8 @@ class Session {
|
||||||
|
|
||||||
public static function start()
|
public static function start()
|
||||||
{
|
{
|
||||||
if(self::$started)
|
//if(self::$started)
|
||||||
return true;
|
// return true;
|
||||||
|
|
||||||
// DEBUG: Ver un nombre con alguna llave random al momentode instalar.
|
// DEBUG: Ver un nombre con alguna llave random al momentode instalar.
|
||||||
$session_name = 'Bludit-KEY';
|
$session_name = 'Bludit-KEY';
|
||||||
|
@ -18,10 +18,14 @@ class Session {
|
||||||
// If set to TRUE then PHP will attempt to send the httponly flag when setting the session cookie.
|
// If set to TRUE then PHP will attempt to send the httponly flag when setting the session cookie.
|
||||||
$httponly = true;
|
$httponly = true;
|
||||||
|
|
||||||
|
// This specifies the lifetime of the cookie in seconds which is sent to the browser.
|
||||||
|
// The value 0 means until the browser is closed.
|
||||||
|
$cookieLifetime = 0;
|
||||||
|
|
||||||
// Gets current cookies params.
|
// Gets current cookies params.
|
||||||
$cookieParams = session_get_cookie_params();
|
$cookieParams = session_get_cookie_params();
|
||||||
|
|
||||||
session_set_cookie_params($cookieParams["lifetime"],
|
session_set_cookie_params($cookieLifetime,
|
||||||
$cookieParams["path"],
|
$cookieParams["path"],
|
||||||
$cookieParams["domain"],
|
$cookieParams["domain"],
|
||||||
$secure,
|
$secure,
|
||||||
|
@ -36,6 +40,13 @@ class Session {
|
||||||
|
|
||||||
// Regenerated the session, delete the old one. There are problems with AJAX.
|
// Regenerated the session, delete the old one. There are problems with AJAX.
|
||||||
//session_regenerate_id(true);
|
//session_regenerate_id(true);
|
||||||
|
|
||||||
|
if(self::$started) {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Session started.');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Error occurred when trying to start the session.');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function started()
|
public static function started()
|
||||||
|
@ -51,6 +62,8 @@ class Session {
|
||||||
|
|
||||||
self::$started = false;
|
self::$started = false;
|
||||||
|
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Session destroyed.');
|
||||||
|
|
||||||
return !isset($_SESSION);
|
return !isset($_SESSION);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -65,8 +78,9 @@ class Session {
|
||||||
{
|
{
|
||||||
$key = 's_'.$key;
|
$key = 's_'.$key;
|
||||||
|
|
||||||
if( isset($_SESSION[$key]) )
|
if( isset($_SESSION[$key]) ) {
|
||||||
return $_SESSION[$key];
|
return $_SESSION[$key];
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,8 @@ class Login {
|
||||||
Session::set('role', $role);
|
Session::set('role', $role);
|
||||||
Session::set('fingerPrint', $this->fingerPrint());
|
Session::set('fingerPrint', $this->fingerPrint());
|
||||||
Session::set('sessionTime', time());
|
Session::set('sessionTime', time());
|
||||||
|
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Set fingerPrint: '.$this->fingerPrint());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isLogged()
|
public function isLogged()
|
||||||
|
@ -36,6 +38,13 @@ class Login {
|
||||||
if(!empty($username)) {
|
if(!empty($username)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Session username empty: '.$username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'FingerPrint are differents. Session fingerPrint: '.Session::get('fingerPrint').' !== Current fingerPrint: '.$this->fingerPrint());
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -47,11 +56,13 @@ class Login {
|
||||||
$password = trim($password);
|
$password = trim($password);
|
||||||
|
|
||||||
if(empty($username) || empty($password)) {
|
if(empty($username) || empty($password)) {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Username or Password empty. Username: '.$username.' - Password: '.$password);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$user = $this->dbUsers->get($username);
|
$user = $this->dbUsers->get($username);
|
||||||
if($user==false) {
|
if($user==false) {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Username not exist: '.$username);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,6 +74,9 @@ class Login {
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
Log::set(__METHOD__.LOG_SEP.'Password are differents.');
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -98,5 +98,3 @@ class Site extends DB_SERIALIZE
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
||||||
|
|
Loading…
Reference in New Issue