Changeset 1328

Show
Ignore:
Timestamp:
03/06/06 09:08:37 (3 years ago)
Author:
mbonetti
Message:

Fix for #362. Well spotted, thanks.

Location:
trunk/rss
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/rss/admin/config.php

    r1309 r1328  
    222222        echo "<form style=\"display:inline\" id=\"cfg\" method=\"post\" action=\"" .$_SERVER['PHP_SELF'] ."\">\n"; 
    223223         
    224         config_edit_form($key,$value,$default,$type,$desc,$export); 
     224        $onclickaction = null; 
     225        config_edit_form($key,$value,$default,$type,$desc,$export,$onclickaction); 
    225226 
    226227        echo "<p style=\"display:inline\">\n"; 
    227228        echo (isset($preview)?"<input type=\"submit\" name=\"action\" value=\"". LBL_ADMIN_PREVIEW_CHANGES ."\"" 
    228       .(isset($onclickaction)?" onclick=\"$onclickaction\"":"") ." />\n":""); 
     229      .($onclickaction?" onclick=\"$onclickaction\"":"") ." />\n":""); 
    229230        echo "<input type=\"hidden\" name=\"".CST_ADMIN_METAACTION."\" value=\"LBL_ADMIN_SUBMIT_CHANGES\" />"; 
    230231     
    231232        echo "<input type=\"submit\" name=\"action\" value=\"". LBL_ADMIN_SUBMIT_CHANGES ."\"" 
    232         .(isset($onclickaction)?" onclick=\"$onclickaction\"":"") 
     233        .($onclickaction?" onclick=\"$onclickaction\"":"") 
    233234        ." /><input type=\"hidden\" name=\"".CST_ADMIN_DOMAIN."\" value=\"". CST_ADMIN_DOMAIN_CONFIG ."\"/>\n</p></form>\n"; 
    234235     
     
    250251    case LBL_ADMIN_SUBMIT_CHANGES: 
    251252    case 'LBL_ADMIN_SUBMIT_CHANGES': 
     253                 
    252254        $key = sanitize($_POST['key'],RSS_SANITIZER_NO_SPACES|RSS_SANITIZER_SIMPLE_SQL); 
    253255        $type = sanitize($_POST['type'],RSS_SANITIZER_CHARACTERS); 
    254256        $value = sanitize($_POST['value'], RSS_SANITIZER_SIMPLE_SQL); 
    255257 
    256                  
    257258                // sanitizine routines for values 
    258259                switch ($key) { 
     
    375376} 
    376377 
    377 function config_edit_form($key,$value,$default,$type,$desc,$export) { 
     378function config_edit_form($key,$value,$default,$type,$desc,$export, & $onclickaction = null) { 
    378379    $value = real_strip_slashes($value); 
    379380 
  • trunk/rss/admin/ds.php

    r1181 r1328  
    5757    }     
    5858 
    59         function populate1() { 
     59    function populate1() { 
    6060      var box1 = getForm().first; 
    6161      var box2 = getForm().second; 
     
    6868     
    6969    function add1() { 
    70       var newtag = getForm().newtag.value.replace(/[^a-zA-Z]*/g,""); 
     70      var newtag = getForm().newtag.value.replace(/[^a-zA-Z0-9]*/g,""); 
    7171      if (newtag == '') return; 
    7272      getForm().newtag.value = ''; 
  • trunk/rss/opml.php

    r1181 r1328  
    6161      or xml_error("couldnt set XML handlers"); 
    6262     
    63     xml_parse($xp, $opml, true) or xml_error("failed parsing xml"); 
     63    xml_parse($xp, $opml, true) or xml_error("failed parsing xml at line ".xml_get_current_line_number().": " . xml_error_string()); 
    6464    xml_parser_free($xp) or xml_error("failed freeing the parser"); 
    6565    return $blogs;