pluginloader enhancement for inactive plugins
Posted: Tue Oct 11, 2011 12:54 pm
Regarding to the vast enhancements done in version 1.5 beta I notice that also the pluginloader has modified (after a long time).
I propose a little modification that enables me to leave inactive plugins on the server. Why? If I want to update a plugin I prefer to install the new one, set the old version inactive before on the server. If anything fails I'm very quick back on the previous state instead of upload the old version again.
With the 3 modifications below in the pluginloader (plugins/index.php) all plugins with an ending like '_inactive' will be ignored. If I rename the old plugin directory name with a trailing "_inactive" it won't be overwritten by the new release.
line ~183:
if($plugin != '.' && $plugin != '..' && is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
line ~223:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
line~237:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
I would appreciate to have this in a new release, what do you think?.
best regards
manu
I propose a little modification that enables me to leave inactive plugins on the server. Why? If I want to update a plugin I prefer to install the new one, set the old version inactive before on the server. If anything fails I'm very quick back on the previous state instead of upload the old version again.
With the 3 modifications below in the pluginloader (plugins/index.php) all plugins with an ending like '_inactive' will be ignored. If I rename the old plugin directory name with a trailing "_inactive" it won't be overwritten by the new release.
line ~183:
if($plugin != '.' && $plugin != '..' && is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
line ~223:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
line~237:
if($plugin != "." AND $plugin != ".." AND $plugin != $pluginloader_cfg['foldername_pluginloader'] AND is_dir($pth['folder']['plugins'].$plugin) AND substr($plugin,-9,9)!='_inactive') { //EM~
I would appreciate to have this in a new release, what do you think?.
best regards
manu