Unverified Commit edd292c1 authored by Leona Maroni's avatar Leona Maroni Committed by GitHub
Browse files

nixos/dokuwiki,nixos/wordpress,nixos/invoiceplane: Remove deprecated isCoercibleToString (#292801)

parents 23a78bd0 4f899ed4
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -49,10 +49,10 @@ let
  in
    if isString v then toPhpString v
    # NOTE: If any value contains a , (comma) this will not get escaped
    else if isList v && any lib.strings.isCoercibleToString v then toPhpString (concatMapStringsSep "," toString v)
    else if isList v && strings.isConvertibleWithToString v then toPhpString (concatMapStringsSep "," toString v)
    else if isInt v then toString v
    else if isBool v then toString (if v then 1 else 0)
    else if isHasAttr "_file" then "trim(file_get_contents(${toPhpString v._file}))"
    else if isHasAttr "_file" then "trim(file_get_contents(${toPhpString (toString v._file)}))"
    else if isHasAttr "_raw" then v._raw
    else abort "The dokuwiki localConf value ${lib.generators.toPretty {} v} can not be encoded."
  ;
+1 −1
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@ let
  mkPhpValue = v:
    if isString v then escapeShellArg v
    # NOTE: If any value contains a , (comma) this will not get escaped
    else if isList v && any lib.strings.isCoercibleToString v then escapeShellArg (concatMapStringsSep "," toString v)
    else if isList v && strings.isConvertibleWithToString v then escapeShellArg (concatMapStringsSep "," toString v)
    else if isInt v then toString v
    else if isBool v then boolToString v
    else abort "The Invoiceplane config value ${lib.generators.toPretty {} v} can not be encoded."
+2 −2
Original line number Diff line number Diff line
@@ -81,10 +81,10 @@ let
  in
    if isString v then toPhpString v
    # NOTE: If any value contains a , (comma) this will not get escaped
    else if isList v && any lib.strings.isCoercibleToString v then toPhpString (concatMapStringsSep "," toString v)
    else if isList v && strings.isConvertibleWithToString v then toPhpString (concatMapStringsSep "," toString v)
    else if isInt v then toString v
    else if isBool v then boolToString v
    else if isHasAttr "_file" then "trim(file_get_contents(${toPhpString v._file}))"
    else if isHasAttr "_file" then "trim(file_get_contents(${toPhpString (toString v._file)}))"
    else if isHasAttr "_raw" then v._raw
    else abort "The Wordpress config value ${lib.generators.toPretty {} v} can not be encoded."
  ;