Changeset 2903

Show
Ignore:
Timestamp:
11/23/08 18:25:24 (4 years ago)
Author:
patdenice
Message:

merge -c2902 from trunk to branch 2.0.
- Add home and identification buttons after installation.
- Use fetchRemote function for remote site actions.
- Corrections in fetchRemote fnction.
- Move PLUGIN_PICTURE_BEFORE in picture.tpl.

Location:
branches/2.0
Files:
12 modified

Legend:

Unmodified
Added
Removed
  • branches/2.0/admin/include/functions.php

    r2901 r2903  
    19491949function fetchRemote($src, &$dest, $user_agent='Piwigo', $step=0) 
    19501950{ 
     1951  // Try to retrieve data from local file? 
     1952  if (!url_is_remote($src)) 
     1953  { 
     1954    $content = @file_get_contents($src); 
     1955    if ($content !== false) 
     1956    { 
     1957      is_resource($dest) ? @fwrite($dest, $content) : $dest = $content; 
     1958      return true; 
     1959    } 
     1960    else 
     1961    { 
     1962      return false; 
     1963    } 
     1964  } 
     1965 
    19511966  // After 3 redirections, return false 
    19521967  if ($step > 3) return false; 
     
    19651980    $content = @curl_exec($ch); 
    19661981    $header_length = @curl_getinfo($ch, CURLINFO_HEADER_SIZE); 
     1982    $status = @curl_getinfo($ch, CURLINFO_HTTP_CODE); 
    19671983    @curl_close($ch); 
    1968     if ($content !== false) 
     1984    if ($content !== false and $status >= 200 and $status < 400) 
    19691985    { 
    19701986      if (preg_match('/Location:\s+?(.+)/', substr($content, 0, $header_length), $m)) 
  • branches/2.0/admin/site_manager.php

    r2530 r2903  
    4545  global $template, $page; 
    4646 
    47   if($lines = @file($url)) 
    48   { 
     47  if (fetchRemote($url, $result)) 
     48  { 
     49    $lines = explode("\r\n", $result); 
    4950    // cleaning lines from HTML tags 
    5051    foreach ($lines as $line) 
     
    113114        $clf_url.= '?action=test'; 
    114115        $clf_url.= '&version='.PHPWG_VERSION; 
    115         if ( ($lines = @file($clf_url)) !== false) 
     116        if (fetchRemote($clf_url, $result)) 
    116117        { 
     118          $lines = explode("\r\n", $result); 
    117119          $first_line = strip_tags($lines[0]); 
    118120          if (!preg_match('/^PWG-INFO-2:/', $first_line)) 
  • branches/2.0/admin/site_reader_remote.php

    r2299 r2903  
    4949  if (!isset($listing_url)) 
    5050  { 
    51     $this->listing_url = $this->site_url.'/listing.xml'; 
     51    $this->listing_url = $this->site_url.'listing.xml'; 
    5252  } 
    5353  else 
     
    6666  global $errors; 
    6767 
    68   if (@fopen($this->listing_url, 'r')) 
     68  if ($xml_content = getXmlCode($this->listing_url)) 
    6969  { 
    7070    $this->site_dirs = array(); 
    7171    $this->site_files = array(); 
    72     $xml_content = getXmlCode($this->listing_url); 
    7372    $info_xml_element = getChild($xml_content, 'informations'); 
    7473    if (getAttribute($info_xml_element , 'phpwg_version') != PHPWG_VERSION) 
  • branches/2.0/admin/template/goto/install.tpl

    r2820 r2903  
    146146  </table> 
    147147</form> 
     148{else} 
     149<p> 
     150  <br /> 
     151  <input type="button" name="index" value="{'home'|@translate}" onClick="document.location = 'index.php';"/> 
     152  <input type="button" name="identification" value="{'Identification'|@translate}" onClick="document.location = 'identification.php';"/> 
     153</p> 
    148154{/if} 
    149155</div> {* content *} 
  • branches/2.0/include/functions_xml.inc.php

    r2299 r2903  
    122122  } 
    123123 
    124   $file = fopen( $filename, 'r' ); 
    125   if ( !$file ) 
     124  if (!fetchRemote($filename, $xml_content)) 
    126125  { 
    127126    return false; 
    128127  } 
    129128 
    130   $xml_content = ''; 
    131   while ( !feof( $file ) ) 
    132   { 
    133     $xml_content .= fgets( $file, 1024 ); 
    134   } 
    135   fclose( $file ); 
    136129  $xml_content = str_replace( "\n", '', $xml_content ); 
    137130  $xml_content = str_replace( "\t", '', $xml_content ); 
  • branches/2.0/language/de_DE/install.lang.php

    r2866 r2903  
    5858$lang['install_help'] = 'Brauchen Sie Hilfe? Stellen Sie Ihre Frage auf der <a href="%s"> Forum Piwigo </ a>.'; 
    5959$lang['install_end_message'] = 'Die Konfiguration der Piwigo abgeschlossen ist, hier ist der nächste Schritt<br /><br /> 
    60 * Gehen Sie auf die Identifizierung Seite: [ <a href="./identification.php">Identifizierung</a> ] und verwenden Sie die Login / Passwort für Webmaster<br /> 
     60* Gehen Sie auf die Identifizierung Seite und verwenden Sie die Login / Passwort für Webmaster<br /> 
    6161* diesem Login ermöglicht Ihnen den Zugang zu den Verwaltungs-Panel und den Anweisungen, um Platz Bilder in Ihre Verzeichnisse.'; 
    6262$lang['conf_mail_webmaster'] = 'Webmaster Mail-Adresse'; 
  • branches/2.0/language/en_UK/install.lang.php

    r2866 r2903  
    6060$lang['install_help'] = 'Need help ? Ask your question on <a href="%s">Piwigo message board</a>.'; 
    6161$lang['install_end_message'] = 'The configuration of Piwigo is finished, here is the next step<br /><br /> 
    62 * go to the identification page : [ <a href="identification.php">identification</a> ] and use the login/password given for webmaster<br /> 
     62* go to the identification page and use the login/password given for webmaster<br /> 
    6363* this login will enable you to access to the administration panel and to the instructions in order to place pictures in your directories'; 
    6464$lang['conf_mail_webmaster'] = 'Webmaster mail address'; 
  • branches/2.0/language/es_ES/install.lang.php

    r2866 r2903  
    5858$lang['install_help'] = '¿ Necesidad de ayudante? Plantee su cuestión sobre él <a href="%s">foro de Piwigo</a>.'; 
    5959$lang['install_end_message'] = 'La configuración de la aplicación correctamente se celebró, coloca en la etapa próxima<br /><br /> 
    60 * Vaya sobre la página de identificación : [ <a href="./identification.php">identificación</a> ] Y conéctese con pseudo dado para el webmaster<br /> 
     60* Vaya sobre la página de identificación y conéctese con pseudo dado para el webmaster<br /> 
    6161* Éste le permite acceder a la parte administración y a las instrucciones para colocar las imágenes en los repertorios.'; 
    6262$lang['conf_mail_webmaster'] = 'Dirige e-mail del Administrador'; 
  • branches/2.0/language/fr_FR/install.lang.php

    r2866 r2903  
    5858$lang['install_help'] = 'Besoin d\'aide ? Posez votre question sur le <a href="%s">forum de Piwigo</a>.'; 
    5959$lang['install_end_message'] = 'La configuration de l\'application s\'est correctement déroulée, place à la prochaine étape<br /><br /> 
    60 * allez sur la page d\'identification : [ <a href="./identification.php">identification</a> ] et connectez-vous avec le pseudo donné pour le webmaster<br /> 
     60* allez sur la page d\'identification et connectez-vous avec le pseudo donné pour le webmaster<br /> 
    6161* celui-ci vous permet d\'accéder à la partie administration et aux instructions pour placer les images dans les répertoires.'; 
    6262$lang['conf_mail_webmaster'] = 'Adresse e-mail de l\'Administrateur'; 
  • branches/2.0/language/it_IT/install.lang.php

    r2886 r2903  
    5858$lang['install_help'] = 'Bisogno di un aiuto? Visitate il <a href="%s">forum di Piwigo</a>.'; 
    5959$lang['install_end_message'] = 'La configurazione di Piwigo è conclusa. Procedete al prossimo step<br /><br /> 
    60 * collegatevi alla pagina d\'accesso: [ <a href="identification.php">Accedi ora</a> ] e usate il vostro nome utente e password del Webmaster<br /> 
     60* collegatevi alla pagina d\'accesso e usate il vostro nome utente e password del Webmaster<br /> 
    6161* a questo punto sarete abilitati all\'accesso al pannello di amministrazione in cui troverete le istruzioni per l\'inserimento delle immagini nelle vostre directory'; 
    6262$lang['conf_mail_webmaster'] = 'Indirizzo email del Amministratore'; 
  • branches/2.0/language/nl_NL/install.lang.php

    r2866 r2903  
    6060$lang['install_help'] = 'Hulp nodig ? stel een vraag op het <a href="%s" target="_blank">Piwigo forum</a>.'; 
    6161$lang['install_end_message'] = 'Het installeren van Piwigo is klaar, de volgende stap is<br /><br /> 
    62 * Ga naar de Indentificatie pagina: [ <a href="identification.php">Indentificatie</a> ] gebruik hiervoor het eerder opgegeven gebruikersnaam met wachtwoord<br /> 
     62* Ga naar de Indentificatie pagina en gebruik hiervoor het eerder opgegeven gebruikersnaam met wachtwoord<br /> 
    6363* Deze gebruikersnaam geeft u toegang tot de beheermenu zodat u afbeeldingen op uw website kan plaatsen'; 
    6464$lang['conf_mail_webmaster'] = 'Webmaster email adres'; 
  • branches/2.0/template/yoga/picture.tpl

    r2779 r2903  
    2525</div> 
    2626{/if} 
     27 
     28{if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} 
    2729 
    2830<div id="imageHeaderBar"> 
     
    3840</div> 
    3941 
    40 {if !empty($PLUGIN_PICTURE_BEFORE)}{$PLUGIN_PICTURE_BEFORE}{/if} 
    4142<div id="imageToolBar"> 
    4243  <div class="randomButtons"> 
     
    279280{/if} {*comments*} 
    280281 
    281  
    282  
    283282{if !empty($PLUGIN_PICTURE_AFTER)}{$PLUGIN_PICTURE_AFTER}{/if}