Skip to content
This repository has been archived by the owner on Jul 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request gladclef#1 from thekrampus/master
Browse files Browse the repository at this point in the history
Doing it with wild abandon. I will "deploy" to "production" today and see what happens.
  • Loading branch information
jcrawfordor committed Aug 17, 2015
2 parents a43cb73 + b60f343 commit d3f9eeb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion help.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function draw_jquery($block_style) {
This page will not work very will until jquery has been set up.<br />
To use jquery, create a file in
<div style='display:inline-block; font-family:monospace;'>
/some/path/banwebplus/server_config.ini
/some/path/banwebplus/resources/server_config.ini
</div>
with the following line:<br />
<div style='display:inline-block; font-family:monospace;'>
Expand Down
2 changes: 1 addition & 1 deletion pages/users/forgot_password.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function change_input(select_element) {
var jselect = $(select_element);
var option = jselect.val().toLowerCase();
var all = $(".credential_type");
var others = [];
var others = array();
var joption = $("#"+option);

// get a list of the other options and store values
Expand Down
2 changes: 1 addition & 1 deletion resources/ajax_calls.php
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ function load_shared_user_schedules() {

// build the list of commands and what to say to the guest
$sgc = json_encode(array(new command("failure", "")));
$no_nos = [];
$no_nos = array();
$no_nos_base = array(
array('save_classes', 'load_user_classes',
json_encode(array(new command("failure", "Guest can't save classes")))),
Expand Down
2 changes: 1 addition & 1 deletion resources/db_query.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function open_db() {
return TRUE;
}

$a_configs = [];
$a_configs = array();
$filename = dirname(__FILE__)."/mysql_config.ini";
if (file_exists($filename)) {
$a_configs = parse_ini_file($filename);
Expand Down
2 changes: 1 addition & 1 deletion resources/globals.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function define_global_vars() {
$global_loaded_server_settings = FALSE;
$mysqli = NULL;

$a_configs = [];
$a_configs = array();
$filename = dirname(__FILE__) . "/server_config.ini";
if (file_exists($filename)) {
$a_configs = parse_ini_file($filename);
Expand Down
7 changes: 4 additions & 3 deletions scraping/new_mexico_tech_banweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ def writeSelectToFile(selectArray, filename, path, title):
f.write(title+" = [['")
optionStrings = []
for optionParts in selectArray:
optionStrings.append("','".join(optionParts))
sanitizedParts = [ p.replace('"', '\\"').replace("'", "\\'") for p in optionParts ]
optionStrings.append("','".join(sanitizedParts))
f.write("'],\n\t['".join(optionStrings))
f.write("']]")
f.close()
Expand Down Expand Up @@ -158,7 +159,7 @@ def getTerm(semester, subjects, parser):
url = "http://banweb7.nmt.edu/pls/PROD/hwzkcrof.P_UncgSrchCrsOff?p_term="+t.getSemester()+"&p_subj="+subjectName.replace(" ", "%20")
print url
page = urllib2.urlopen(url)
soup = BeautifulSoup(page)
soup = BeautifulSoup(page, "lxml")
trs = soup.findAll("tr")
trs = trs[1:] #discard the retarded row that banweb is retarded about
print_verbose("adding subject "+subjectName)
Expand All @@ -178,7 +179,7 @@ def main(parser):

page = urllib2.urlopen(url)

soup = BeautifulSoup(page)
soup = BeautifulSoup(page, "lxml")

path = ""
if (type(parser.path) == type("")):
Expand Down

0 comments on commit d3f9eeb

Please sign in to comment.