Skip to content

Commit

Permalink
Dev Minor variable name change
Browse files Browse the repository at this point in the history
git-svn-id: file:///Users/Shitiz/Downloads/lssvn/source/limesurvey@8987 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
c-schmitz committed Jul 27, 2010
1 parent 08eff6e commit 277e949
Show file tree
Hide file tree
Showing 7 changed files with 77 additions and 14 deletions.
2 changes: 1 addition & 1 deletion admin/fck_LimeReplacementFields.php
Expand Up @@ -37,7 +37,7 @@
. "\t\t<title>LimeReplacementFields</title>\n"
. "\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n"
. "\t\t<meta content=\"noindex, nofollow\" name=\"robots\">\n"
. "\t\t<script src=\"$fckeditordir/editor/dialog/common/fck_dialog_common.js\" type=\"text/javascript\"></script>\n"
. "\t\t<script src=\"$sFCKEditorURL/editor/dialog/common/fck_dialog_common.js\" type=\"text/javascript\"></script>\n"
. "\t\t<script src=\"$rooturl/scripts/jquery/jquery.js\" type=\"text/javascript\"></script>\n"
. "\t\t<script language=\"javascript\">\n"
. "\t\t\tvar mydialog = window.parent ;\n"
Expand Down
2 changes: 1 addition & 1 deletion admin/html.php
Expand Up @@ -3019,7 +3019,7 @@
. "<input type='hidden' name='action' value='importsurveyresources' />\n"
. "<ul>\n"
. "<li><label>&nbsp;</label>\n"
. "<input type='button' onclick='window.open(\"$fckeditordir/editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php\", \"_blank\")' value=\"".$clang->gT("Browse Uploaded Resources")."\" $disabledIfNoResources /></li>\n"
. "<input type='button' onclick='window.open(\"$sFCKEditorURL/editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php\", \"_blank\")' value=\"".$clang->gT("Browse Uploaded Resources")."\" $disabledIfNoResources /></li>\n"
. "<li><label>&nbsp;</label>\n"
. "<input type='button' onclick='window.open(\"$scriptname?action=exportsurvresources&amp;sid={$surveyid}\", \"_blank\")' value=\"".$clang->gT("Export Resources As ZIP Archive")."\" $disabledIfNoResources /></li>\n"
. "<li><label for='the_file'>".$clang->gT("Select ZIP File:")."</label>\n"
Expand Down
10 changes: 5 additions & 5 deletions admin/htmleditor-functions.php
Expand Up @@ -77,8 +77,8 @@ function PrepareEditorPopupScript()

