Fix deprecated constant MYSQL_ASSOC + session_write notices #26
8 changed files with 47 additions and 8 deletions
2
boot.php
2
boot.php
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
require_once 'include/session.php';
|
||||
|
||||
require_once 'vendor/autoload.php';
|
||||
|
||||
set_time_limit(0);
|
||||
|
|
|
@ -70,7 +70,7 @@ class dba
|
|||
|
||||
$r = array();
|
||||
if ($result->num_rows) {
|
||||
while ($x = $result->fetch_array(MYSQL_ASSOC)) {
|
||||
while ($x = $result->fetch_array(MYSQLI_ASSOC)) {
|
||||
$r[] = $x;
|
||||
}
|
||||
$result->free_result();
|
||||
|
|
|
@ -15,7 +15,6 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data);
|
|||
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
require_once 'session.php';
|
||||
require_once 'datetime.php';
|
||||
|
||||
if ($argc < 3) {
|
||||
|
|
|
@ -15,7 +15,6 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data);
|
|||
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
require_once 'session.php';
|
||||
require_once 'datetime.php';
|
||||
require_once 'simplepie/simplepie.inc';
|
||||
require_once 'include/items.php';
|
||||
|
|
|
@ -14,7 +14,6 @@ $db = new dba($db_host, $db_user, $db_pass, $db_data, $install);
|
|||
|
||||
unset($db_host, $db_user, $db_pass, $db_data);
|
||||
|
||||
require_once 'session.php';
|
||||
require_once 'datetime.php';
|
||||
|
||||
$a->set_baseurl(get_config('system', 'url'));
|
||||
|
|
|
@ -30,10 +30,14 @@ function ref_session_write($id, $data)
|
|||
{
|
||||
global $session_exists, $session_expire;
|
||||
|
||||
if (!$id || !$data) {
|
||||
if (!$id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!$data) {
|
||||
return true;
|
||||
}
|
||||
|
||||
$expire = time() + $session_expire;
|
||||
$default_expire = time() + 300;
|
||||
|
||||
|
|
|
@ -24,8 +24,6 @@ unset($db_host, $db_user, $db_pass, $db_data);
|
|||
$a->init_pagehead();
|
||||
$a->page['aside'] = '<div id="logo"><img src="images/friendica-32.png" alt="friendica logo" /> <a href="http://friendica.com">Friendica</a></div><div id="slogan">Your friends. Your web.</div>';
|
||||
|
||||
require_once 'session.php';
|
||||
|
||||
session_start();
|
||||
|
||||
if ((x($_SESSION, 'authenticated')) || (x($_POST, 'auth-params')) || ($a->module === 'login')) {
|
||||
|
|
38
maintenance.html
Normal file
38
maintenance.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
|
||||
<!DOCTYPE html >
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
|
||||
<meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1">
|
||||
<link rel="search" type="application/opensearchdescription+xml" title="Friendica Directory" href="/opensearch" />
|
||||
|
||||
<title>Friendica Directory</title>
|
||||
<link rel="shortcut icon" href="/images/friendica-32.png" />
|
||||
<link rel="apple-touch-icon" href="/images/friendica-128.png"/>
|
||||
|
||||
<link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
|
||||
<link href="/assets/css/awesome/font-awesome.min.css?v=4.3.0" rel="stylesheet" type="text/css">
|
||||
|
||||
<script type="text/javascript" src="/assets/js/jquery/jquery.min.js?v=1.11.2"></script>
|
||||
<script type="text/javascript" src="/assets/js/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<a class="hamburger mobile"><i class="fa fa-bars"></i></a>
|
||||
<nav id="links">
|
||||
<div class="viewport">
|
||||
</div>
|
||||
</nav>
|
||||
<div class="homepage-wrapper">
|
||||
<h1 class="header">
|
||||
Friendica <br> Directory
|
||||
</h1>
|
||||
<h2>
|
||||
Directory under maintenance
|
||||
</h2>
|
||||
|
||||
<p class="about">
|
||||
The Friendica Directory is unavailable at this time, please connect with <a href="https://friendica.mrpetovan.com/profile/hypolite">hypolite@friendica.mrpetovan.com</a> for updates about its status.
|
||||
![]() You're right, I committed directly to my master and then I built the two other issues branches on my master as well, which means that the commits with the maintenance page appears everywhere, both in this PR as well as in the branches' PR. I'm not sure I can make it a setting as it is supposed to be a static page that should work even if nothing else does. You're right, I committed directly to my master and then I built the two other issues branches on my master as well, which means that the commits with the maintenance page appears everywhere, both in this PR as well as in the branches' PR.
I'm not sure I can make it a setting as it is supposed to be a static page that should work even if nothing else does.
![]() You could maybe include a simple config file for that purpose? You could maybe include a simple config file for that purpose?
![]() Does the directory not have a Does the directory not have a `.htconfig.php` file? I simple assumed so ;-)
![]() I will change it in a further PR. I will change it in a further PR.
|
||||
</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in a new issue
I guess your other PRs are based upon this one? There is this issue with the mail address that @tobiasd had addressed.