Skip to content
Browse files

Validation now uses admin site for testing version

  • Loading branch information...
1 parent 51ef921 commit 5952645c7fdba85170e5908148cb09c90a227326 @bruderstein committed
View
18 doc/index.html
@@ -381,16 +381,20 @@
<br/><br/>
It's obviously important to test that your modifications work, so for that we have a
-testing version of the Plugin Manager. This version allows you to override the
-URL of the XML and MD5 file. Just set xmlurl and md5url settings in the PluginManager.ini.
+testing version of the Plugin Manager.
-<br/>Note these are URLs, so you need to use something like
+<ol>
+<li>Download the testing version of Plugin Manager here: <a href="http://www.brotherstone.co.uk/npp/pm/PluginManager_TEST_UNI.zip">Unicode</a> / <a href="http://www.brotherstone.co.uk/npp/pm/PluginManager_TEST_ANSI.zip">ANSI</a></li>
+<li>Add the following lines to your PluginManager.ini (under plugins\Config, or %APPDATA%\notepad++\plugins\config)
<pre>
-xmlurl=file:///d:/work/npp/pluginsxml/plugins.xml
-md5url=file:///d:/work/npp/pluginsxml/plugins.md5.txt
+xmlurl=http://www.brotherstone.co.uk/npp/pm/admin/plugins/generate_xml
+md5url=http://www.brotherstone.co.uk/npp/pm/admin/dummy.md5.txt
</pre>
-<br/>You can download a new version of plugins.xml (with your modifications) from the <a href="http://www.brotherstone.co.uk/npp/pm/admin">administration system</a>
-<br/>The testing version of the Plugin Manager is here: <a href="http://www.brotherstone.co.uk/npp/pm/PluginManager_TEST_UNI.zip">Unicode</a> / <a href="http://www.brotherstone.co.uk/npp/pm/PluginManager_TEST_ANSI.zip">ANSI</a>
+</li>
+</ol>
+
+<br/><br/>This version downloads the XML directly from the admin site, and validates the MD5s against the hashes that have been added on the admin site. Please test your changes.
+
<br/><br/>This is also a "debug" build, so if something goes wrong, you can step through it. The PDBs are also included in the zip file.
<br/><br/>The current XML file is located <b><a href="http://sourceforge.net/projects/npppluginmgr/files/xml">here</a></b>, if you want to check it out.
View
32 doc/update.htm
@@ -0,0 +1,32 @@
+<html><body>
+<h1>Plugin Manager 1.0.8 Update</h1>
+<p>For <b>Windows 7</b> and <b>Vista</b> users, you will almost certainly need to start Notepad++ as administrator in order to update from Plugin Manager 0.9.3.1
+(the version bundled with Notepad++ since about 5.6)
+</p>
+<p>Simply right click the Notepad++ program in your start menu, and click "Run as administrator"</p>
+<p>In Notepad++, go to the Plugins menu and choose Plugin Manager, Show Plugin Manager. On the updates tab you'll see Plugin Manager listed and ticked.
+Just click "Update"</p>
+<p>Restart when it asks you to, and then you have the new version.</p>
+<br/><br/><a href="http://sourceforge.net/projects/notepad-plus/forums/forum/331754/topic/4923003">Forum post to post issues or queries about the update</a>
+<br/><br/>
+<a name="gpupcopy"></a>
+<h2>Need to complete steps... message</h2>
+If after installing the Plugin Manager update, and restarting Notepad++,
+you receive a message about steps still needing to be completed, and after
+clicking "yes" and restarting again, the message still appears, you need to
+delete the PluginManagerGpup.xml file from your plugin config directory.
+The right directory is shown in the settings dialog in Plugin Manager itself (plugins, plugin manager, show plugin manager, settings).
+<a name="gpupver"></a>
+<h2>Message about GPUP.EXE</h2>
+<p>If you receive a message about GPUP.EXE not being the right version, simply reinstall plugin manager, you won't need to run Notepad++
+as administrator to do that.</p>
+<p>To help the search engines, the exact message is "The external plugin updater (gpup.exe) under the updater directory does not appear to be the correct version.
+It will most likely work, but you should reinstall the plugin manager at your next opportunity to ensure full
+functionality. We'll attempt to use the current version for this operation."
+</p>
+<p>Plugins, Plugin Manager, Show Plugin Manager, go to the "installed" tab, and select Plugin Manager, then click reinstall.</p>
+<p>On Windows 7 and Vista, you'll likely get 2 UAC prompts (asking to confirm to perform the action as an administrator), that's completely normal,
+and has to do with the fact that the GPUP.EXE file needs to be replaced as administrator, and then the new version run to replace the plugin DLL.</p>
+
+</body>
+</html>
View
5 libinstall/include/libinstall/Validate.h
@@ -1,8 +1,11 @@
#ifndef _VALIDATE_H
#define _VALIDATE_H
-
+#ifdef ALLOW_OVERRIDE_XML_URL
+#define VALIDATE_BASEURL _T("http://www.brotherstone.co.uk/npp/pm/admin/validate.php?md5=")
+#else
#define VALIDATE_BASEURL _T("http://npppluginmgr.sourceforge.net/app/validate.php?md5=")
+#endif
#define VALIDATE_RESULT_OK "ok"
#define VALIDATE_RESULT_UNKNOWN "unknown"
#define VALIDATE_RESULT_BANNED "banned"
View
4 libinstall/projects/2010/libinstall.vcxproj
@@ -195,7 +195,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\tinyxml\include;..\..\..\unzip\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;NOUNCRYPT;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;NOUNCRYPT;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;ALLOW_OVERRIDE_XML_URL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -218,7 +218,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\..\tinyxml\include;..\..\..\unzip\include;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
- <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;NOUNCRYPT;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;NOUNCRYPT;TIXML_USE_STL;_CRT_SECURE_NO_WARNINGS;CURL_STATICLIB;ALLOW_OVERRIDE_XML_URL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
View
1 website/adminvalidate/dummy.md5.txt
@@ -0,0 +1 @@
+00000000000000000000000000000000
View
31 website/adminvalidate/validate.php
@@ -0,0 +1,31 @@
+<?
+
+if (!isset($_GET["md5"]))
+ echo "param_error";
+else
+{
+ try {
+ $conn = new PDO('mysql:host=localhost;dbname=npppm', 'npppmvalidate', 'npppmvalidate');
+
+ } catch (Exception $e){
+
+ echo "connect_error";
+ exit;
+ }
+
+ $md5 = $_GET["md5"];
+ $sql = "select status from FileHash where md5sum=:md5";
+ $query = $conn->prepare($sql);
+ $query->execute(array(':md5' => $_GET['md5']));
+
+ $row = $query->fetch();
+
+
+ if ($row == FALSE)
+ echo "unknown";
+ else if ($row['status'] == "ok" || $row['status'] == "banned")
+ echo $row['status'];
+ else
+ echo "unknown";
+
+ }

0 comments on commit 5952645

Please sign in to comment.
Something went wrong with that request. Please try again.