Skip to content

Commit

Permalink
fixes only:
Browse files Browse the repository at this point in the history
- some searches returned bad array for page['items'] (resulting in php warnings and sometimes mysql fatal error) still existing in branch 2.0
- mysql fatal error in admin maintenance
- php warn in plugins_list.php
- fix check on function param in admin/include/functions.php

git-svn-id: http://piwigo.org/svn/trunk@5691 68402e56-0260-453c-a942-63ccdbb3a9ee
  • Loading branch information
rvelices committed Apr 6, 2010
1 parent f8293ef commit 4e4f257
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions admin/include/functions.php
Expand Up @@ -247,7 +247,7 @@ function delete_elements($ids, $physical_deletion=false)
{
update_category($category_ids);
}

trigger_action('delete_elements', $ids);
}

Expand Down Expand Up @@ -920,7 +920,7 @@ function update_path()
{
$query = '
UPDATE '.IMAGES_TABLE.'
SET path = '.pwg_db_concat(array($fulldirs[$cat_id],'\'/\'','file')).'
SET path = '.pwg_db_concat(array("'".$fulldirs[$cat_id]."/'",'file')).'
WHERE storage_category_id = '.$cat_id.'
;';
pwg_query($query);
Expand Down Expand Up @@ -1292,7 +1292,7 @@ function set_tags($tags, $image_id)
*/
function add_tags($tags, $images)
{
if (count($tags) == 0 or count($tags) == 0)
if (count($tags) == 0 or count($images) == 0)
{
return;
}
Expand Down Expand Up @@ -1903,7 +1903,7 @@ function get_active_menu($menu_page)
return 0;
}
}

switch ($menu_page)
{
case 'photos_add':
Expand All @@ -1923,7 +1923,7 @@ function get_active_menu($menu_page)
case 'cat_perm':
case 'permalinks':
return 1;

case 'user_list':
case 'user_perm':
case 'group_list':
Expand All @@ -1936,7 +1936,7 @@ function get_active_menu($menu_page)
case 'plugins_new':
case 'plugin':
return 3;

case 'stats':
case 'history':
case 'maintenance':
Expand Down Expand Up @@ -1971,7 +1971,7 @@ function get_fckb_taglist($query)
)
);
}

return $taglist;
}

Expand All @@ -1983,7 +1983,7 @@ function get_fckb_tag_ids($raw_tags)
// or "1234" (numeric characters only)

$tag_ids = array();

foreach ($raw_tags as $raw_tag)
{
if (preg_match('/^~~(\d+)~~$/', $raw_tag, $matches))
Expand All @@ -1994,7 +1994,7 @@ function get_fckb_tag_ids($raw_tags)
{
// we have to create a new tag
array_push(
$tag_ids,
$tag_ids,
tag_id_from_tag_name($raw_tag)
);
}
Expand Down
6 changes: 3 additions & 3 deletions admin/plugins_list.php
Expand Up @@ -39,7 +39,7 @@
if (isset($_GET['action']) and isset($_GET['plugin']) and !is_adviser())
{
check_pwg_token();

$page['errors'] = $plugins->perform_action($_GET['action'], $_GET['plugin']);

if (empty($page['errors']))
Expand Down Expand Up @@ -69,7 +69,7 @@
'VERSION' => $fs_plugin['version'],
'DESC' => $fs_plugin['description'],
'AUTHOR' => $fs_plugin['author'],
'AUTHOR_URL' => $fs_plugin['author uri'],
'AUTHOR_URL' => @$fs_plugin['author uri'],
'U_ACTION' => sprintf($action_url, $plugin_id)
);

Expand Down Expand Up @@ -112,6 +112,6 @@
{
$template->append('plugin_states', 'missing');
}

$template->assign_var_from_handle('ADMIN_CONTENT', 'plugins');
?>
2 changes: 1 addition & 1 deletion include/functions_search.inc.php
Expand Up @@ -252,7 +252,7 @@ function get_regular_search_results($search, $images_where)
}
else
{
$items = array_intersect($items, $tag_items);
$items = array_values( array_intersect($items, $tag_items) );
}
break;
case 'OR':
Expand Down

0 comments on commit 4e4f257

Please sign in to comment.