aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--admin/include/functions.php11
-rw-r--r--include/category_cats.inc.php8
-rw-r--r--include/page_header.php2
-rw-r--r--include/template.php31
-rw-r--r--profile.php11
-rw-r--r--template/yoga/default-layout.css2
6 files changed, 47 insertions, 18 deletions
diff --git a/admin/include/functions.php b/admin/include/functions.php
index a60d44b75..061de2740 100644
--- a/admin/include/functions.php
+++ b/admin/include/functions.php
@@ -528,11 +528,16 @@ function mass_inserts($table_name, $dbfields, $datas)
INSERT INTO '.$table_name.'
('.implode(',', $dbfields).')
VALUES';
- foreach ($datas as $insert_id => $insert)
+ $first = 1;
+ foreach ($datas as $insert)
{
$query.= '
';
- if ($insert_id > 0)
+ if ($first)
+ {
+ $first = 0;
+ }
+ else
{
$query.= ',';
}
@@ -1890,7 +1895,7 @@ function check_conf()
{
global $conf, $header_notes;
$count = 0;
-
+
if (($conf['show_exif']) and (!function_exists('read_exif_data')))
{
$header_notes[] = sprintf(l10n('note_check_exif'), '$conf[\'show_exif\']');
diff --git a/include/category_cats.inc.php b/include/category_cats.inc.php
index 67e666fb8..f6f188831 100644
--- a/include/category_cats.inc.php
+++ b/include/category_cats.inc.php
@@ -2,7 +2,7 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
// | file : $Id$
@@ -37,7 +37,7 @@ if ($page['section']=='recent_cats')
$query = '
SELECT
id,name, representative_picture_id, comment, nb_images, uppercats,
- date_last, max_date_last, count_images, count_categories
+ date_last, max_date_last, count_images, count_categories, global_rank
FROM '.CATEGORIES_TABLE.' INNER JOIN '.USER_CACHE_CATEGORIES_TABLE.'
ON id = cat_id and user_id = '.$user['id'].'
WHERE date_last > SUBDATE(
@@ -151,6 +151,10 @@ SELECT representative_picture_id
unset($image_id);
}
+if ($page['section']=='recent_cats')
+{
+ usort($categories, 'global_rank_compare');
+}
if (count($categories) > 0)
{
$thumbnail_src_of = array();
diff --git a/include/page_header.php b/include/page_header.php
index 8b0d69d2d..4ebe643b2 100644
--- a/include/page_header.php
+++ b/include/page_header.php
@@ -62,7 +62,7 @@ if (isset($header_infos))
}
// Header notes
-if (count($header_notes) > 0)
+if ( isset($header_notes) and count($header_notes)>0)
{
foreach ($header_notes as $header_note)
{
diff --git a/include/template.php b/include/template.php
index 8de10e0d9..276464a22 100644
--- a/include/template.php
+++ b/include/template.php
@@ -2,10 +2,10 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -293,10 +293,37 @@ class Template {
function assign_var($varname, $varval)
{
$this->_tpldata['.'][0][$varname] = $varval;
+ return true;
+ }
+ /**
+ * Root-level variable concatenation. Appends a string to an existing
+ * variable assignment with the same name.
+ */
+ function concat_var($varname, $varval)
+ {
+ if ( isset($this->_tpldata['.'][0][$varname]) )
+ {
+ $this->_tpldata['.'][0][$varname] .= $varval;
+ }
+ else
+ {
+ $this->_tpldata['.'][0][$varname] = $varval;
+ }
return true;
}
+ /**
+ * Returns a root-level variable value
+ */
+ function get_var($varname, $default=null)
+ {
+ if ( isset($this->_tpldata['.'][0][$varname]) )
+ {
+ return $this->_tpldata['.'][0][$varname];
+ }
+ return $default;
+ }
/**
* Generates a full path+filename for the given filename, which can either
diff --git a/profile.php b/profile.php
index 532964fe1..5284dbe78 100644
--- a/profile.php
+++ b/profile.php
@@ -2,10 +2,10 @@
// +-----------------------------------------------------------------------+
// | PhpWebGallery - a PHP based picture gallery |
// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
-// | Copyright (C) 2003-2005 PhpWebGallery Team - http://phpwebgallery.net |
+// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
// +-----------------------------------------------------------------------+
// | branch : BSF (Best So Far)
-// | file : $RCSfile$
+// | file : $Id$
// | last update : $Date$
// | last modifier : $Author$
// | revision : $Revision$
@@ -38,13 +38,6 @@ include_once(PHPWG_ROOT_PATH.'include/common.inc.php');
// +-----------------------------------------------------------------------+
check_status(ACCESS_CLASSIC);
-if ($user['is_the_guest'] and !$guest_allowed)
-{
- echo '<div style="text-align:center;">'.$lang['only_members'].'<br />';
- echo '<a href="./identification.php">'.$lang['ident_title'].'</a></div>';
- exit();
-}
-
$userdata = $user;
//------------------------------------------------------ update & customization
diff --git a/template/yoga/default-layout.css b/template/yoga/default-layout.css
index b7fba4f2d..589b2dcf5 100644
--- a/template/yoga/default-layout.css
+++ b/template/yoga/default-layout.css
@@ -233,7 +233,7 @@ UL.actions A {
}
UL.tagSelection {
- width: 40em;
+ width: 99%;
margin: 1em 0 1em 0;
padding: 0;
}