- fix icon display on index page (calendar by post date)
- remove unnecessary include_once - mysql functions simplification git-svn-id: http://piwigo.org/svn/trunk@8844 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
parent
f33339b964
commit
13b9118f41
4 changed files with 4 additions and 13 deletions
|
|
@ -77,9 +77,7 @@ function pwg_db_check_version()
|
||||||
|
|
||||||
function pwg_get_db_version()
|
function pwg_get_db_version()
|
||||||
{
|
{
|
||||||
list($mysql_version) = pwg_db_fetch_row(pwg_query('SELECT VERSION();'));
|
return mysql_get_server_info();
|
||||||
|
|
||||||
return $mysql_version;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pwg_query($query)
|
function pwg_query($query)
|
||||||
|
|
@ -222,8 +220,8 @@ function mass_updates($tablename, $dbfields, $datas, $flags=0)
|
||||||
if (count($datas) == 0)
|
if (count($datas) == 0)
|
||||||
return;
|
return;
|
||||||
// depending on the MySQL version, we use the multi table update or N update queries
|
// depending on the MySQL version, we use the multi table update or N update queries
|
||||||
if (count($datas) < 10 or version_compare(mysql_get_server_info(), '4.0.4') < 0)
|
if (count($datas) < 10)
|
||||||
{ // MySQL is prior to version 4.0.4, multi table update feature is not available
|
{
|
||||||
foreach ($datas as $data)
|
foreach ($datas as $data)
|
||||||
{
|
{
|
||||||
$query = '
|
$query = '
|
||||||
|
|
|
||||||
|
|
@ -813,8 +813,6 @@ function fill_caddie($elements_id)
|
||||||
{
|
{
|
||||||
global $user;
|
global $user;
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
||||||
|
|
||||||
$query = '
|
$query = '
|
||||||
SELECT element_id
|
SELECT element_id
|
||||||
FROM '.CADDIE_TABLE.'
|
FROM '.CADDIE_TABLE.'
|
||||||
|
|
|
||||||
|
|
@ -154,7 +154,6 @@ SELECT MAX('.$conf['user_fields']['id'].') + 1
|
||||||
$conf['user_fields']['email'] => $mail_address
|
$conf['user_fields']['email'] => $mail_address
|
||||||
);
|
);
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
||||||
mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
|
mass_inserts(USERS_TABLE, array_keys($insert), array($insert));
|
||||||
|
|
||||||
// Assign by default groups
|
// Assign by default groups
|
||||||
|
|
@ -184,7 +183,6 @@ SELECT id
|
||||||
|
|
||||||
if (count($inserts) != 0)
|
if (count($inserts) != 0)
|
||||||
{
|
{
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
||||||
mass_inserts(USER_GROUP_TABLE, array('user_id', 'group_id'), $inserts);
|
mass_inserts(USER_GROUP_TABLE, array('user_id', 'group_id'), $inserts);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -417,7 +415,6 @@ DELETE FROM '.USER_CACHE_CATEGORIES_TABLE.'
|
||||||
WHERE user_id = '.$userdata['id'];
|
WHERE user_id = '.$userdata['id'];
|
||||||
pwg_query($query);
|
pwg_query($query);
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
||||||
mass_inserts
|
mass_inserts
|
||||||
(
|
(
|
||||||
USER_CACHE_CATEGORIES_TABLE,
|
USER_CACHE_CATEGORIES_TABLE,
|
||||||
|
|
@ -1022,9 +1019,7 @@ function create_user_infos($arg_id, $override_values = null)
|
||||||
array_push($inserts, $insert);
|
array_push($inserts, $insert);
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once(PHPWG_ROOT_PATH.'admin/include/functions.php');
|
|
||||||
mass_inserts(USER_INFOS_TABLE, array_keys($inserts[0]), $inserts);
|
mass_inserts(USER_INFOS_TABLE, array_keys($inserts[0]), $inserts);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($U_MODE_POSTED)}
|
{if isset($U_MODE_POSTED)}
|
||||||
<li>{strip}<a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
<li>{strip}<a href="{$U_MODE_POSTED}" title="{'display a calendar by posted date'|@translate}" class="pwg-state-default pwg-button" rel="nofollow">
|
||||||
<span class="pwg-icon pwg-icon-camera-calendar"> </span><span class="pwg-button-text">{'Calendar'|@translate}</span>
|
<span class="pwg-icon pwg-icon-calendar"> </span><span class="pwg-button-text">{'Calendar'|@translate}</span>
|
||||||
</a>{/strip}</li>
|
</a>{/strip}</li>
|
||||||
{/if}
|
{/if}
|
||||||
{if isset($U_MODE_CREATED)}
|
{if isset($U_MODE_CREATED)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue