Ad Injection - Version 0.9.4.1

Version Description

Fix: Remove file contents if ad is 0 length.

Download this release

Release Info

Developer reviewmylife
Plugin Icon wp plugin Ad Injection
Version 0.9.4.1
Comparing to
See all releases

Code changes from version 0.9.4 to 0.9.4.1

Files changed (3) hide show
  1. ad-injection-admin.php +3 -3
  2. ad-injection.php +1 -1
  3. readme.txt +7 -1
ad-injection-admin.php CHANGED
@@ -151,7 +151,9 @@ function adinj_write_file($path, $content, $permission){
151
  if ($ops['ad_insertion_mode'] != 'mfunc') return;
152
  global $adinj_warning_msg_filewrite;
153
  $handle = fopen($path, "w");
154
- fwrite($handle, $content) or $adinj_warning_msg_filewrite .= "<br />Error: could not write to file: $path";
 
 
155
  fclose($handle);
156
  adinj_chmod($path, $permission);
157
  }
@@ -1223,9 +1225,7 @@ function adinj_getdefault($option){
1223
  }
1224
 
1225
  function write_ad_to_file($ad, $ad_path){
1226
- if (strlen($ad) > 0){
1227
  adinj_write_file($ad_path, $ad, 0640);
1228
- }
1229
  }
1230
 
1231
  function adinj_docs(){
151
  if ($ops['ad_insertion_mode'] != 'mfunc') return;
152
  global $adinj_warning_msg_filewrite;
153
  $handle = fopen($path, "w");
154
+ if (strlen($content) > 0){
155
+ fwrite($handle, $content) or $adinj_warning_msg_filewrite .= "<br />Error: could not write to file: $path";
156
+ }
157
  fclose($handle);
158
  adinj_chmod($path, $permission);
159
  }
1225
  }
1226
 
1227
  function write_ad_to_file($ad, $ad_path){
 
1228
  adinj_write_file($ad_path, $ad, 0640);
 
1229
  }
1230
 
1231
  function adinj_docs(){
ad-injection.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Ad Injection
4
  Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
5
  Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
6
- Version: 0.9.4
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/
9
  License: GPLv2
3
  Plugin Name: Ad Injection
4
  Plugin URI: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-wordpress/
5
  Description: Injects any advert (e.g. AdSense) into your WordPress posts or widget area. Restrict who sees the ads by post length, age, referrer or IP. Cache compatible.
6
+ Version: 0.9.4.1
7
  Author: reviewmylife
8
  Author URI: http://www.reviewmylife.co.uk/
9
  License: GPLv2
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.reviewmylife.co.uk/blog/2010/12/06/ad-injection-plugin-w
4
  Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free
5
  Requires at least: 3.0.0
6
  Tested up to: 3.0.3
7
- Stable tag: 0.9.4
8
 
9
  Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
10
 
@@ -197,6 +197,9 @@ If you do get any errors please use the 'Report a bug or give feedback' link on
197
 
198
  == Changelog ==
199
 
 
 
 
200
  = 0.9.4 =
201
  Global tag and category restrictions.
202
  Smoother JQuery show/hide blocks (especially on IE)
@@ -258,6 +261,9 @@ Fix 'Something badly wrong in num_rand_ads_to_insert' message that occurs on pag
258
 
259
  == Upgrade Notice ==
260
 
 
 
 
261
  = 0.9.4 =
262
  If you are using mfunc mode and have added ad widgets with a version prior to 0.9.2 please re-save them to regenerate the ad files (fixed for upgrades from 0.9.2).
263
 
4
  Tags: ad injection, adsense, advert injection, advert, ad, injection, advertising, affiliate, inject, injection, insert, widget, monetize, monetise, banner, Amazon, ClickBank, TradeDoubler, Google, adBrite, post, WordPress, automatically, plugin, Adsense Injection, free
5
  Requires at least: 3.0.0
6
  Tested up to: 3.0.3
7
+ Stable tag: 0.9.4.1
8
 
9
  Injects any adverts (e.g. AdSense) into the WordPress posts or widget area. Restrict who sees ads by post length/age/referrer or IP. Cache compatible.
10
 
197
 
198
  == Changelog ==
199
 
200
+ = 0.9.4.1 =
201
+ Fix: Remove file contents if ad is 0 length.
202
+
203
  = 0.9.4 =
204
  Global tag and category restrictions.
205
  Smoother JQuery show/hide blocks (especially on IE)
261
 
262
  == Upgrade Notice ==
263
 
264
+ = 0.9.4.1 =
265
+ If you are using mfunc mode and have added ad widgets with a version prior to 0.9.2 please re-save them to regenerate the ad files (fixed for upgrades from 0.9.2).
266
+
267
  = 0.9.4 =
268
  If you are using mfunc mode and have added ad widgets with a version prior to 0.9.2 please re-save them to regenerate the ad files (fixed for upgrades from 0.9.2).
269