Subversion Repositories Applications.papyrus

Compare Revisions

Ignore whitespace Rev 1634 → Rev 1635

/trunk/papyrus/applications/admin_site/bibliotheque/adsi_site.fonct.php
19,7 → 19,7
// | License along with this library; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
// +------------------------------------------------------------------------------------------------------+
// CVS : $Id: adsi_site.fonct.php,v 1.39 2007-06-26 14:18:53 florian Exp $
// CVS : $Id: adsi_site.fonct.php,v 1.40 2007-10-04 12:57:37 ddelon Exp $
/**
* Bibliotheque de fonctions d'admininistration des projets
*
34,7 → 34,7
*@author Alexandre GRANIER <alexandre@tela-botanica.org>
*@author Laurent COUDOUNEAU <lc@gsite.org>
*@copyright Tela-Botanica 2000-2004
*@version $Revision: 1.39 $ $Date: 2007-06-26 14:18:53 $
*@version $Revision: 1.40 $ $Date: 2007-10-04 12:57:37 $
// +------------------------------------------------------------------------------------------------------+
*/
 
1116,6 → 1116,7
* @param int identifiant de l'administrateur realisant cette création.
* @return string retourne un message en cas de succes ou d'echec.
*/
 
function ADMIN_traduireSite(&$db, $aso_valeurs, $id_admin)
{
// Nous verifions si nous avons a faire a un site externe.
1135,7 → 1136,7
if (!GEN_FTP_UTILISE && $id_type_site != '103') {
foreach ($tab_rep_langue as $nom_rep_langue) {
foreach ($tab_rep_site as $nom_rep_site) {
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$chemin_repertoire = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$nom_rep_langue.GEN_SEP.$nom_rep_site;
$vieux_umask = umask(0);
$resultat = creerDossier($chemin_repertoire, 0777, GEN_SEP);
1149,9 → 1150,9
}
}
}
$chemin_squelette_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
$chemin_squelette_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE;
$chemin_squelette_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$chemin_squelette_site = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE;
if (!copy($chemin_squelette_defaut, $chemin_squelette_site)) {
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de cr&eacute;er le fichier de squellete par d&eacute;faut.<br />'.
1160,9 → 1161,9
'Fichier n&deg; : '. __FILE__ .'<br /></p>';
return $message;
}
$chemin_style_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
$chemin_style_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE;
$chemin_style_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$chemin_style_site = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE;
if (!copy($chemin_style_defaut, $chemin_style_site)) {
$message = '<p class="pap_erreur"> ERREUR Papyrus admin : impossible de cr&eacute;er le fichier de style par défaut.<br />'.
1192,13 → 1193,13
'Fichier n&deg; : '. __FILE__ .'<br /><p>';
return $message;
}
$objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ;
$objet_pear_ftp->mkdir(PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ;
//$objet_pear_ftp->cd(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ;
//$objet_pear_ftp->cd(PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha']) ;
foreach ($tab_rep_langue as $nom_rep_langue) {
$objet_pear_ftp->mkdir(PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ;
$objet_pear_ftp->mkdir(PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue) ;
foreach ($tab_rep_site as $nom_rep_site) {
$chemin_repertoire = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site;
$chemin_repertoire = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.$nom_rep_langue.GEN_SEP.$nom_rep_site;
$resultat = $objet_pear_ftp->mkdir($chemin_repertoire) ;
if (PEAR::isError($resultat)) {
1211,9 → 1212,9
}
}
}
$chemin_squelette_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
$chemin_squelette_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE;
$chemin_squelette_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$chemin_squelette_site = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_SQUELETTE.GEN_SEP.GEN_FICHIER_SQUELETTE;
$resultat = $objet_pear_ftp->put($chemin_squelette_defaut, $chemin_squelette_site, true, FTP_BINARY);
if (PEAR::isError($resultat)) {
1225,9 → 1226,9
'Fichier n&deg; : '. __FILE__ .'<br /></p>';
return $message;
}
$chemin_style_defaut = PAP_FTP_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
$chemin_style_defaut = PAP_CHEMIN_RACINE.GEN_CHEMIN_COMMUN.GEN_DOSSIER_GENERIQUE.GEN_SEP.
GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE;
$chemin_style_site = PAP_FTP_RACINE.GEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$chemin_style_site = PAP_CHEMIN_RACINEGEN_CHEMIN_SITES.$aso_valeurs['gs_code_alpha'].GEN_SEP.
$aso_valeurs['gs_ce_i18n'].GEN_SEP.GEN_DOSSIER_STYLE.GEN_SEP.GEN_FICHIER_STYLE;
$resultat = $objet_pear_ftp->put($chemin_style_defaut, $chemin_style_site, true, FTP_BINARY);
if (PEAR::isError($resultat)) {
1403,6 → 1404,7
}
 
 
 
/** Fonction ADMIN_modifierSite() - Modifie un site de Papyrus.
*
* Cette fonction modifie un site géré par Papyrus.
1840,6 → 1842,9
// +- Fin du code source --------------------------------------------------------------------------------+
/*
* $Log: not supported by cvs2svn $
* Revision 1.39 2007-06-26 14:18:53 florian
* amélioration des formulaires des différentes applis de l'interface d'administration afin de les simplifier
*
* Revision 1.38 2007-06-25 12:15:06 alexandre_tb
* merge from narmer
*