Index: wifidog/install.php
===================================================================
--- wifidog/install.php (revision 1311)
+++ wifidog/install.php (working copy)
@@ -550,6 +550,7 @@
refreshButton();
navigation(array(array("title" => "Back", "page" => "Database")));
die();
+ break;
}
print "";
print "
";
@@ -766,7 +767,6 @@
Please select the Authentication Servers default language and locale
Index: wifidog/classes/NodeLists/NodeListPDF.php
===================================================================
--- wifidog/classes/NodeLists/NodeListPDF.php (revision 1311)
+++ wifidog/classes/NodeLists/NodeListPDF.php (working copy)
@@ -67,7 +67,7 @@
if (!$_serverBusy) {
// Load FPDF library
- require_once("lib/fpdf/fpdf.php");
+ require_once("lib/fpdf153/fpdf.php");
/**
* PDF class of WiFiDog, extends FPDF library
Index: wifidog/classes/Dependency.php
===================================================================
--- wifidog/classes/Dependency.php (revision 1311)
+++ wifidog/classes/Dependency.php (working copy)
@@ -91,6 +91,7 @@
* 'installMethod' => For localLib, the protocol to be used to download and install the dependency. Currently, allowed values are:
* 'tarball': Decompress a tarball in wifidog/lib
* 'installDestination' => For localLib, the path, relative to wifidog/lib where the dependency should be installed
+ * 'filename' => temp download filename if sourceurl does not meet preg requirements.
*
* @var array
*/
@@ -199,21 +200,30 @@
/* Pecl libraries */
"radius" => array (
"type" => "peclStandard",
+ "detectFiles" => "?",
'description' => "Required by the optional Radius Authenticator"
),
/* Locally installed libraries */
"FCKeditor" => array (
"type" => "localLib",
- "detectFiles" => "lib/FCKeditor/fckeditor.php",
+ "detectFiles" => "lib/fckeditor/fckeditor.php",
'description' => "Required by content type FCKEditor (WYSIWYG HTML)",
- 'website' => "http://www.fckeditor.net/"
+ 'website' => "http://www.fckeditor.net/",
+ 'installSourceUrl' => "http://easynews.dl.sourceforge.net/sourceforge/fckeditor/FCKeditor_2.5.tar.gz",
+ 'installMethod' => "tarball",
+ 'installDestination' => "/",
),
+
"FPDF" => array (
"type" => "localLib",
- "detectFiles" => "lib/fpdf/fpdf.php",
+ "detectFiles" => "lib/fpdf153/fpdf.php",
'description' => "Required if you want to be able to export the node list as a PDF file",
- 'website' => "http://www.fpdf.org/"
+ 'website' => "http://www.fpdf.org/",
+ 'installSourceUrl' => "http://www.fpdf.org/en/dl.php?v=153&f=tgz",
+ 'installMethod' => "tarball",
+ 'installDestination' => "/",
+ 'filename' => "fpdf.tgz"
),
"php-openid" => array (
"type" => "localLib",
@@ -245,23 +255,26 @@
),
"Cache" => array (
"type" => "pearStandard",
- "detectFiles" => "Cache/Lite.php",
- 'description' => "Required if you want to turn on the experimental USE_CACHE_LITE in config.php"
+ "detectFiles" => "Cache/Lite.php", #unsure whether this file still exists.
+ 'description' => "Required if you want to turn on the experimental USE_CACHE_LITE in config.php",
),
"HTML_Safe" => array (
"type" => "pearStandard",
"detectFiles" => "HTML/Safe.php",
- 'description' => "Optional for content type Langstring (and subtypes) to better strip out dangerous HTML"
+ 'description' => "Optional for content type Langstring (and subtypes) to better strip out dangerous HTML",
+ 'installSourceUrl' => "channel://pear.php.net/HTML_Safe-0.9.9beta"
),
"Image_Graph" => array (
"type" => "pearStandard",
"detectFiles" => "Image/Graph.php",
- 'description' => "Required if you want to generate graphical statistics"
+ 'description' => "Required if you want to generate graphical statistics",
+ 'installSourceUrl' => "channel://pear.php.net/Image_graph-0.7.2"
),
"Image_Canvas" => array (
"type" => "pearStandard",
"detectFiles" => "Image/Canvas.php",
- 'description' => "Required if you want to generate graphical statistics"
+ 'description' => "Required if you want to generate graphical statistics",
+ 'installSourceUrl' => "channel://pear.php.net/Image_Canvas-0.3.1"
),
"Image_Color" => array (
"type" => "pearStandard",
@@ -507,20 +520,42 @@
$html .= sprintf(_("Sorry, i couldn't find the source for %s in installSourceUrl"),
$this->getId());
}
-
-
break;
- //case "pearStandard":
- // break;
+
+
+ case "pearStandard":
+ if($this->getInstallSourceUrl()) {
+ $installSource=$this->getInstallSourceUrl();
+ }
+ else {
+ $installSource=$this->getId();
+ }
+ $html .= sprintf(_("To install this standard PEAR extension, try 'sudo pear install %s'"), $installSource);
+ break;
+
+
+ case "peclStandard":
+ if($this->getInstallSourceUrl()) {
+ $installSource=$this->getInstallSourceUrl();
+ }
+ else {
+ $installSource=$this->getId();
+ }
+ $html .= sprintf(_("To install this standard PEAR extension, try 'sudo pecl install %s'"), $installSource);
+ break;
+
+
case "pearCustom":
if($this->getInstallSourceUrl()) {
$installSource=$this->getInstallSourceUrl();
}
else {
- $installSource=sprintf(_("url_to_the_tarball (Sorry, i couldn't find the source for %s in installSourceUrl)"), $this->getId());
+ $installSource=sprintf(_("url_to_the_tarball (Sorry, i couldn't find the source for %s in installSourceUrl)"), $this->getId());
}
$html .= sprintf(_("To install this custom PEAR extension, use 'sudo pear install %s'"), $installSource);
break;
+
+
default:
$html .= sprintf(_("Sorry, I don't know how to install a %s extension"), $type);
}
@@ -614,6 +649,7 @@
return $retval;
}
+
/**
* Get the source URL where the package can be downloaded. It's meaning depends on the install method (for example, it may be a svn source)
@@ -698,8 +734,13 @@
case "tarball":
$downloadPath = WIFIDOG_ABS_FILE_PATH . "tmp/";
chdir($downloadPath);
- $filename_array = preg_split("/\//", $installSourceUrl);
- $filename = array_pop($filename_array);
+ if(!empty(self::$_components[$this->_id]['filename'])) {
+ $filename = self::$_components[$this->_id]['filename'];
+ }
+ else {
+ $filename_array = preg_split("/\//", $installSourceUrl);
+ $filename = array_pop($filename_array);
+ }
if (!file_exists($downloadPath . $filename)){