diff options
author | z0rglub <z0rglub@piwigo.org> | 2003-11-03 21:35:24 +0000 |
---|---|---|
committer | z0rglub <z0rglub@piwigo.org> | 2003-11-03 21:35:24 +0000 |
commit | 860a39302ead57c596bec64e9d738c5dd69640bd (patch) | |
tree | a71089e36e0f9c2a90ff5fc373dc5f07551e5ddb | |
parent | 5fdc7ea1e582c7378ea8fd8ac3a9a50ec5298970 (diff) |
Modifications linked to the move of admin.php to the root directory of PhpWebGallery
git-svn-id: http://piwigo.org/svn/trunk@228 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | admin.php | 14 | ||||
-rw-r--r-- | admin/comments.php | 9 | ||||
-rw-r--r-- | admin/configuration.php | 2 | ||||
-rw-r--r-- | admin/help.php | 2 | ||||
-rw-r--r-- | admin/infos_images.php | 4 | ||||
-rw-r--r-- | admin/thumbnail.php | 2 | ||||
-rw-r--r-- | admin/update.php | 12 | ||||
-rw-r--r-- | category.php | 2 |
8 files changed, 19 insertions, 28 deletions
@@ -18,10 +18,10 @@ ***************************************************************************/ //----------------------------------------------------------- personnal include -include_once( './include/isadmin.inc.php' ); +include_once( './admin/include/isadmin.inc.php' ); //----------------------------------------------------- template initialization $vtp = new VTemplate; -$handle = $vtp->Open( '../template/'.$user['template'].'/admin/admin.vtp' ); +$handle = $vtp->Open( './template/'.$user['template'].'/admin.vtp' ); // language $tpl = array( 'title_default','charset','install_warning' ); templatize_array( $tpl, 'lang', $handle ); @@ -117,9 +117,9 @@ switch ( $_GET['page'] ) { $title.= ' '.$lang['title_thumbnails_2'].' <span style="color:#006699;">'; // $_GET['dir'] contains : - // ../galleries/vieux_lyon ou - // ../galleries/vieux_lyon/visite ou - // ../galleries/vieux_lyon/visite/truc ... + // ./galleries/vieux_lyon ou + // ./galleries/vieux_lyon/visite ou + // ./galleries/vieux_lyon/visite/truc ... $dir = explode( "/", $_GET['dir'] ); $title.= $dir[2]; for ( $i = 3; $i < sizeof( $dir ) - 1; $i++ ) @@ -237,13 +237,13 @@ $vtp->closeSession( $handle, 'summary' ); // back to thumbnails page $vtp->addSession( $handle, 'summary' ); $vtp->setVar( $handle, 'summary.indent', '| ' ); -$vtp->setVar( $handle, 'summary.link', add_session_id( '../category.php' ) ); +$vtp->setVar( $handle, 'summary.link', add_session_id( './category.php' ) ); $vtp->setVar( $handle, 'summary.name', $lang['menu_back'] ); $vtp->closeSession( $handle, 'summary' ); //------------------------------------------------------------- content display if ( $page_valide ) { - include ( $_GET['page'].'.php' ); + include ( './admin/'.$_GET['page'].'.php' ); } else { diff --git a/admin/comments.php b/admin/comments.php index 9c9ec1096..f13afab30 100644 --- a/admin/comments.php +++ b/admin/comments.php @@ -60,17 +60,12 @@ function display_pictures( $mysql_result, $maxtime, $validation_box = false ) $name.= ' [ '.$subrow['file'].' ]'; $vtp->setVar( $sub, 'picture.title', $name ); // source of the thumbnail picture - $src = ''; - if ( $array_cat_site_id[$subrow['cat_id']] == 1 ) - { - $src.= '.'; - } - $src.= $array_cat_directories[$subrow['cat_id']]; + $src = $array_cat_directories[$subrow['cat_id']]; $src.= 'thumbnail/'.$conf['prefix_thumbnail']; $src.= $file.'.'.$subrow['tn_ext']; $vtp->setVar( $sub, 'picture.thumb_src', $src ); // link to the full size picture - $url = '../picture.php?cat='.$subrow['cat_id']; + $url = './picture.php?cat='.$subrow['cat_id']; $url.= '&image_id='.$row['image_id']; $vtp->setVar( $sub, 'picture.thumb_url', add_session_id( $url ) ); // 3. for each picture, retrieving all comments diff --git a/admin/configuration.php b/admin/configuration.php index 3ccbd6573..bced7704f 100644 --- a/admin/configuration.php +++ b/admin/configuration.php @@ -589,7 +589,7 @@ $vtp->addSession( $sub, 'param_line' ); $vtp->setVar( $sub, 'param_line.name', $lang['customize_language'] ); $vtp->addSession( $sub, 'select' ); $vtp->setVar( $sub, 'select.name', 'language' ); -$option = get_languages( '../language/' ); +$option = get_languages( './language/' ); for ( $i = 0; $i < sizeof( $option ); $i++ ) { $vtp->addSession( $sub, 'option' ); diff --git a/admin/help.php b/admin/help.php index 931049c80..085a3f017 100644 --- a/admin/help.php +++ b/admin/help.php @@ -29,7 +29,7 @@ foreach ( $categories as $category ) { if ( $category == 'images' ) { $vtp->addSession( $sub, 'illustration' ); - $vtp->setVar( $sub, 'illustration.pic_src', './images/admin.png' ); + $vtp->setVar( $sub, 'illustration.pic_src', './admin/images/admin.png' ); $vtp->setVar( $sub, 'illustration.pic_alt', '' ); $vtp->setVar( $sub, 'illustration.caption', $lang['help_images_intro'] ); $vtp->closeSession( $sub, 'illustration' ); diff --git a/admin/infos_images.php b/admin/infos_images.php index 342b43d45..344573eac 100644 --- a/admin/infos_images.php +++ b/admin/infos_images.php @@ -272,10 +272,6 @@ if ( isset( $page['cat'] ) ) get_complete_dir( $row['storage_category_id'] ); } $thumbnail_url = $array_cat_directories[$row['storage_category_id']]; - if ( preg_match( '/^\.\/galleries/', $thumbnail_url ) ) - { - $thumbnail_url = '.'.$thumbnail_url; - } $thumbnail_url.= 'thumbnail/'; $thumbnail_url.= $conf['prefix_thumbnail'].$file.".".$row['tn_ext']; $vtp->setVar( $sub, 'picture.thumbnail_url', $thumbnail_url ); diff --git a/admin/thumbnail.php b/admin/thumbnail.php index 5f2774d6c..0abbae506 100644 --- a/admin/thumbnail.php +++ b/admin/thumbnail.php @@ -421,7 +421,7 @@ if ( isset( $_GET['dir'] ) ) else { $vtp->addSession( $sub, 'directory_list' ); - get_displayed_dirs( '../galleries', 60 ); + get_displayed_dirs( './galleries', 60 ); $vtp->closeSession( $sub, 'directory_list' ); } //----------------------------------------------------------- sending html code diff --git a/admin/update.php b/admin/update.php index c19dc7219..df1c6ebff 100644 --- a/admin/update.php +++ b/admin/update.php @@ -22,12 +22,12 @@ include_once( './admin/include/isadmin.inc.php' ); function insert_local_category( $cat_id ) { global $conf, $page, $user, $lang; - + $site_id = 1; - + // 0. retrieving informations on the category to display - $cat_directory = '../galleries'; - + $cat_directory = './galleries'; + if ( is_numeric( $cat_id ) ) { $cat_directory.= '/'.get_local_dir( $cat_id ); @@ -64,7 +64,7 @@ function insert_local_category( $cat_id ) while ( $row = mysql_fetch_array( $result ) ) { // retrieving the directory - $rep = '../galleries/'.get_local_dir( $row['id'] ); + $rep = './galleries/'.get_local_dir( $row['id'] ); // is the directory present ? if ( !is_dir( $rep ) ) delete_category( $row['id'] ); } @@ -588,7 +588,7 @@ if ( !isset( $_GET['update'] ) $vtp->setVar( $sub, 'introduction.all:url', $url ); $vtp->closeSession( $sub, 'introduction' ); } -//------------------------------------------------- local update : ../galleries +//-------------------------------------------------- local update : ./galleries else { $count_new = 0; diff --git a/category.php b/category.php index 55c4c9d63..1058eb958 100644 --- a/category.php +++ b/category.php @@ -216,7 +216,7 @@ if ( $user['status'] == 'admin' ) { $vtp->addSession( $handle, 'summary' ); $vtp->setVar( $handle, 'summary.url', - add_session_id( './admin/admin.php' ) ); + add_session_id( './admin.php' ) ); $vtp->setVar( $handle, 'summary.title', $lang['hint_admin'] ); $vtp->setVar( $handle, 'summary.name', replace_space( $lang['admin'] ) ); $vtp->closeSession( $handle, 'summary' ); |