mirror of
https://github.com/e107inc/e107.git
synced 2025-08-04 13:47:31 +02:00
Do not require php closing tag for addons
This commit is contained in:
@@ -11,9 +11,9 @@
|
|||||||
| 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.106 $
|
| $Revision: 1.107 $
|
||||||
| $Date: 2009-10-26 01:04:36 $
|
| $Date: 2009-10-29 13:35:54 $
|
||||||
| $Author: e107coders $
|
| $Author: marj_nl_fr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -1841,7 +1841,9 @@ class e107plugin
|
|||||||
{
|
{
|
||||||
$passfail = '';
|
$passfail = '';
|
||||||
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$addonPHP);
|
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$addonPHP);
|
||||||
if ((substr($file_text,0,5) != '<'.'?php') || (substr($file_text,-2,2) !='?>'))
|
if ((substr($file_text, 0, 5) != '<'.'?php')
|
||||||
|
|| ( (substr($file_text, -2, 2) != '?'.'>') && (strrpos($file_text, '?'.'>') !== FALSE) )
|
||||||
|
)
|
||||||
{
|
{
|
||||||
$passfail = '<b>fail</b>';
|
$passfail = '<b>fail</b>';
|
||||||
}
|
}
|
||||||
@@ -1901,10 +1903,32 @@ class e107plugin
|
|||||||
|
|
||||||
function checkAddon($plugin_path,$e_xxx)
|
function checkAddon($plugin_path,$e_xxx)
|
||||||
{ // Return 0 = OK, 1 = Fail, 2 = inaccessible
|
{ // Return 0 = OK, 1 = Fail, 2 = inaccessible
|
||||||
|
|
||||||
|
/*** debug
|
||||||
|
if($plugin_path == 'chatbox_menu' && $e_xxx == 'e_rss')
|
||||||
|
{
|
||||||
|
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$e_xxx.".php");
|
||||||
|
if (substr($file_text, 0, 5) != '<'.'?php')
|
||||||
|
echo '<'.'?php';
|
||||||
|
if (substr($file_text, -2, 2) != '?'.'>')
|
||||||
|
echo '?'.'>';
|
||||||
|
if (strrpos($file_text, '?'.'>') !== FALSE)
|
||||||
|
echo 'no ?'.'>';
|
||||||
|
if ( (substr($file_text, -2, 2) != '?'.'>') AND (strrpos($file_text, '?'.'>') !== FALSE) )
|
||||||
|
echo "( (substr(\$file_text, -2, 2) != '?'.'>') OR (strrpos(\$file_text, '?'.'>') === FALSE) )";
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if(is_readable(e_PLUGIN.$plugin_path."/".$e_xxx.".php"))
|
if(is_readable(e_PLUGIN.$plugin_path."/".$e_xxx.".php"))
|
||||||
{
|
{
|
||||||
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$e_xxx.".php");
|
$file_text = file_get_contents(e_PLUGIN.$plugin_path."/".$e_xxx.".php");
|
||||||
if ((substr($file_text,0,5) != '<'.'?php') || (substr($file_text,-2,2) !='?>')) return 1;
|
if ((substr($file_text, 0, 5) != '<'.'?php')
|
||||||
|
|| ( (substr($file_text, -2, 2) != '?'.'>') && (strrpos($file_text, '?'.'>') !== FALSE) )
|
||||||
|
)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
return 2;
|
return 2;
|
||||||
|
@@ -11,9 +11,9 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/e_notify.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/chatbox_menu/e_notify.php,v $
|
||||||
| $Revision: 1.1.1.1 $
|
| $Revision: 1.2 $
|
||||||
| $Date: 2006-12-02 04:34:51 $
|
| $Date: 2009-10-29 13:35:54 $
|
||||||
| $Author: mcfly_e107 $
|
| $Author: marj_nl_fr $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -37,4 +37,3 @@ if (!function_exists('notify_cboxpost')) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
|
@@ -41,4 +41,3 @@ if($items = $sql -> db_Select('chatbox', "*", "cb_blocked=0 ORDER BY cb_datestam
|
|||||||
|
|
||||||
$eplug_rss_data[] = $rss;
|
$eplug_rss_data[] = $rss;
|
||||||
$eplug_rss_feed[] = $feed;
|
$eplug_rss_feed[] = $feed;
|
||||||
?>
|
|
Reference in New Issue
Block a user