mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 21:27:25 +02:00
Support multilanguage titles in plugin log entries, add correct links to sitelinks on install, fix naming error in plugin.php conversion
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_admin/admin_log.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_admin/admin_log.php,v $
|
||||||
| $Revision: 1.16 $
|
| $Revision: 1.17 $
|
||||||
| $Date: 2008-08-01 20:25:34 $
|
| $Date: 2008-08-10 11:41:01 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
|
|
|
|
||||||
| Preferences:
|
| Preferences:
|
||||||
@@ -67,7 +67,16 @@ if (e_QUERY)
|
|||||||
|
|
||||||
$action = varset($qs[0],'adminlog');
|
$action = varset($qs[0],'adminlog');
|
||||||
|
|
||||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_log_messages.php');
|
// Load language files for log messages
|
||||||
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/admin/lan_log_messages.php'); //... for core functions
|
||||||
|
if (is_array($pref['logLanguageFile'])) //... and for any plugins which support it
|
||||||
|
{
|
||||||
|
foreach($pref['logLanguageFile'] as $path => $file)
|
||||||
|
{
|
||||||
|
$file = str_replace('--LAN--',e_LANGUAGE,$file);
|
||||||
|
include_lan(e_PLUGIN.$path.'/'.$file);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -4,8 +4,8 @@
|
|||||||
| e107 website system - Converter for plugin.php to plugin.xml
|
| e107 website system - Converter for plugin.php to plugin.xml
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_files/utilities/pluginxmlgen.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_files/utilities/pluginxmlgen.php,v $
|
||||||
| $Revision: 1.2 $
|
| $Revision: 1.3 $
|
||||||
| $Date: 2008-08-10 09:17:31 $
|
| $Date: 2008-08-10 11:41:13 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -184,7 +184,7 @@ function makeXML($pluginDir, $extras=array())
|
|||||||
}
|
}
|
||||||
$baseFolder .= '/';
|
$baseFolder .= '/';
|
||||||
// 'commentID' tags needed
|
// 'commentID' tags needed
|
||||||
$adminText .= writeTag('configfile',$eplug_conffile,2);
|
$adminText .= writeTag('configFile',$eplug_conffile,2);
|
||||||
$adminText .= writeTag('icon',str_replace($baseFolder,'',$eplug_icon),2);
|
$adminText .= writeTag('icon',str_replace($baseFolder,'',$eplug_icon),2);
|
||||||
$adminText .= writeTag('iconSmall',str_replace($baseFolder,'',$eplug_icon_small),2);
|
$adminText .= writeTag('iconSmall',str_replace($baseFolder,'',$eplug_icon_small),2);
|
||||||
$adminText .= writeTag('caption',$eplug_caption,2);
|
$adminText .= writeTag('caption',$eplug_caption,2);
|
||||||
|
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/plugin_class.php,v $
|
||||||
| $Revision: 1.39 $
|
| $Revision: 1.40 $
|
||||||
| $Date: 2008-08-10 09:17:41 $
|
| $Date: 2008-08-10 11:41:02 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
|
|
||||||
Mods for extra plugin.xml variables
|
Mods for extra plugin.xml variables
|
||||||
@@ -150,7 +150,6 @@ class e107plugin
|
|||||||
$plug_info = $this->plug_vars;
|
$plug_info = $this->plug_vars;
|
||||||
$plugin_path = substr(str_replace(e_PLUGIN,"",$p['path']),0,-1);
|
$plugin_path = substr(str_replace(e_PLUGIN,"",$p['path']),0,-1);
|
||||||
|
|
||||||
|
|
||||||
// scan for addons.
|
// scan for addons.
|
||||||
$eplug_addons = $this->getAddons($plugin_path); // Returns comma-separated list
|
$eplug_addons = $this->getAddons($plugin_path); // Returns comma-separated list
|
||||||
// $eplug_addons = $this->getAddons($plugin_path,'check'); // Checks opening/closing tags on addon files
|
// $eplug_addons = $this->getAddons($plugin_path,'check'); // Checks opening/closing tags on addon files
|
||||||
@@ -701,7 +700,14 @@ class e107plugin
|
|||||||
$canContinue = FALSE;
|
$canContinue = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
// First of all, if installing or upgrading, check that any dependencies are met
|
|
||||||
|
// First of all, see if there's a language file specific to install
|
||||||
|
if (isset($plug_vars['installLanguageFile']) && isset($plug_vars['installLanguageFile']['@attributes']['filename']))
|
||||||
|
{
|
||||||
|
include_lan($path.$plug_vars['installLanguageFile']['@attributes']['filename']);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next most important, if installing or upgrading, check that any dependencies are met
|
||||||
if ($canContinue && ($function != 'uninstall') && isset($plug_vars['depends']))
|
if ($canContinue && ($function != 'uninstall') && isset($plug_vars['depends']))
|
||||||
{
|
{
|
||||||
foreach ($plug_vars['depends'] as $dt => $dv)
|
foreach ($plug_vars['depends'] as $dt => $dv)
|
||||||
@@ -808,9 +814,10 @@ class e107plugin
|
|||||||
{
|
{
|
||||||
$plug_vars['menuLink'] = array($plug_vars['menuLink']);
|
$plug_vars['menuLink'] = array($plug_vars['menuLink']);
|
||||||
}
|
}
|
||||||
foreach($plug_vars['menuLink'] as $link)
|
// foreach($plug_vars['menuLink'] as $link)
|
||||||
|
foreach($plug_vars['menuLink'] as $attrib)
|
||||||
{
|
{
|
||||||
$attrib = $link['@attributes'];
|
// $attrib = $link['@attributes'];
|
||||||
switch($function)
|
switch($function)
|
||||||
{
|
{
|
||||||
case 'upgrade':
|
case 'upgrade':
|
||||||
@@ -818,9 +825,10 @@ class e107plugin
|
|||||||
// Add any active link
|
// Add any active link
|
||||||
if(!isset($attrib['active']) || $attrib['active'] == 'true')
|
if(!isset($attrib['active']) || $attrib['active'] == 'true')
|
||||||
{
|
{
|
||||||
|
$addlink = e_PLUGIN.$attrib['url'];
|
||||||
$perm = (isset($attrib['perm']) ? $attrib['perm'] : 0);
|
$perm = (isset($attrib['perm']) ? $attrib['perm'] : 0);
|
||||||
$txt .= "Adding link {$attrib['name']} with url [{$attrib['url']}] and perm {$perm} <br />";
|
$txt .= "Adding link {$attrib['name']} with url [{$addlink}] and perm {$perm} <br />";
|
||||||
$this->manage_link('add', $attrib['url'], $attrib['name'], $perm);
|
$this->manage_link('add', $addlink, $attrib['name'], $perm);
|
||||||
}
|
}
|
||||||
//remove inactive links on upgrade
|
//remove inactive links on upgrade
|
||||||
if($function == 'upgrade' && isset($attrib['active']) && $attrib['active'] == 'false')
|
if($function == 'upgrade' && isset($attrib['active']) && $attrib['active'] == 'false')
|
||||||
|
Reference in New Issue
Block a user