Some rewrites:

- max_proccesses_reach() and maxload_reached() (why no _ behind max?) are called
  both way, static and with object reference.
- this is strongly discouraged and should be avoided as its support (in PHP) may
  be dropped in future releases.
- used $a = get_app(); to encapsulate code (even when the function does
  currently the same, it may be changed later)

Signed-off-by: Roland Häder <roland@mxchange.org>
This commit is contained in:
Roland Häder 2016-12-13 10:16:36 +01:00
commit 293436e5fd
27 changed files with 69 additions and 67 deletions

View file

@ -63,7 +63,7 @@ function fbrowser_content($a){
);
function _map_files1($rr){
global $a;
$a = get_app();
$types = Photo::supportedTypes();
$ext = $types[$rr['type']];
@ -110,7 +110,8 @@ function fbrowser_content($a){
intval(local_user())
);
function _map_files2($rr){ global $a;
function _map_files2($rr){
$a = get_app();
list($m1,$m2) = explode("/",$rr['filetype']);
$filetype = ( (file_exists("images/icons/$m1.png"))?$m1:"zip");

View file

@ -27,7 +27,7 @@ function fetch_init($a){
$parts = parse_url($r[0]["author-link"]);
$host = $parts["scheme"]."://".$parts["host"];
if (normalise_link($host) != normalise_link(App::get_baseurl())) {
if (normalise_link($host) != normalise_link($a->get_baseurl())) {
$location = $host."/fetch/".$a->argv[1]."/".urlencode($guid);
header("HTTP/1.1 301 Moved Permanently");

View file

@ -31,7 +31,7 @@ function p_init($a){
$parts = parse_url($r[0]["author-link"]);
$host = $parts["scheme"]."://".$parts["host"];
if (normalise_link($host) != normalise_link(App::get_baseurl())) {
if (normalise_link($host) != normalise_link($a->get_baseurl())) {
$location = $host."/p/".urlencode($guid).".xml";
header("HTTP/1.1 301 Moved Permanently");