Changeset 12648


Ignore:
Timestamp:
11/19/11 18:42:26 (8 years ago)
Author:
mistic100
Message:

fix stupid errors

Location:
extensions/Back2Front
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/Back2Front/Back2Front.php

    r12364 r12648  
    228228        pwg_query("INSERT INTO ".B2F_TABLE." 
    229229          VALUES(".$_POST['b2f_front_id'].", ".$_GET['image_id'].", '".$verso_categories."') 
    230           ON DUPLICATE KEY UPDATE image_id = ".$_POST['b2f_front_id'].", categories = ".$verso_categories.";"); 
     230          ON DUPLICATE KEY UPDATE image_id = ".$_POST['b2f_front_id'].", categories = '".$verso_categories."';"); 
    231231       
    232232        $template->assign(array( 
  • extensions/Back2Front/maintain.inc.php

    r12361 r12648  
    22if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 
    33 
    4 include_once(PHPWG_PLUGINS_PATH.'back2front/functions.inc.php'); 
     4include_once(PHPWG_PLUGINS_PATH.'Back2Front/functions.inc.php'); 
    55 
    66function plugin_install()  
     
    4444  global $conf; 
    4545 
    46   if (!isset($conf['back2front']))  
     46 
     47  $conf['back2front'] = explode(',', $conf['back2front']); 
     48   
     49  if (!isset($conf['back2front'][3]))  
    4750  { 
    48     pwg_query("INSERT INTO `" . CONFIG_TABLE . "` 
    49       VALUES ('back2front', '".$versos_cat['id'].",click,none,top,".serialize(array('default'=>null)).",1', 'Configuration for Back2Front plugin');"); 
    50   }  
    51   else  
     51    $conf['back2front'][3] = 'top'; 
     52    $conf['back2front'][4] = serialize(array('default'=>null)); 
     53  } 
     54  if (!isset($conf['back2front'][5])) 
    5255  { 
    53     $conf['back2front'] = explode(',', $conf['back2front']); 
    54      
    55     if (!isset($conf['back2front'][3]))  
    56     { 
    57       $conf['back2front'][3] = 'top'; 
    58       $conf['back2front'][4] = serialize(array('default'=>null)); 
    59     } 
    60     if (!isset($conf['back2front'][5])) 
    61     { 
    62       $conf['back2front'][5] = true; 
    63     } 
    64      
    65     conf_update_param('back2front', implode (',', $conf['back2front']));  
     56    $conf['back2front'][5] = true; 
    6657  } 
     58   
     59  conf_update_param('back2front', implode (',', $conf['back2front']));  
    6760} 
    6861 
Note: See TracChangeset for help on using the changeset viewer.