From: <var...@us...> - 2015-02-04 15:26:03
|
Revision: 9506 http://sourceforge.net/p/phpwiki/code/9506 Author: vargenau Date: 2015-02-04 15:25:50 +0000 (Wed, 04 Feb 2015) Log Message: ----------- Introduce PHPWIKI_WSDL_URL variable Modified Paths: -------------- trunk/soapscripts/README trunk/soapscripts/createpage trunk/soapscripts/createpagefromfile trunk/soapscripts/fulltextsearch trunk/soapscripts/getallpagenames trunk/soapscripts/getcurrentrevision trunk/soapscripts/getpage trunk/soapscripts/getpagemeta trunk/soapscripts/getpagerevision trunk/soapscripts/getpluginsynopsis trunk/soapscripts/listlinks trunk/soapscripts/listplugins trunk/soapscripts/listrelations trunk/soapscripts/recentchanges trunk/soapscripts/replacestring trunk/soapscripts/titlesearch Modified: trunk/soapscripts/README =================================================================== --- trunk/soapscripts/README 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/README 2015-02-04 15:25:50 UTC (rev 9506) @@ -14,3 +14,6 @@ * recentchanges * replacestring * titlesearch + +The WSDL file is taken from environment variable PHPWIKI_WSDL_URL. +If this variable is not set, http://phpwiki.fr/PhpWiki.wsdl is used. Modified: trunk/soapscripts/createpage =================================================================== --- trunk/soapscripts/createpage 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/createpage 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/createpagefromfile =================================================================== --- trunk/soapscripts/createpagefromfile 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/createpagefromfile 2015-02-04 15:25:50 UTC (rev 9506) @@ -15,8 +15,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/fulltextsearch =================================================================== --- trunk/soapscripts/fulltextsearch 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/fulltextsearch 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } @@ -28,7 +33,7 @@ try { $pages = $client->doFullTextSearch($argv[1], $credentials); foreach ($pages as $page) { - echo $page['pagename']."\n"; + echo $page['pagename']."\n"; } } catch (SoapFault $e) { echo 'Error: ' . $e->getMessage() . "\n"; Modified: trunk/soapscripts/getallpagenames =================================================================== --- trunk/soapscripts/getallpagenames 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getallpagenames 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/getcurrentrevision =================================================================== --- trunk/soapscripts/getcurrentrevision 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getcurrentrevision 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/getpage =================================================================== --- trunk/soapscripts/getpage 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getpage 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } @@ -17,7 +22,7 @@ $password = readline("Password: "); $credentials = base64_encode($login.':'.$password); if ($fp = fopen($phpwiki, 'w')) { - fprintf($fp, "%s:%s", $login, $password); + fprintf($fp, "%s:%s", $login, $password); fclose($fp); chmod($phpwiki, 0600); } Modified: trunk/soapscripts/getpagemeta =================================================================== --- trunk/soapscripts/getpagemeta 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getpagemeta 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } @@ -28,7 +33,7 @@ try { $pagemeta = $client->getPageMeta($argv[1], $credentials); foreach ($pagemeta as $key => $value) { - echo "$key: $value\n"; + echo "$key: $value\n"; } } catch (SoapFault $e) { echo 'Error: ' . $e->getMessage() . "\n"; Modified: trunk/soapscripts/getpagerevision =================================================================== --- trunk/soapscripts/getpagerevision 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getpagerevision 2015-02-04 15:25:50 UTC (rev 9506) @@ -9,8 +9,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/getpluginsynopsis =================================================================== --- trunk/soapscripts/getpluginsynopsis 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/getpluginsynopsis 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/listlinks =================================================================== --- trunk/soapscripts/listlinks 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/listlinks 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/listplugins =================================================================== --- trunk/soapscripts/listplugins 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/listplugins 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/listrelations =================================================================== --- trunk/soapscripts/listrelations 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/listrelations 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/recentchanges =================================================================== --- trunk/soapscripts/recentchanges 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/recentchanges 2015-02-04 15:25:50 UTC (rev 9506) @@ -9,8 +9,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/replacestring =================================================================== --- trunk/soapscripts/replacestring 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/replacestring 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } Modified: trunk/soapscripts/titlesearch =================================================================== --- trunk/soapscripts/titlesearch 2015-02-04 14:45:06 UTC (rev 9505) +++ trunk/soapscripts/titlesearch 2015-02-04 15:25:50 UTC (rev 9506) @@ -5,8 +5,13 @@ exit; } +$wsdl = getenv('PHPWIKI_WSDL_URL'); +if ($wsdl === false) { + $wsdl = "http://phpwiki.fr/PhpWiki.wsdl"; +} + try { - $client = new SoapClient("http://phpwiki.nmu.alcatel.fr/phpwiki/PhpWiki.wsdl"); + $client = new SoapClient($wsdl); } catch (SoapFault $fault) { die($fault->faultstring); } @@ -28,7 +33,7 @@ try { $pages = $client->doTitleSearch($argv[1], $credentials); foreach ($pages as $page) { - echo $page['pagename']."\n"; + echo $page['pagename']."\n"; } } catch (SoapFault $e) { echo 'Error: ' . $e->getMessage() . "\n"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |