1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-29 10:50:25 +02:00

Multiple $emessage to $mes replacements and old code clean-up. Updated headers.

This commit is contained in:
Tijn Kuyper
2013-02-25 20:14:59 +01:00
parent 7ebffc627f
commit e6e20fd8ef
12 changed files with 75 additions and 90 deletions

View File

@@ -80,14 +80,14 @@ if (isset($_POST['deleteconfirm']))
$destination_file = e_BASE.$delfile;
if (@unlink($destination_file))
{
$message .= FMLAN_26." '".$destination_file."' ".FMLAN_27.".<br />";
//$mes->addSuccess(LAN_DELETED.": <br />."$destination_file."<br />") // FIXME syntax
//$message .= FMLAN_26." '".$destination_file."' ".FMLAN_27.".<br />";
$mes->addSuccess(LAN_DELETED.": <br />.".$destination_file."<br />");
$deleteList[] = $destination_file;
}
else
{
$message .= FMLAN_28." '".$destination_file."'.<br />";
//$mes->addError(LAN_DELETED_FAILED.": <br />."$destination_file."<br />) // FIXME syntax
//$message .= FMLAN_28." '".$destination_file."'.<br />";
$mes->addError(LAN_DELETED_FAILED.": <br />.".$destination_file."<br />");
}
}
@@ -102,13 +102,14 @@ if (isset($_POST['deleteconfirm']))
$newpath = $_POST['movepath'];
if (rename(e_BASE.$delfile,$newpath.$newfile))
{
$message .= FMLAN_38." ".$newpath.$newfile."<br />"; // FIXME
//$message .= FMLAN_38." ".$newpath.$newfile."<br />";
$mes->addSuccess(FMLAN_38.":".$newpath.$newfile);
$moveList[] = e_BASE.$delfile.'=>'.$newpath.$newfile;
}
else
{
$message .= FMLAN_39." ".$newpath.$newfile."<br />"; // FIXME
$message .= (!is_writable($newpath)) ? $newpath.LAN_NOTWRITABLE : "";
//$message .= FMLAN_39." ".$newpath.$newfile."<br />";
$mes->addError((!is_writable($newpath)) ? $newpath.LAN_NOTWRITABLE : ""); // TODO check if this message actually works
}
}
}
@@ -141,14 +142,16 @@ if (isset($_POST['upload']))
{
if ($files['error'][$key])
{
$message .= $spacer.FMLAN_10.' '.$files['error'][$key].': '.$name; // FIXME
//$message .= $spacer.FMLAN_10.' '.$files['error'][$key].': '.$name;
$mes->addError($files['error'][$key].': '.$name);
}
elseif ($files['size'][$key])
{
$uploaded = file_upload(e_BASE.$_POST['upload_dir'][$key]);
if (($uploaded === FALSE) || !is_array($uploaded))
{
$message .= $spacer.FMLAN_51.$name; // FIXME
//$message .= $spacer.FMLAN_51.$name; // FIXME
$mes->addError($name);
$spacer = '<br />';
}
else
@@ -161,7 +164,8 @@ if (isset($_POST['upload']))
}
else
{ // Most likely errors trapped earlier.
$message .= $spacer.FMLAN_10.' '.$inf['error'].' ('.$inf['message'].'): '.$inf['rawname']; // FIXME
//$message .= $spacer.FMLAN_10.' '.$inf['error'].' ('.$inf['message'].'): '.$inf['rawname']; // FIXME
$mes->addError($inf['error'].' ('.$inf['message'].'): '.$inf['rawname']);
}
$spacer = '<br />';
}
@@ -176,12 +180,14 @@ if (isset($_POST['upload']))
}
$ns->tablerender($caption, $mes->render() . $text);
if ($message) // FIXME
/*
if ($message)
{
$ns->tablerender("", "<div style=\"text-align:center\"><b>".$message."</b></div>");
}
*/
if (strpos(e_QUERY, ".") && !is_dir(realpath(e_BASE.$path)))

View File

@@ -29,7 +29,6 @@ require_once(e_HANDLER.'form_handler.php');
$frm = e107::getForm();
require_once(e_HANDLER.'message_handler.php');
//$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
$tmp = (e_QUERY) ? explode('.', e_QUERY) : '';

View File

@@ -79,7 +79,7 @@ $e_sub_cat = 'image';
// $frm = new e_form(); //new form handler
$emessage = eMessage::getInstance();
$mes = e107::getMessage();
class media_admin extends e_admin_dispatcher
{
@@ -1993,7 +1993,7 @@ if (isset($_POST['submit_show_delete_multi']))
if(!empty($message))
{
$admin_log->log_event('IMALAN_01', implode('[!br!]', $message), E_LOG_INFORMATIVE, '');
$emessage->add(implode(', ', $message).' '.IMALAN_28, E_MESSAGE_SUCCESS);
$mes->addSuccess(implode(', ', $message).' '.IMALAN_28);
}
}
}
@@ -2028,7 +2028,7 @@ if (isset($_POST['submit_show_deleteall']))
}
$message = $count." ".IMALAN_26;
$emessage->add($message, E_MESSAGE_SUCCESS);
$mes->addSuccess($message);
$admin_log->log_event('IMALAN_02', $message.$imgList,E_LOG_INFORMATIVE, '');
unset($imgList);
}
@@ -2073,7 +2073,7 @@ if (isset($_POST['submit_avdelete_multi']))
$sql->db_Update("user", "user_image='' WHERE user_id IN (".implode(',', $uids).")");
}
$emessage->add(IMALAN_51.'<strong>'.implode(', ', $tmp).'</strong> '.IMALAN_28, E_MESSAGE_SUCCESS);
$mes->addSuccess(IMALAN_51.'<strong>'.implode(', ', $tmp).'</strong> '.IMALAN_28);
$admin_log->log_event('IMALAN_03', implode('[!br!]', $avList), E_LOG_INFORMATIVE, '');
unset($search_users);
@@ -2381,7 +2381,7 @@ if (isset($_POST['check_avatar_sizes']))
</table>
";
$ns->tablerender(IMALAN_37, $emessage->render().$text);
$ns->tablerender(IMALAN_37, $mes->render().$text);
}

View File

