diff options
Diffstat (limited to 'h-source')
-rwxr-xr-x | h-source/.htaccess | 15 | ||||
-rw-r--r-- | h-source/Application/Controllers/WikiController.php | 2 | ||||
-rwxr-xr-x | h-source/Application/Hooks/BeforeChecks.php | 2 | ||||
-rwxr-xr-x | h-source/Config/Config.php | 8 | ||||
-rwxr-xr-x | h-source/Library/Call.php | 8 | ||||
-rwxr-xr-x | h-source/Library/Functions.php | 5 | ||||
-rwxr-xr-x | h-source/Library/Helper/List.php | 2 | ||||
-rwxr-xr-x | h-source/Library/Helper/Menu.php | 2 | ||||
-rwxr-xr-x | h-source/Library/Helper/Popup.php | 4 | ||||
-rwxr-xr-x | h-source/Library/Theme.php | 6 | ||||
-rw-r--r-- | h-source/README.org | 18 | ||||
-rw-r--r-- | h-source/admin/Application/Include/myFunctions.php | 12 | ||||
-rwxr-xr-x | h-source/admin/Config/Config.php | 8 | ||||
-rwxr-xr-x | h-source/admin/Library/Helper/Popup.php | 4 | ||||
-rwxr-xr-x | h-source/admin/Library/Theme.php | 4 | ||||
-rwxr-xr-x | h-source/admin/Library/Url.php | 2 | ||||
-rw-r--r-- | h-source/config.xml | 78 | ||||
-rw-r--r-- | h-source/mark-staging.patch | 83 |
18 files changed, 176 insertions, 87 deletions
diff --git a/h-source/.htaccess b/h-source/.htaccess index 56ccf22..95ab62f 100755 --- a/h-source/.htaccess +++ b/h-source/.htaccess @@ -1,14 +1,5 @@ RewriteEngine On -RewriteCond %{HTTPS} !^on$ -RewriteRule (.*) https://www.h-node.org/$1 [R,L] - -# <IfModule mod_rewrite.c> -# Options +FollowSymlinks -# RewriteEngine on - RewriteCond %{REQUEST_FILENAME} !-f - RewriteCond %{REQUEST_FILENAME} !-d - RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] -# </IfModule> - - +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ index.php?url=$1 [QSA,L] diff --git a/h-source/Application/Controllers/WikiController.php b/h-source/Application/Controllers/WikiController.php index 5dc05b8..f3da19f 100644 --- a/h-source/Application/Controllers/WikiController.php +++ b/h-source/Application/Controllers/WikiController.php @@ -496,7 +496,7 @@ class WikiController extends BaseController // if ($this->m['WikitalkModel']->queryResult) // { -// header('Refresh: 0;url=http://'.DOMAIN_NAME.$_SERVER['REQUEST_URI']); +// header('Refresh: 0;url='.$_SERVER['REQUEST_URI']); // die(); // } } diff --git a/h-source/Application/Hooks/BeforeChecks.php b/h-source/Application/Hooks/BeforeChecks.php index 6f200e6..47e7936 100755 --- a/h-source/Application/Hooks/BeforeChecks.php +++ b/h-source/Application/Hooks/BeforeChecks.php @@ -13,7 +13,7 @@ if (!defined('EG')) die('Direct access not allowed!'); Params::$htmlentititiesCharset = "UTF-8"; -Params::$useHttps = true; +Params::$useHttps = false; Params::$allowedSanitizeFunc .= ",sanitizeString,sanitizeAlphanum"; diff --git a/h-source/Config/Config.php b/h-source/Config/Config.php index bea5562..1290751 100755 --- a/h-source/Config/Config.php +++ b/h-source/Config/Config.php @@ -23,10 +23,10 @@ if (!defined('EG')) die('Direct access not allowed!'); -define('DB', ''); -define('USER', ''); +define('DB', 'hnode'); +define('USER', 'root'); define('PWD', ''); -define('HOST', ''); +define('HOST', 'localhost'); /*default controller name*/ define('DEFAULT_CONTROLLER','home'); @@ -35,7 +35,7 @@ define('DEFAULT_CONTROLLER','home'); define('DEFAULT_ACTION','index'); /*website parameters*/ -define('DOMAIN_NAME','h-source'); +define('DOMAIN_NAME','localhost'); /*type of database.*/ //it can be: Mysql, Mysqli or None (first letter in uppercase) diff --git a/h-source/Library/Call.php b/h-source/Library/Call.php index c75508b..a9145c2 100755 --- a/h-source/Library/Call.php +++ b/h-source/Library/Call.php @@ -257,7 +257,7 @@ function getQueryString() return ''; } -function __autoload($className) +function autoloader($className) { $backupName = $className; @@ -290,6 +290,7 @@ function __autoload($className) } } +spl_autoload_register('autoloader'); try { @@ -324,7 +325,8 @@ try { //load the files defined inside Config/Autoload.php foreach (Autoload::$files as $file) { - $ext = strtolower(end(explode('.', $file))); + $parts = explode('.', $file); + $ext = strtolower(end($parts)); $path = ROOT . DS . APPLICATION_PATH . DS . 'Include' . DS . $file; if (file_exists($path) and $ext === 'php') { @@ -354,4 +356,4 @@ try { echo '<div class="alert">Message: '.$e->getMessage().'</div>'; -}
\ No newline at end of file +} diff --git a/h-source/Library/Functions.php b/h-source/Library/Functions.php index 1477680..e0e77bf 100755 --- a/h-source/Library/Functions.php +++ b/h-source/Library/Functions.php @@ -107,9 +107,6 @@ SANITIZE DEEP */ function stripslashesDeep($value) { - if(get_magic_quotes_gpc()) {#if stripslashes - return array_map('stripslashes', $value); - } return $value; } @@ -304,4 +301,4 @@ function xml_encode($string) } return strtr($string, $trans); -}
\ No newline at end of file +} diff --git a/h-source/Library/Helper/List.php b/h-source/Library/Helper/List.php index ba59643..57aeeff 100755 --- a/h-source/Library/Helper/List.php +++ b/h-source/Library/Helper/List.php @@ -73,7 +73,7 @@ class Helper_List extends Helper_Html { //get the generic language class $this->strings = Factory_Strings::generic(Params::$language); - $baseUrl = 'http://'.DOMAIN_NAME.'/Public/Img/Icons/elementary_2_5/'; + $baseUrl = '/Public/Img/Icons/elementary_2_5/'; //set the files of the images $this->submitImages = array( diff --git a/h-source/Library/Helper/Menu.php b/h-source/Library/Helper/Menu.php index 8fd4bf4..86ee24a 100755 --- a/h-source/Library/Helper/Menu.php +++ b/h-source/Library/Helper/Menu.php @@ -36,7 +36,7 @@ class Helper_Menu extends Helper_Html public function __construct() { - $baseUrl = "http://".DOMAIN_NAME.'/Public/Img/Icons/elementary_2_5/'; + $baseUrl = '/Public/Img/Icons/elementary_2_5/'; //get the generic language class $this->strings = Factory_Strings::generic(Params::$language); diff --git a/h-source/Library/Helper/Popup.php b/h-source/Library/Helper/Popup.php index 18bb00d..43140fe 100755 --- a/h-source/Library/Helper/Popup.php +++ b/h-source/Library/Helper/Popup.php @@ -133,10 +133,10 @@ class Helper_Popup extends Helper_Html { $returnString .= "</div>\n"; } if (count($this->popupArray)>0) { - $returnString .= "<script type=\"text/javascript\" src=\"http://".DOMAIN_NAME."/Public/Js/DisplayTag.js\"></script>\n"; + $returnString .= "<script type=\"text/javascript\" src=\"/Public/Js/DisplayTag.js\"></script>\n"; } } return $returnString; } -}
\ No newline at end of file +} diff --git a/h-source/Library/Theme.php b/h-source/Library/Theme.php index 10c0fce..fe938ee 100755 --- a/h-source/Library/Theme.php +++ b/h-source/Library/Theme.php @@ -39,11 +39,9 @@ class Theme { function __construct($controller) { - $protocol = Params::$useHttps ? "https" : "http"; - $this->controller = $controller; - $this->baseUrl = MOD_REWRITE_MODULE === true ? "$protocol://" . DOMAIN_NAME : "$protocol://" . DOMAIN_NAME . '/index.php'; - $this->baseUrlSrc = "$protocol://" . DOMAIN_NAME; + $this->baseUrl = MOD_REWRITE_MODULE === true ? '': '/index.php'; + $this->baseUrlSrc = ''; } diff --git a/h-source/README.org b/h-source/README.org new file mode 100644 index 0000000..d3b2821 --- /dev/null +++ b/h-source/README.org @@ -0,0 +1,18 @@ +* Php module dependencies + +It is not clear what are the exact php modules required for the site to run. On a Trisquel 9 VM typically it is sufficient to have the following extra modules installed on top of a standard php 7 installation: + +- php-gd +- php-mbstring +- php-mysql +- php-xml + +Help with formalizing the module dependencies is appreciated. + +* Staging deployment patch + +When deploying to staging, run + +#+begin_src sh + patch -p2 <mark-staging.patch +#+end_src diff --git a/h-source/admin/Application/Include/myFunctions.php b/h-source/admin/Application/Include/myFunctions.php index ab32bbf..355c181 100644 --- a/h-source/admin/Application/Include/myFunctions.php +++ b/h-source/admin/Application/Include/myFunctions.php @@ -166,7 +166,7 @@ function getLinkToUser($user) } else { - return "<a href='http://".DOMAIN_NAME."/users/meet/".Lang::$current."/$user'>$user</a>"; + return "<a href='/users/meet/".Lang::$current."/$user'>$user</a>"; } } @@ -271,7 +271,7 @@ function linkToNotebook($match) $hardware = new HardwareModel(); $clean['id_hard'] = (int)$match[2]; $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); - $href = "HTTP://".DOMAIN_NAME."/notebooks/view/".Lang::$current."/".$clean['id_hard']."/$name"; + $href = "/notebooks/view/".Lang::$current."/".$clean['id_hard']."/$name"; return (strcmp($name,'') !== 0) ? "<a title = 'link to notebook $name: $href' href='$href'>".$name."</a>" : $match[0]; } @@ -281,7 +281,7 @@ function linkToWifi($match) $hardware = new HardwareModel(); $clean['id_hard'] = (int)$match[2]; $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); - $href = "HTTP://".DOMAIN_NAME."/wifi/view/".Lang::$current."/".$clean['id_hard']."/$name"; + $href = "/wifi/view/".Lang::$current."/".$clean['id_hard']."/$name"; return (strcmp($name,'') !== 0) ? "<a title = 'link to wifi card $name: $href' href='$href'>".$name."</a>" : $match[0]; } @@ -291,7 +291,7 @@ function linkToVideocard($match) $hardware = new HardwareModel(); $clean['id_hard'] = (int)$match[2]; $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); - $href = "HTTP://".DOMAIN_NAME."/videocards/view/".Lang::$current."/".$clean['id_hard']."/$name"; + $href = "/videocards/view/".Lang::$current."/".$clean['id_hard']."/$name"; return (strcmp($name,'') !== 0) ? "<a title = 'link to video card $name: $href' href='$href'>".$name."</a>" : $match[0]; } @@ -309,10 +309,10 @@ function getMotivation($row,$controller) $clean['id_hard'] = (int)$row['deletion']['id_duplicate']; $hardware = new HardwareModel(); $name = encodeUrl($hardware->getTheModelName($clean['id_hard'])); - return "<b>duplication</b> of the model having id <b><a href='http://".DOMAIN_NAME."/".$controller."/view/".Lang::$current."/".$clean['id_hard']."/".$name."'>".$clean['id_hard']."</a></b>"; + return "<b>duplication</b> of the model having id <b><a href='/".$controller."/view/".Lang::$current."/".$clean['id_hard']."/".$name."'>".$clean['id_hard']."</a></b>"; } else { return "<b>".$row['deletion']['object']."</b>"; } -}
\ No newline at end of file +} diff --git a/h-source/admin/Config/Config.php b/h-source/admin/Config/Config.php index 24d2e57..3f7866d 100755 --- a/h-source/admin/Config/Config.php +++ b/h-source/admin/Config/Config.php @@ -6,10 +6,10 @@ if (!defined('EG')) die('Direct access not allowed!'); -define('DB', ''); -define('USER', ''); +define('DB', 'hnode'); +define('USER', 'root'); define('PWD', ''); -define('HOST', ''); +define('HOST', 'localhost'); /*default controller name*/ define('DEFAULT_CONTROLLER','adminusers'); @@ -18,7 +18,7 @@ define('DEFAULT_CONTROLLER','adminusers'); define('DEFAULT_ACTION','login'); /*website parameters*/ -define('DOMAIN_NAME','h-source/admin'); +define('DOMAIN_NAME','localhost/admin'); /*type of database.*/ //it can be: Mysql, Mysqli or None (first letter in uppercase) diff --git a/h-source/admin/Library/Helper/Popup.php b/h-source/admin/Library/Helper/Popup.php index 9ceac72..17ba908 100755 --- a/h-source/admin/Library/Helper/Popup.php +++ b/h-source/admin/Library/Helper/Popup.php @@ -78,10 +78,10 @@ class Helper_Popup extends Helper_Html { $this->viewArgs[$field] = $tempArg; } if (count($this->popupArray)>0) { - $returnString .= "<script type=\"text/javascript\" src=\"http://".DOMAIN_NAME."/Public/Js/DisplayTag.js\"></script>\n"; + $returnString .= "<script type=\"text/javascript\" src=\"/admin/Public/Js/DisplayTag.js\"></script>\n"; } } return $returnString; } -}
\ No newline at end of file +} diff --git a/h-source/admin/Library/Theme.php b/h-source/admin/Library/Theme.php index 692697e..afa3660 100755 --- a/h-source/admin/Library/Theme.php +++ b/h-source/admin/Library/Theme.php @@ -22,8 +22,8 @@ class Theme { function __construct($controller) { $this->controller = $controller; - $this->baseUrl = MOD_REWRITE_MODULE === true ? 'http://' . DOMAIN_NAME : 'http://' . DOMAIN_NAME . '/index.php'; - $this->baseUrlSrc = 'http://' . DOMAIN_NAME; + $this->baseUrl = MOD_REWRITE_MODULE === true ? '/admin' : '/admin/index.php'; + $this->baseUrlSrc = '/admin'; } diff --git a/h-source/admin/Library/Url.php b/h-source/admin/Library/Url.php index 4e2ca5e..54d6e3e 100755 --- a/h-source/admin/Library/Url.php +++ b/h-source/admin/Library/Url.php @@ -9,7 +9,7 @@ class Url { //get the url starting from the root folder public static function getRoot($pathFromRootFolder = null) { - $url = MOD_REWRITE_MODULE === true ? 'http://' . DOMAIN_NAME . '/' . $pathFromRootFolder : 'http://' . DOMAIN_NAME . '/index.php/' . $pathFromRootFolder; + $url = MOD_REWRITE_MODULE === true ? '/admin/' . $pathFromRootFolder : '/admin/index.php/' . $pathFromRootFolder; return $url; } diff --git a/h-source/config.xml b/h-source/config.xml index 8c3eb18..8f87304 100644 --- a/h-source/config.xml +++ b/h-source/config.xml @@ -5,35 +5,35 @@ <mod> <type>TopLink</type> <text>Help</text> - <href><![CDATA[https://h-node.org/help/page/en/Help]]></href> + <href><![CDATA[/help/page/en/Help]]></href> </mod> </en> <it> <mod> <type>TopLink</type> <text>Aiuto</text> - <href><![CDATA[https://h-node.org/help/page/it/Help]]></href> + <href><![CDATA[/help/page/it/Help]]></href> </mod> </it> <es> <mod> <type>TopLink</type> <text>Ayuda</text> - <href><![CDATA[https://h-node.org/help/page/es/Help]]></href> + <href><![CDATA[/help/page/es/Help]]></href> </mod> </es> <fr> <mod> <type>TopLink</type> <text>Télécharger</text> - <href><![CDATA[https://h-node.org/help/page/fr/Help]]></href> + <href><![CDATA[/help/page/fr/Help]]></href> </mod> </fr> <gr> <mod> <type>TopLink</type> <text>Βοήθεια</text> - <href><![CDATA[https://h-node.org/help/page/gr/Help]]></href> + <href><![CDATA[/help/page/gr/Help]]></href> </mod> </gr> </help_page_link> @@ -42,35 +42,35 @@ <mod> <type>TopLink</type> <text>FAQ</text> - <href><![CDATA[https://h-node.org/faq/page/en/FAQ]]></href> + <href><![CDATA[/faq/page/en/FAQ]]></href> </mod> </en> <it> <mod> <type>TopLink</type> <text>FAQ</text> - <href><![CDATA[https://h-node.org/faq/page/it/FAQ]]></href> + <href><![CDATA[/faq/page/it/FAQ]]></href> </mod> </it> <es> <mod> <type>TopLink</type> <text>FAQ</text> - <href><![CDATA[https://h-node.org/faq/page/es/FAQ]]></href> + <href><![CDATA[/faq/page/es/FAQ]]></href> </mod> </es> <fr> <mod> <type>TopLink</type> <text>FAQ</text> - <href><![CDATA[https://h-node.org/faq/page/fr/FAQ]]></href> + <href><![CDATA[/faq/page/fr/FAQ]]></href> </mod> </fr> <gr> <mod> <type>TopLink</type> <text>FAQ</text> - <href><![CDATA[https://h-node.org/faq/page/gr/FAQ]]></href> + <href><![CDATA[/faq/page/gr/FAQ]]></href> </mod> </gr> </faq_link> @@ -128,7 +128,7 @@ <type>raw</type> <div>discover_hardware</div> <text><![CDATA[ - <a href="https://h-node.org/wiki/page/en/Discover-your-hardware"><img src="https://h-node.org/Public/Img/discover.png"></a> + <a href="/wiki/page/en/Discover-your-hardware"><img src="/Public/Img/discover.png"></a> ]]></text> </mod> </en> @@ -155,7 +155,7 @@ <text><![CDATA[ <div style="margin:3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">subscribe to our</div> <div style="background:#B7F18C;padding:5px 10px;text-align:left;border-top:2px solid #015512;"> - <a href="https://h-node.org/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="https://h-node.org/Public/Img/mailing.png"></a> + <a href="/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="/Public/Img/mailing.png"></a> </div> ]]></text> @@ -166,7 +166,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">client for h-node</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Please help in the development of the client for h-node (h-client project). See <a href="https://h-node.org/wiki/page/en/client-for-h-node-com">here</a> and <a href="http://savannah.nongnu.org/projects/h-client/">here</a> + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Please help in the development of the client for h-node (h-client project). See <a href="/wiki/page/en/client-for-h-node-com">here</a> and <a href="http://savannah.nongnu.org/projects/h-client/">here</a> </div> ]]></text> @@ -177,7 +177,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">related projects</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Please help in the development of the <a href="https://h-node.org/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a> software, a different h-node client + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Please help in the development of the <a href="/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a> software, a different h-node client </div> ]]></text> @@ -189,7 +189,7 @@ <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">download the source code</div> <div style="text-align:left;border-top:2px solid #FF4500;padding:4px 4px 0px 4px;"> - <a href="https://h-node.org/source/notes_0.2.html"><img width="180px" src="https://h-node.org/Public/Img/download_code_gpl3.png"></a> + <a href="/source/notes_0.2.html"><img width="180px" src="/Public/Img/download_code_gpl3.png"></a> </div> ]]></text> @@ -272,7 +272,7 @@ <text><![CDATA[ <div style="margin:3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">iscriviti alla nostra</div> <div style="background:#B7F18C;padding:5px 10px;text-align:left;border-top:2px solid #015512;"> - <a href="https://h-node.org/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="https://h-node.org/Public/Img/mailing.png"></a> + <a href="/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="/Public/Img/mailing.png"></a> </div> ]]></text> @@ -283,7 +283,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">client per h-node</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Puoi aiutare nello sviluppo del client per h-node (progetto h-client). Leggi <a href="https://h-node.org/wiki/page/en/client-for-h-node-com">qui</a> e <a href="http://savannah.nongnu.org/projects/h-client/">qui</a> + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Puoi aiutare nello sviluppo del client per h-node (progetto h-client). Leggi <a href="/wiki/page/en/client-for-h-node-com">qui</a> e <a href="http://savannah.nongnu.org/projects/h-client/">qui</a> </div> ]]></text> @@ -294,7 +294,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">progetti correlati</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Puoi aiutare nello sviluppo del software <a href="https://h-node.org/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a>, un diverso client per h-node + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Puoi aiutare nello sviluppo del software <a href="/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a>, un diverso client per h-node </div> ]]></text> @@ -306,7 +306,7 @@ <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">scarica il codice sorgente</div> <div style="text-align:left;border-top:2px solid #FF4500;padding:4px 4px 0px 4px;"> - <a href="https://h-node.org/source/notes_0.2.html"><img width="180px" src="https://h-node.org/Public/Img/download_code_gpl3.png"></a> + <a href="/source/notes_0.2.html"><img width="180px" src="/Public/Img/download_code_gpl3.png"></a> </div> ]]></text> @@ -389,7 +389,7 @@ <text><![CDATA[ <div style="margin:3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">suscríbase a nuestra</div> <div style="background:#B7F18C;padding:5px 10px;text-align:left;border-top:2px solid #015512;"> - <a href="https://h-node.org/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="https://h-node.org/Public/Img/mailing.png"></a> + <a href="/wiki/page/en/mailing-lists"><img height="50px" align="middle" src="/Public/Img/mailing.png"></a> </div> ]]></text> @@ -400,7 +400,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">cliente para h-node</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Por favor ayude en el desarrollo del cliente de h-node (proyecto h-client). Vea <a href="https://h-node.org/wiki/page/en/client-for-h-node-com">aquí</a> y <a href="http://savannah.nongnu.org/projects/h-client/">aquí</a> + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Por favor ayude en el desarrollo del cliente de h-node (proyecto h-client). Vea <a href="/wiki/page/en/client-for-h-node-com">aquí</a> y <a href="http://savannah.nongnu.org/projects/h-client/">aquí</a> </div> ]]></text> @@ -411,7 +411,7 @@ <type>raw</type> <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">proyectos relacionados</div> - <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Por favor ayuda en el desarrollo del programa <a href="https://h-node.org/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a>, un cliente diferente para h-node + <div style="text-align:left;border-top:2px solid #1E90FF;padding:4px 4px 4px 8px;background:#E0FFFF;font:normal 12px/1.5 sans-serif,arial,Verdana;">Por favor ayuda en el desarrollo del programa <a href="/source/ht/ismyhwok_25thSep2010-1.tar.gz">IsMyHWOK</a>, un cliente diferente para h-node </div> ]]></text> @@ -423,7 +423,7 @@ <text><![CDATA[ <div style="margin:16px 0px 3px 0px;text-align:left;font:normal 14px/1 sans-serif,arial,Verdana;">descargue el código fuente</div> <div style="text-align:left;border-top:2px solid #FF4500;padding:4px 4px 0px 4px;"> - <a href="https://h-node.org/source/notes_0.2.html"><img width="180px" src="https://h-node.org/Public/Img/download_code_gpl3.png"></a> + <a href="/source/notes_0.2.html"><img width="180px" src="/Public/Img/download_code_gpl3.png"></a> </div> ]]></text> @@ -492,13 +492,13 @@ <en> <mod> <type>raw</type> - <text><![CDATA[ please read the <a href="https://h-node.org/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page">guidelines on how to compile a hardware device page</a> ]]></text> + <text><![CDATA[ please read the <a href="/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page">guidelines on how to compile a hardware device page</a> ]]></text> </mod> </en> <it> <mod> <type>raw</type> - <text><![CDATA[ per favore leggi la <a href="https://h-node.org/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page">guida su come compilare una pagina di hardware</a> ]]></text> + <text><![CDATA[ per favore leggi la <a href="/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page">guida su come compilare una pagina di hardware</a> ]]></text> </mod> </it> </how_to_compile> @@ -506,19 +506,19 @@ <en> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/help/page/en/discover-your-hardware#The%20model%20name%20of%20your%20notebook" target="_blank">learn how to find it</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/help/page/en/discover-your-hardware#The%20model%20name%20of%20your%20notebook" target="_blank">learn how to find it</a> ]]></text> </mod> </en> <it> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/help/page/en/Scopri-il-tuo-hardware#Il%20modello%20del%20tuo%20notebook" target="_blank">scopri come individuarlo</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/help/page/en/Scopri-il-tuo-hardware#Il%20modello%20del%20tuo%20notebook" target="_blank">scopri come individuarlo</a> ]]></text> </mod> </it> <es> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/help/page/en/Descubra-su-hardware#El%20modelo%20de%20su%20computador%20port%C3%A1til" target="_blank">aprenda como encontrarlo</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/help/page/en/Descubra-su-hardware#El%20modelo%20de%20su%20computador%20port%C3%A1til" target="_blank">aprenda como encontrarlo</a> ]]></text> </mod> </es> </model_name_entry_help_label> @@ -526,37 +526,37 @@ <en> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/wiki-tutorial">discover all the wiki tags</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/wiki-tutorial">discover all the wiki tags</a> ]]></text> </mod> </en> <it> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/it/tutorial-della-wiki">scopri tutti i tag della wiki</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/it/tutorial-della-wiki">scopri tutti i tag della wiki</a> ]]></text> </mod> </it> <es> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/es/tutorial-del-wiki">mostrar todas las etiquetas del wiki</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/es/tutorial-del-wiki">mostrar todas las etiquetas del wiki</a> ]]></text> </mod> </es> <fr> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/wiki-tutorial">voir tous les tags wiki</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/wiki-tutorial">voir tous les tags wiki</a> ]]></text> </mod> </fr> <de> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/wiki-tutorial">Wiki-Elemente</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/wiki-tutorial">Wiki-Elemente</a> ]]></text> </mod> </de> <gr> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/wiki-tutorial">Wiki-Elemente</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/wiki-tutorial">Wiki-Elemente</a> ]]></text> </mod> </gr> </description_entry_help_label> @@ -641,19 +641,19 @@ <en> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/discover-your-hardware#The%20VendorID:ProductID%20code%20of%20your%20device" target="blank">learn how to find it</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/discover-your-hardware#The%20VendorID:ProductID%20code%20of%20your%20device" target="blank">learn how to find it</a> ]]></text> </mod> </en> <it> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/Scopri-il-tuo-hardware#Il%20codice%20VendorID:ProductID%20del%20tuo%20dispositivo" target="blank">scopri come individuarlo</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/Scopri-il-tuo-hardware#Il%20codice%20VendorID:ProductID%20del%20tuo%20dispositivo" target="blank">scopri come individuarlo</a> ]]></text> </mod> </it> <es> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/Descubra-su-hardware#El%20c%C3%B3digo%20VendorID:ProductID%20de%20su%20dispositivo" target="blank">aprenda como encontrarlo</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/Descubra-su-hardware#El%20c%C3%B3digo%20VendorID:ProductID%20de%20su%20dispositivo" target="blank">aprenda como encontrarlo</a> ]]></text> </mod> </es> </vendorid_productid_label> @@ -665,13 +665,13 @@ <en> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page#Does%20the%20device%20prevent%20the%20installation%20of%20wifi%20cards%20not-approved%20by%20the%20vendor?" target="_blank">learn how to fill this entry</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/en/guidelines-on-how-to-compile-a-hardware-device-page#Does%20the%20device%20prevent%20the%20installation%20of%20wifi%20cards%20not-approved%20by%20the%20vendor?" target="_blank">learn how to fill this entry</a> ]]></text> </mod> </en> <it> <mod> <type>raw</type> - <text><![CDATA[ <a target="_blank" href="https://h-node.org/wiki/page/it/guidelines-on-how-to-compile-a-hardware-device-page#Does%20the%20device%20prevent%20the%20installation%20of%20wifi%20cards%20not-approved%20by%20the%20vendor?" target="_blank">guida su come scegliere questo campo</a> ]]></text> + <text><![CDATA[ <a target="_blank" href="/wiki/page/it/guidelines-on-how-to-compile-a-hardware-device-page#Does%20the%20device%20prevent%20the%20installation%20of%20wifi%20cards%20not-approved%20by%20the%20vendor?" target="_blank">guida su come scegliere questo campo</a> ]]></text> </mod> </it> </prevent_wifi_label> diff --git a/h-source/mark-staging.patch b/h-source/mark-staging.patch new file mode 100644 index 0000000..d55e607 --- /dev/null +++ b/h-source/mark-staging.patch @@ -0,0 +1,83 @@ +From 4eccedeb80e83cf6e6b276a4ee91ee1efd603d5d Mon Sep 17 00:00:00 2001 +From: Yuchen Pei <hi@ypei.me> +Date: Wed, 22 Sep 2021 12:23:40 +1000 +Subject: [PATCH] Adding prominant notice that the site is staging. + +And directing visitors to the official site. +--- + h-source/Application/Include/params.php | 4 ++-- + h-source/Application/Views/Desktop/header.php | 1 + + h-source/Application/Views/Mobile/header.php | 4 +++- + h-source/config.xml | 9 +++++++++ + 4 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/h-source/Application/Include/params.php b/h-source/Application/Include/params.php +index 19f1ed7..29cdc6c 100644 +--- a/h-source/Application/Include/params.php ++++ b/h-source/Application/Include/params.php +@@ -26,7 +26,7 @@ class Website + + static public $fromEmail = "noreply@h-node.org"; + +- static public $generalName = "h-node.org"; ++ static public $generalName = "h-node.org STAGING"; + + static public $projectName = "h-node"; + +@@ -225,4 +225,4 @@ class Account + $result = $mailer->batchSend($message); + + } +-} +\ No newline at end of file ++} +diff --git a/h-source/Application/Views/Desktop/header.php b/h-source/Application/Views/Desktop/header.php +index d153840..2a20ef6 100644 +--- a/h-source/Application/Views/Desktop/header.php ++++ b/h-source/Application/Views/Desktop/header.php +@@ -105,6 +105,7 @@ $currPos = $querySanitized ? $this->controller."/".$this->action : 'home/index'; + <div id="external_header"> + <div id="header"> + <img style="float:left;" src="<?php echo $this->baseUrl;?>/Public/Img/title.png"> ++ <span style="font-size: 400%;">STAGING</span> + <a href="http://www.fsf.org"><img style="float:right;" src="<?php echo $this->baseUrl;?>/Public/Img/fsf_logo.png"></a> + </div> + </div> +diff --git a/h-source/Application/Views/Mobile/header.php b/h-source/Application/Views/Mobile/header.php +index 446f820..ac66d27 100644 +--- a/h-source/Application/Views/Mobile/header.php ++++ b/h-source/Application/Views/Mobile/header.php +@@ -89,7 +89,9 @@ $currPos = $querySanitized ? $this->controller."/".$this->action : 'home/index'; + <div data-role="page" data-theme="d"> + <div data-role="header"> + <div class="ui-grid-a"> +- <div class="ui-block-a"><img style="padding-top:5px;" width="110px" src="<?php echo $this->baseUrl;?>/Public/Img/title.png"></div> ++ <div class="ui-block-a"><img style="padding-top:5px;" width="110px" src="<?php echo $this->baseUrl;?>/Public/Img/title.png"> ++ <span style="font-size: 300%; vertical-align:top;">STAGING</span> ++ </div> + <div class="ui-block-b"><a href="http://www.fsf.org"><img style="padding-top:10px;" width="150px" src="<?php echo $this->baseUrl;?>/Public/Img/fsf_logo.png"></a></div> + </div><!-- /grid-a --> + +diff --git a/h-source/config.xml b/h-source/config.xml +index 8f87304..159eef5 100644 +--- a/h-source/config.xml ++++ b/h-source/config.xml +@@ -77,6 +77,15 @@ + </top_menu> + <top_news> + <en> ++ <mod> ++ <type>raw</type> ++ <text><![CDATA[ ++ ++ <div style="padding:0.5em;background:#FFA07A;margin:0.5em;border-top:1px solid #FF4500;border-bottom:1px solid #FF4500;color:#DC143C;font-size:16px;">This is a staging instance of h-node. For the official site please visit <a href="https://h-node.org">h-node.org</a>. ++ </div> ++ ++ ]]></text> ++ </mod> + <mod> + <type>raw</type> + <text><![CDATA[ +-- +2.33.0 + |