summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt1
-rw-r--r--editors/ckeditor.inc3
-rw-r--r--editors/fckeditor.inc3
-rw-r--r--editors/jwysiwyg.inc3
-rw-r--r--editors/markitup.inc3
-rw-r--r--editors/openwysiwyg.inc5
-rw-r--r--editors/tinymce.inc3
-rw-r--r--editors/whizzywig.inc3
-rw-r--r--editors/wymeditor.inc3
-rw-r--r--editors/yui.inc3
10 files changed, 29 insertions, 1 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 3443e70..60ccee4 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -6,6 +6,7 @@ Wysiwyg x.x-x.x, xxxx-xx-xx
Wysiwyg 5.x-3.x, xxxx-xx-xx
---------------------------
+#752516 by nquocbao, sun: Fixed file stream warnings in version callbacks.
#689218 by wwalc, TwoD, sun: Improved support for CKEditor.
#695398 by TwoD: Updated support for TinyMCE 3.3.
#696040 by Dave Reid: Fixed missing Cancel link on profile form.
diff --git a/editors/ckeditor.inc b/editors/ckeditor.inc
index 696b2cf..f9eade9 100644
--- a/editors/ckeditor.inc
+++ b/editors/ckeditor.inc
@@ -60,6 +60,9 @@ function wysiwyg_ckeditor_editor() {
*/
function wysiwyg_ckeditor_version($editor) {
$library = $editor['library path'] . '/ckeditor.js';
+ if (!file_exists($library)) {
+ return;
+ }
$library = fopen($library, 'r');
$max_lines = 8;
while ($max_lines && $line = fgets($library, 140)) {
diff --git a/editors/fckeditor.inc b/editors/fckeditor.inc
index 4243eb9..f3a1b02 100644
--- a/editors/fckeditor.inc
+++ b/editors/fckeditor.inc
@@ -52,6 +52,9 @@ function wysiwyg_fckeditor_editor() {
*/
function wysiwyg_fckeditor_version($editor) {
$library = $editor['library path'] . '/fckeditor.js';
+ if (!file_exists($library)) {
+ return;
+ }
$library = fopen($library, 'r');
$max_lines = 100;
while ($max_lines && $line = fgets($library, 60)) {
diff --git a/editors/jwysiwyg.inc b/editors/jwysiwyg.inc
index 3c810e5..6327ade 100644
--- a/editors/jwysiwyg.inc
+++ b/editors/jwysiwyg.inc
@@ -48,6 +48,9 @@ function wysiwyg_jwysiwyg_editor() {
*/
function wysiwyg_jwysiwyg_version($editor) {
$script = $editor['library path'] . '/jquery.wysiwyg.js';
+ if (!file_exists($script)) {
+ return;
+ }
$script = fopen($script, 'r');
fgets($script);
$line = fgets($script);
diff --git a/editors/markitup.inc b/editors/markitup.inc
index eb4254e..944f6ce 100644
--- a/editors/markitup.inc
+++ b/editors/markitup.inc
@@ -49,6 +49,9 @@ function wysiwyg_markitup_editor() {
*/
function wysiwyg_markitup_version($editor) {
$changelog = $editor['library path'] . '/readme.txt';
+ if (!file_exists($changelog)) {
+ return;
+ }
$changelog = fopen($changelog, 'r');
$line = fgets($changelog);
if (preg_match('@([0-9\.]+)@', $line, $version)) {
diff --git a/editors/openwysiwyg.inc b/editors/openwysiwyg.inc
index 152873b..7f77baa 100644
--- a/editors/openwysiwyg.inc
+++ b/editors/openwysiwyg.inc
@@ -45,7 +45,10 @@ function wysiwyg_openwysiwyg_editor() {
* The installed editor version.
*/
function wysiwyg_openwysiwyg_version($editor) {
- $changelog = $editor['editor path'] . '/changelog';
+ $changelog = $editor['library path'] . '/changelog';
+ if (!file_exists($changelog)) {
+ return;
+ }
$changelog = fopen($changelog, 'r');
$line = fgets($changelog, 20);
if (preg_match('@v([\d\.]+)@', $line, $version)) {
diff --git a/editors/tinymce.inc b/editors/tinymce.inc
index d4423fd..55f6ce3 100644
--- a/editors/tinymce.inc
+++ b/editors/tinymce.inc
@@ -82,6 +82,9 @@ function wysiwyg_tinymce_editor() {
*/
function wysiwyg_tinymce_version($editor) {
$script = $editor['library path'] . '/tiny_mce.js';
+ if (!file_exists($script)) {
+ return;
+ }
$script = fopen($script, 'r');
// Version is contained in the first 100 chars.
$line = fgets($script, 100);
diff --git a/editors/whizzywig.inc b/editors/whizzywig.inc
index 6442c9b..9ad9f6f 100644
--- a/editors/whizzywig.inc
+++ b/editors/whizzywig.inc
@@ -46,6 +46,9 @@ function wysiwyg_whizzywig_editor() {
*/
function wysiwyg_whizzywig_version($editor) {
$script = $editor['library path'] . '/whizzywig.js';
+ if (!file_exists($script)) {
+ return;
+ }
$script = fopen($script, 'r');
$line = fgets($script, 43);
if (preg_match('@Whizzywig v([0-9]+)@', $line, $version)) {
diff --git a/editors/wymeditor.inc b/editors/wymeditor.inc
index 47d21cf..77b88c2 100644
--- a/editors/wymeditor.inc
+++ b/editors/wymeditor.inc
@@ -53,6 +53,9 @@ function wysiwyg_wymeditor_editor() {
*/
function wysiwyg_wymeditor_version($editor) {
$script = $editor['library path'] . '/jquery.wymeditor.js';
+ if (!file_exists($script)) {
+ return;
+ }
$script = fopen($script, 'r');
fgets($script);
$line = fgets($script);
diff --git a/editors/yui.inc b/editors/yui.inc
index b2cb56e..258803b 100644
--- a/editors/yui.inc
+++ b/editors/yui.inc
@@ -66,6 +66,9 @@ function wysiwyg_yui_editor() {
*/
function wysiwyg_yui_version($editor) {
$library = $editor['library path'] . '/editor/editor.js';
+ if (!file_exists($library)) {
+ return;
+ }
$library = fopen($library, 'r');
$max_lines = 10;
while ($max_lines && $line = fgets($library, 60)) {