@@ -2,22 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/beginner.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
if($_GET['mode'] == "e_advanced"){
$pref['adminstyle'] = "classis";
@@ -46,7 +42,7 @@ if($_GET['mode'] == "e_advanced"){
if($buts != '')
{
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}

View File

@@ -2,22 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/cascade.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
$text = "<div style='text-align:center'>
<table class='fborder' style='".ADMIN_WIDTH."'>";
@@ -39,6 +35,6 @@ $text .= e107::getNav()->pluginLinks( E_16_PLUGMANAGER, 'adminb');
$text .= "</table></div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
?>

View File

@@ -2,22 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/categories.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = e107::getMessage();
$mes = e107::getMessage();
$text = "<div style='text-align:center'>
<table class='fborder' style='".ADMIN_WIDTH."'>";
@@ -108,7 +104,7 @@ foreach ($admin_cat['id'] as $cat_key => $cat_id)
$text .= "</table></div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
echo admin_info();

View File

@@ -2,23 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/classis.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
$buts = "";
while (list($key, $funcinfo) = each($newarray))
@@ -32,7 +27,7 @@ if($buts != "")
$text .= $buts;
$text .= render_clean();
$text .= "</table></div>";
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>
<table style='".ADMIN_WIDTH."'>";

View File

@@ -2,22 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/combo.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
$text = "<div style='text-align:center'>
<table style='".ADMIN_WIDTH."'>";
@@ -33,7 +29,7 @@ while ($td <= 5) {
$td = 1;
$text .= "</tr></table></div>";
if($buts != ""){
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>

View File

@@ -2,22 +2,18 @@
/*
* e107 website system
*
* Copyright (C) 2008-2009 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_admin/includes/compact.php,v $
* $Revision$
* $Date$
* $Author$
* $URL$
* $Id$
*/
if (!defined('e107_INIT')) { exit; }
require_once(e_HANDLER."message_handler.php");
$emessage = &eMessage::getInstance();
$mes = e107::getMessage();
$buts = "";
$text = "<div style='text-align:center'>
@@ -38,7 +34,7 @@ $td = 1;
$text .= "</tr></table></div>";
if($buts !=""){
$ns->tablerender(ADLAN_47." ".ADMINNAME, $emessage->render().$text);
$ns->tablerender(ADLAN_47." ".ADMINNAME, $mes->render().$text);
}
$text = "<div style='text-align:center'>

View File

@@ -2,7 +2,7 @@
/*
* e107 website system
*
* Copyright (C) 2008-2010 e107 Inc (e107.org)
* Copyright (C) 2008-2013 e107 Inc (e107.org)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
@@ -53,7 +53,8 @@ EOF;
$this->getStats();
global $user_pref, $pref; // quick fix.
global $user_pref; // quick fix.
$pref = e107::getPref();
e107::js('inline',$code,'jquery');

View File

@@ -28,8 +28,8 @@ require_once("auth.php");
require_once(e_HANDLER."message_handler.php");
require_once(e_HANDLER."form_handler.php");
$frm = new e_form();
$emessage = &eMessage::getInstance();
$frm = e107::getForm();
$mes = e107::getMessage();
$lck = new lancheck;
@@ -136,12 +136,12 @@ if(isset($_POST['submit']))
{
$caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_ERROR;
$message = '';
$emessage->add(LAN_CHECK_17, E_MESSAGE_ERROR);
$mes->addError(LAN_CHECK_17);
}
else
{
$caption = LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24;
$emessage->add(sprintf(LAN_CHECK_23, basename($writeit)), E_MESSAGE_SUCCESS);
$mes->addSuccess(sprintf(LAN_CHECK_23, basename($writeit)));
}
fclose($writeit);
@@ -155,7 +155,7 @@ if(isset($_POST['submit']))
$e107->ns->tablerender($caption, $emessage->render().$message);
$ns->tablerender($caption, $mes->render().$message);
require_once(e_ADMIN."footer.php");
exit;
}
@@ -279,11 +279,11 @@ if(isset($_POST['language_sel']) && isset($_POST['language']))
{
e107::getConfig()->setPref('lancheck/'.$_POST['language'],1);
e107::getConfig()->save(FALSE);
$mes->add(LAN_CHECK_27.'<b>'.$lck->error_count.'</b>', E_MESSAGE_SUCCESS);
$mes->addSuccess(LAN_CHECK_27.'<b>'.$lck->error_count.'</b>');
}
else
{
$mes->add(LAN_CHECK_27.'<b>'.$lck->error_count.'</b>', E_MESSAGE_WARNING);
$mes->addWarning(LAN_CHECK_27.'<b>'.$lck->error_count.'</b>');
}
@@ -300,7 +300,7 @@ class lancheck
var $error_count=0;
function check_core_lanfiles($checklan,$subdir=''){
global $frm;
$frm = e107::getForm();
$English = $this->get_comp_lan_phrases(e_LANGUAGEDIR."English/".$subdir,$checklan);
$check = $this->get_comp_lan_phrases(e_LANGUAGEDIR.$checklan."/".$subdir,$checklan);
@@ -506,7 +506,7 @@ class lancheck
// for plugins and themes - checks what kind of language files directory structure we have
function check_lanfiles($mode, $comp_name, $base_lan="English", $target_lan)
{
global $frm;
$frm = e107::getForm();
$folder['P'] = e_PLUGIN.$comp_name;
$folder['T'] = e_THEME.$comp_name;
@@ -594,7 +594,9 @@ class lancheck
}
function edit_lanfiles($dir1,$dir2,$f1,$f2){
global $e107, $emessage, $lan;
global $e107, $lan;
$mes = e107::getMessage();
$ns = e107::getRender();
/* echo "<br />dir1 = $dir1";
echo "<br />file1 = $f1";
@@ -713,7 +715,7 @@ class lancheck
</form>
";
$e107->ns->tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24, $text);
$ns->tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_24, $text);
require_once(e_ADMIN."footer.php");
exit;
@@ -820,7 +822,9 @@ function lancheck_adminmenu() {
include_lan(e_LANGUAGEDIR.e_LANGUAGE."/admin/lan_language.php");
global $action,$pref;
global $action;
$pref = e107::getPref();
if ($action == "") {
$action = "tools";
}
@@ -843,5 +847,5 @@ function lancheck_adminmenu() {
e107::getNav()->admin(ADLAN_132, $action, $var);
}
$ns -> tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_1, LAN_CHECK_26);
$ns->tablerender(LAN_CHECK_PAGE_TITLE.' - '.LAN_CHECK_1, LAN_CHECK_26);
require_once(e_ADMIN."footer.php");

View File

@@ -18,7 +18,7 @@
// define("FMLAN_7", "No file was uploaded.");
// define("FMLAN_8", "Uploaded file size 0 bytes");
// define("FMLAN_9", "The file did not upload. Filename");
define('FMLAN_10', 'Error');
//define('FMLAN_10', 'Error');
// define("FMLAN_11", "Probably incorrect permissions on upload directory.");
define("FMLAN_12", "file");
define("FMLAN_13", "files");
@@ -61,7 +61,7 @@ define("FMLAN_47", "User Uploads");
define("FMLAN_48", "Move selected to");
define("FMLAN_49", "Please confirm you wish to move the selected files.");
define("FMLAN_50", "Move");
define('FMLAN_51', 'Unidentified error: ');
define('FMLAN_51', 'Unidentified error');