Author: locilka
Date: Fri Feb 1 13:12:49 2008
New Revision: 44098
URL: http://svn.opensuse.org/viewcvs/yast?rev=44098&view=rev
Log:
- Added new functions into the URL module: MakeMapFromParams and
MakeParamsFromMap.
- Fixed deprecated find() calls in URL module.
- 2.16.25
Modified:
trunk/yast2/VERSION
trunk/yast2/library/modules/Mode.ycp
trunk/yast2/library/types/src/URL.ycp
trunk/yast2/package/yast2.changes
Modified: trunk/yast2/VERSION
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/VERSION?rev=44098&r1=44097&r2=44098&view=diff
==============================================================================
--- trunk/yast2/VERSION (original)
+++ trunk/yast2/VERSION Fri Feb 1 13:12:49 2008
@@ -1 +1 @@
-2.16.24
+2.16.25
Modified: trunk/yast2/library/modules/Mode.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/modules/Mode.ycp?rev=44098&r1=44097&r2=44098&view=diff
==============================================================================
--- trunk/yast2/library/modules/Mode.ycp (original)
+++ trunk/yast2/library/modules/Mode.ycp Fri Feb 1 13:12:49 2008
@@ -197,6 +197,10 @@
return mode () == "update";
}
+global boolean Depeche () {
+ return true;
+}
+
/**
* normal, running system
*/
Modified: trunk/yast2/library/types/src/URL.ycp
URL: http://svn.opensuse.org/viewcvs/yast/trunk/yast2/library/types/src/URL.ycp?rev=44098&r1=44097&r2=44098&view=diff
==============================================================================
--- trunk/yast2/library/types/src/URL.ycp (original)
+++ trunk/yast2/library/types/src/URL.ycp Fri Feb 1 13:12:49 2008
@@ -251,7 +251,7 @@
if(url == nil || size(url) < 1) return false;
/* We don't allow URLs with spaces */
- if(find(url, " ") != -1) return false;
+ if(search(url, " ") != nil) return false;
map tokens = Parse(url);
@@ -329,9 +329,11 @@
}
y2debug("url: %1", url);
- if (tokens["path"]:"" != "" && find (tokens["path"]:"", "/") != 0 )
+ // path is not empty and doesn't start with "/"
+ if (tokens["path"]:"" != "" && ! regexpmatch (tokens["path"]:"", "^/"))
url = sformat("%1/%2", url, EscapeString(tokens["path"]:"", transform_map_filename));
- else if (tokens["path"]:"" != "" && find (tokens["path"]:"", "/") == 0 )
+ // patch is not empty and starts with "/"
+ else if (tokens["path"]:"" != "" && regexpmatch (tokens["path"]:"", "^/"))
{
while (substring (tokens["path"]:"", 0, 2) == "//")
tokens["path"] = substring (tokens["path"]:"", 1);
@@ -418,4 +420,93 @@
y2milestone("%1", Check(nil));
*/
+/**
+ * Reads list of HTTP params and returns them as map.
+ * (Useful also for cd:/, dvd:/, nfs:/ ... params)
+ * Neither keys nor values are HTML-unescaped, see UnEscapeString().
+ *
+ * @params string params
+ * @return map