Author: jreidinger Date: Thu Apr 16 12:15:40 2009 New Revision: 56802 URL: http://svn.opensuse.org/viewcvs/yast?rev=56802&view=rev Log: remove duplicate function replaceAll, already in String.ycp as Replace Modified: trunk/bootloader/src/modules/BootELILO.ycp trunk/bootloader/src/modules/BootLILO.ycp trunk/bootloader/src/routines/misc.ycp Modified: trunk/bootloader/src/modules/BootELILO.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootELILO.ycp?rev=56802&r1=56801&r2=56802&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootELILO.ycp (original) +++ trunk/bootloader/src/modules/BootELILO.ycp Thu Apr 16 12:15:40 2009 @@ -247,7 +247,7 @@ || BootCommon::globals["boot_efilabel"]:"" == "" || BootCommon::globals["boot_efilabel"]:"" == nil ) { - string efi_path = BootCommon::replaceAll ( + string efi_path = String::Replace( getEliloConfSubpath (), "/", "\\"); // Read Firmware setting from NVRam map efi_status = (map)SCR::Execute (.target.bash_output, sformat ( Modified: trunk/bootloader/src/modules/BootLILO.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/modules/BootLILO.ycp?rev=56802&r1=56801&r2=56802&view=diff ============================================================================== --- trunk/bootloader/src/modules/BootLILO.ycp (original) +++ trunk/bootloader/src/modules/BootLILO.ycp Thu Apr 16 12:15:40 2009 @@ -28,6 +28,7 @@ import "Kernel"; import "Mode"; import "Pkg"; +import "String"; import "Storage"; import "Stage"; @@ -51,7 +52,7 @@ } if (size (original) > 15) original = substring (original, 0, 15); - return BootCommon::replaceAll (original, " ", "_"); + return String::Replace (original, " ", "_"); } Modified: trunk/bootloader/src/routines/misc.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/bootloader/src/routines/misc.ycp?rev=56802&r1=56801&r2=56802&view=diff ============================================================================== --- trunk/bootloader/src/routines/misc.ycp (original) +++ trunk/bootloader/src/routines/misc.ycp Thu Apr 16 12:15:40 2009 @@ -848,32 +848,6 @@ } /** - * replaces all occurences of 'from' to 'to' in src - * @param src input string - * @param from string to be replaced - * @param to string to be replaced by - * @return string modified string - */ - global define string replaceAll(string src, string from, string to) ``{ - if (from == "") - { - return src; - } - - list tokens = []; - - integer p = search(src, from); - while(p != nil) - { - tokens = add(tokens, substring(src, 0, p)); - src = substring(src, p + size(from), size(src) - (p+size(from))); - p = search(src, from); - } - tokens = add(tokens, src); - return mergestring((list<string>)tokens, to); - } - - /** * returns list difference A \ B (items that are in A and are not in B) * @param a list A * @param b list B -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org