function PrepareEditorInlineScript()
{
global $homeurl, $fckeditordir;
$script ="<script type=\"text/javascript\" src=\"".$fckeditordir."/fckeditor.js\"></script>\n"
global $homeurl, $sFCKEditorURL;
$script ="<script type=\"text/javascript\" src=\"".$sFCKEditorURL."/fckeditor.js\"></script>\n"
. "<script type=\"text/javascript\">\n"
. "<!--\n"
. "function updateFCKeditor(fieldname,value)\n"
Expand Down Expand Up @@ -226,7 +226,7 @@ function getPopupEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=nu

function getInlineEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=null,$qID=null,$action=null)
{
global $clang, $imagefiles, $homeurl, $rooturl, $fckeditordir, $fckeditexpandtoolbar;
global $clang, $imagefiles, $homeurl, $rooturl, $sFCKEditorURL, $fckeditexpandtoolbar;

$htmlcode = '';
$imgopts = '';
Expand Down Expand Up @@ -266,8 +266,8 @@ function getInlineEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=n
$htmlcode .= ""
. "<script type=\"text/javascript\">\n"
. "var $oFCKeditorVarName = new FCKeditor('$fieldname');\n"
. "$oFCKeditorVarName.BasePath = '".$fckeditordir."/';\n"
. "$oFCKeditorVarName.Config[\"CustomConfigurationsPath\"] = \"".$fckeditordir."/limesurvey-config.js\";\n"
. "$oFCKeditorVarName.BasePath = '".$sFCKEditorURL."/';\n"
. "$oFCKeditorVarName.Config[\"CustomConfigurationsPath\"] = \"".$sFCKEditorURL."/limesurvey-config.js\";\n"
. "$oFCKeditorVarName.Config[\"LimeReplacementFieldsType\"] = \"".$fieldtype."\";\n"
. "$oFCKeditorVarName.Config[\"LimeReplacementFieldsSID\"] = \"".$surveyID."\";\n"
. "$oFCKeditorVarName.Config[\"LimeReplacementFieldsGID\"] = \"".$gID."\";\n"
Expand Down
6 changes: 3 additions & 3 deletions admin/htmleditor-popup.php
Expand Up @@ -86,7 +86,7 @@
<title>'.$clang->gT("Editing").' '.$fieldtext.'</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex, nofollow" />
<script type="text/javascript" src="'.$fckeditordir.'/fckeditor.js"></script>
<script type="text/javascript" src="'.$sFCKEditorURL.'/fckeditor.js"></script>
</head>';


Expand All @@ -112,11 +112,11 @@ function closeme()
var saveChanges = false;
var oFCKeditor = new FCKeditor( 'MyTextarea' );
oFCKeditor.BasePath = '".$fckeditordir."/';
oFCKeditor.BasePath = '".$sFCKEditorURL."/';
oFCKeditor.Height = '350';
oFCKeditor.Width = '98%';
oFCKeditor.Value = window.opener.document.getElementsByName(\"".$fieldname."\")[0].value;
oFCKeditor.Config[\"CustomConfigurationsPath\"] = \"".$fckeditordir."/limesurvey-config.js\";
oFCKeditor.Config[\"CustomConfigurationsPath\"] = \"".$sFCKEditorURL."/limesurvey-config.js\";
oFCKeditor.Config[\"ToolbarStartExpanded\"] = true;
oFCKeditor.Config[\"ToolbarCanCollapse\"] = false;
oFCKeditor.ToolbarSet = '".$toolbarname."';
Expand Down
2 changes: 1 addition & 1 deletion admin/labels.php
Expand Up @@ -466,7 +466,7 @@
. "\t<input type='hidden' name='action' value='importlabelresources' />\n"
. "\t<ul>\n"
. "\t\t<li><label>&nbsp;</label>\n"
. "\t\t<input type='button' onclick='window.open(\"$fckeditordir/editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php?\", \"_blank\")' value=\"".$clang->gT("Browse Uploaded Resources")."\" $disabledIfNoResources /></li>\n"
. "\t\t<input type='button' onclick='window.open(\"$sFCKEditorURL/editor/filemanager/browser/default/browser.html?Connector=../../connectors/php/connector.php?\", \"_blank\")' value=\"".$clang->gT("Browse Uploaded Resources")."\" $disabledIfNoResources /></li>\n"
. "\t\t<li><label>&nbsp;</label>\n"
. "\t\t<input type='button' onclick='window.open(\"$scriptname?action=exportlabelresources&amp;lid={$lid}\", \"_blank\")' value=\"".$clang->gT("Export Resources As ZIP Archive")."\" $disabledIfNoResources /></li>\n"
. "\t\t<li><label for='the_file'>".$clang->gT("Select ZIP File:")."</label>\n"
Expand Down
67 changes: 65 additions & 2 deletions admin/update/updater.php
@@ -1,5 +1,20 @@
<?php

/*
* LimeSurvey
* Copyright (C) 2007 The LimeSurvey Project Team / Carsten Schmitz
* All rights reserved.
* License: GNU/GPL License v2 or later, see LICENSE.php
* LimeSurvey is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*
* $Id$
*/
$updaterversion='$Id:';

if (isset($_REQUEST['update'])) die();

if ($action=='update'){
if ($subaction=='step4')
Expand All @@ -14,10 +29,58 @@
{
$adminoutput=UpdateStep2();
}
else $adminoutput=UpdateStep1();
else
{
// $adminoutput=RunUpdaterUpdate();
$adminoutput=UpdateStep1();
}
}


function RunUpdaterUpdate()
{
if (!is_writable($tempdir))
{
$output.= "<li class='errortitle'>".sprintf($clang->gT("Tempdir %s is not writable"),$tempdir)."<li>";
$error=true;
}
if (!is_writable($rootdir.DIRECTORY_SEPARATOR.'version.php'))
{
$output.= "<li class='errortitle'>".sprintf($clang->gT("Version file is not writable (%s). Please set according file permissions."),$rootdir.DIRECTORY_SEPARATOR.'version.php')."</li>";
$error=true;
}
$output.='</ul><h3>'.$clang->gT('Change log').'</h3>';
require_once($homedir."/classes/http/http.php");
$updatekey=getGlobalSetting('updatekey');

$http=new http_class;
/* Connection timeout */
$http->timeout=0;
/* Data transfer timeout */
$http->data_timeout=0;
$http->user_agent="Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$http->GetRequestArguments("http://update.limesurvey.org/updates/changelog/$buildnumber/$updatebuild/$updatekey",$arguments);

$updateinfo=false;
$httperror=$http->Open($arguments);
$httperror=$http->SendRequest($arguments);

if($httperror=="") {
$body=''; $full_body='';
for(;;){
$httperror = $http->ReadReplyBody($body,10000);
if($httperror != "" || strlen($body)==0) break;
$full_body .= $body;
}
$changelog=json_decode($full_body,true);
$output.='<textarea class="updater-changelog" readonly="readonly">'.htmlspecialchars($changelog['changelog']).'</textarea>';
}
else
{
print( $httperror );
}
}

function UpdateStep1()
{
global $clang, $scriptname, $updatekey, $subaction, $updatebuild, $homedir, $buildnumber, $tempdir, $rootdir;
Expand Down
2 changes: 1 addition & 1 deletion config-defaults.php
Expand Up @@ -466,7 +466,7 @@
$tempdir = "$rootdir".DIRECTORY_SEPARATOR."tmp"; // The physical location where LimeSurvey can store temporary files
// Note: For OS/2 the $tempdir may need to be defined as an actual directory
// example: "x:/limesurvey/tmp". We don't know why.
$fckeditordir = "$homeurl/scripts/fckeditor.266";
$sFCKEditorURL = "$homeurl/scripts/fckeditor.266";
$fckeditexpandtoolbar = true; // defines if the FCKeditor toolbar should be opened by default
$pdfexportdir = "$homedir/classes/tcpdf"; //Directory with the tcpdf.php extensiontcpdf.php
$pdffonts = $pdfexportdir.'/fonts'; //Directory for the TCPDF fonts
Expand Down

0 comments on commit 277e949

Please sign in to comment.