Bug fixes
This commit is contained in:
parent
6af40b3dfe
commit
d8a5c98fa9
@ -24,7 +24,7 @@
|
||||
<option value="editor">Editor</option>
|
||||
<option value="admin">Administrator</option>
|
||||
</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>
|
||||
@ -35,4 +35,4 @@
|
||||
|
||||
<input type="submit" class="btn btn-blue" value="Add" name="add-user">
|
||||
<a href="<?php echo HTML_PATH_ADMIN_ROOT.'users' ?>" class="btn">Cancel</a>
|
||||
</form>
|
||||
</form>
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
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">';
|
||||
}
|
||||
?>
|
||||
|
@ -20,7 +20,7 @@
|
||||
}
|
||||
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">';
|
||||
}
|
||||
?>
|
||||
|
@ -40,7 +40,7 @@
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
<?php
|
||||
}
|
||||
@ -61,7 +61,7 @@
|
||||
<label>
|
||||
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>
|
||||
|
||||
<input type="submit" class="btn btn-blue" value="Save" name="user-email">
|
||||
|
@ -32,4 +32,4 @@
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
@ -24,4 +24,4 @@
|
||||
|
||||
?>
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
@ -18,7 +18,7 @@
|
||||
}
|
||||
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">';
|
||||
}
|
||||
?>
|
||||
|
@ -18,25 +18,25 @@
|
||||
<label>
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
Footer text
|
||||
<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>
|
||||
|
||||
<input type="submit" class="btn" value="Save" name="form-general">
|
||||
@ -59,13 +59,13 @@
|
||||
}
|
||||
?>
|
||||
</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>
|
||||
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>
|
||||
|
||||
<h4>Writting Settings</h4>
|
||||
@ -73,8 +73,8 @@
|
||||
<ul class="forms-list">
|
||||
<li>
|
||||
<input type="checkbox" name="advancedOptions" id="advancedOptions" value="true" <?php echo $Site->advancedOptions()?'checked':'' ?>>
|
||||
<label for="advancedOptions">Advanced options when writing.</label>
|
||||
<div class="forms-desc">Add/edit friendly URL, description and tags.</div>
|
||||
<label for="advancedOptions">Advanced options</label>
|
||||
<div class="forms-desc">Add or edit description, tags or modify the friendly URL.</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
@ -119,7 +119,7 @@
|
||||
}
|
||||
?>
|
||||
</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 for="timezone">
|
||||
@ -138,7 +138,7 @@
|
||||
<label>
|
||||
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>
|
||||
|
||||
<input type="submit" class="btn" value="Save" name="form-regional">
|
||||
|
@ -24,7 +24,7 @@
|
||||
echo '<td>'.$field['lastName'].'</td>';
|
||||
echo '<td>'.$field['role'].'</td>';
|
||||
echo '<td>'.$field['email'].'</td>';
|
||||
echo '<td>'.$field['registered'].'</td>';
|
||||
echo '<td>'.Date::format($field['registered'], '%d %B').'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
|
@ -1,4 +1,4 @@
|
||||
Set the right permissions for this directory.
|
||||
|
||||
Documentation:
|
||||
- http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
||||
- http://docs.bludit.com/en/troubleshooting/writing-test-failure-err205
|
@ -218,9 +218,9 @@ Congratulations, you have installed **Bludit** successfully!
|
||||
What\'s next:
|
||||
---
|
||||
- Administrate your Bludit from the [Admin Area](./admin/)
|
||||
- Follow Bludit on [Twitter](https://twitter.com/bludit) / Facebook / Google+
|
||||
- Visit the forum for support
|
||||
- Read the documentation for more information
|
||||
- Follow Bludit on [Twitter](https://twitter.com/bludit) / [Facebook](https://www.facebook.com/pages/Bludit/239255789455913) / Google+
|
||||
- Visit the [forum](http://forum.bludit.com) for support
|
||||
- Read the [documentation](http://docs.bludit.com) for more information
|
||||
- Share with your friend :D';
|
||||
|
||||
file_put_contents(PATH_POSTS.$firstPostSlug.DS.'index.txt', $data, LOCK_EX);
|
||||
|
@ -27,7 +27,7 @@ class dbJSON
|
||||
}
|
||||
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'=>'/'),
|
||||
'uriPost'=> array('inFile'=>false, 'value'=>'/post/'),
|
||||
'uriTag'=> array('inFile'=>false, 'value'=>'/tag/'),
|
||||
'url'=> array('inFile'=>false, 'value'=>''),
|
||||
//'url'=> array('inFile'=>false, 'value'=>''),
|
||||
'advancedOptions'=> array('inFile'=>false, 'value'=>'false')
|
||||
);
|
||||
|
||||
|
@ -6,8 +6,8 @@ class Session {
|
||||
|
||||
public static function start()
|
||||
{
|
||||
if(self::$started)
|
||||
return true;
|
||||
//if(self::$started)
|
||||
// return true;
|
||||
|
||||
// DEBUG: Ver un nombre con alguna llave random al momentode instalar.
|
||||
$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.
|
||||
$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.
|
||||
$cookieParams = session_get_cookie_params();
|
||||
|
||||
session_set_cookie_params($cookieParams["lifetime"],
|
||||
session_set_cookie_params($cookieLifetime,
|
||||
$cookieParams["path"],
|
||||
$cookieParams["domain"],
|
||||
$secure,
|
||||
@ -36,6 +40,13 @@ class Session {
|
||||
|
||||
// Regenerated the session, delete the old one. There are problems with AJAX.
|
||||
//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()
|
||||
@ -51,6 +62,8 @@ class Session {
|
||||
|
||||
self::$started = false;
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Session destroyed.');
|
||||
|
||||
return !isset($_SESSION);
|
||||
}
|
||||
|
||||
@ -65,8 +78,9 @@ class Session {
|
||||
{
|
||||
$key = 's_'.$key;
|
||||
|
||||
if( isset($_SESSION[$key]) )
|
||||
if( isset($_SESSION[$key]) ) {
|
||||
return $_SESSION[$key];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -21,10 +21,12 @@ class Login {
|
||||
|
||||
public function setLogin($username, $role)
|
||||
{
|
||||
Session::set('username', $username);
|
||||
Session::set('role', $role);
|
||||
Session::set('username', $username);
|
||||
Session::set('role', $role);
|
||||
Session::set('fingerPrint', $this->fingerPrint());
|
||||
Session::set('sessionTime', time());
|
||||
|
||||
Log::set(__METHOD__.LOG_SEP.'Set fingerPrint: '.$this->fingerPrint());
|
||||
}
|
||||
|
||||
public function isLogged()
|
||||
@ -36,6 +38,13 @@ class Login {
|
||||
if(!empty($username)) {
|
||||
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;
|
||||
@ -47,11 +56,13 @@ class Login {
|
||||
$password = trim($password);
|
||||
|
||||
if(empty($username) || empty($password)) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Username or Password empty. Username: '.$username.' - Password: '.$password);
|
||||
return false;
|
||||
}
|
||||
|
||||
$user = $this->dbUsers->get($username);
|
||||
if($user==false) {
|
||||
Log::set(__METHOD__.LOG_SEP.'Username not exist: '.$username);
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -63,6 +74,9 @@ class Login {
|
||||
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
Log::set(__METHOD__.LOG_SEP.'Password are differents.');
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -98,5 +98,3 @@ class Site extends DB_SERIALIZE
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user