fix: php 5 errors and warnings

improve: put back update remote site from local listing.xml functionality
(allow_url_fopen is false on several ISPs)

git-svn-id: http://piwigo.org/svn/trunk@1107 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rvelices
2006-03-28 01:26:37 +00:00
parent 51a4de797c
commit 7690f9bb8b
8 changed files with 136 additions and 53 deletions
+14 -8
View File
@@ -6,9 +6,9 @@
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $RCSfile$
// | last update : $Date: 2005-12-03 17:03:58 -0500 (Sat, 03 Dec 2005) $
// | last modifier : $Author: plg $
// | revision : $Revision: 967 $
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
// +-----------------------------------------------------------------------+
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
@@ -86,7 +86,13 @@ $infos = array();
if ($site_is_remote)
{
include_once(PHPWG_ROOT_PATH.'admin/site_reader_remote.php');
$site_reader = new RemoteSiteReader($site_url);
$local_listing = null;
if ( isset($_GET['local_listing'])
and $_GET['local_listing'] )
{
$local_listing = PHPWG_ROOT_PATH.'listing.xml';
}
$site_reader = new RemoteSiteReader($site_url, $local_listing);
}
else
{
@@ -431,7 +437,7 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
'type' => 'PWG-UPDATE-1'
)
);
continue;
}
@@ -453,12 +459,12 @@ SELECT IF(MAX(id)+1 IS NULL, 1, MAX(id)+1) AS next_element_id
: null,
'path' => $path,
);
array_push(
$inserts,
$insert
);
array_push(
$insert_links,
array(
@@ -724,7 +730,7 @@ if (isset($_POST['submit']) and preg_match('/^metadata/', $_POST['sync'])
}
}
$update_fields = $site_reader->get_update_attributes();
$update_fields = array_merge($update_fields, 'date_metadata_update');
$update_fields = array_merge($update_fields, array('date_metadata_update'));
$fields =
array(
'primary' => array('id'),