mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 12:26:40 +02:00
This commit is contained in:
@@ -870,7 +870,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|
||||
int argc, char **argv, char **argv_eol)
|
||||
{
|
||||
char *ptr_name, *ptr_code, *path_script;
|
||||
int i, send_to_buffer_as_input, exec_commands;
|
||||
int i, send_to_buffer_as_input, exec_commands, old_php_quiet;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) pointer;
|
||||
@@ -929,6 +929,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|
||||
|| (weechat_strcmp (argv[1], "reload") == 0)
|
||||
|| (weechat_strcmp (argv[1], "unload") == 0))
|
||||
{
|
||||
old_php_quiet = php_quiet;
|
||||
ptr_name = argv_eol[2];
|
||||
if (strncmp (ptr_name, "-q ", 3) == 0)
|
||||
{
|
||||
@@ -958,7 +959,7 @@ weechat_php_command_cb (const void *pointer, void *data,
|
||||
/* unload PHP script */
|
||||
weechat_php_unload_name (ptr_name);
|
||||
}
|
||||
php_quiet = 0;
|
||||
php_quiet = old_php_quiet;
|
||||
}
|
||||
else if (weechat_strcmp (argv[1], "eval") == 0)
|
||||
{
|
||||
@@ -1267,6 +1268,8 @@ php_weechat_log_message (char *message)
|
||||
int
|
||||
weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
{
|
||||
int old_php_quiet;
|
||||
|
||||
/* make C compiler happy */
|
||||
(void) argc;
|
||||
(void) argv;
|
||||
@@ -1314,9 +1317,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
|
||||
PG(report_zend_debug) = 0; /* Turn off --enable-debug output */
|
||||
|
||||
old_php_quiet = php_quiet;
|
||||
php_quiet = 1;
|
||||
plugin_script_init (weechat_php_plugin, &php_data);
|
||||
php_quiet = 0;
|
||||
php_quiet = old_php_quiet;
|
||||
|
||||
plugin_script_display_short_list (weechat_php_plugin,
|
||||
php_scripts);
|
||||
@@ -1332,7 +1336,10 @@ weechat_plugin_init (struct t_weechat_plugin *plugin, int argc, char *argv[])
|
||||
int
|
||||
weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
{
|
||||
int old_php_quiet;
|
||||
|
||||
/* unload all scripts */
|
||||
old_php_quiet = php_quiet;
|
||||
php_quiet = 1;
|
||||
if (php_script_eval)
|
||||
{
|
||||
@@ -1340,7 +1347,7 @@ weechat_plugin_end (struct t_weechat_plugin *plugin)
|
||||
php_script_eval = NULL;
|
||||
}
|
||||
plugin_script_end (plugin, &php_data);
|
||||
php_quiet = 0;
|
||||
php_quiet = old_php_quiet;
|
||||
|
||||
if (weechat_php_func_map)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user